From 112b0ae22de592b2400bd66867941b130184852f Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 18:39:07 -0400 Subject: [PATCH 01/15] feat(phase1): add ANTLR4 parser, OMG stdlib embedding, and lint command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Download SysMLv2Lexer.g4 + SysMLv2Parser.g4 from daltskin/sysml-v2-grammar commit bac7eb87 (OMG 2026-04 release) - Generate C# parser via ANTLR4 4.13.1 + JDK 25; committed to Parser/Generated/ - Add Parser/Generated/.editorconfig to suppress CS1584/CS1658/CS3021 for generated code (not modifying generated files) - Embed 94 OMG stdlib files (58 SysML + 36 KerML) as assembly resources - Add Grammar/README.md documenting versions and regeneration instructions - Implement WorkspaceParser: parse .sysml files via ANTLR4, report diagnostics - Implement StdlibLoader: load embedded SysML stdlib files at runtime (KerML files embedded but deferred to Phase 2 — require separate grammar) - Add SysmlDiagnostic, DiagnosticSeverity, WorkspaceParseResult public types - Implement lint command: resolve file patterns, parse workspace, report errors - Update Context to support 'lint' subcommand and positional file arguments - Add 7 WorkspaceParserTests including stdlib-parses-cleanly gate - Phase 1 gate: all 58 SysML stdlib files parse without syntax errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .cspell.yaml | 7 + .../Cli/Context.cs | 52 +- .../Lint/LintCommand.cs | 100 + .../Program.cs | 20 +- .../DemaConsulting.SysML2Tools.csproj | 10 +- .../Grammar/README.md | 46 + .../Grammar/SysMLv2Lexer.g4 | 258 ++ .../Grammar/SysMLv2Parser.g4 | 2168 +++++++++++++ .../DiagnosticSeverity.cs} | 18 +- .../Parser/Internal/StdlibLoader.cs | 66 + .../Internal/SysmlDiagnosticListener.cs | 69 + .../Parser/SysmlDiagnostic.cs | 19 +- .../Parser/WorkspaceParseResult.cs | 53 + .../Parser/WorkspaceParser.cs | 107 + .../Analysis/AnalysisTooling.sysml | 34 + .../Analysis/SampledFunctions.sysml | 119 + .../Analysis/StateSpaceRepresentation.sysml | 143 + .../Analysis/TradeStudies.sysml | 171 ++ .../CausationConnections.sysml | 83 + .../Cause and Effect/CauseAndEffect.sysml | 81 + .../Geometry/ShapeItems.sysml | 899 ++++++ .../Geometry/SpatialItems.sysml | 168 + .../Metadata/ImageMetadata.sysml | 78 + .../Metadata/ModelingMetadata.sysml | 143 + .../ParametersOfInterestMetadata.sysml | 39 + .../Metadata/RiskMetadata.sysml | 100 + .../Quantities and Units/ISQ.sysml | 42 + .../Quantities and Units/ISQAcoustics.sysml | 439 +++ .../ISQAtomicNuclear.sysml | 2726 +++++++++++++++++ .../Quantities and Units/ISQBase.sysml | 206 ++ .../ISQCharacteristicNumbers.sysml | 1991 ++++++++++++ .../ISQChemistryMolecular.sysml | 1353 ++++++++ .../ISQCondensedMatter.sysml | 1223 ++++++++ .../ISQElectromagnetism.sysml | 2333 ++++++++++++++ .../Quantities and Units/ISQInformation.sysml | 958 ++++++ .../Quantities and Units/ISQLight.sysml | 1537 ++++++++++ .../Quantities and Units/ISQMechanics.sysml | 1564 ++++++++++ .../Quantities and Units/ISQSpaceTime.sysml | 1169 +++++++ .../ISQThermodynamics.sysml | 1256 ++++++++ .../MeasurementRefCalculations.sysml | 30 + .../MeasurementReferences.sysml | 526 ++++ .../Quantities and Units/Quantities.sysml | 107 + .../QuantityCalculations.sysml | 70 + .../Quantities and Units/SI.sysml | 378 +++ .../Quantities and Units/SIPrefixes.sysml | 48 + .../TensorCalculations.sysml | 50 + .../Quantities and Units/Time.sysml | 274 ++ .../USCustomaryUnits.sysml | 260 ++ .../VectorCalculations.sysml | 62 + .../DerivationConnections.sysml | 63 + .../RequirementDerivation.sysml | 39 + .../Collections.kerml | 147 + .../ScalarValues.kerml | 23 + .../VectorValues.kerml | 64 + .../BaseFunctions.kerml | 80 + .../BooleanFunctions.kerml | 22 + .../CollectionFunctions.kerml | 68 + .../ComplexFunctions.kerml | 47 + .../ControlFunctions.kerml | 117 + .../DataFunctions.kerml | 43 + .../IntegerFunctions.kerml | 43 + .../NaturalFunctions.kerml | 27 + .../NumericalFunctions.kerml | 43 + .../OccurrenceFunctions.kerml | 154 + .../RationalFunctions.kerml | 49 + .../RealFunctions.kerml | 56 + .../ScalarFunctions.kerml | 33 + .../SequenceFunctions.kerml | 111 + .../StringFunctions.kerml | 25 + .../TrigFunctions.kerml | 35 + .../VectorFunctions.kerml | 273 ++ .../Kernel Semantic Library/Base.kerml | 95 + .../Kernel Semantic Library/Clocks.kerml | 156 + .../ControlPerformances.kerml | 135 + .../FeatureReferencingPerformances.kerml | 190 ++ .../Kernel Semantic Library/KerML.kerml | 483 +++ .../Kernel Semantic Library/Links.kerml | 67 + .../Kernel Semantic Library/Metaobjects.kerml | 58 + .../Kernel Semantic Library/Objects.kerml | 212 ++ .../Kernel Semantic Library/Observation.kerml | 161 + .../Kernel Semantic Library/Occurrences.kerml | 992 ++++++ .../Performances.kerml | 293 ++ .../SpatialFrames.kerml | 197 ++ .../StatePerformances.kerml | 145 + .../Kernel Semantic Library/Transfers.kerml | 281 ++ .../TransitionPerformances.kerml | 66 + .../Kernel Semantic Library/Triggers.kerml | 188 ++ .../Stdlib/Systems Library/Actions.sysml | 552 ++++ .../Stdlib/Systems Library/Allocations.sysml | 29 + .../Systems Library/AnalysisCases.sysml | 38 + .../Stdlib/Systems Library/Attributes.sysml | 25 + .../Stdlib/Systems Library/Calculations.sysml | 37 + .../Stdlib/Systems Library/Cases.sysml | 71 + .../Stdlib/Systems Library/Connections.sysml | 60 + .../Stdlib/Systems Library/Constraints.sysml | 44 + .../Stdlib/Systems Library/Flows.sysml | 126 + .../Stdlib/Systems Library/Interfaces.sysml | 89 + .../Stdlib/Systems Library/Items.sysml | 153 + .../Stdlib/Systems Library/Metadata.sysml | 32 + .../Stdlib/Systems Library/Parts.sysml | 81 + .../Stdlib/Systems Library/Ports.sysml | 54 + .../Stdlib/Systems Library/Requirements.sysml | 194 ++ .../StandardViewDefinitions.sysml | 123 + .../Stdlib/Systems Library/States.sysml | 103 + .../Stdlib/Systems Library/SysML.sysml | 539 ++++ .../Stdlib/Systems Library/UseCases.sysml | 57 + .../Systems Library/VerificationCases.sysml | 103 + .../Stdlib/Systems Library/Views.sysml | 164 + .../Parser/WorkspaceParserTests.cs | 114 + 109 files changed, 31707 insertions(+), 15 deletions(-) create mode 100644 src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs create mode 100644 src/DemaConsulting.SysML2Tools/Grammar/README.md create mode 100644 src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Lexer.g4 create mode 100644 src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 rename src/DemaConsulting.SysML2Tools/{Placeholder.cs => Parser/DiagnosticSeverity.cs} (72%) create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Internal/StdlibLoader.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs rename test/DemaConsulting.SysML2Tools.Tests/Placeholder.cs => src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs (60%) create mode 100644 src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/AnalysisTooling.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/SampledFunctions.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/StateSpaceRepresentation.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/TradeStudies.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CausationConnections.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CauseAndEffect.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/ShapeItems.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/SpatialItems.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ImageMetadata.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ModelingMetadata.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/RiskMetadata.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQ.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAcoustics.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQBase.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQInformation.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQLight.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQMechanics.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementReferences.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Quantities.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/QuantityCalculations.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SI.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SIPrefixes.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/TensorCalculations.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Time.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/VectorCalculations.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/DerivationConnections.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/Collections.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/DataFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RealFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/StringFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Base.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Clocks.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/KerML.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Links.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Objects.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Observation.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Performances.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Transfers.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Triggers.kerml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Actions.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Allocations.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/AnalysisCases.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Attributes.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Calculations.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Cases.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Connections.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Constraints.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Flows.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Interfaces.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Items.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Metadata.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Parts.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Ports.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Requirements.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/StandardViewDefinitions.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/States.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/SysML.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/UseCases.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/VerificationCases.sysml create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Views.sysml create mode 100644 test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs diff --git a/.cspell.yaml b/.cspell.yaml index f629dcd3..15daf5cf 100644 --- a/.cspell.yaml +++ b/.cspell.yaml @@ -54,6 +54,11 @@ words: - Sysml - sysml - sysml2tools + - kerml + - KerML + - daltskin + - interp + - Dlanguage - venv - versionmark - Weasyprint @@ -68,6 +73,8 @@ ignorePaths: - "**/third-party/**" - "**/3rd-party/**" - "**/generated/**" + - "**/Generated/**" + - "**/Stdlib/**" - "**/AGENT_REPORT_*.md" - "**/.agent-logs/**" - "**/bin/**" diff --git a/src/DemaConsulting.SysML2Tools.Tool/Cli/Context.cs b/src/DemaConsulting.SysML2Tools.Tool/Cli/Context.cs index 94070758..4fbb59aa 100644 --- a/src/DemaConsulting.SysML2Tools.Tool/Cli/Context.cs +++ b/src/DemaConsulting.SysML2Tools.Tool/Cli/Context.cs @@ -20,6 +20,18 @@ namespace DemaConsulting.SysML2Tools.Cli; +/// +/// Top-level command selected by the user. +/// +internal enum SysmlCommand +{ + /// No command specified — prints banner and help hint. + None, + + /// Parse a workspace and report syntax diagnostics. + Lint +} + /// /// Context class that handles command-line arguments and program output. /// @@ -61,8 +73,16 @@ internal sealed class Context : IDisposable public string? ResultsFile { get; private init; } /// - /// Gets the heading depth for markdown output (default is 1). + /// Gets the top-level command to execute. /// + public SysmlCommand Command { get; private init; } + + /// + /// Gets the file glob patterns supplied as positional arguments. + /// + public IReadOnlyList Files { get; private init; } = Array.Empty(); + + public int HeadingDepth { get; private init; } = 1; /// @@ -99,7 +119,9 @@ public static Context Create(string[] args) Silent = parser.Silent, Validate = parser.Validate, ResultsFile = parser.ResultsFile, - HeadingDepth = parser.HeadingDepth + HeadingDepth = parser.HeadingDepth, + Command = parser.Command, + Files = parser.Files }; // Open log file if specified @@ -167,6 +189,21 @@ private sealed class ArgumentParser /// public string? ResultsFile { get; private set; } + /// + /// Gets the top-level command. + /// + public SysmlCommand Command { get; private set; } + + /// + /// File glob patterns collected from positional arguments. + /// + private readonly List _files = []; + + /// + /// Gets the file glob patterns supplied as positional arguments. + /// + public IReadOnlyList Files => _files; + /// /// Gets the heading depth for markdown output. /// @@ -232,7 +269,18 @@ private int ParseArgument(string arg, string[] args, int index) HeadingDepth = GetRequiredIntArgument(arg, args, index, "a heading depth argument", 1, 6); return index + 1; + case "lint": + Command = SysmlCommand.Lint; + return index; + default: + if (!arg.StartsWith("-", StringComparison.Ordinal)) + { + // Positional argument — treat as a file glob pattern + _files.Add(arg); + return index; + } + throw new ArgumentException($"Unsupported argument '{arg}'", nameof(args)); } } diff --git a/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs b/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs new file mode 100644 index 00000000..9e179aac --- /dev/null +++ b/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs @@ -0,0 +1,100 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using DemaConsulting.SysML2Tools.Cli; +using DemaConsulting.SysML2Tools.Parser; + +namespace DemaConsulting.SysML2Tools.Lint; + +/// +/// Implements the lint command: parse the workspace and report diagnostics. +/// +internal static class LintCommand +{ + /// + /// Runs the lint command. + /// + /// The CLI context, supplying file patterns and output methods. + public static void Run(Context context) + { + var files = ResolveFiles(context.Files); + + if (files.Count == 0) + { + context.WriteError("lint: no input files specified. Provide one or more .sysml or .kerml file paths."); + return; + } + + context.WriteLine($"Linting {files.Count} file(s)..."); + + var result = WorkspaceParser.Parse(files); + + foreach (var diagnostic in result.Diagnostics) + { + var line = $"{diagnostic.FilePath}({diagnostic.Line},{diagnostic.Column}): {diagnostic.Severity.ToString().ToLowerInvariant()}: {diagnostic.Message}"; + if (diagnostic.Severity == DiagnosticSeverity.Error) + { + context.WriteError(line); + } + else + { + context.WriteLine(line); + } + } + + if (result.HasErrors) + { + context.WriteError($"lint: {result.Diagnostics.Count(d => d.Severity == DiagnosticSeverity.Error)} error(s) found."); + } + else + { + context.WriteLine("lint: no errors found."); + } + } + + /// + /// Resolves file glob patterns to concrete file paths. + /// + private static IReadOnlyList ResolveFiles(IReadOnlyList patterns) + { + var resolved = new List(); + foreach (var pattern in patterns) + { + var dir = Path.GetDirectoryName(pattern) ?? "."; + var glob = Path.GetFileName(pattern); + + if (string.IsNullOrEmpty(glob)) + { + continue; + } + + if (Directory.Exists(dir)) + { + resolved.AddRange(Directory.GetFiles(dir, glob, SearchOption.TopDirectoryOnly)); + } + else if (File.Exists(pattern)) + { + resolved.Add(pattern); + } + } + + return resolved; + } +} diff --git a/src/DemaConsulting.SysML2Tools.Tool/Program.cs b/src/DemaConsulting.SysML2Tools.Tool/Program.cs index 106f5ffc..f7dc777d 100644 --- a/src/DemaConsulting.SysML2Tools.Tool/Program.cs +++ b/src/DemaConsulting.SysML2Tools.Tool/Program.cs @@ -20,6 +20,7 @@ using System.Reflection; using DemaConsulting.SysML2Tools.Cli; +using DemaConsulting.SysML2Tools.Lint; using DemaConsulting.SysML2Tools.SelfTest; namespace DemaConsulting.SysML2Tools; @@ -151,7 +152,10 @@ private static void PrintBanner(Context context) /// The context for output. private static void PrintHelp(Context context) { - context.WriteLine("Usage: sysml2tools [options]"); + context.WriteLine("Usage: sysml2tools [options] [files...]"); + context.WriteLine(""); + context.WriteLine("Commands:"); + context.WriteLine(" lint Parse files and report syntax errors"); context.WriteLine(""); context.WriteLine("Options:"); context.WriteLine(" -v, --version Display version information"); @@ -169,9 +173,15 @@ private static void PrintHelp(Context context) /// The context containing command line arguments and program state. private static void RunToolLogic(Context context) { - context.WriteLine("SysML2 Tools - Demo Functionality"); - context.WriteLine("This is a template project demonstrating best practices."); - context.WriteLine(""); - context.WriteLine("Replace this with your actual tool implementation."); + switch (context.Command) + { + case SysmlCommand.Lint: + LintCommand.Run(context); + break; + + default: + context.WriteLine("No command specified. Run 'sysml2tools --help' for usage."); + break; + } } } diff --git a/src/DemaConsulting.SysML2Tools/DemaConsulting.SysML2Tools.csproj b/src/DemaConsulting.SysML2Tools/DemaConsulting.SysML2Tools.csproj index 92b3a530..277f30de 100644 --- a/src/DemaConsulting.SysML2Tools/DemaConsulting.SysML2Tools.csproj +++ b/src/DemaConsulting.SysML2Tools/DemaConsulting.SysML2Tools.csproj @@ -6,7 +6,6 @@ enable enable - false DemaConsulting.SysML2Tools.Core DemaConsulting.SysML2Tools.Core @@ -42,8 +41,15 @@ Organization: $(Company) - + + + + + + + + diff --git a/src/DemaConsulting.SysML2Tools/Grammar/README.md b/src/DemaConsulting.SysML2Tools/Grammar/README.md new file mode 100644 index 00000000..6607b16d --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Grammar/README.md @@ -0,0 +1,46 @@ +# Grammar + +This folder contains the ANTLR4 grammar files for SysML v2 textual notation. +The generated C# parser lives in `../Parser/Generated/` and is committed to the +repository — no Java is required to build this project. + +## Source Versions + +- **Grammar files** (`SysMLv2Lexer.g4`, `SysMLv2Parser.g4`): + [daltskin/sysml-v2-grammar][grammar-repo], commit `bac7eb87` (OMG release 2026-04, dated 2026-05-22) +- **Stdlib** (`.sysml` / `.kerml` files): + [Systems-Modeling/SysML-v2-Release][sysml-repo], tag `2026-04` +- **ANTLR4 generator**: `antlr-4.13.1-complete.jar`, version 4.13.1 +- **JDK**: OpenJDK 25.0.3+9 (JDK 25) + +[grammar-repo]: https://github.com/daltskin/sysml-v2-grammar +[sysml-repo]: https://github.com/Systems-Modeling/SysML-v2-Release + +## Regenerating the Parser + +To regenerate `../Parser/Generated/` after a grammar update: + +1. Download the updated `.g4` files from [daltskin/sysml-v2-grammar][grammar-repo] + and replace the files in this folder. +2. Download the ANTLR4 complete jar from + (use the same version as `Antlr4.Runtime.Standard` in the `.csproj`). +3. Run from the repository root: + + ```pwsh + $java = 'path\to\java.exe' + $antlr = 'path\to\antlr-4.13.1-complete.jar' + $src = 'src\DemaConsulting.SysML2Tools\Grammar' + $out = 'src\DemaConsulting.SysML2Tools\Parser\Generated' + Remove-Item $out\* -Include *.cs,*.interp,*.tokens -Force + & $java -jar $antlr -Dlanguage=CSharp ` + -package DemaConsulting.SysML2Tools.Parser.Generated ` + -listener -visitor -o $out ` + $src\SysMLv2Lexer.g4 $src\SysMLv2Parser.g4 + ``` + +4. Update the version table above. +5. Commit the regenerated files. + +> **Note:** The `.interp` and `.tokens` files in `Generated/` are not needed +> at runtime — the ANTLR4 ATN is serialized inline in the generated C# — but +> they are committed alongside the `.cs` files to keep regeneration reproducible. diff --git a/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Lexer.g4 b/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Lexer.g4 new file mode 100644 index 00000000..c0043f34 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Lexer.g4 @@ -0,0 +1,258 @@ +/* + * SysML v2 ANTLR4 Grammar + * Derived from the OMG SysML v2 specification (KEBNF format). + * Source: https://github.com/Systems-Modeling/SysML-v2-Release + * Generator: https://github.com/daltskin/sysml-v2-grammar + * License: MIT + */ + +lexer grammar SysMLv2Lexer; + +// $antlr-format alignTrailingComments true, columnLimit 150, useTab false +// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true +// $antlr-format alignSemicolons hanging, alignColons hanging +// $antlr-format minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false + +// Keywords +ABOUT : 'about' ; +ABSTRACT : 'abstract' ; +ACCEPT : 'accept' ; +ACTION : 'action' ; +ACTOR : 'actor' ; +AFTER : 'after' ; +ALIAS : 'alias' ; +ALL : 'all' ; +ALLOCATE : 'allocate' ; +ALLOCATION : 'allocation' ; +ANALYSIS : 'analysis' ; +AND : 'and' ; +AS : 'as' ; +ASSERT : 'assert' ; +ASSIGN : 'assign' ; +ASSOC : 'assoc' ; +ASSUME : 'assume' ; +AT : 'at' ; +ATTRIBUTE : 'attribute' ; +BEHAVIOR : 'behavior' ; +BIND : 'bind' ; +BINDING : 'binding' ; +BOOL : 'bool' ; +BY : 'by' ; +CALC : 'calc' ; +CASE : 'case' ; +CHAINS : 'chains' ; +CLASS : 'class' ; +CLASSIFIER : 'classifier' ; +COMMENT : 'comment' ; +COMPOSITE : 'composite' ; +CONCERN : 'concern' ; +CONJUGATE : 'conjugate' ; +CONJUGATES : 'conjugates' ; +CONJUGATION : 'conjugation' ; +CONNECT : 'connect' ; +CONNECTION : 'connection' ; +CONNECTOR : 'connector' ; +CONST : 'const' ; +CONSTANT : 'constant' ; +CONSTRAINT : 'constraint' ; +CROSSES : 'crosses' ; +DATATYPE : 'datatype' ; +DECIDE : 'decide' ; +DEF : 'def' ; +DEFAULT : 'default' ; +DEFINED : 'defined' ; +DEPENDENCY : 'dependency' ; +DERIVED : 'derived' ; +DIFFERENCES : 'differences' ; +DISJOINING : 'disjoining' ; +DISJOINT : 'disjoint' ; +DO : 'do' ; +DOC : 'doc' ; +ELSE : 'else' ; +END : 'end' ; +ENTRY : 'entry' ; +ENUM : 'enum' ; +EVENT : 'event' ; +EXHIBIT : 'exhibit' ; +EXIT : 'exit' ; +EXPOSE : 'expose' ; +EXPR : 'expr' ; +FALSE : 'false' ; +FEATURE : 'feature' ; +FEATURED : 'featured' ; +FEATURING : 'featuring' ; +FILTER : 'filter' ; +FIRST : 'first' ; +FLOW : 'flow' ; +FOR : 'for' ; +FORK : 'fork' ; +FRAME : 'frame' ; +FROM : 'from' ; +FUNCTION : 'function' ; +HASTYPE : 'hastype' ; +IF : 'if' ; +IMPLIES : 'implies' ; +IMPORT : 'import' ; +IN : 'in' ; +INCLUDE : 'include' ; +INDIVIDUAL : 'individual' ; +INOUT : 'inout' ; +INTERACTION : 'interaction' ; +INTERFACE : 'interface' ; +INTERSECTS : 'intersects' ; +INV : 'inv' ; +INVERSE : 'inverse' ; +INVERTING : 'inverting' ; +ISTYPE : 'istype' ; +ITEM : 'item' ; +JOIN : 'join' ; +LANGUAGE : 'language' ; +LIBRARY : 'library' ; +LOCALE : 'locale' ; +LOOP : 'loop' ; +MEMBER : 'member' ; +MERGE : 'merge' ; +MESSAGE : 'message' ; +META : 'meta' ; +METACLASS : 'metaclass' ; +METADATA : 'metadata' ; +MULTIPLICITY : 'multiplicity' ; +NAMESPACE : 'namespace' ; +NEW : 'new' ; +NONUNIQUE : 'nonunique' ; +NOT : 'not' ; +NULL : 'null' ; +OBJECTIVE : 'objective' ; +OCCURRENCE : 'occurrence' ; +OF : 'of' ; +OR : 'or' ; +ORDERED : 'ordered' ; +OUT : 'out' ; +PACKAGE : 'package' ; +PARALLEL : 'parallel' ; +PART : 'part' ; +PERFORM : 'perform' ; +PORT : 'port' ; +PORTION : 'portion' ; +PREDICATE : 'predicate' ; +PRIVATE : 'private' ; +PROTECTED : 'protected' ; +PUBLIC : 'public' ; +REDEFINES : 'redefines' ; +REDEFINITION : 'redefinition' ; +REF : 'ref' ; +REFERENCES : 'references' ; +RENDER : 'render' ; +RENDERING : 'rendering' ; +REP : 'rep' ; +REQUIRE : 'require' ; +REQUIREMENT : 'requirement' ; +RETURN : 'return' ; +SATISFY : 'satisfy' ; +SEND : 'send' ; +SNAPSHOT : 'snapshot' ; +SPECIALIZATION : 'specialization' ; +SPECIALIZES : 'specializes' ; +STAKEHOLDER : 'stakeholder' ; +STANDARD : 'standard' ; +STATE : 'state' ; +STEP : 'step' ; +STRUCT : 'struct' ; +SUBCLASSIFIER : 'subclassifier' ; +SUBJECT : 'subject' ; +SUBSET : 'subset' ; +SUBSETS : 'subsets' ; +SUBTYPE : 'subtype' ; +SUCCESSION : 'succession' ; +TERMINATE : 'terminate' ; +THEN : 'then' ; +TIMESLICE : 'timeslice' ; +TO : 'to' ; +TRANSITION : 'transition' ; +TRUE : 'true' ; +TYPE : 'type' ; +TYPED : 'typed' ; +TYPING : 'typing' ; +UNIONS : 'unions' ; +UNTIL : 'until' ; +USE : 'use' ; +VAR : 'var' ; +VARIANT : 'variant' ; +VARIATION : 'variation' ; +VERIFICATION : 'verification' ; +VERIFY : 'verify' ; +VIA : 'via' ; +VIEW : 'view' ; +VIEWPOINT : 'viewpoint' ; +WHEN : 'when' ; +WHILE : 'while' ; +XOR : 'xor' ; + +// Operators and punctuation +BANG_EQ_EQ : '!==' ; +COLON_COLON_GT : '::>' ; +COLON_GT_GT : ':>>' ; +EQ_EQ_EQ : '===' ; +BANG_EQ : '!=' ; +STAR_STAR : '**' ; +ARROW : '->' ; +DOT_DOT : '..' ; +DOT_QUESTION : '.?' ; +COLON_COLON : '::' ; +COLON_EQ : ':=' ; +COLON_GT : ':>' ; +LE : '<=' ; +EQ_EQ : '==' ; +FAT_ARROW : '=>' ; +GE : '>=' ; +QUESTION_QUESTION : '??' ; +AT_AT : '@@' ; +HASH : '#' ; +DOLLAR : '$' ; +PERCENT : '%' ; +AMP : '&' ; +LPAREN : '(' ; +RPAREN : ')' ; +STAR : '*' ; +PLUS : '+' ; +COMMA : ',' ; +MINUS : '-' ; +DOT : '.' ; +SLASH : '/' ; +COLON : ':' ; +SEMI : ';' ; +LT : '<' ; +EQ : '=' ; +GT : '>' ; +QUESTION : '?' ; +AT_SIGN : '@' ; +LBRACK : '[' ; +RBRACK : ']' ; +CARET : '^' ; +LBRACE : '{' ; +PIPE : '|' ; +RBRACE : '}' ; +TILDE : '~' ; + +// Identifiers +IDENTIFIER : [a-zA-Z_] [a-zA-Z0-9_]* ; + +// String literals +STRING : '\'' ( '\\' . | ~['\\] )* '\'' ; +DOUBLE_STRING : '"' ( '\\' . | ~["\\] )* '"' ; + +// Numeric literals +INTEGER : [0-9]+ ; +REAL : [0-9]* '.' [0-9]+ ( [eE] [+-]? [0-9]+ )? | [0-9]+ [eE] [+-]? [0-9]+ ; + +// Comments +// REGULAR_COMMENT also matches //* ... */ (OMG block-comment-out convention). +REGULAR_COMMENT : '/*' .*? '*/' | '//*' .*? '*/' ; +// SINGLE_LINE_NOTE: '//' followed by non-'*' content (to avoid consuming +// //* ... */ block comments which are handled by REGULAR_COMMENT). +// A bare '//' at end of line is handled by the second rule. +SINGLE_LINE_NOTE : '//' ~[*\r\n] ~[\r\n]* -> skip ; +BARE_LINE_COMMENT : '//' -> skip ; + +// Whitespace +WS : [ \t\r\n]+ -> skip ; \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 b/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 new file mode 100644 index 00000000..801abbf1 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 @@ -0,0 +1,2168 @@ +/* + * SysML v2 ANTLR4 Grammar + * Derived from the OMG SysML v2 specification (KEBNF format). + * Source: https://github.com/Systems-Modeling/SysML-v2-Release + * Generator: https://github.com/daltskin/sysml-v2-grammar + * License: MIT + */ + +parser grammar SysMLv2Parser; + +options { + tokenVocab = SysMLv2Lexer; +} + +// $antlr-format alignTrailingComments true, columnLimit 150, useTab false +// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true +// $antlr-format alignSemicolons hanging, alignColons hanging +// $antlr-format minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false + +// ===== Expression rules (precedence-climbing) ===== + +ownedExpression + : IF ownedExpression QUESTION ownedExpression ELSE ownedExpression + | ownedExpression QUESTION_QUESTION ownedExpression + | ownedExpression IMPLIES ownedExpression + | ownedExpression OR ownedExpression + | ownedExpression AND ownedExpression + | ownedExpression XOR ownedExpression + | ownedExpression PIPE ownedExpression + | ownedExpression AMP ownedExpression + | ownedExpression ( EQ_EQ | BANG_EQ | EQ_EQ_EQ | BANG_EQ_EQ ) ownedExpression + | ownedExpression ( LT | GT | LE | GE ) ownedExpression + | ownedExpression DOT_DOT ownedExpression + | ownedExpression ( PLUS | MINUS ) ownedExpression + | ownedExpression ( STAR | SLASH | PERCENT ) ownedExpression + | ownedExpression ( STAR_STAR | CARET ) ownedExpression + | ( PLUS | MINUS | TILDE | NOT ) ownedExpression + | ( AT_SIGN | AT_AT ) typeReference + | ownedExpression ( ISTYPE | HASTYPE | AT_SIGN ) typeReference + | ownedExpression AS typeReference + | ownedExpression AT_AT typeReference + | ownedExpression META typeReference + | ownedExpression LBRACK sequenceExpressionList? RBRACK + | ownedExpression HASH LPAREN sequenceExpressionList? RPAREN + | ownedExpression argumentList + | ownedExpression DOT qualifiedName + | ownedExpression DOT_QUESTION bodyExpression + | ownedExpression ARROW qualifiedName ( bodyExpression | argumentList ) + | ALL typeReference + | baseExpression + ; + +typeReference + : qualifiedName + ; + +sequenceExpressionList + : ownedExpression ( COMMA ownedExpression )* + ; + +baseExpression + : nullExpression + | REGULAR_COMMENT // ignore block comments used as expression placeholders + | literalExpression + | qualifiedName ( argumentList | DOT METADATA )? // merged featureRef/metadataAccess/invocation + | constructorExpression + | bodyExpression + | LPAREN AS typeReference RPAREN // metadata cast expression: (as MetadataType) + | LPAREN sequenceExpressionList? RPAREN + ; + +nullExpression + : NULL + | LPAREN RPAREN + ; + +featureReferenceExpression + : qualifiedName + ; + +constructorExpression + : NEW qualifiedName argumentList + ; + +bodyExpression + : LBRACE functionBodyPart RBRACE + ; + +argumentList + : LPAREN ( positionalArgumentList | namedArgumentList )? RPAREN + ; + +positionalArgumentList + : ownedExpression ( COMMA ownedExpression )* + ; + +namedArgumentList + : namedArgument ( COMMA namedArgument )* + ; + +namedArgument + : qualifiedName EQ ownedExpression + ; + +literalExpression + : literalBoolean + | literalString + | literalInteger + | literalReal + | literalInfinity + ; + +literalBoolean : TRUE | FALSE ; +literalString : DOUBLE_STRING ; +literalInteger : INTEGER ; +literalReal : REAL ; +literalInfinity : STAR ; + +argumentMember + : ownedExpression + ; + +argumentExpressionMember + : ownedExpression + ; + +// ===== Name rule (Identifier or UnrestrictedName) ===== + +name + : IDENTIFIER + | STRING + | unreservedKeyword + ; + +// Keywords that appear as names in the official OMG standard library. +// These are contextually unreserved — valid as identifiers in name positions. +unreservedKeyword + : TYPE + | MULTIPLICITY + | VAR + | LANGUAGE + | LOCALE + | CROSSES + | STEP + | FEATURE + | BEHAVIOR + | FUNCTION + | MEMBER + | PREDICATE + | INTERACTION + | METACLASS + ; + +// ===== Parser rules ===== + +identification + : LT name GT name + | LT name GT + | name + ; + +relationshipBody + : SEMI + | LBRACE relationshipOwnedElement* RBRACE + | LBRACE ( ownedAnnotation )* RBRACE + ; + +relationshipOwnedElement + : ownedRelatedElement + | ownedAnnotation + ; + +ownedRelatedElement + : nonFeatureElement + | featureElement + ; + +dependency + : ( prefixMetadataAnnotation )* DEPENDENCY ( identification? FROM )? qualifiedName ( COMMA qualifiedName )* TO qualifiedName ( COMMA qualifiedName )* relationshipBody + | ( prefixMetadataAnnotation )* DEPENDENCY dependencyDeclaration relationshipBody + ; + +annotation + : qualifiedName + ; + +ownedAnnotation + : annotatingElement + ; + +annotatingElement + : comment + | documentation + | textualRepresentation + | metadataFeature + ; + +comment + : ( COMMENT identification? ( ABOUT annotation ( COMMA annotation )* )? )? ( LOCALE DOUBLE_STRING )? REGULAR_COMMENT + ; + +documentation + : DOC identification? ( LOCALE DOUBLE_STRING )? REGULAR_COMMENT + ; + +textualRepresentation + : ( REP identification? )? LANGUAGE DOUBLE_STRING REGULAR_COMMENT + ; + +rootNamespace + : packageBodyElement* EOF + ; + +namespace + : ( prefixMetadataMember )* namespaceDeclaration namespaceBody + ; + +namespaceDeclaration + : NAMESPACE identification? + ; + +namespaceBody + : SEMI + | LBRACE namespaceBodyElement* RBRACE + ; + +namespaceBodyElement + : namespaceMember + | aliasMember + | importRule + ; + +memberPrefix + : ( visibilityIndicator )? + ; + +visibilityIndicator + : PUBLIC + | PRIVATE + | PROTECTED + ; + +namespaceMember + : nonFeatureMember + | namespaceFeatureMember + ; + +nonFeatureMember + : memberPrefix memberElement + ; + +namespaceFeatureMember + : memberPrefix featureElement + ; + +aliasMember + : memberPrefix ALIAS ( LT name GT )? ( name )? FOR qualifiedName relationshipBody + ; + +qualifiedName + : ( DOLLAR COLON_COLON )? ( name COLON_COLON )* name + ; + +importRule + : ( visibilityIndicator )? IMPORT ( ALL )? importDeclaration relationshipBody + ; + +importDeclaration + : membershipImport + | namespaceImport + ; + +membershipImport + : qualifiedName ( COLON_COLON STAR_STAR )? + ; + +namespaceImport + : qualifiedName COLON_COLON STAR ( COLON_COLON STAR_STAR )? + | filterPackage + ; + +filterPackage + : filterPackageImportDeclaration ( filterPackageMember )+ + | filterPackageImport ( filterPackageMember )+ + ; + +filterPackageMember + : LBRACK ownedExpression RBRACK + ; + +memberElement + : annotatingElement + | nonFeatureElement + ; + +nonFeatureElement + : dependency + | namespace + | type + | classifier + | dataType + | class + | structure + | metaclass + | association + | associationStructure + | interaction + | behavior + | function + | predicate + | multiplicity + | package + | libraryPackage + | specialization + | conjugation + | subclassification + | disjoining + | featureInverting + | featureTyping + | subsetting + | redefinition + | typeFeaturing + ; + +featureElement + : feature + | step + | expression + | booleanExpression + | invariant + | connector + | bindingConnector + | succession + | flow + | successionFlow + ; + +type + : typePrefix TYPE typeDeclaration typeBody + ; + +typePrefix + : ( ABSTRACT )? ( prefixMetadataMember )* + ; + +typeDeclaration + : ( ALL )? identification? ( ownedMultiplicity )? ( specializationPart | conjugationPart )+ typeRelationshipPart* + ; + +specializationPart + : ( COLON_GT | SPECIALIZES ) ownedSpecialization ( COMMA ownedSpecialization )* + ; + +conjugationPart + : ( TILDE | CONJUGATES ) ownedConjugation + ; + +typeRelationshipPart + : disjoiningPart + | unioningPart + | intersectingPart + | differencingPart + ; + +disjoiningPart + : DISJOINT FROM ownedDisjoining ( COMMA ownedDisjoining )* + ; + +unioningPart + : UNIONS unioning ( COMMA unioning )* + ; + +intersectingPart + : INTERSECTS intersecting ( COMMA intersecting )* + ; + +differencingPart + : DIFFERENCES differencing ( COMMA differencing )* + ; + +typeBody + : SEMI + | LBRACE typeBodyElement* RBRACE + ; + +typeBodyElement + : nonFeatureMember + | featureMember + | aliasMember + | importRule + ; + +specialization + : ( SPECIALIZATION identification? )? SUBTYPE specificType ( COLON_GT | SPECIALIZES ) generalType relationshipBody + ; + +ownedSpecialization + : generalType + ; + +specificType + : qualifiedName ( DOT qualifiedName )* + ; + +generalType + : qualifiedName ( DOT qualifiedName )* + ; + +conjugation + : ( CONJUGATION identification? )? CONJUGATE qualifiedName ( DOT qualifiedName )* ( TILDE | CONJUGATES ) qualifiedName ( DOT qualifiedName )* relationshipBody + ; + +ownedConjugation + : qualifiedName ( DOT qualifiedName )* + ; + +disjoining + : ( DISJOINING identification? )? DISJOINT qualifiedName ( DOT qualifiedName )* FROM qualifiedName ( DOT qualifiedName )* relationshipBody + ; + +ownedDisjoining + : qualifiedName ( DOT qualifiedName )* + ; + +unioning + : qualifiedName ( DOT qualifiedName )* + ; + +intersecting + : qualifiedName ( DOT qualifiedName )* + ; + +differencing + : qualifiedName ( DOT qualifiedName )* + ; + +featureMember + : typeFeatureMember + | ownedFeatureMember + ; + +typeFeatureMember + : memberPrefix MEMBER featureElement + ; + +ownedFeatureMember + : memberPrefix featureElement + ; + +classifier + : typePrefix CLASSIFIER classifierDeclaration typeBody + ; + +classifierDeclaration + : ( ALL )? identification? ( ownedMultiplicity )? ( superclassingPart | conjugationPart )? typeRelationshipPart* + ; + +superclassingPart + : ( COLON_GT | SPECIALIZES ) ownedSubclassification ( COMMA ownedSubclassification )* + ; + +subclassification + : ( SPECIALIZATION identification? )? SUBCLASSIFIER qualifiedName ( COLON_GT | SPECIALIZES ) qualifiedName relationshipBody + ; + +ownedSubclassification + : qualifiedName + ; + +feature + : ( featurePrefix ( FEATURE | prefixMetadataMember ) featureDeclaration? | ( endFeaturePrefix | basicFeaturePrefix ) ( REF )? featureDeclaration ) valuePart? typeBody + ; + +endFeaturePrefix + : ( CONST )? END + ; + +basicFeaturePrefix + : ( featureDirection )? ( DERIVED )? ( ABSTRACT )? ( COMPOSITE | PORTION )? ( VAR | CONST )? + ; + +featurePrefix + : ( endFeaturePrefix ownedCrossFeatureMember | basicFeaturePrefix ) ( prefixMetadataMember )* + ; + +ownedCrossFeatureMember + : ownedCrossFeature + ; + +ownedCrossFeature + : basicFeaturePrefix featureDeclaration + | basicUsagePrefix usageDeclaration? + ; + +featureDirection + : IN + | OUT + | INOUT + ; + +featureDeclaration + : ( ALL )? ( featureIdentification ( featureSpecializationPart | conjugationPart )? | featureSpecializationPart | conjugationPart ) featureRelationshipPart* + ; + +featureIdentification + : LT name GT ( name )? + | name + ; + +featureRelationshipPart + : typeRelationshipPart + | chainingPart + | invertingPart + | typeFeaturingPart + ; + +chainingPart + : CHAINS qualifiedName ( DOT qualifiedName )* + ; + +invertingPart + : INVERSE OF ownedFeatureInverting + ; + +typeFeaturingPart + : FEATURED BY ownedTypeFeaturing ( COMMA ownedTypeFeaturing )* + ; + +featureSpecializationPart + : featureSpecialization+ multiplicityPart? featureSpecialization* + | multiplicityPart featureSpecialization* + ; + +multiplicityPart + : ownedMultiplicity ( ORDERED ( NONUNIQUE )? | NONUNIQUE ( ORDERED )? )? + | ( ORDERED ( NONUNIQUE )? | NONUNIQUE ( ORDERED )? ) + ; + +featureSpecialization + : typings + | subsettings + | references + | crosses + | redefinitions + ; + +typings + : typedBy ( COMMA featureTyping )* + ; + +typedBy + : ( COLON | TYPED BY | DEFINED BY ) featureTyping + ; + +subsettings + : subsets ( COMMA ownedSubsetting )* + ; + +subsets + : ( COLON_GT | SUBSETS ) ownedSubsetting + ; + +references + : ( COLON_COLON_GT | REFERENCES ) ownedReferenceSubsetting + ; + +crosses + : ( FAT_ARROW | CROSSES ) ownedCrossSubsetting + ; + +redefinitions + : redefines ( COMMA ownedRedefinition )* + ; + +redefines + : ( COLON_GT_GT | REDEFINES ) ownedRedefinition + ; + +featureTyping + : ( SPECIALIZATION identification? )? TYPING qualifiedName ( COLON | TYPED BY ) generalType relationshipBody + | ownedFeatureTyping + | conjugatedPortTyping + ; + +ownedFeatureTyping + : qualifiedName ( DOT qualifiedName )* + ; + +subsetting + : ( SPECIALIZATION identification? )? SUBSET specificType ( COLON_GT | SUBSETS ) generalType relationshipBody + ; + +ownedSubsetting + : qualifiedName ( DOT qualifiedName )* + ; + +ownedReferenceSubsetting + : qualifiedName ( DOT qualifiedName )* + ; + +ownedCrossSubsetting + : qualifiedName ( DOT qualifiedName )* + ; + +redefinition + : ( SPECIALIZATION identification? )? REDEFINITION specificType ( COLON_GT_GT | REDEFINES ) generalType relationshipBody + ; + +ownedRedefinition + : qualifiedName ( DOT qualifiedName )* + ; + +featureInverting + : ( INVERTING identification? )? INVERSE qualifiedName ( DOT qualifiedName )* OF qualifiedName ( DOT qualifiedName )* relationshipBody + ; + +ownedFeatureInverting + : qualifiedName ( DOT qualifiedName )* + ; + +typeFeaturing + : FEATURING ( identification? OF )? qualifiedName BY qualifiedName relationshipBody + ; + +ownedTypeFeaturing + : qualifiedName + ; + +dataType + : typePrefix DATATYPE classifierDeclaration typeBody + ; + +class + : typePrefix CLASS classifierDeclaration typeBody + ; + +structure + : typePrefix STRUCT classifierDeclaration typeBody + ; + +association + : typePrefix ASSOC classifierDeclaration typeBody + ; + +associationStructure + : typePrefix ASSOC STRUCT classifierDeclaration typeBody + ; + +connector + : featurePrefix CONNECTOR ( featureDeclaration? valuePart? | connectorDeclaration ) typeBody + ; + +connectorDeclaration + : binaryConnectorDeclaration + | naryConnectorDeclaration + ; + +binaryConnectorDeclaration + : ( featureDeclaration? FROM | ALL FROM? )? connectorEndMember TO connectorEndMember + ; + +naryConnectorDeclaration + : featureDeclaration? LPAREN connectorEndMember COMMA connectorEndMember ( COMMA connectorEndMember )* RPAREN + ; + +connectorEndMember + : connectorEnd + ; + +connectorEnd + : ( ownedCrossMultiplicityMember )? ( name ( COLON_COLON_GT | REFERENCES ) )? ownedReferenceSubsetting + ; + +ownedCrossMultiplicityMember + : ownedCrossMultiplicity + ; + +ownedCrossMultiplicity + : ownedMultiplicity + ; + +bindingConnector + : featurePrefix BINDING bindingConnectorDeclaration typeBody + ; + +bindingConnectorDeclaration + : featureDeclaration ( OF connectorEndMember EQ connectorEndMember )? + | ( ALL )? ( OF? connectorEndMember EQ connectorEndMember )? + ; + +succession + : featurePrefix SUCCESSION successionDeclaration typeBody + ; + +successionDeclaration + : featureDeclaration ( FIRST connectorEndMember THEN connectorEndMember )? + | ( ALL )? ( FIRST? connectorEndMember THEN connectorEndMember )? + ; + +behavior + : typePrefix BEHAVIOR classifierDeclaration typeBody + ; + +step + : featurePrefix STEP featureDeclaration valuePart? typeBody + ; + +function + : typePrefix FUNCTION classifierDeclaration functionBody + ; + +functionBody + : SEMI + | LBRACE functionBodyPart RBRACE + ; + +functionBodyPart + : ( definitionBodyItem | typeBodyElement | returnFeatureMember )* ( resultExpressionMember )? + ; + +returnFeatureMember + : memberPrefix RETURN featureElement + ; + +resultExpressionMember + : memberPrefix ownedExpression + ; + +expression + : featurePrefix EXPR featureDeclaration valuePart? functionBody + ; + +predicate + : typePrefix PREDICATE classifierDeclaration functionBody + ; + +booleanExpression + : featurePrefix BOOL featureDeclaration valuePart? functionBody + ; + +invariant + : featurePrefix INV ( TRUE | FALSE )? featureDeclaration valuePart? functionBody + ; + +featureChainMember + : qualifiedName ( DOT qualifiedName )* + ; + +interaction + : typePrefix INTERACTION classifierDeclaration typeBody + ; + +flow + : featurePrefix FLOW flowDeclaration typeBody + ; + +successionFlow + : featurePrefix SUCCESSION FLOW flowDeclaration typeBody + ; + +flowDeclaration + : featureDeclaration valuePart? ( OF payloadFeatureMember )? ( FROM flowEndMember TO flowEndMember )? + | ( ALL )? flowEndMember TO flowEndMember + | usageDeclaration? valuePart? ( OF flowPayloadFeatureMember )? ( FROM flowEndMember TO flowEndMember )? + ; + +payloadFeatureMember + : payloadFeature + ; + +payloadFeature + : identification? valuePart + | identification? payloadFeatureSpecializationPart valuePart? + | ownedFeatureTyping ( ownedMultiplicity )? + | ownedMultiplicity ( ownedFeatureTyping )? + ; + +payloadFeatureSpecializationPart + : featureSpecialization+ multiplicityPart? featureSpecialization* + | multiplicityPart featureSpecialization+ + ; + +flowEndMember + : flowEnd + ; + +flowEnd + : qualifiedName ( DOT qualifiedName )* + ; + +valuePart + : featureValue + ; + +featureValue + : ( EQ | COLON_EQ | DEFAULT ( EQ | COLON_EQ )? ) ownedExpression + ; + +multiplicity + : multiplicitySubset + | multiplicityRange + ; + +multiplicitySubset + : MULTIPLICITY identification? subsets typeBody + ; + +multiplicityRange + : MULTIPLICITY identification? multiplicityBounds typeBody + ; + +ownedMultiplicity + : ownedMultiplicityRange + ; + +ownedMultiplicityRange + : multiplicityBounds + ; + +multiplicityBounds + : LBRACK ( multiplicityExpressionMember DOT_DOT )? multiplicityExpressionMember RBRACK + ; + +multiplicityExpressionMember + : ( literalExpression | featureReferenceExpression ) + ; + +metaclass + : typePrefix METACLASS classifierDeclaration typeBody + ; + +prefixMetadataAnnotation + : HASH prefixMetadataFeature + | HASH prefixMetadataUsage + ; + +prefixMetadataMember + : HASH prefixMetadataFeature + | HASH prefixMetadataUsage + ; + +prefixMetadataFeature + : ownedFeatureTyping + ; + +metadataFeature + : ( prefixMetadataMember )* ( AT_SIGN | METADATA ) metadataFeatureDeclaration ( ABOUT annotation ( COMMA annotation )* )? metadataBody + ; + +metadataFeatureDeclaration + : ( identification? ( COLON | TYPED BY ) )? ownedFeatureTyping + ; + +metadataBody + : SEMI + | LBRACE ( metadataBodyElement )* RBRACE + | LBRACE ( definitionMember | metadataBodyUsageMember | aliasMember | importRule )* RBRACE + ; + +metadataBodyElement + : nonFeatureMember + | metadataBodyFeatureMember + | aliasMember + | importRule + ; + +metadataBodyFeatureMember + : metadataBodyFeature + ; + +metadataBodyFeature + : FEATURE? ( COLON_GT_GT | REDEFINES )? ownedRedefinition featureSpecializationPart? valuePart? metadataBody + ; + +package + : ( prefixMetadataMember )* packageDeclaration packageBody + ; + +libraryPackage + : ( STANDARD )? LIBRARY ( prefixMetadataMember )* packageDeclaration packageBody + ; + +packageDeclaration + : PACKAGE identification? + ; + +packageBody + : SEMI + | LBRACE packageBodyElement* RBRACE + ; + +elementFilterMember + : memberPrefix FILTER ownedExpression SEMI + ; + +dependencyDeclaration + : ( identification? FROM )? qualifiedName ( COMMA qualifiedName )* TO qualifiedName ( COMMA qualifiedName )* + ; + +annotatingMember + : annotatingElement + ; + +packageBodyElement + : packageMember + | elementFilterMember + | aliasMember + | importRule + ; + +packageMember + : memberPrefix ( definitionElement | usageElement ) + ; + +definitionElement + : package + | libraryPackage + | annotatingElement + | dependency + | attributeDefinition + | enumerationDefinition + | occurrenceDefinition + | individualDefinition + | itemDefinition + | partDefinition + | connectionDefinition + | flowDefinition + | interfaceDefinition + | portDefinition + | actionDefinition + | calculationDefinition + | stateDefinition + | constraintDefinition + | requirementDefinition + | concernDefinition + | caseDefinition + | analysisCaseDefinition + | verificationCaseDefinition + | useCaseDefinition + | viewDefinition + | viewpointDefinition + | renderingDefinition + | metadataDefinition + | allocationDefinition + | extendedDefinition + ; + +usageElement + : nonOccurrenceUsageElement + | occurrenceUsageElement + ; + +basicDefinitionPrefix + : ABSTRACT + | VARIATION + ; + +definitionExtensionKeyword + : prefixMetadataMember + ; + +definitionPrefix + : basicDefinitionPrefix? definitionExtensionKeyword* + ; + +definition + : definitionDeclaration definitionBody + ; + +definitionDeclaration + : identification? subclassificationPart? + ; + +definitionBody + : SEMI + | LBRACE definitionBodyItem* RBRACE + ; + +definitionBodyItem + : importRule + | memberPrefix definitionBodyItemContent + | ( sourceSuccessionMember )? memberPrefix endOccurrenceUsageElement + | ( sourceSuccessionMember )? memberPrefix occurrenceUsageElement + ; + +// Factored dispatch: after memberPrefix is consumed, the next token +// (ALIAS, VARIANT, keyword, or identifier) unambiguously selects the branch. +// This reduces the SLL prediction DFA from 6 nullable-prefix alternatives to 3+4. +definitionBodyItemContent + : ALIAS ( LT name GT )? ( name )? FOR qualifiedName relationshipBody + | VARIANT variantUsageElement + | definitionElement + | nonOccurrenceUsageElement + ; + +definitionMember + : memberPrefix definitionElement + ; + +variantUsageMember + : memberPrefix VARIANT variantUsageElement + ; + +nonOccurrenceUsageMember + : memberPrefix nonOccurrenceUsageElement + ; + +structureUsageMember + : memberPrefix structureUsageElement + ; + +behaviorUsageMember + : memberPrefix behaviorUsageElement + ; + +refPrefix + : ( featureDirection )? ( DERIVED )? ( ABSTRACT | VARIATION )? ( CONSTANT )? + ; + +basicUsagePrefix + : refPrefix ( REF )? + ; + +endUsagePrefix + : END ownedCrossFeatureMember + ; + +usageExtensionKeyword + : prefixMetadataMember + ; + +unextendedUsagePrefix + : endUsagePrefix + | basicUsagePrefix + ; + +usagePrefix + : unextendedUsagePrefix usageExtensionKeyword* + ; + +usage + : usageDeclaration? usageCompletion + ; + +usageDeclaration + : identification featureSpecializationPart? + | featureSpecializationPart + ; + +usageCompletion + : valuePart? usageBody + ; + +usageBody + : definitionBody + ; + +defaultReferenceUsage + : refPrefix usage + ; + +referenceUsage + : ( endUsagePrefix | refPrefix ) REF usage + ; + +// Unnamed end feature with specialization (e.g., end :>> QualifiedName;) +// Handles end features in connection/flow/interface definition bodies +// where no name is given, only a redefines/subsets/typing. +endFeatureUsage + : endUsagePrefix featureDeclaration usageCompletion + ; + +variantReference + : ownedReferenceSubsetting featureSpecialization* usageBody + ; + +nonOccurrenceUsageElement + : referenceUsage + | endFeatureUsage + | attributeUsage + | enumerationUsage + | bindingConnectorAsUsage + | successionAsUsage + | extendedUsage + | defaultReferenceUsage + ; + +// end [multiplicity] — e.g. end [1] port p : P; +// The END keyword marks a feature as a connection/interface/flow endpoint. +// The optional multiplicity constrains the end feature cardinality. +endOccurrenceUsageElement + : END ( name )? ( ownedCrossMultiplicityMember )? ( NONUNIQUE )? occurrenceUsageElement + ; + +occurrenceUsageElement + : structureUsageElement + | behaviorUsageElement + ; + +structureUsageElement + : occurrenceUsage + | individualUsage + | portionUsage + | eventOccurrenceUsage + | itemUsage + | partUsage + | viewUsage + | renderingUsage + | portUsage + | connectionUsage + | interfaceUsage + | allocationUsage + | message + | flowUsage + | successionFlowUsage + ; + +behaviorUsageElement + : actionUsage + | calculationUsage + | stateUsage + | constraintUsage + | requirementUsage + | concernUsage + | caseUsage + | analysisCaseUsage + | verificationCaseUsage + | useCaseUsage + | viewpointUsage + | performActionUsage + | exhibitStateUsage + | includeUseCaseUsage + | assertConstraintUsage + | satisfyRequirementUsage + ; + +variantUsageElement + : variantReference + | referenceUsage + | attributeUsage + | bindingConnectorAsUsage + | successionAsUsage + | occurrenceUsage + | individualUsage + | portionUsage + | eventOccurrenceUsage + | itemUsage + | partUsage + | viewUsage + | renderingUsage + | portUsage + | connectionUsage + | interfaceUsage + | allocationUsage + | message + | flowUsage + | successionFlowUsage + | behaviorUsageElement + ; + +subclassificationPart + : ( COLON_GT | SPECIALIZES ) ownedSubclassification ( COMMA ownedSubclassification )* + ; + +attributeDefinition + : definitionPrefix ATTRIBUTE DEF definition + ; + +attributeUsage + : usagePrefix ATTRIBUTE usage + ; + +enumerationDefinition + : definitionExtensionKeyword* ENUM DEF definitionDeclaration enumerationBody + ; + +enumerationBody + : SEMI + | LBRACE ( annotatingMember | enumerationUsageMember )* RBRACE + ; + +enumerationUsageMember + : ( prefixMetadataMember )* memberPrefix enumeratedValue + ; + +enumeratedValue + : ENUM? usage + ; + +enumerationUsage + : usagePrefix ENUM usage + ; + +occurrenceDefinitionPrefix + : basicDefinitionPrefix? ( INDIVIDUAL emptyMultiplicityMember )? definitionExtensionKeyword* + ; + +occurrenceDefinition + : occurrenceDefinitionPrefix OCCURRENCE DEF definition + ; + +individualDefinition + : basicDefinitionPrefix? INDIVIDUAL definitionExtensionKeyword* DEF definition emptyMultiplicityMember + ; + +emptyMultiplicityMember + : emptyMultiplicity_ + ; + +occurrenceUsagePrefix + : basicUsagePrefix ( INDIVIDUAL )? ( portionKind )? usageExtensionKeyword* + ; + +occurrenceUsage + : occurrenceUsagePrefix OCCURRENCE usage + ; + +individualUsage + : basicUsagePrefix INDIVIDUAL usageExtensionKeyword* usage + ; + +portionUsage + : basicUsagePrefix ( INDIVIDUAL )? portionKind usageExtensionKeyword* usage + ; + +portionKind + : SNAPSHOT + | TIMESLICE + ; + +eventOccurrenceUsage + : occurrenceUsagePrefix EVENT ( ownedReferenceSubsetting featureSpecializationPart? | OCCURRENCE usageDeclaration? ) usageCompletion + ; + +sourceSuccessionMember + : THEN sourceSuccession + ; + +sourceSuccession + : sourceEndMember + ; + +sourceEndMember + : sourceEnd + ; + +sourceEnd + : ( ownedMultiplicity )? + ; + +itemDefinition + : occurrenceDefinitionPrefix ITEM DEF definition + ; + +itemUsage + : occurrenceUsagePrefix ITEM usage + ; + +partDefinition + : occurrenceDefinitionPrefix PART DEF definition + ; + +partUsage + : occurrenceUsagePrefix PART usage + ; + +portDefinition + : definitionPrefix PORT DEF definition conjugatedPortDefinitionMember + ; + +conjugatedPortDefinitionMember + : conjugatedPortDefinition + ; + +conjugatedPortDefinition + : portConjugation + ; + +portUsage + : occurrenceUsagePrefix PORT usage + ; + +conjugatedPortTyping + : TILDE qualifiedName + ; + +connectionDefinition + : occurrenceDefinitionPrefix CONNECTION DEF definition + ; + +connectionUsage + : occurrenceUsagePrefix ( CONNECTION usageDeclaration? valuePart? ( CONNECT connectorPart )? | CONNECT connectorPart ) usageBody + ; + +connectorPart + : binaryConnectorPart + | naryConnectorPart + ; + +binaryConnectorPart + : connectorEndMember TO connectorEndMember + ; + +naryConnectorPart + : LPAREN connectorEndMember COMMA connectorEndMember ( COMMA connectorEndMember )* RPAREN + ; + +bindingConnectorAsUsage + : usagePrefix ( BINDING usageDeclaration? )? BIND connectorEndMember EQ connectorEndMember usageBody + ; + +successionAsUsage + : usagePrefix ( SUCCESSION usageDeclaration? )? FIRST connectorEndMember THEN connectorEndMember usageBody + ; + +interfaceDefinition + : occurrenceDefinitionPrefix INTERFACE DEF definitionDeclaration interfaceBody + ; + +interfaceBody + : SEMI + | LBRACE interfaceBodyItem* RBRACE + ; + +interfaceBodyItem + : definitionMember + | variantUsageMember + | interfaceNonOccurrenceUsageMember + | ( sourceSuccessionMember )? interfaceOccurrenceUsageMember + | aliasMember + | importRule + ; + +interfaceNonOccurrenceUsageMember + : memberPrefix interfaceNonOccurrenceUsageElement + ; + +interfaceNonOccurrenceUsageElement + : referenceUsage + | attributeUsage + | enumerationUsage + | bindingConnectorAsUsage + | successionAsUsage + ; + +interfaceOccurrenceUsageMember + : memberPrefix interfaceOccurrenceUsageElement + ; + +interfaceOccurrenceUsageElement + : defaultInterfaceEnd + | endOccurrenceUsageElement + | structureUsageElement + | behaviorUsageElement + ; + +defaultInterfaceEnd + : END usage + ; + +interfaceUsage + : occurrenceUsagePrefix INTERFACE interfaceUsageDeclaration interfaceBody + ; + +interfaceUsageDeclaration + : usageDeclaration? valuePart? ( CONNECT interfacePart )? + | interfacePart + ; + +interfacePart + : binaryInterfacePart + | naryInterfacePart + ; + +binaryInterfacePart + : interfaceEndMember TO interfaceEndMember + ; + +naryInterfacePart + : LPAREN interfaceEndMember COMMA interfaceEndMember ( COMMA interfaceEndMember )* RPAREN + ; + +interfaceEndMember + : interfaceEnd + ; + +interfaceEnd + : ( ownedCrossMultiplicityMember )? ( name ( COLON_COLON_GT | REFERENCES ) )? ownedReferenceSubsetting + ; + +allocationDefinition + : occurrenceDefinitionPrefix ALLOCATION DEF definition + ; + +allocationUsage + : occurrenceUsagePrefix allocationUsageDeclaration usageBody + ; + +allocationUsageDeclaration + : ALLOCATION usageDeclaration? ( ALLOCATE connectorPart )? + | ALLOCATE connectorPart + ; + +flowDefinition + : occurrenceDefinitionPrefix FLOW DEF definition + ; + +message + : occurrenceUsagePrefix MESSAGE messageDeclaration definitionBody + ; + +messageDeclaration + : usageDeclaration? valuePart? ( OF flowPayloadFeatureMember )? ( FROM messageEventMember TO messageEventMember )? + | messageEventMember TO messageEventMember + ; + +messageEventMember + : messageEvent + ; + +messageEvent + : ownedReferenceSubsetting + ; + +flowUsage + : occurrenceUsagePrefix FLOW flowDeclaration definitionBody + ; + +successionFlowUsage + : occurrenceUsagePrefix SUCCESSION FLOW flowDeclaration definitionBody + ; + +flowPayloadFeatureMember + : flowPayloadFeature + ; + +flowPayloadFeature + : payloadFeature + ; + +actionDefinition + : occurrenceDefinitionPrefix ACTION DEF definitionDeclaration actionBody + ; + +actionBody + : SEMI + | LBRACE actionBodyItem* RBRACE + ; + +actionBodyItem + : nonBehaviorBodyItem + | initialNodeMember ( actionTargetSuccessionMember )* + | ( sourceSuccessionMember )? actionBehaviorMember ( actionTargetSuccessionMember )* + | guardedSuccessionMember + ; + +nonBehaviorBodyItem + : importRule + | aliasMember + | definitionMember + | variantUsageMember + | nonOccurrenceUsageMember + | ( sourceSuccessionMember )? structureUsageMember + ; + +actionBehaviorMember + : actionNodeMember + | behaviorUsageMember + ; + +initialNodeMember + : memberPrefix FIRST qualifiedName relationshipBody + ; + +actionNodeMember + : memberPrefix actionNode + ; + +actionTargetSuccessionMember + : memberPrefix actionTargetSuccession + ; + +guardedSuccessionMember + : memberPrefix guardedSuccession + ; + +actionUsage + : occurrenceUsagePrefix ACTION actionUsageDeclaration actionBody + ; + +actionUsageDeclaration + : usageDeclaration? valuePart? + ; + +performActionUsage + : occurrenceUsagePrefix PERFORM performActionUsageDeclaration actionBody + ; + +performActionUsageDeclaration + : ( ownedReferenceSubsetting featureSpecializationPart? | ACTION usageDeclaration? ) valuePart? + ; + +actionNode + : controlNode + | sendNode + | acceptNode + | assignmentNode + | terminateNode + | ifNode + | whileLoopNode + | forLoopNode + ; + +actionNodeUsageDeclaration + : ACTION usageDeclaration? + ; + +actionNodePrefix + : occurrenceUsagePrefix actionNodeUsageDeclaration? + ; + +controlNode + : mergeNode + | decisionNode + | joinNode + | forkNode + ; + +controlNodePrefix + : refPrefix ( INDIVIDUAL )? ( portionKind )? usageExtensionKeyword* + ; + +mergeNode + : controlNodePrefix MERGE usageDeclaration? actionBody + ; + +decisionNode + : controlNodePrefix DECIDE usageDeclaration? actionBody + ; + +joinNode + : controlNodePrefix JOIN usageDeclaration? actionBody + ; + +forkNode + : controlNodePrefix FORK usageDeclaration? actionBody + ; + +acceptNode + : occurrenceUsagePrefix acceptNodeDeclaration actionBody + ; + +acceptNodeDeclaration + : actionNodeUsageDeclaration? ACCEPT acceptParameterPart + ; + +acceptParameterPart + : payloadParameterMember ( VIA nodeParameterMember )? + ; + +payloadParameterMember + : payloadParameter + ; + +payloadParameter + : payloadFeature + | identification? payloadFeatureSpecializationPart? triggerValuePart + ; + +triggerValuePart + : triggerFeatureValue + ; + +triggerFeatureValue + : triggerExpression + ; + +triggerExpression + : ( AT | AFTER ) argumentMember + | WHEN argumentExpressionMember + ; + +sendNode + : occurrenceUsagePrefix ( actionNodeUsageDeclaration | actionUsageDeclaration ) SEND ( nodeParameterMember senderReceiverPart? | emptyParameterMember senderReceiverPart? ) actionBody + ; + +sendNodeDeclaration + : actionNodeUsageDeclaration? SEND nodeParameterMember senderReceiverPart? + ; + +senderReceiverPart + : VIA nodeParameterMember ( TO nodeParameterMember )? + | emptyParameterMember TO nodeParameterMember + ; + +nodeParameterMember + : nodeParameter + ; + +nodeParameter + : featureBinding + ; + +featureBinding + : ownedExpression + ; + +emptyParameterMember + : emptyUsage_ + ; + +assignmentNode + : occurrenceUsagePrefix assignmentNodeDeclaration actionBody + ; + +assignmentNodeDeclaration + : ( actionNodeUsageDeclaration )? ASSIGN assignmentTargetMember featureChainMember COLON_EQ nodeParameterMember + ; + +assignmentTargetMember + : assignmentTargetParameter + ; + +assignmentTargetParameter + : ( assignmentTargetBinding DOT )? + ; + +assignmentTargetBinding + : nonFeatureChainPrimaryExpression + ; + +terminateNode + : occurrenceUsagePrefix actionNodeUsageDeclaration? TERMINATE ( nodeParameterMember )? actionBody + ; + +ifNode + : actionNodePrefix IF expressionParameterMember actionBodyParameterMember ( ELSE ( actionBodyParameterMember | ifNodeParameterMember ) )? + ; + +expressionParameterMember + : ownedExpression + ; + +actionBodyParameterMember + : actionBodyParameter + ; + +actionBodyParameter + : ( ACTION usageDeclaration? )? LBRACE actionBodyItem* RBRACE + ; + +ifNodeParameterMember + : ifNode + ; + +whileLoopNode + : actionNodePrefix ( WHILE expressionParameterMember | LOOP emptyParameterMember ) actionBodyParameterMember ( UNTIL expressionParameterMember SEMI )? + ; + +forLoopNode + : actionNodePrefix FOR forVariableDeclarationMember IN nodeParameterMember actionBodyParameterMember + ; + +forVariableDeclarationMember + : usageDeclaration? + ; + +actionTargetSuccession + : ( targetSuccession | guardedTargetSuccession | defaultTargetSuccession ) usageBody + ; + +targetSuccession + : sourceEndMember THEN connectorEndMember + ; + +guardedTargetSuccession + : guardExpressionMember THEN transitionSuccessionMember + ; + +defaultTargetSuccession + : ELSE transitionSuccessionMember + ; + +guardedSuccession + : ( SUCCESSION usageDeclaration? )? FIRST featureChainMember guardExpressionMember THEN transitionSuccessionMember usageBody + ; + +stateDefinition + : occurrenceDefinitionPrefix STATE DEF definitionDeclaration stateDefBody + ; + +stateDefBody + : SEMI + | ( PARALLEL )? LBRACE stateBodyItem* RBRACE + ; + +stateBodyItem + : nonBehaviorBodyItem + | ( sourceSuccessionMember )? behaviorUsageMember ( targetTransitionUsageMember )* + | transitionUsageMember + | entryActionMember ( entryTransitionMember )* + | doActionMember + | exitActionMember + ; + +entryActionMember + : memberPrefix ENTRY stateActionUsage + ; + +doActionMember + : memberPrefix DO stateActionUsage + ; + +exitActionMember + : memberPrefix EXIT stateActionUsage + ; + +entryTransitionMember + : memberPrefix ( guardedTargetSuccession | THEN transitionSuccessionMember ) SEMI + ; + +stateActionUsage + : emptyActionUsage_ SEMI + | statePerformActionUsage + | stateAcceptActionUsage + | stateSendActionUsage + | stateAssignmentActionUsage + ; + +statePerformActionUsage + : performActionUsageDeclaration actionBody + ; + +stateAcceptActionUsage + : acceptNodeDeclaration actionBody + ; + +stateSendActionUsage + : sendNodeDeclaration actionBody + ; + +stateAssignmentActionUsage + : assignmentNodeDeclaration actionBody + ; + +transitionUsageMember + : memberPrefix transitionUsage + ; + +targetTransitionUsageMember + : memberPrefix targetTransitionUsage + ; + +stateUsage + : occurrenceUsagePrefix STATE actionUsageDeclaration stateUsageBody + ; + +stateUsageBody + : SEMI + | ( PARALLEL )? LBRACE stateBodyItem* RBRACE + ; + +exhibitStateUsage + : occurrenceUsagePrefix EXHIBIT ( ownedReferenceSubsetting featureSpecializationPart? | STATE usageDeclaration? ) valuePart? stateUsageBody + ; + +transitionUsage + : TRANSITION ( usageDeclaration? FIRST )? featureChainMember emptyParameterMember ( emptyParameterMember triggerActionMember )? ( guardExpressionMember )? ( effectBehaviorMember )? THEN transitionSuccessionMember actionBody + ; + +targetTransitionUsage + : emptyParameterMember ( TRANSITION ( emptyParameterMember triggerActionMember )? ( guardExpressionMember )? ( effectBehaviorMember )? | emptyParameterMember triggerActionMember ( guardExpressionMember )? ( effectBehaviorMember )? | guardExpressionMember ( effectBehaviorMember )? )? THEN transitionSuccessionMember actionBody + ; + +triggerActionMember + : ACCEPT triggerAction + ; + +triggerAction + : acceptParameterPart + ; + +guardExpressionMember + : IF ownedExpression + ; + +effectBehaviorMember + : DO effectBehaviorUsage + ; + +effectBehaviorUsage + : emptyActionUsage_ + | transitionPerformActionUsage + | transitionAcceptActionUsage + | transitionSendActionUsage + | transitionAssignmentActionUsage + ; + +transitionPerformActionUsage + : performActionUsageDeclaration ( LBRACE actionBodyItem* RBRACE )? + ; + +transitionAcceptActionUsage + : acceptNodeDeclaration ( LBRACE actionBodyItem* RBRACE )? + ; + +transitionSendActionUsage + : sendNodeDeclaration ( LBRACE actionBodyItem* RBRACE )? + ; + +transitionAssignmentActionUsage + : assignmentNodeDeclaration ( LBRACE actionBodyItem* RBRACE )? + ; + +transitionSuccessionMember + : transitionSuccession + ; + +transitionSuccession + : emptyEndMember connectorEndMember + ; + +emptyEndMember + : emptyFeature_ + ; + +calculationDefinition + : occurrenceDefinitionPrefix CALC DEF definitionDeclaration calculationBody + ; + +calculationUsage + : occurrenceUsagePrefix CALC actionUsageDeclaration calculationBody + ; + +calculationBody + : SEMI + | LBRACE calculationBodyPart RBRACE + ; + +calculationBodyPart + : calculationBodyItem* ( resultExpressionMember )? + ; + +calculationBodyItem + : actionBodyItem + | returnParameterMember + ; + +returnParameterMember + : memberPrefix RETURN usageElement + ; + +constraintDefinition + : occurrenceDefinitionPrefix CONSTRAINT DEF definitionDeclaration calculationBody + ; + +constraintUsage + : occurrenceUsagePrefix CONSTRAINT constraintUsageDeclaration calculationBody + ; + +assertConstraintUsage + : occurrenceUsagePrefix ASSERT ( NOT )? ( ownedReferenceSubsetting featureSpecializationPart? | CONSTRAINT constraintUsageDeclaration ) calculationBody + ; + +constraintUsageDeclaration + : usageDeclaration? valuePart? + ; + +requirementDefinition + : occurrenceDefinitionPrefix REQUIREMENT DEF definitionDeclaration requirementBody + ; + +requirementBody + : SEMI + | LBRACE requirementBodyItem* RBRACE + ; + +requirementBodyItem + : definitionBodyItem + | subjectMember + | requirementConstraintMember + | framedConcernMember + | requirementVerificationMember + | actorMember + | stakeholderMember + ; + +subjectMember + : memberPrefix subjectUsage + ; + +subjectUsage + : SUBJECT usageExtensionKeyword* usage + ; + +requirementConstraintMember + : memberPrefix requirementKind requirementConstraintUsage + ; + +requirementKind + : ASSUME + | REQUIRE + ; + +requirementConstraintUsage + : ownedReferenceSubsetting featureSpecializationPart? requirementBody + | ( usageExtensionKeyword* CONSTRAINT | usageExtensionKeyword+ ) constraintUsageDeclaration calculationBody + ; + +framedConcernMember + : memberPrefix FRAME framedConcernUsage + ; + +framedConcernUsage + : ownedReferenceSubsetting featureSpecializationPart? calculationBody + | ( usageExtensionKeyword* CONCERN | usageExtensionKeyword+ ) calculationUsageDeclaration calculationBody + ; + +actorMember + : memberPrefix actorUsage + ; + +actorUsage + : ACTOR usageExtensionKeyword* usage + ; + +stakeholderMember + : memberPrefix stakeholderUsage + ; + +stakeholderUsage + : STAKEHOLDER usageExtensionKeyword* usage + ; + +requirementUsage + : occurrenceUsagePrefix REQUIREMENT constraintUsageDeclaration requirementBody + ; + +satisfyRequirementUsage + : occurrenceUsagePrefix ( ASSERT ( NOT )? | NOT )? SATISFY ( ownedReferenceSubsetting featureSpecializationPart? | REQUIREMENT usageDeclaration? ) valuePart? ( BY satisfactionSubjectMember )? requirementBody + ; + +satisfactionSubjectMember + : satisfactionParameter + ; + +satisfactionParameter + : satisfactionFeatureValue + ; + +satisfactionFeatureValue + : satisfactionReferenceExpression + ; + +satisfactionReferenceExpression + : featureChainMember + ; + +concernDefinition + : occurrenceDefinitionPrefix CONCERN DEF definitionDeclaration requirementBody + ; + +concernUsage + : occurrenceUsagePrefix CONCERN constraintUsageDeclaration requirementBody + ; + +caseDefinition + : occurrenceDefinitionPrefix CASE DEF definitionDeclaration caseBody + ; + +caseUsage + : occurrenceUsagePrefix CASE constraintUsageDeclaration caseBody + ; + +caseBody + : SEMI + | LBRACE caseBodyItem* ( resultExpressionMember )? RBRACE + ; + +caseBodyItem + : actionBodyItem + | returnParameterMember + | subjectMember + | actorMember + | objectiveMember + ; + +objectiveMember + : memberPrefix OBJECTIVE objectiveRequirementUsage + ; + +objectiveRequirementUsage + : usageExtensionKeyword* constraintUsageDeclaration requirementBody + ; + +analysisCaseDefinition + : occurrenceDefinitionPrefix ANALYSIS DEF definitionDeclaration caseBody + ; + +analysisCaseUsage + : occurrenceUsagePrefix ANALYSIS constraintUsageDeclaration caseBody + ; + +verificationCaseDefinition + : occurrenceDefinitionPrefix VERIFICATION DEF definitionDeclaration caseBody + ; + +verificationCaseUsage + : occurrenceUsagePrefix VERIFICATION constraintUsageDeclaration caseBody + ; + +requirementVerificationMember + : memberPrefix VERIFY requirementVerificationUsage + ; + +requirementVerificationUsage + : ownedReferenceSubsetting featureSpecialization* requirementBody + | ( usageExtensionKeyword* REQUIREMENT | usageExtensionKeyword+ ) constraintUsageDeclaration requirementBody + ; + +useCaseDefinition + : occurrenceDefinitionPrefix USE CASE DEF definitionDeclaration caseBody + ; + +useCaseUsage + : occurrenceUsagePrefix USE CASE constraintUsageDeclaration caseBody + ; + +includeUseCaseUsage + : occurrenceUsagePrefix INCLUDE ( ownedReferenceSubsetting featureSpecializationPart? | USE CASE usageDeclaration? ) valuePart? caseBody + ; + +viewDefinition + : occurrenceDefinitionPrefix VIEW DEF definitionDeclaration viewDefinitionBody + ; + +viewDefinitionBody + : SEMI + | LBRACE viewDefinitionBodyItem* RBRACE + ; + +viewDefinitionBodyItem + : definitionBodyItem + | elementFilterMember + | viewRenderingMember + ; + +viewRenderingMember + : memberPrefix RENDER viewRenderingUsage + ; + +viewRenderingUsage + : ownedReferenceSubsetting featureSpecializationPart? usageBody + | ( usageExtensionKeyword* RENDERING | usageExtensionKeyword+ ) usage + ; + +viewUsage + : occurrenceUsagePrefix VIEW usageDeclaration? valuePart? viewBody + ; + +viewBody + : SEMI + | LBRACE viewBodyItem* RBRACE + ; + +viewBodyItem + : definitionBodyItem + | elementFilterMember + | viewRenderingMember + | expose + ; + +expose + : EXPOSE ( membershipExpose | namespaceExpose ) relationshipBody + ; + +membershipExpose + : membershipImport + ; + +namespaceExpose + : namespaceImport + ; + +viewpointDefinition + : occurrenceDefinitionPrefix VIEWPOINT DEF definitionDeclaration requirementBody + ; + +viewpointUsage + : occurrenceUsagePrefix VIEWPOINT constraintUsageDeclaration requirementBody + ; + +renderingDefinition + : occurrenceDefinitionPrefix RENDERING DEF definition + ; + +renderingUsage + : occurrenceUsagePrefix RENDERING usage + ; + +metadataDefinition + : ( ABSTRACT )? definitionExtensionKeyword* METADATA DEF definition + ; + +prefixMetadataUsage + : ownedFeatureTyping + ; + +metadataBodyUsageMember + : metadataBodyUsage + ; + +metadataBodyUsage + : REF? ( COLON_GT_GT | REDEFINES )? ownedRedefinition featureSpecializationPart? valuePart? metadataBody + ; + +extendedDefinition + : basicDefinitionPrefix? definitionExtensionKeyword+ DEF definition + ; + +extendedUsage + : unextendedUsagePrefix usageExtensionKeyword+ usage + ; + +filterPackageImportDeclaration + : membershipImport + | namespaceImportDirect + ; + +namespaceImportDirect + : qualifiedName COLON_COLON STAR ( COLON_COLON STAR_STAR )? + ; + +// ===== Stub rules for undefined references ===== +// These rules are referenced in the spec but not fully defined. +// They need manual review and completion. + +calculationUsageDeclaration + : usageDeclaration? valuePart? + ; + +emptyActionUsage_ + : /* epsilon */ + ; + +emptyFeature_ + : /* epsilon */ + ; + +emptyMultiplicity_ + : /* epsilon */ + ; + +emptyUsage_ + : /* epsilon */ + ; + +filterPackageImport + : IDENTIFIER /* TODO: stub for filterPackageImport */ + ; + +nonFeatureChainPrimaryExpression + : IDENTIFIER /* TODO: stub for nonFeatureChainPrimaryExpression */ + ; + +portConjugation + : /* epsilon */ + ; diff --git a/src/DemaConsulting.SysML2Tools/Placeholder.cs b/src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs similarity index 72% rename from src/DemaConsulting.SysML2Tools/Placeholder.cs rename to src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs index 464861fe..c6808bd6 100644 --- a/src/DemaConsulting.SysML2Tools/Placeholder.cs +++ b/src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs @@ -18,11 +18,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -namespace DemaConsulting.SysML2Tools; +namespace DemaConsulting.SysML2Tools.Parser; -// Phase 0 stub — core library API surface will be added in Phase 1. -#pragma warning disable S2094 // Empty class is intentional Phase 0 stub -internal static class Placeholder +/// +/// Severity level of a SysML diagnostic message. +/// +public enum DiagnosticSeverity { + /// Informational message — not a problem. + Info, + + /// Warning — parseable but suspicious. + Warning, + + /// Error — the file cannot be parsed or resolved correctly. + Error } -#pragma warning restore S2094 diff --git a/src/DemaConsulting.SysML2Tools/Parser/Internal/StdlibLoader.cs b/src/DemaConsulting.SysML2Tools/Parser/Internal/StdlibLoader.cs new file mode 100644 index 00000000..1c2c8b54 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Internal/StdlibLoader.cs @@ -0,0 +1,66 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System.Reflection; + +namespace DemaConsulting.SysML2Tools.Parser.Internal; + +/// +/// Loads the OMG SysML v2 standard library files embedded as assembly resources. +/// +internal static class StdlibLoader +{ + /// + /// Prefix used by the resource names for stdlib files. + /// + private static readonly string ResourcePrefix = + typeof(StdlibLoader).Namespace!.Replace(".Parser.Internal", string.Empty) + ".Stdlib."; + + /// + /// Returns all stdlib files as (virtualPath, content) pairs. + /// + /// + /// Virtual paths use the [stdlib] prefix to distinguish them from user files + /// in diagnostic messages. + /// + internal static IEnumerable<(string VirtualPath, string Content)> LoadAll() + { + var assembly = typeof(StdlibLoader).Assembly; + foreach (var name in assembly.GetManifestResourceNames()) + { + if (!name.StartsWith(ResourcePrefix, StringComparison.Ordinal)) + { + continue; + } + + if (!name.EndsWith(".sysml", StringComparison.OrdinalIgnoreCase)) + { + // .kerml files require the KerML grammar — deferred to Phase 2 + continue; + } + + var virtualPath = "[stdlib]" + name[ResourcePrefix.Length..]; + + using var stream = assembly.GetManifestResourceStream(name)!; + using var reader = new System.IO.StreamReader(stream); + yield return (virtualPath, reader.ReadToEnd()); + } + } +} diff --git a/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs b/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs new file mode 100644 index 00000000..a31979b9 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs @@ -0,0 +1,69 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using Antlr4.Runtime; +using DemaConsulting.SysML2Tools.Parser.Generated; + +namespace DemaConsulting.SysML2Tools.Parser.Internal; + +/// +/// ANTLR4 error listener that captures syntax errors into a shared diagnostic list. +/// +internal sealed class SysmlDiagnosticListener : + IAntlrErrorListener, + IAntlrErrorListener +{ + private readonly string _filePath; + private readonly List _diagnostics; + + /// + /// Initializes a new listener that appends errors to . + /// + internal SysmlDiagnosticListener(string filePath, List diagnostics) + { + _filePath = filePath; + _diagnostics = diagnostics; + } + + // Parser error handler + void IAntlrErrorListener.SyntaxError( + System.IO.TextWriter output, + IRecognizer recognizer, + IToken offendingSymbol, + int line, + int charPositionInLine, + string msg, + RecognitionException e) => + Append(line, charPositionInLine, msg); + + // Lexer error handler + void IAntlrErrorListener.SyntaxError( + System.IO.TextWriter output, + IRecognizer recognizer, + int offendingSymbol, + int line, + int charPositionInLine, + string msg, + RecognitionException e) => + Append(line, charPositionInLine, msg); + + private void Append(int line, int column, string msg) => + _diagnostics.Add(new SysmlDiagnostic(_filePath, line, column, DiagnosticSeverity.Error, msg)); +} diff --git a/test/DemaConsulting.SysML2Tools.Tests/Placeholder.cs b/src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs similarity index 60% rename from test/DemaConsulting.SysML2Tools.Tests/Placeholder.cs rename to src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs index 5e1a4d2d..57ee9b6c 100644 --- a/test/DemaConsulting.SysML2Tools.Tests/Placeholder.cs +++ b/src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs @@ -18,4 +18,21 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -// Phase 0 stub — core library tests will be added in Phase 1. +namespace DemaConsulting.SysML2Tools.Parser; + +/// +/// A single diagnostic message produced while parsing a SysML v2 file. +/// +/// +/// The source file path (or a [stdlib]… virtual path for embedded library files). +/// +/// One-based line number within . +/// Zero-based column offset within the line. +/// Severity of the diagnostic. +/// Human-readable description of the problem. +public sealed record SysmlDiagnostic( + string FilePath, + int Line, + int Column, + DiagnosticSeverity Severity, + string Message); diff --git a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs new file mode 100644 index 00000000..a4821cf1 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs @@ -0,0 +1,53 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +namespace DemaConsulting.SysML2Tools.Parser; + +/// +/// The aggregate result of parsing a SysML v2 workspace (stdlib + user files). +/// +public sealed class WorkspaceParseResult +{ + /// + /// Initializes a new instance of . + /// + /// All files that were parsed (stdlib + user files). + /// All diagnostics collected across all files. + internal WorkspaceParseResult(IReadOnlyList files, IReadOnlyList diagnostics) + { + Files = files; + Diagnostics = diagnostics; + } + + /// + /// Gets all file paths that were parsed, including stdlib virtual paths. + /// + public IReadOnlyList Files { get; } + + /// + /// Gets all diagnostics collected across every parsed file. + /// + public IReadOnlyList Diagnostics { get; } + + /// + /// Gets a value indicating whether any error-level diagnostics exist. + /// + public bool HasErrors => Diagnostics.Any(d => d.Severity == DiagnosticSeverity.Error); +} diff --git a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs new file mode 100644 index 00000000..1a85d071 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs @@ -0,0 +1,107 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using Antlr4.Runtime; +using DemaConsulting.SysML2Tools.Parser.Generated; +using DemaConsulting.SysML2Tools.Parser.Internal; + +namespace DemaConsulting.SysML2Tools.Parser; + +/// +/// Parses one or more SysML v2 source files together with the OMG stdlib. +/// +/// +/// Phase 1 performs syntax-only parsing (CST construction). No semantic model, +/// symbol table, or reference resolution is done at this stage. +/// +public static class WorkspaceParser +{ + /// + /// Parses the stdlib plus every file matched by . + /// + /// + /// Absolute or relative paths to .sysml or .kerml files to include. + /// The OMG stdlib is always implicitly included. + /// + /// + /// A containing all files parsed and all + /// diagnostics collected. + /// + public static WorkspaceParseResult Parse(IEnumerable filePaths) + { + ArgumentNullException.ThrowIfNull(filePaths); + + var allFiles = new List(); + var allDiagnostics = new List(); + + // Parse each stdlib file (silently — no user-visible output on success) + foreach (var (virtualPath, content) in StdlibLoader.LoadAll()) + { + allFiles.Add(virtualPath); + ParseSource(virtualPath, content, allDiagnostics); + } + + // Parse user-supplied files + foreach (var path in filePaths) + { + allFiles.Add(path); + var content = File.ReadAllText(path); + ParseSource(path, content, allDiagnostics); + } + + return new WorkspaceParseResult(allFiles, allDiagnostics); + } + + /// + /// Parses SysML v2 source text from a string (used in tests and for stdlib loading). + /// + /// Virtual or real path used in diagnostic messages. + /// Source text to parse. + /// Diagnostics produced during parsing. + public static IReadOnlyList ParseSource(string filePath, string content) + { + var diagnostics = new List(); + ParseSource(filePath, content, diagnostics); + return diagnostics; + } + + /// + /// Parses SysML v2 source text and appends any diagnostics to . + /// + private static void ParseSource(string filePath, string content, List diagnostics) + { + var listener = new SysmlDiagnosticListener(filePath, diagnostics); + + var inputStream = new AntlrInputStream(content); + + var lexer = new SysMLv2Lexer(inputStream); + lexer.RemoveErrorListeners(); + lexer.AddErrorListener(listener); + + var tokenStream = new CommonTokenStream(lexer); + + var parser = new SysMLv2Parser(tokenStream); + parser.RemoveErrorListeners(); + parser.AddErrorListener(listener); + + // Trigger parse; the CST root is discarded in Phase 1 + _ = parser.rootNamespace(); + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/AnalysisTooling.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/AnalysisTooling.sysml new file mode 100644 index 00000000..fb92b904 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/AnalysisTooling.sysml @@ -0,0 +1,34 @@ +standard library package AnalysisTooling { + doc + /* + * This package contains definitions for metadata annotations related + * to analysis tool integration. + */ + + private import ScalarValues::*; + + metadata def ToolExecution { + doc + /* + * ToolExecution metadata identifies an external analysis tool to be + * used to implement the annotated action. + */ + + attribute toolName : String; + attribute uri : String; + } + + metadata def ToolVariable { + doc + /* + * ToolVariable metadata is used in the context of an action that has + * been annotated with ToolExecution metadata. It is used to annotate + * a parameter or other feature of the action with the name of the + * variable in the tool that is to correspond to the annotated + * feature. + */ + + attribute name : String; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/SampledFunctions.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/SampledFunctions.sysml new file mode 100644 index 00000000..d6539811 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/SampledFunctions.sysml @@ -0,0 +1,119 @@ +standard library package SampledFunctions { + doc + /* + * This package provides a library model of discretely sampled mathematical functions. + */ + + private import Base::Anything; + private import ScalarValues::Positive; + private import Collections::KeyValuePair; + private import Collections::OrderedMap; + private import SequenceFunctions::size; + private import ControlFunctions::forAll; + private import ControlFunctions::collect; + private import ControlFunctions::select; + + attribute def SamplePair :> KeyValuePair { + doc + /* + * SamplePair is a key-value pair of a domain-value and a range-value, used as a sample element in SampledFunction. + */ + + attribute domainValue :>> key; + attribute rangeValue :>> val; + } + + attribute def SampledFunction :> OrderedMap { + doc + /* + * SampledFunction is a variable-size, ordered collection of 'SamplePair' elements that represents a generic, discretely sampled, + * uni-variate or multi-variate mathematical function. The function must be montonic, either strictly increasing or strictly + * decreasing. + * + * It maps discrete domain values to discrete range values. + * The domain of the function is represented by the sequence of 'domainValue' of each 'SamplePair' in 'samples', and + * the range of the function is represented by the sequence of 'rangeValue' of each 'SamplePair' in 'samples'. + */ + + attribute samples: SamplePair[0..*] ordered :>> elements; + + assert constraint { + // Note: Assumes the functions '<' and '>' are defined for the domain type. + (1..size(samples)-1)->forAll { in i; (samples.domainValue#(i) < samples.domainValue#(i+1)) } or // Strictly increasing + (1..size(samples)-1)->forAll { in i; (samples.domainValue#(i) > samples.domainValue#(i+1)) } // Strictly decreasing + } + } + + calc def Domain { + doc + /* + * Domain returns the sequence of the domainValues of all samples in a SampledFunction. + */ + + in fn : SampledFunction; + return : Anything[0..*] = fn.samples.domainValue; + } + + calc def Range { + doc + /* + * Range returns the sequence of the rangeValues of all samples in a SampledFunction. + */ + + in fn : SampledFunction; + return : Anything[0..*] = fn.samples.rangeValue; + } + + calc def Sample { + doc + /* + * Sample returns a SampledFunction that samples a given calculation over a sequence of domainValues. + */ + + in calc calculation { in x; } + in attribute domainValues [0..*]; + return sampling = new SampledFunction ( + samples = domainValues->collect { in x; new SamplePair(x, calculation(x)) } + ); + } + + calc def Interpolate { + doc + /* + * An Interpolate calculation returns an interpolated range value from a given SampledFunction for a given domain value. + * If the input domain value is outside the bounds of the domainValues of the SampleFunction, null is returned. + */ + + in attribute fn : SampledFunction; + in attribute value; + return attribute result; + } + + calc interpolateLinear : Interpolate { + doc + /* + * interpolateLinear is an Interpolate calculation assuming a linear functional form between SamplePairs. + */ + + in attribute fn : SampledFunction; + in attribute value; + + private attribute domainValues = Domain(fn); + private attribute index : Positive[0..1] = + (1..size(domainValues))->select { in i : Positive; domainValues#(i) <= value }#(1); + + private calc def Linear { + in attribute lowerSample : SamplePair; + in attribute upperSample : SamplePair; + in attribute value; + private attribute f = (value - lowerSample.domainValue) / (lowerSample.domainValue - upperSample.domainValue); + return result = upperSample.rangeValue + f * (lowerSample.rangeValue - upperSample.rangeValue); + } + + return result [0..1] = + if index == null or index == size(domainValues)? null + else if domainValues#(index) < domainValues#(index+1)? Linear(fn.samples#(index), fn.samples#(index+1), value) + else Linear(fn.samples#(index+1), fn.samples#(index), value); + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/StateSpaceRepresentation.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/StateSpaceRepresentation.sysml new file mode 100644 index 00000000..45c28b65 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/StateSpaceRepresentation.sysml @@ -0,0 +1,143 @@ +standard library package StateSpaceRepresentation { + doc + /* + * This package provides a model of the foundational state-space system representation, + * commonly used in control systems. + */ + + private import ISQ::DurationValue; + private import Quantities::VectorQuantityValue; + private import VectorCalculations::*; + + abstract attribute def StateSpace :> VectorQuantityValue; + abstract attribute def Input :> VectorQuantityValue; + abstract attribute def Output :> VectorQuantityValue; + + abstract calc def GetNextState { + in input: Input; + in stateSpace: StateSpace; + in timeStep: DurationValue; + return : StateSpace; + } + abstract calc def GetOutput { + in input: Input; + in stateSpace: StateSpace; + return : Output; + } + + abstract action def StateSpaceEventDef { + doc + /* + * Events to be received. + */ + } + action def ZeroCrossingEventDef :> StateSpaceEventDef; + + item def StateSpaceItem { + doc + /* + * Item for SSR connection + */ + } + + abstract action def StateSpaceDynamics { + doc + /* + * StateSpaceDynamics is the simplest form of State Space Representation, + * and nextState directly computes the stateSpace of the next timestep. + */ + + in attribute input: Input; + + abstract calc getNextState: GetNextState; + abstract calc getOutput: GetOutput; + attribute stateSpace: StateSpace; + + out attribute output: Output = getOutput(input, stateSpace); + } + + abstract attribute def StateDerivative :> VectorQuantityValue { + doc + /* + * The definition of the time derivative of StateSpace, which means dx/dt, where x is StateSpace + */ + + ref stateSpace: StateSpace; + constraint { stateSpace.order == order } + } + + abstract calc def GetDerivative { + doc + /* + * Computes the time derivative of stateSpace, which corresponds dx/dt = f(u, x), where u is input and x is stateSpace. + */ + + in input: Input; + in stateSpace: StateSpace; + return : StateDerivative; + } + + abstract calc def Integrate { + doc + /* + * Integrates stateSpace to compute the next stateSpace, which corresponds to x + int dx/dt dt. + * Its actual implementation should be given by a solver. + */ + + in getDerivative: GetDerivative; + in input: Input; + in initialState: StateSpace; + in timeInterval: DurationValue; + return result: StateSpace; + } + + abstract action def ContinuousStateSpaceDynamics :> StateSpaceDynamics { + doc + /* + * ContinuousStateSpaceDynamics represents continuous behavior. + * derivative needs to return a time derivative of stateSpace, i.e. dx/dt. + */ + + abstract calc getDerivative: GetDerivative; + calc :>> getNextState: GetNextState { + /* We compute nextState by Integrate defined above by giving derivative calc. */ + calc integrate: Integrate { + in getDerivative = ContinuousStateSpaceDynamics::getDerivative; + in input = GetNextState::input; + in initialState = GetNextState::stateSpace; + in timeInterval = GetNextState::timeStep; + } + return result = integrate.result; + } + + event occurrence zeroCrossingEvents[0..*] : ZeroCrossingEventDef { + /* ContinuousStateSpaceDynamics may cause zero crossings anomaly. */ + } + } + + abstract calc def GetDifference { + doc + /* + * Computes difference of stateSpace by one timestep, that is x(k+1) - x(k), + * where k is the timestep number. + */ + + in input: Input; + in stateSpace: StateSpace; + return : StateSpace; + } + + abstract action def DiscreteStateSpaceDynamics :> StateSpaceDynamics { + doc + /* + * DiscreteStateSpaceDynamics represents discrete behavior. + * differences needs to return difference of the stateSpace for each timestep. + */ + + abstract calc getDifference: GetDifference; + calc :>> getNextState: GetNextState { + attribute diff: StateSpace = getDifference(input, stateSpace); + return result = stateSpace + diff; + } + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/TradeStudies.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/TradeStudies.sysml new file mode 100644 index 00000000..5e98e0f2 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/TradeStudies.sysml @@ -0,0 +1,171 @@ +standard library package TradeStudies { + doc + /* + * This package provides a simple framework for defining trade-off study analysis cases. + */ + + private import Base::Anything; + private import ScalarValues::*; + private import ScalarFunctions::*; + private import ControlFunctions::*; + + abstract calc def EvaluationFunction { + doc + /* + * An EvaluationFunction is a calculation that evaluates a TradeStudy alternative, + * producing a ScalarValue that can be comparted with the evaluation of other + * alternatives. + */ + + in ref alternative : Anything { + doc + /* + * The alternative to be evaluated. + */ + } + + return attribute result : ScalarValue[1] { + doc + /* + * A ScalarValue representing the evaluation of the given alternative. + */ + } + } + + abstract requirement def TradeStudyObjective { + doc + /* + * A TradeStudyObjective is the base definition for the objective of a TradeStudy. + * The requirement is to choose from a given set of alternatives the selectedAlternative + * for that has the best evaluation according to a given EvaluationFunction. What + * value is considered "best" is not defined in the abstract base definition but must be + * computed in any concrete specialization. + */ + + subject selectedAlternative : Anything { + doc + /* + * The alternative that should be selected, as evaluated using the given + * ObjectiveFunction. + */ + } + + in ref alternatives : Anything[1..*] { + doc + /* + * The alternatives being considered in the TradeStudy for which this TradeStudyObjective + * is the objective. + */ + } + + in calc eval : EvaluationFunction { + doc + /* + * The EvaluationFunction to be used in evaluating the given alternatives. + */ + } + + attribute best : ScalarValue { + doc + /* + * Out of the evaluation results of all the given alternatives, the one that is considered + * "best", in the sense that it is the value the selectedAlternative should have. This + * value must be computed in any concrete specialization of TradeStudyObjective. + */ + } + + require constraint { eval(selectedAlternative) == best } + } + + requirement def MinimizeObjective :> TradeStudyObjective { + doc + /* + * A MinimizeObjective is a TradeStudyObjective that requires that the + * selectedAlternative have the minimum ObjectiveFunction value of all the + * given alternatives. + */ + + attribute :>> best = alternatives->minimize { + doc + /* + * For a MinimizeObjective, the best value is the minimum one. + */ + + in x; eval(x) + }; + } + + requirement def MaximizeObjective :> TradeStudyObjective { + doc + /* + * A MaximizeObjective is a TradeStudyObjective that requires that the + * selectedAlternative have the maximum ObjectiveFunction value of all the + * given alternatives. + */ + + attribute :>> best = alternatives->maximize { + doc + /* + * For a MinimizeObjective, the best value is the maximum one. + */ + + in x; eval(x) + }; + } + + abstract analysis def TradeStudy { + doc + /* + * A TradeStudy is an analysis case whose subject is a set of alternatives + * (at least one) and whose result is a selection of one of those alternatives. + * The alternatives are evaluated based on a given ObjectiveFunction and the + * selection is made such that it satisfies the objective of the TradeStudy + * (which must be a TradeStudyObjective). + */ + + subject studyAlternatives : Anything[1..*] { + doc + /* + * The set of alternatives being considered in this TradeStudy. + * + * In a TradeStudy usage, bind this feature to the actual collection of + * alternatives to be considered. + */ + } + + abstract calc evaluationFunction : EvaluationFunction { + doc + /* + * The EvaluationFunction to be used to evaluate the alternatives. + * + * In a TradeStudy usage, redefine this feature to provide the desired + * calculation (or bind it to a calculation usage that does so). + */ + } + + objective tradeStudyObjective : TradeStudyObjective { + doc + /* + * The objective of this TradeStudy. + * + * Redefine this feature to give it a definition that is a concrete + * specialization of TradeStudyObjective. That can either be one of the + * specializations provided in this package, or a more specific user- + * defined one. + */ + + subject :>> selectedAlternative; + in ref :>> alternatives = studyAlternatives; + in calc :>> eval = evaluationFunction; + } + + return selectedAlternative : Anything = studyAlternatives->selectOne {in ref a { + doc + /* + * The alternative selected by this TradeStudy, which is the one that meets the + * requirement of the tradeStudyObjective. + */ + } tradeStudyObjective(selectedAlternative = a)}; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CausationConnections.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CausationConnections.sysml new file mode 100644 index 00000000..23086e38 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CausationConnections.sysml @@ -0,0 +1,83 @@ +standard library package CausationConnections { + doc + /* + * This package provides a library model modeling causes, effects, and causation connections + * between them. + */ + + private import SequenceFunctions::isEmpty; + private import SequenceFunctions::size; + private import SequenceFunctions::intersection; + + abstract occurrence causes[*] { + doc /* Occurrences that are causes. */ + } + + abstract occurrence effects[*] { + doc /* Occurrences that are effects. */ + } + + abstract connection def Multicausation { + doc + /* + * A Multicausation connection models the situation in which one set of + * occurrences causes another. + * + * To create a Multicausation connection, specialize this connection definition + * adding specific end features of the relavent types. Ends representing causes + * should subset 'causes', while ends representing effects should subset 'effects'. + * There must be at least one cause and at least one effect. + */ + + abstract constant ref occurrence causes[1..*] :>> causes :> participant { + doc + /* + * The causing occurrences. (Constant for each Multicausation instance.) + */ + } + abstract constant ref occurrence effects[1..*] :>> effects :> participant { + doc + /* + * The effect occurrences caused by the causing occurrences. + * (Constant for each Multicausation instance.) + */ + } + + private assert constraint disjointCauseEffect { + doc /* causes must be disjoint from effects. */ + isEmpty(intersection(causes, effects)) + } + + private succession causalOrdering first [nCauses] causes.startShot then [nEffects] effects { + doc /* All causes must exist before all effects. */ + attribute nCauses = size(causes); + attribute nEffects = size(effects); + } + } + + abstract connection multicausations : Multicausation[*] { + doc /* multicausations is the base feature for Multicausation ConnectionUsages. */ + } + + connection def Causation :> Multicausation { + doc + /* + * A Causation is a binary Multicausation in which a single cause occurrence + * causes a single effect occurrence. (However, a single cause can separately + * have multiple effects, and a single effect can have separate Causation + * connections with multiple causes.) + */ + + end theCauses [*] occurrence theCause :> causes :>> source { + doc /* The single causing occurrence. */ + } + + end theEffects [*] occurrence theEffect :> effects :>> target { + doc /* The single effect occurrence resulting from the cause. */ + } + } + + abstract connection causations : Causation[*] :> multicausations { + doc /* causations is the base feature for Causation ConnectionUsages. */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CauseAndEffect.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CauseAndEffect.sysml new file mode 100644 index 00000000..6a104d9a --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CauseAndEffect.sysml @@ -0,0 +1,81 @@ +standard library package CauseAndEffect { + doc /* This package provides language-extension metadata for cause-effect modeling. */ + + public import CausationConnections::*; + private import ScalarValues::*; + private import Metaobjects::SemanticMetadata; + + metadata def CauseMetadata :> SemanticMetadata { + doc + /* + * CauseMetadata identifies a usage as being a cause occurrence. + * It is intended to be used to tag the cause ends of a Multicausation. + */ + + ref :>> annotatedElement : SysML::Usage; + ref :>> baseType = causes as SysML::Usage; + } + + metadata def EffectMetadata :> SemanticMetadata { + doc + /* + * EffectMetadata identifies a usage as being an effect occurrence. + * It is intended to be used to tag the effect ends of a Multicausation. + */ + + ref :>> annotatedElement : SysML::Usage; + ref :>> baseType = effects as SysML::Usage; + } + + metadata def CausationMetadata { + doc + /* + * CausationMetadata allows for the specification of additional metadata about + * a cause-effect connection definition or usage. + */ + + ref :> annotatedElement : SysML::ConnectionDefinition; + ref :> annotatedElement : SysML::ConnectionUsage; + + attribute isNecessary : Boolean default false { + doc + /* + * Whether all the causes are necessary for all the effects to occur. + * If this is false (the default), then some or all of the effects may + * still have occurred even if some of the causes did not. + */ + } + + attribute isSufficient : Boolean default false { + doc + /* + * Whether the causes were sufficient for all the effects to occur. + * If this is false (the default), then it may be the case that some + * other occurrences were also necessary for some or all of the effects + * to have occurred. + */ + } + + attribute probability : Real[0..1] { + doc /* The probability that the causes will actually result in effects occurring. */ + } + } + + metadata def MulticausationSemanticMetadata :> CausationMetadata, SemanticMetadata { + doc + /* + * MulticausationMetadata is SemanticMetadata for a Multicausation connection. + */ + + ref :>> baseType = multicausations meta SysML::Usage; + } + + metadata def CausationSemanticMetadadata :> CausationMetadata, SemanticMetadata { + doc + /* + * CausationMetadata is SemanticMetadata for a Causation connection. + */ + + ref :>> baseType = causations meta SysML::Usage; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/ShapeItems.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/ShapeItems.sysml new file mode 100644 index 00000000..9cd6cd2e --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/ShapeItems.sysml @@ -0,0 +1,899 @@ +standard library package ShapeItems { + doc + /* + * This package provides a model of items that represent basic geometric shapes. + */ + + private import ScalarValues::Boolean; + private import ScalarValues::Positive; + private import ISQSpaceTime::*; + private import ISQBase::*; + private import SI::m; + private import Occurrences::MatesWith; + private import Objects::*; + private import Items::Item; + private import SequenceFunctions::equals; + private import SequenceFunctions::isEmpty; + private import SequenceFunctions::notEmpty; + private import SequenceFunctions::size; + private import SequenceFunctions::includes; + private import ControlFunctions::'if'; + private import ControlFunctions::forAll; + private import ControlFunctions::exists; + private import Quantities::scalarQuantities; + + item def PlanarCurve :> Curve { + doc + /* + * A PlanarCurve is a Curve with a given length embeddable in a plane. + */ + + attribute :>> length [1]; + + attribute :>> outerSpaceDimension; + assert constraint { notEmpty(outerSpaceDimension) & outerSpaceDimension <= 2 } + } + + item def PlanarSurface :> Surface { + doc + /* + * A PlanarSurface is a flat Surface with a given area. + */ + + attribute :>> area [1]; + attribute :>> outerSpaceDimension = 2; + + item :>> shape : PlanarCurve; + } + + item def Line :> PlanarCurve { + doc + /* + * A Line is a Curve that is a straight line of a given length. + */ + + attribute :>> length [1]; + attribute :>> outerSpaceDimension = 1; + } + + abstract item def Path :> StructuredSpaceObject::StructuredCurve { + doc + /* + * Path is the most general structured Curve. + */ + + item :>> faces [0]; + item :>> edges [1..*] { + item :>> vertices [0..2]; + } + item :>> vertices [*] = edges.vertices; + + assert constraint { isClosed == vertices->forAll{in p1 : Point; + vertices->exists{p2 : Point; p1 != p2 and + includes(p1.matingOccurrences, p2) } } } + } + + attribute semiMajorAxis : LengthValue [0..*] :> scalarQuantities; + attribute semiMinorAxis : LengthValue [0..*] :> scalarQuantities; + attribute xoffset : LengthValue [0..*] :> scalarQuantities default 0 [m]; + attribute yoffset : LengthValue [0..*] :> scalarQuantities default 0 [m]; + attribute baseLength : LengthValue [0..*] :> scalarQuantities; + attribute baseWidth : LengthValue [0..*] :> scalarQuantities; + + item def ConicSection :> Path, PlanarCurve { + doc + /* + * A ConicSection is a closed PlanarCurve, possibly disconnected, see Hyperbola. + */ + + + item :>> edges [1..2]; + + item :>> vertices [0]; + } + + item def Ellipse :> ConicSection { + doc + /* + * An Ellipse is a ConicSection in the shape of an ellipse of a given semiaxes. + */ + + attribute :>> semiMajorAxis [1]; + attribute :>> semiMinorAxis [1]; + + item :>> edges [1]; + } + + item def Circle :> Ellipse { + doc + /* + * A Circle is an Ellipse with semiaxes equal to its radius. + */ + + attribute :>> radius [1]; + attribute :>> semiMajorAxis [1] = radius; + attribute :>> semiMinorAxis [1] = radius; + + item :>> edges { + attribute length [1] = Circle::radius * TrigFunctions::pi * 2; + } + } + + item def Parabola :> ConicSection { + doc + /* + * A Parabola is a ConicSection in the shape of a parabola of a given focal length. + */ + + attribute focalDistance : LengthValue [1] :> scalarQuantities; + + item :>> edges [1]; + } + + item def Hyperbola :> ConicSection { + doc + /* + * A Hyperbola is a ConicSection in the shape of a hyperbola with given axes. + */ + + attribute tranverseAxis : LengthValue [1] :> scalarQuantities; + attribute conjugateAxis : LengthValue [1] :> scalarQuantities; + } + + item def Polygon :> Path, PlanarCurve { + doc + /* + * A Polygon is a closed planar Path with straight edges. + */ + + item :>> edges : Line { item :>> vertices [2]; } + + attribute :>> isClosed = true; + + assert constraint { (1..size(edges))->forAll {in i; + edges#(i).vertices->equals((vertices#((2*i)-1), vertices#(2*i))) and + includes((edges#(i).vertices#(2) as Item).matingOccurrences, + edges#(if i==size(edges) ? 1 else i+1).vertices#(1)) } } + } + + item def Triangle :> Polygon { + doc + /* + * A Triangle is three-sided Polygon with given length (base), width (perpendicular distance + * from base to apex), and offset of this perpendicular at the base from the center of the base. + */ + + attribute :>> length [1]; + attribute :>> width [1]; + attribute :>> xoffset [1]; + + item :>> edges [3] = (base, e2, e3); + item base [1] { length = Triangle::length; } + item e2 [1]; + item e3 [1]; + + item :>> vertices [6]; + item v12 [2] ordered = (vertices#(2), vertices#(3)); + item apex [2] ordered = (vertices#(4), vertices#(5)); + item v31 [2] ordered = (vertices#(6), vertices#(1)); + } + + item def RightTriangle :> Triangle { + doc + /* + * A RightTriangle is a Triangle with sides opposite the hypotenuse at right angles. + */ + + attribute :>> xoffset = length / 2; + + item :>> e2 { attribute :>> length = Triangle::width; } + + item hypotenuse :>> e3 { + attribute :>> length = ( Triangle::length^2 + Triangle::width^2 ); + } + } + + item def Quadrilateral :> Polygon { + doc + /* + * A Quadrilateral is a four-sided Polygon. + */ + + item :>> edges [4] = (e1, e2, e3, e4); + item e1 [1]; + item e2 [1]; + item e3 [1]; + item e4 [1]; + + item :>> vertices [8]; + item v12 [2] ordered = (vertices#(2), vertices#(3)); + item v23 [2] ordered = (vertices#(4), vertices#(5)); + item v34 [2] ordered = (vertices#(6), vertices#(7)); + item v41 [2] ordered = (vertices#(6), vertices#(1)); + } + + item def Rectangle :> Quadrilateral { + doc + /* + * A Rectangle is a Quadrilateral four right angles and given length and width. + */ + + attribute :>> length [1]; + attribute :>> width [1]; + + item :>> e1 { attribute :>> length = Rectangle::length; } + item :>> e2 { attribute :>> length = Rectangle::width; } + item :>> e3 { attribute :>> length = e1.length; } + item :>> e4 { attribute :>> length = e2.length; } + } + + abstract item def Shell :> StructuredSpaceObject::StructuredSurface { + doc + /* + * Shell is the most general structured Surface. + */ + } + + item def Disc :> Shell, PlanarSurface { + doc + /* + * A Disc is a Shell bound by an Ellipse. + */ + + attribute :>> semiMajorAxis [1]; + attribute :>> semiMinorAxis [1]; + + item :>> shape : Ellipse [1] { + attribute :>> semiMajorAxis = Disc::semiMajorAxis; + attribute :>> semiMinorAxis = Disc::semiMinorAxis; + } + + item :>> faces : PlanarSurface [1] { + item :>> edges [1]; + } + item :>> edges : Ellipse [1] = shape { + attribute :>> Shell::edges::innerSpaceDimension, Ellipse::innerSpaceDimension; + ref item :>> Shell::edges::vertices, Ellipse::vertices; + } + item :>> vertices [0]; + } + + item def CircularDisc :> Disc { + doc + /* + * A CircularDisc is a Disc bound by a Circle. + */ + + attribute :>> radius [1]; + attribute :>> semiMajorAxis [1] = radius; + attribute :>> semiMinorAxis [1] = radius; + + item :>> shape : Circle { + attribute :>> Disc::shape::semiMajorAxis, Circle::semiMajorAxis; + attribute :>> Disc::shape::semiMinorAxis, Circle::semiMinorAxis; + } + item :>> edges : Circle; + } + + item def ConicSurface :> Shell { + doc + /* + * A ConicSurface is a Surface that has ConicSection cross-sections. + */ + + item :>> faces [1..2]; + item :>> edges [0]; + item :>> vertices [0]; + + attribute :>> genus = 0; + } + + item def Ellipsoid :> ConicSurface { + doc + /* + * An Ellipsoid is a ConicSurface with only elliptical cross-sections. + */ + + attribute semiAxis1 : LengthValue [1] :> scalarQuantities; + attribute semiAxis2 : LengthValue [1] :> scalarQuantities; + attribute semiAxis3 : LengthValue [1] :> scalarQuantities; + + item :>> faces [1]; + } + + item def Sphere :> Ellipsoid { + doc + /* + * A Sphere is an Ellipsoid with all the same semiaxes. + */ + + attribute :>> radius [1]; + attribute :>> semiAxis1 [1] = radius; + attribute :>> semiAxis2 [1] = radius; + attribute :>> semiAxis3 [1] = radius; + } + + item def Paraboloid :> ConicSurface { + doc + /* + * A Paraboloid is a ConicSurface with only parabolic cross-sections. + */ + + attribute focalDistance : LengthValue [1] :> scalarQuantities; + + item :>> faces [1]; + } + + item def Hyperboloid :> ConicSurface { + doc + /* + * A Hyperboloid is a ConicSurface with only hyperbolic cross-sections. + */ + + attribute transverseAxis : LengthValue [1] :> scalarQuantities; + attribute conjugateAxis : LengthValue [1] :> scalarQuantities; + } + + item def Toroid :> Shell { + doc + /* + * A Toroid is a surface generated from revolving a planar closed curve about an line coplanar + * with the curve. It is single sided with one hole. + */ + + attribute revolutionRadius : LengthValue [1] :> scalarQuantities; + + item revolvedCurve : PlanarCurve [1] { attribute :>> isClosed = true; } + + item :>> faces [1]; + item :>> edges [0]; + item :>> vertices [0]; + + attribute :>> genus = 1; + } + + item def Torus :> Toroid { + doc + /* + * A Torus is a revolution of a Circle. + */ + + attribute majorRadius :>> revolutionRadius; + attribute minorRadius : LengthValue [1] :> scalarQuantities; + + item :>> revolvedCurve: Circle [1] { attribute :>> radius = minorRadius; } + } + + + item def RectangularToroid :> Toroid { + doc + /* + * A RectangularToroid is a revolution of a Rectangle. + */ + + attribute rectangleLength : LengthValue [1] :> scalarQuantities; + attribute rectangleWidth : LengthValue [1] :> scalarQuantities; + + item :>> revolvedCurve: Rectangle [1] { + attribute :>> length = rectangleLength; + attribute :>> width = rectangleWidth; + attribute :>> revolvedCurve::isClosed, Rectangle::isClosed; + } + } + + item def ConeOrCylinder :> Shell { + doc + /* + * A ConeOrCylinder is Shell that a Cone or a Cylinder with a given elliptical base, + * height, width (perpendicular distance from the base to the center of the top side or vertex), + * and offsets of this perpendicular at the base from the center of the base. + */ + + attribute :>> semiMajorAxis [1]; + attribute :>> semiMinorAxis [1]; + attribute :>> height [1]; + + attribute :>> xoffset [1]; + attribute :>> yoffset [1]; + + item :>> faces [2..3]; + item base : Disc [1] :> faces { + attribute :>> Disc::innerSpaceDimension, faces::innerSpaceDimension; + ref :>> Disc::edges, ConeOrCylinder::faces::edges { + attribute :>> Disc::edges::innerSpaceDimension, ConeOrCylinder::faces::edges::innerSpaceDimension; + } + ref :>> Disc::vertices, ConeOrCylinder::faces::vertices; + } + item af : Disc [0..1] :> faces { + attribute :>> Disc::innerSpaceDimension, faces::innerSpaceDimension; + ref :>> Disc::edges, ConeOrCylinder::faces::edges { + attribute :>> Disc::edges::innerSpaceDimension, ConeOrCylinder::faces::edges::innerSpaceDimension; + } + ref :>> Disc::vertices, ConeOrCylinder::faces::vertices; + } + item cf : Surface [1] :> faces; + + item :>> edges [2..4] = faces.edges; + item be [2] :> edges { + attribute :>> semiMajorAxis = ConeOrCylinder::semiMajorAxis; + attribute :>> semiMinorAxis = ConeOrCylinder::semiMinorAxis; + } + item ae [0..2] :> edges { + attribute :>> semiMajorAxis = be.semiMajorAxis; + attribute :>> semiMinorAxis = be.semiMinorAxis; + } + assert constraint { size(ae) == (if isEmpty(af) ? 0 else 2) and + size(edges) == (if isEmpty(af) ? 2 else 4) } + + item :>> vertices [0..1] = faces.vertices; + assert constraint { isEmpty(af) == notEmpty(vertices) } + + /* Bind face edges to specific edges */ + binding [1] bind [0..*] base.edges = [0..*] be; + binding [1] bind [0..*] cf.edges = [0..*] be; + + /* Meeting edges */ + connection :MatesWith connect [1] be to [1] be; + + attribute :>> genus = 0; + } + + item def Cone :> ConeOrCylinder { + doc + /* + * A Cone has one elliptical sides joined to a point by a curved side. + */ + + item :>> faces [2]; + + item apex :>> vertices; + + /* Bind face vertices to specific vertices */ + binding [1] bind [0..*] cf.vertices = [0..*] apex; + } + + item def EccentricCone :> Cone { + doc + /* + * An EccentricCone is a Cone with least one positive offset. + */ + + assert constraint { xoffset > 0 or yoffset > 0 } + } + + item def CircularCone :> Cone { + doc + /* + * A CircularCone is a Cone with a circular base. + */ + + attribute :>> radius [1]; + attribute :>> semiMajorAxis [1] = radius; + attribute :>> semiMinorAxis [1] = radius; + + item :>> base : CircularDisc { + ref :>> base::edges, CircularDisc::edges; + } + } + + item def RightCircularCone :> CircularCone { + doc + /* + * A RightCircularCone is a CircularCone with zero offsets. + */ + + attribute :>> xoffset { attribute :>> num = 0; } + attribute :>> yoffset { attribute :>> num = 0; } + } + + item def Cylinder :> ConeOrCylinder { + doc + /* + * A Cylinder has two elliptical sides joined by a curved side. + */ + + item :>> af [1]; + + binding [1] bind [0..*] cf.edges = [0..*] ae; + + connection :MatesWith connect [1] ae to [1] ae { + doc /* Meeting edges */ + } + } + + item def EccentricCylinder :> Cylinder { + doc + /* + * An EccentricCylinder is a Cylinder with least one positive offset. + */ + + assert constraint { xoffset > 0 or yoffset > 0 } + } + + item def CircularCylinder :> Cylinder { + doc + /* + * A CircularCylinder is a Cylinder with two circular sides. + */ + + attribute :>> radius [1]; + attribute :>> semiMajorAxis [1] = radius; + attribute :>> semiMinorAxis [1] = radius; + + item :>> base : CircularDisc { + ref :>> base::edges, CircularDisc::edges; + } + item :>> af : CircularDisc { + ref :>> af::edges, CircularDisc::edges; + } + } + + item def RightCircularCylinder :> CircularCylinder { + doc + /* + * A RightCircularCylinder is a CircularCylinder with zero offsets. + */ + + attribute :>> xoffset { attribute :>> num = 0; } + attribute :>> yoffset { attribute :>> num = 0; } + } + + item def Polyhedron :> Shell { + doc + /* + * A Polyhedron is a closed Shell with polygonal sides. + */ + + attribute :>> isClosed = true; + + item :>> faces : Polygon [2..*] { + attribute :>> Polygon::innerSpaceDimension, faces::innerSpaceDimension; + ref :>> Polygon::edges, ConeOrCylinder::faces::edges; + ref :>> Polygon::vertices, ConeOrCylinder::faces::vertices; + } + + item :>> edges = faces.edges; + + attribute :>> outerSpaceDimension = if size(faces) > 2 ? 3 else 2; + + attribute :>> genus = 0; + } + + item def CuboidOrTriangularPrism :> Polyhedron { + doc + /* + * A CuboidOrTriangularPrism is a Polyhedron that is either a Cuboid or TriangularPrism. + */ + + item :>> faces [5..6]; + item tf : Quadrilateral [1] :> faces { + ref :>> Quadrilateral::edges, ConeOrCylinder::faces::edges; + ref :>> Quadrilateral::vertices, ConeOrCylinder::faces::vertices; + } + item bf : Quadrilateral [1] :> faces { + ref :>> Quadrilateral::edges, ConeOrCylinder::faces::edges; + ref :>> Quadrilateral::vertices, ConeOrCylinder::faces::vertices; + } + item ff : Polygon [1] :> faces { item :>> Polygon::edges, faces::edges [3..4]; } + item rf : Polygon [1] :> faces { item :>> Polygon::edges, faces::edges [3..4]; } + item slf : Quadrilateral [1] :> faces { + ref :>> Quadrilateral::edges, ConeOrCylinder::faces::edges; + ref :>> Quadrilateral::vertices, ConeOrCylinder::faces::vertices; + } + item srf : Quadrilateral [0..1] :> faces { + ref :>> Quadrilateral::edges, ConeOrCylinder::faces::edges; + ref :>> Quadrilateral::vertices, ConeOrCylinder::faces::vertices; + } + + item :>> edges; + assert constraint { size(edges) == 18 or size(edges) == 24 } + + item tfe [2] :> edges; + item tre [2] :> edges; + item tsle [2] :> edges; + item tsre [0..2] :> edges; + item bfe [2] :> edges; + item bre [2] :> edges; + item bsle [2] :> edges; + item bsre [2] :> edges; + item ufle [2] :> edges; + item ufre [0..2] :> edges; + item urle [2] :> edges; + item urre [0..2] :> edges; + + assert constraint { ( isEmpty(srf) implies isEmpty(tsre) ) and + ( isEmpty(tsre) == isEmpty(ufre) ) and + ( isEmpty(ufre) == isEmpty(urre) ) } + + item :>> vertices; + assert constraint { size(vertices) == size(edges) } + + item tflv [3] :> vertices; + item tfrv [0..3] :> vertices; + item trlv [3] :> vertices; + item trrv [0..3] :> vertices; + item bflv [3] :> vertices; + item bfrv [3] :> vertices; + item brlv [3] :> vertices; + item brrv [3] :> vertices; + + assert constraint { ( isEmpty(tfrv) == isEmpty(trrv) ) } + + /* Bind face edges to specific edges */ + binding [1] bind [0..1] tf.edges = [0..1] tfe; + binding [1] bind [0..1] tf.edges = [0..1] tre; + binding [1] bind [0..1] tf.edges = [0..1] tsle; + binding [1] bind [0..1] bf.edges = [0..1] bfe; + binding [1] bind [0..1] bf.edges = [0..1] bre; + binding [1] bind [0..1] bf.edges = [0..1] bsle; + binding [1] bind [0..1] bf.edges = [0..1] bsre; + + binding [1] bind [0..1] ff.edges = [0..1] tfe; + binding [1] bind [0..1] ff.edges = [0..1] bfe; + binding [1] bind [0..1] ff.edges = [0..1] ufle; + + binding [1] bind [0..1] rf.edges = [0..1] tre; + binding [1] bind [0..1] rf.edges = [0..1] bre; + binding [1] bind [0..1] rf.edges = [0..1] urle; + + /* Bind edge vertices to specific vertices */ + binding [1] bind [0..1] tfe.vertices = [0..1] tflv; + binding [1] bind [0..1] tre.vertices = [0..1] trlv; + binding [1] bind [0..1] tsle.vertices = [0..1] tflv; + binding [1] bind [0..1] tsle.vertices = [0..1] trlv; + + binding [1] bind [0..1] bfe.vertices = [0..1] bflv; + binding [1] bind [0..1] bfe.vertices = [0..1] bfrv; + binding [1] bind [0..1] bre.vertices = [0..1] brlv; + binding [1] bind [0..1] bre.vertices = [0..1] brrv; + binding [1] bind [0..1] bsle.vertices = [0..1] bflv; + binding [1] bind [0..1] bsle.vertices = [0..1] brlv; + binding [1] bind [0..1] bsre.vertices = [0..1] bfrv; + binding [1] bind [0..1] bsre.vertices = [0..1] brrv; + + binding [1] bind [0..1] ufle.vertices = [0..1] tflv; + binding [1] bind [0..1] ufle.vertices = [0..1] bflv; + binding [1] bind [0..1] urle.vertices = [0..1] trlv; + binding [1] bind [0..1] urle.vertices = [0..1] brlv; + + /* Meeting edges */ + connection :MatesWith connect [1] tfe to [1] tfe; + connection :MatesWith connect [1] tre to [1] tre; + connection :MatesWith connect [1] tsle to [1] tsle; + connection :MatesWith connect [1] bfe to [1] bfe; + connection :MatesWith connect [1] bre to [1] bre; + connection :MatesWith connect [1] bsle to [1] bsle; + connection :MatesWith connect [1] bsre to [1] bsre; + connection :MatesWith connect [1] ufle to [1] ufle; + connection :MatesWith connect [1] urle to [1] urle; + connection :MatesWith connect [1] bsre to [1] bsre; + + /* Meeting vertices */ + connection :MatesWith connect [2] tflv to [2] tflv; + connection :MatesWith connect [2] trlv to [2] trlv; + connection :MatesWith connect [2] bflv to [2] bflv; + connection :MatesWith connect [2] bfrv to [2] bfrv; + connection :MatesWith connect [2] brlv to [2] brlv; + connection :MatesWith connect [2] brrv to [2] brrv; + } + + item def TriangularPrism :> CuboidOrTriangularPrism { + doc + /* + * A TriangularPrism is a Polyhedron with five sides, two triangular and + * the others quadrilateral. + */ + + + item :>> faces [5]; + item :>> ff : Triangle { + ref :>> Triangle::edges, ConeOrCylinder::faces::edges; + ref :>> Triangle::vertices, ConeOrCylinder::faces::vertices; + } + item :>> rf : Triangle { + ref :>> Triangle::edges, ConeOrCylinder::faces::edges; + ref :>> Triangle::vertices, ConeOrCylinder::faces::vertices; + } + + item :>> edges [18]; + + item :>> vertices; + + /* Bind face edges to specific edges */ + binding [1] bind [0..1] tf.edges = [0..1] bsre; + + /* Bind edge vertices to specific vertices */ + binding [1] bind [0..1] tfe.vertices = [0..1] bfrv; + binding [1] bind [0..1] tre.vertices = [0..1] bfrv; + } + + item def RightTriangularPrism :> TriangularPrism { + doc + /* + * A RightTriangularPrism a TriangularPrism with two right triangluar sides, + * with given length, width, and height. + */ + + attribute :>> length [1]; + attribute :>> width [1]; + attribute :>> height [1]; + + item :>> tf : Rectangle; + item :>> bf : Rectangle; + item :>> ff : RightTriangle { + attribute :>> length = RightTriangularPrism::length; + attribute :>> width = RightTriangularPrism::width; + } + item :>> rf : RightTriangle { + attribute :>> length = ff.length; + attribute :>> width = rf.width; + } + item :>> slf : Rectangle; + item :>> srf : Rectangle; + + item :>> tfe { attribute :>> length = ff.hypotenuse.length; } + item :>> tre { attribute :>> length = tfe.length; } + item :>> tsle { attribute :>> length = height; } + item :>> bfe { attribute :>> length = RightTriangularPrism::length; } + item :>> bre { attribute :>> length = RightTriangularPrism::length; } + item :>> bsle { attribute :>> length = height; } + item :>> bsre { attribute :>> length = height; } + item :>> ufle { attribute :>> length = width; } + item :>> urle { attribute :>> length = width; } + } + alias Wedge for RightTriangularPrism; + + item def Cuboid :> CuboidOrTriangularPrism { + doc + /* + * A Cuboid is a Polyhedron with six sides, all quadrilateral. + */ + + item :>> faces [6]; + item :>> ff : Quadrilateral { + ref :>> Quadrilateral::edges, ConeOrCylinder::faces::edges; + ref :>> Quadrilateral::vertices, ConeOrCylinder::faces::vertices; + } + item :>> rf : Quadrilateral { + ref :>> Quadrilateral::edges, ConeOrCylinder::faces::edges; + ref :>> Quadrilateral::vertices, ConeOrCylinder::faces::vertices; + } + + item :>> edges [24]; + + item :>> vertices; + + /* Bind face edges to specific edges */ + binding [1] bind [0..1] tf.edges = [0..1] tsre; + binding [1] bind [0..1] ff.edges = [0..1] ufre; + binding [1] bind [0..1] rf.edges = [0..1] urre; + + binding [1] bind [0..1] srf.edges = [0..1] tsre; + binding [1] bind [0..1] srf.edges = [0..1] bsre; + binding [1] bind [0..1] srf.edges = [0..1] ufre; + binding [1] bind [0..1] srf.edges = [0..1] urre; + + /* Bind edge vertices to specific vertices */ + binding [1] bind [0..1] tfe.vertices = [0..1] tfrv; + binding [1] bind [0..1] tre.vertices = [0..1] trrv; + binding [1] bind [0..1] tsre.vertices = [0..1] tfrv; + binding [1] bind [0..1] tsre.vertices = [0..1] trrv; + + binding [1] bind [0..1] ufre.vertices = [0..1] tfrv; + binding [1] bind [0..1] ufre.vertices = [0..1] bfrv; + binding [1] bind [0..1] urre.vertices = [0..1] trrv; + binding [1] bind [0..1] urre.vertices = [0..1] brrv; + + /* Meeting edges */ + connection :MatesWith connect [1] tsre to [1] tsre; + connection :MatesWith connect [1] ufre to [1] ufre; + connection :MatesWith connect [1] urre to [1] urre; + connection :MatesWith connect [1] bsre to [1] bsre; + + /* Meeting vertices */ + connection :MatesWith connect [2] tfrv to [2] tfrv; + connection :MatesWith connect [2] trrv to [2] trrv; + } + + item def RectangularCuboid :> Cuboid { + doc + /* + * A RectangularCuboid is a Cuboid with all Rectangular sides. + */ + + attribute :>> length [1]; + attribute :>> width [1]; + attribute :>> height [1]; + + item :>> tf : Rectangle { attribute :>> length = RectangularCuboid::length; + attribute :>> width = RectangularCuboid::height; } + item :>> bf : Rectangle { attribute :>> length = RectangularCuboid::length; + attribute :>> width = RectangularCuboid::height; } + item :>> ff : Rectangle { attribute :>> length = RectangularCuboid::length; + attribute :>> width = RectangularCuboid::width; } + item :>> rf : Rectangle { attribute :>> length = RectangularCuboid::length; + attribute :>> width = RectangularCuboid::width; } + item :>> slf : Rectangle { attribute :>> length = RectangularCuboid::height; + attribute :>> width = RectangularCuboid::width; } + item :>> srf : Rectangle { attribute :>> length = RectangularCuboid::height; + attribute :>> width = RectangularCuboid::width; } + } + alias Box for RectangularCuboid; + + item def Pyramid :> Polyhedron { + doc + /* + * A Pyramid is a Polyhedron with the sides of a polygon (base) forming the bases of triangles + * that join at an apex point. Its height is the perpendicular distance from the base to the apex, + * and its offsets are between this perpendicular at the base and the center of the base. + */ + + attribute :>> height [1]; + attribute :>> xoffset; + attribute :>> yoffset; + + item :>> faces; + item base [1] :> faces; + item wall : Triangle :> faces { + ref :>> Triangle::edges, ConeOrCylinder::faces::edges; + ref :>> Triangle::vertices, ConeOrCylinder::faces::vertices; + } + attribute wallNumber : Positive = size(wall); + + assert constraint { size(faces) == wallNumber + 1 } + assert constraint { size(wall) == size(base.edges) } + + item :>> edges; + + assert constraint { size(edges) == wallNumber * 4 } + + item :>> vertices; + item apex :> vertices = wall.apex; + + assert constraint { size(apex) == wallNumber } + + /* Base to wall and wall to wall edge mating. */ + assert constraint { (1..wallNumber)->forAll {in i; + includes(wall#(i).base.matingOccurrences, + Pyramid::base.edges#(i)) and + includes((wall#(i).edges#(3) as Item).matingOccurrences, + wall#(if i==wallNumber ? 1 else i+1).edges#(2)) } } + + /* Meeting apices. */ + connection :MatesWith connect [wallNumber] apex to [wallNumber] apex; + } + + item def Tetrahedron :> Pyramid { + doc + /* + * A Tetrahedron is Pyramid with a triangular base. + */ + + attribute :>> baseLength [1]; + attribute :>> baseWidth [1]; + + item :>> base : Triangle { + ref :>> Triangle::edges, ConeOrCylinder::faces::edges; + ref :>> Triangle::vertices, ConeOrCylinder::faces::vertices; + attribute :>> length = Tetrahedron::baseLength; + attribute :>> width = Tetrahedron::baseWidth; + } + } + + item def RectangularPyramid :> Pyramid { + doc + /* + * A RectangularPyramid is Pyramid with a rectangular base. + */ + + attribute :>> baseLength [1]; + attribute :>> baseWidth [1]; + + item :>> base : Rectangle { + ref :>> Rectangle::edges, ConeOrCylinder::faces::edges; + ref :>> Rectangle::vertices, ConeOrCylinder::faces::vertices; + attribute :>> length = RectangularPyramid::baseLength; + attribute :>> width = RectangularPyramid::baseWidth; + } + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/SpatialItems.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/SpatialItems.sysml new file mode 100644 index 00000000..421ee090 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/SpatialItems.sysml @@ -0,0 +1,168 @@ +standard library package SpatialItems { + doc + /* + * This package models physical items that have a spatial extent and act as a spatial frame of reference + * for obtaining position and displacement vectors of points within them. + */ + + private import Objects::Point; + private import SpatialFrames::SpatialFrame; + private import Quantities::VectorQuantityValue; + private import MeasurementReferences::ThreeDCoordinateFrame; + private import MeasurementReferences::nullTransformation; + private import Time::Clock; + private import Time::TimeInstantValue; + private import ScalarValues::Natural; + private import ISQ::universalCartesianSpatial3dCoordinateFrame; + private import ISQ::Position3dVector; + private import ISQ::Displacement3dVector; + private import VectorFunctions::isZeroVector; + private import SequenceFunctions::isEmpty; + private import ControlFunctions::forAll; + + item def SpatialItem :> SpatialFrame { + doc + /* + * A SpatialItem is an Item with a three-dimensional spatial extent that also acts as a SpatialFrame of reference. + */ + + ref item :>> localClock : Clock[1] default Time::universalClock { + doc + /* + * A local Clock to be used as the corresponding time reference within this SpatialItem. + * By default this is the singleton universalClock. + */ + } + + attribute coordinateFrame : ThreeDCoordinateFrame[1] default universalCartesianSpatial3dCoordinateFrame { + doc + /* + * The three-dimensional CoordinateFrame to be used as the measurement reference for position + * and displacement vector values relative to this SpatialItem. + * By default this is the singleton universalCartesianSpatial3dCoordinateFrame. + */ + } + + item originPoint : Point[1] :> spaceShots { + doc + /* + * The Point at the origin of the coordinateFrame of this SpatialItem. + */ + } + + assert constraint originPointConstraint { + doc + /* + * The CurrentPositionOf the originPoint must always be a zero vector. + */ + + isZeroVector(CurrentPositionOf(originPoint, that)) + } + + item subSpatialItems : SpatialItem[1..*] :> subitems { + ref item :>> SpatialItem::localClock, subitems::localClock; + } + + part subSpatialParts : SpatialItem[1..*] :> subSpatialItems, subparts { + ref item :>> SpatialItem::localClock, subSpatialItems::localClock, subparts::localClock; + } + + item componentItems : SpatialItem[1..*] :> subSpatialItems { + doc + /* + * A SpatialItem with componentItems is entirely made up of those items (the SpatialItem occurs only + * as a collection of its componentItems). By default they have the same localClock and equivalent + * coordinate frame as the SpatialItem they make up. A SpatialItem without componentItems occurs + * on its own, separately from its subitems. + */ + ref item :>> SpatialItem::localClock, subSpatialItems::localClock default (that as SpatialItem).localClock; + attribute :>> coordinateFrame { + attribute :>> mRefs default (that.that as SpatialItem).coordinateFrame.mRefs; + attribute :>> transformation[1] default nullTransformation { + attribute :>> source default (that.that.that as SpatialItem).coordinateFrame; + } + } + } + + private attribute cunionNum: Natural [1] = if isEmpty(componentItems) ? 0 else 1; + private attribute componentUnion[cunionNum] :> unionsOf { + doc + /* + * A SpatialItem with componentItems is is a spatial union of them. + */ + + item :>> elements : SpatialItem [1..*] = componentItems; + } + + part componentParts : SpatialItem[1..*] :> componentItems, subSpatialParts { + ref item :>> SpatialItem::localClock, componentItems::localClock, subSpatialParts::localClock, subparts::localClock; + } + } + + calc def PositionOf :> SpatialFrames::PositionOf { + doc + /* + * The PositionOf a Point relative to a SpatialItem, at a specific TimeInstantValue relative to a given Clock, + * is a positionVector that is a VectorQuantityValue in the coordinateFrame of the SpatialItem. + * The default Clock is the localClock of the SpatialItem. + */ + + in point : Point[1]; + in timeInstant : TimeInstantValue[1]; + in enclosingItem :>> 'frame' : SpatialItem[1]; + in clock : Clock[1] default enclosingItem.localClock; + return positionVector : Position3dVector[1] { + attribute :>> mRef = enclosingItem.coordinateFrame; + } + } + + calc def CurrentPositionOf :> SpatialFrames::CurrentPositionOf { + doc + /* + * The CurrentPositionOf a Point relative to a SpatialItem and a Clock is the PositionOf + * the Point relative to the SpatialItem at the currentTime of the Clock. + */ + + in point : Point[1]; + in enclosingItem :>> 'frame' : SpatialItem[1]; + in clock : Clock[1] default enclosingItem.localClock; + return positionVector : Position3dVector[1] { + attribute :>> mRef = enclosingItem.coordinateFrame; + } + } + + calc def DisplacementOf :> SpatialFrames::DisplacementOf { + doc + /* + * The DisplacementOf two Points relative to a SpatialItem, at a specific TimeInstantValue relative to a + * given Clock, is the displacementVector computed as the difference between the PositionOf the + * first Point and PositionOf the second Point, relative to that SpatialItem, at that timeInstant. + */ + + in point1 : Point[1]; + in point2 : Point[1]; + in timeInstant : TimeInstantValue[1]; + in spatialItem :>> 'frame' : SpatialItem[1]; + in clock : Clock[1] default spatialItem.localClock; + return displacementVector : Displacement3dVector[1] { + attribute :>> mRef = spatialItem.coordinateFrame; + } + } + + calc def CurrentDisplacementOf :> SpatialFrames::CurrentDisplacementOf { + doc + /* + * The CurrentDisplacementOf two Points relative to a SpatialItem and a Clock is the DisplacementOf + * the Points relative to the SpatialItem, at the currentTime of the Clock. + */ + + in point1 : Point[1]; + in point2 : Point[1]; + in spatialItem :>> 'frame' : SpatialItem[1]; + in clock : Clock[1] default spatialItem.localClock; + return displacementVector : Displacement3dVector[1] { + attribute :>> mRef = spatialItem.coordinateFrame; + } + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ImageMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ImageMetadata.sysml new file mode 100644 index 00000000..1ea7f565 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ImageMetadata.sysml @@ -0,0 +1,78 @@ +standard library package ImageMetadata { + doc + /* + * This package provides attributive data and metadata to allow a model element to be + * annotated with an image to be used in its graphical rendering or as a marker to + * adorn graphical or textual renderings. + */ + + private import ScalarValues::String; + + attribute def Image { + doc + /* + * Image provides the data necessary for the physical definition of + * a graphical image. + */ + + attribute content : String[0..1] { + doc + /* + * Binary data for the image according to the given MIME type, + * encoded as given by the encoding. + */ + } + + attribute encoding : String[0..1] { + doc + /* + * Describes how characters in the content are to be decoded into + * binary data. At least "base64", "hex", "identify", and "JSONescape" + * shall be supported. + */ + } + + attribute type : String[0..1] { + doc + /* + * The MIME type according to which the content should be interpreted. + */ + } + + attribute location : String[0..1] { + doc + /* + * A URI for the location of a resource containing the image content, + * as an alternative for embedding it in the content attribute. + */ + } + } + + metadata def Icon { + doc + /* + * Icon metadata can be used to annotate a model element with an image to be used + * to show render the element on a diagram and/or a small image to be used as an + * adornment on a graphical or textual rendering. Alternatively, another metadata + * definition can be annotated with an Icon to indicate that any model element + * annotated by the containing metadata can be rendered according to the Icon. + */ + + attribute fullImage : Image[0..1] { + doc + /* + * A full-sized image that can be used to render the annotated element on a + * graphical view, potentially as an alternative to its standard rendering. + */ + } + + attribute smallImage : Image[0..1] { + doc + /* + * A smaller image that can be used as an adornment on the graphical rendering + * of the annotated element or as a marker in a textual rendering. + */ + } + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ModelingMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ModelingMetadata.sysml new file mode 100644 index 00000000..0fbdaf53 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ModelingMetadata.sysml @@ -0,0 +1,143 @@ +standard library package ModelingMetadata { + doc + /* + * This package contains definitions of metadata generally useful for annotating models. + */ + + private import Base::Anything; + private import ScalarValues::String; + private import RiskMetadata::Risk; + + enum def StatusKind { + doc + /* + * StatusKind enumerates the possible statuses of work on a model element. + */ + + open { + doc + /* + * Status is open. + */ + } + + tbd { + doc + /* + * Status is to be determined. + */ + } + + tbr { + doc + /* + * Status is to be resolved. + */ + } + + tbc { + doc + /* + * Status is to be confirmed. + */ + } + + done { + doc + /* + * Status is done. + */ + } + + closed { + doc + /* + * Status is closed. + */ + } + } + + metadata def StatusInfo { + doc + /* + * StatusInfo is used to annotate a model element with status information. + */ + + attribute originator : String [0..1] { + doc + /* + * The originator of the annotated element. + */ + } + + attribute owner : String [0..1] { + doc + /* + * The current owner of the annotated element. + */ + } + + attribute status : StatusKind { + doc + /* + * The current status of work on the annotated element (required). + */ + } + + item risk : Risk [0..1] { + doc + /* + * An assessment of risk for the annotated element. + */ + } + } + + metadata def Rationale { + doc + /* + * Rationale is used to explain a choice or other decision made related to the + * annotated element. + */ + + attribute text : String { + doc + /* + * A textual description of the rationale (required). + */ + } + + ref explanation : Anything [0..1] { + doc + /* + * A reference to a feature that provides a formal explanation of the rationale. + * (For example, a trade study whose result explains the choice of a certain alternative). + */ + } + } + + metadata def Issue { + doc + /* + * Issue is used to record some issue concerning the annotated element. + */ + + attribute text : String { + doc + /* + * A textual description of the issue. + */ + } + } + + metadata def Refinement { + doc + /* + * Refinement is used to identify a dependency as modeling a refinement relationship. + * In such a relationship, the source elements of the relationship provide a more precise and/or + * accurate representation than the target elements. + */ + + :>> annotatedElement : SysML::Dependency; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml new file mode 100644 index 00000000..42b3e59c --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml @@ -0,0 +1,39 @@ +standard library package ParametersOfInterestMetadata { + doc + /* + * This package contains definitions of metadata to identify key parameters of interest, + * including measures of effectiveness (MOE) and other key measures of performance (MOP). + */ + + private import Metaobjects::SemanticMetadata; + + attribute measuresOfEffectiveness[*] nonunique { + doc /* Base feature for attributes that are measures of effectiveness. */ + } + + attribute measuresOfPerformance[*] nonunique { + doc /* Base feature for attributes that are measures of performance. */ + } + + metadata def MeasureOfEffectiveness :> SemanticMetadata { + doc + /* + * MeasureOfEffectiveness is semantic metadata for identifying an attribute as a + * measure of effectiveness. + */ + + :>> annotatedElement : SysML::Usage; + :>> baseType = measuresOfEffectiveness meta SysML::Usage; + } + + metadata def MeasureOfPerformance :> SemanticMetadata { + doc + /* + * MeasureOfPerformance is semantic metadata for identifying an attribute as a + * measure of performance. + */ + + :>> annotatedElement : SysML::Usage; + :>> baseType = measuresOfPerformance meta SysML::Usage; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/RiskMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/RiskMetadata.sysml new file mode 100644 index 00000000..0464e195 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/RiskMetadata.sysml @@ -0,0 +1,100 @@ +standard library package RiskMetadata { + doc + /* + * This package defines metadata for annotating model elements with assessments of risk. + */ + + private import ScalarValues::Real; + + attribute def Level :> Real { + doc + /* + * A Level is a Real number in the interval 0.0 to 1.0, inclusive. + */ + + assert constraint { that >= 0.0 and that <= 1.0 } + } + + enum def LevelEnum :> Level { + doc + /* + * LevelEnum provides standard probability Levels for low, medium and high risks. + */ + + low = 0.25; + medium = 0.50; + high = 0.75; + } + + attribute def RiskLevel { + doc + /* + * RiskLevel gives the probability of a risk occurring and, optionally, the impact + * if the risk occurs. + */ + + attribute probability : Level { + doc + /* + * The probability that a risk will occur. + */ + } + + attribute impact : Level [0..1] { + doc + /* + * The impact of the risk if it occurs (with 0.0 being no impact and 1.0 being + * the most severe impact). + */ + } + } + + enum def RiskLevelEnum :> RiskLevel { + doc + /* + * RiskLevelEnum enumerates standard RiskLevels for low, medium and high risks + * (without including impact). + */ + + low = new RiskLevel(probability = LevelEnum::low); + medium = new RiskLevel(probability = LevelEnum::medium); + high = new RiskLevel(probability = LevelEnum::high); + } + + metadata def Risk { + doc + /* + * Risk is used to annotate a model element with an assessment of the risk related to it + * in some typical risk areas. + */ + + attribute totalRisk : RiskLevel [0..1] { + doc + /* + * The total risk associated with the annotated element. + */ + } + + attribute technicalRisk : RiskLevel [0..1] { + doc + /* + * The risk of unresolved technical issues regarding the annotated element. + */ + } + + attribute scheduleRisk : RiskLevel [0..1] { + doc + /* + * The risk that work on the annotated element will not be completed on schedule. + */ + } + + attribute costRisk : RiskLevel [0..1] { + doc + /* + * The risk that work on the annotated element will exceed its planned cost. + */ + } + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQ.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQ.sysml new file mode 100644 index 00000000..85ce0337 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQ.sysml @@ -0,0 +1,42 @@ +standard library package ISQ { + doc + /* + * International system of quantities (ISQ), as defined in ISO/IEC 80000 + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + + public import ISQBase::*; // ISO/IEC 80000 base quantities and general concepts + public import ISQSpaceTime::*; // ISO 80000-3 "Space and Time" + public import ISQMechanics::*; // ISO 80000-4 "Mechanics" + public import ISQThermodynamics::*; // ISO 80000-5 "Thermodynamics" + public import ISQElectromagnetism::*; // IEC 80000-6 "Electromagnetism" + public import ISQLight::*; // ISO 80000-7 "Light" + public import ISQAcoustics::*; // ISO 80000-8 "Acoustics" + public import ISQChemistryMolecular::*; // ISO 80000-9 "Physical chemistry and molecular physics" + public import ISQAtomicNuclear::*; // ISO 80000-10 "Atomic and nuclear physics" + public import ISQCharacteristicNumbers::*; // ISO 80000-11 "Characteristic numbers" + public import ISQCondensedMatter::*; // ISO 80000-12 "Condensed matter physics" + public import ISQInformation::*; // IEC 80000-13 "Information science and technology" + + /* Additional quantity declarations */ + + attribute def TemperatureDifferenceValue :> ScalarQuantityValue { + doc + /* + * temperature difference + * A separate temperature difference quantity and unit are needed in order to support °C, °F and centrigrade temperature differences + */ + attribute :>> num: Real; + attribute :>> mRef: TemperatureDifferenceUnit[1]; + } + + attribute temperatureDifference: TemperatureDifferenceValue [*] nonunique :> scalarQuantities; + + attribute def TemperatureDifferenceUnit :> SimpleUnit { + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; } + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAcoustics.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAcoustics.sysml new file mode 100644 index 00000000..11801cf4 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAcoustics.sysml @@ -0,0 +1,439 @@ +standard library package ISQAcoustics { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-8:2020 "Acoustics" + * see also https://www.iso.org/standard/64978.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQMechanics::PowerValue; + private import ISQMechanics::PressureValue; + private import ISQSpaceTime::CartesianSpatial3dCoordinateFrame; + private import ISQSpaceTime::SpeedValue; + private import ISQSpaceTime::CartesianVelocity3dCoordinateFrame; + private import ISQSpaceTime::AccelerationValue; + private import ISQSpaceTime::CartesianAcceleration3dCoordinateFrame; + private import ISQThermodynamics::EnergyValue; + + /* ISO-80000-8 item 8-1 logarithmic frequency range */ + attribute def LogarithmicFrequencyRangeValue :> ScalarQuantityValue { + doc + /* + * source: item 8-1 logarithmic frequency range + * symbol(s): `G` + * application domain: generic + * name: LogarithmicFrequencyRange + * quantity dimension: 1 + * measurement unit(s): oct, dec + * tensor order: 0 + * definition: quantity given by: `G = log_2(f_2/f_1) "[oct]" = log_10(f_2/f_1) "[dec]"`, where `f_1` and `f_2` are two frequencies (ISO 80000-3) + * remarks: One octave (oct) is the logarithmic frequency range between `f_1` and `f_2` when `f_2/f_1 = 2`. Similarly, one decade (dec) is the logarithmic frequency range between `f_1` and `f_2` when `f_2/f_1 = 10`; thus `1 "[dec]" = log_2(10) "[oct]" ≈ 3.322 "[oct]"`. ISO 266 specifies preferred frequencies for acoustics separated by logarithmic frequency ranges equal to one tenth of a decade (`0.1 "[dec]"`). Each `0.1 "[dec]"` logarithmic frequency range is referred to in ISO 266 as a "one-third-octave interval" because `0.1 "[dec]"` is approximately equal to `1/3 "[oct]"`. Similarly, a logarithmic frequency range of `0.3 "[dec]"` is referred to as a "one-octave interval" because `0.3 "[dec]"` is approximately equal to `1 "[oct]"`. A logarithmic frequency range equal to one tenth of a decade can be referred to as a decidecade. + */ + attribute :>> num: Real; + attribute :>> mRef: LogarithmicFrequencyRangeUnit[1]; + } + + attribute logarithmicFrequencyRange: LogarithmicFrequencyRangeValue[*] nonunique :> scalarQuantities; + + attribute def LogarithmicFrequencyRangeUnit :> DimensionOneUnit { + } + + /* ISO-80000-8 item 8-2.1 static pressure */ + attribute staticPressure: PressureValue :> scalarQuantities { + doc + /* + * source: item 8-2.1 static pressure + * symbol(s): `p_s` + * application domain: generic + * name: StaticPressure (specializes Pressure) + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, kg*m^-1*s^-2 + * tensor order: 0 + * definition: pressure (ISO 80000-4) in a medium when no sound wave is present + * remarks: This definition applies to a medium with zero flow. + */ + } + + /* ISO-80000-8 item 8-2.2 sound pressure */ + attribute soundPressure: PressureValue :> scalarQuantities { + doc + /* + * source: item 8-2.2 sound pressure + * symbol(s): `p` + * application domain: generic + * name: SoundPressure (specializes Pressure) + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, kg*m^-1*s^-2 + * tensor order: 0 + * definition: difference between instantaneous total pressure and static pressure (item 8-2.1) + * remarks: None. + */ + } + + /* ISO-80000-8 item 8-3 sound particle displacement */ + attribute def CartesianSoundParticleDisplacement3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 8-3 sound particle displacement + * symbol(s): `vec(δ)` + * application domain: generic + * name: SoundParticleDisplacement (specializes Displacement) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity giving the instantaneous displacement (ISO 80000-3) of a particle in a medium from what would be its position in the absence of sound waves + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianSoundParticleDisplacement3dVector: CartesianSoundParticleDisplacement3dVector :> vectorQuantities; + + /* ISO-80000-8 item 8-4 sound particle velocity */ + attribute def CartesianSoundParticleVelocity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 8-4 sound particle velocity + * symbol(s): `vec(u)`, `(vec(v))` + * application domain: generic + * name: SoundParticleVelocity (specializes Velocity) + * quantity dimension: L^1*T^-1 + * measurement unit(s): m*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity given by: `vec(u) = del(vec(δ))/del(t)`, where `vec(δ)` is sound particle displacement (item 8-3) and `t` is time (ISO 80000-3) + * remarks: The definition is limited to small-amplitude acoustic disturbances such that the magnitude of `vec(u)` is small relative to the phase speed (ISO 80000-3) of sound. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianVelocity3dCoordinateFrame[1]; + } + + attribute cartesianSoundParticleVelocity3dVector: CartesianSoundParticleVelocity3dVector :> vectorQuantities; + + /* ISO-80000-8 item 8-5 sound particle acceleration */ + attribute def CartesianSoundParticleAcceleration3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 8-5 sound particle acceleration + * symbol(s): `vec(a)` + * application domain: generic + * name: SoundParticleAcceleration (specializes Acceleration) + * quantity dimension: L^1*T^-2 + * measurement unit(s): m*s^-2 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity given by: `vec(a) = (del(vec(u)))/(del(t))`, where `vec(u)` is sound particle velocity (item 8-4) and `t` is time + * remarks: The definition is limited to small-amplitude acoustic disturbances such that the magnitude of `vec(u)` is small relative to the phase speed (ISO 80000-3) of sound. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAcceleration3dCoordinateFrame[1]; + } + + attribute cartesianSoundParticleAcceleration3dVector: CartesianSoundParticleAcceleration3dVector :> vectorQuantities; + + /* ISO-80000-8 item 8-6 volume velocity, volume flow rate */ + attribute volumeVelocity: SpeedValue :> scalarQuantities { + doc + /* + * source: item 8-6 volume velocity, volume flow rate + * symbol(s): `q`, `q_v` + * application domain: generic + * name: VolumeVelocity (specializes Speed) + * quantity dimension: L^3*T^-1 + * measurement unit(s): m^3*s^-1 + * tensor order: 0 + * definition: surface integral of the normal component of the sound particle velocity (item 8-4) over a defined surface + * remarks: None. + */ + } + + alias volumeFlowRate for volumeVelocity; + + /* ISO-80000-8 item 8-7 sound energy density */ + attribute def SoundEnergyDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 8-7 sound energy density + * symbol(s): `w` + * application domain: generic + * name: SoundEnergyDensity + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): J/m^3, kg*m^-1*s^-2 + * tensor order: 0 + * definition: quantity given by: `w = 1/2 ρ_m u^2 + 1/2 p^2/(ρ_m c^2)`, where `ρ_m` is mean density (ISO 80000-4), `u` is the magnitude of the sound particle velocity (item 8-4), `p` is sound pressure (item 8-2.2), and `c` is the phase speed (ISO 80000-3) of sound + * remarks: In formula form: `E = int_(t_1)^(t_2) p^2 dt`, where `t_1` and `t_2` are the starting and ending times for the integral and `p` is sound pressure (item 8-2.2). In airborne acoustics, the sound pressure is frequency-weighted and frequency-band-limited. If frequency weightings as specified in IEC 61672-1 are applied, this should be indicated by appropriate subscripts to the symbol `E`. In underwater acoustics, the term ""sound exposure"" indicates an unweighted quantity unless indicated otherwise. + */ + attribute :>> num: Real; + attribute :>> mRef: SoundEnergyDensityUnit[1]; + } + + attribute soundEnergyDensity: SoundEnergyDensityValue[*] nonunique :> scalarQuantities; + + attribute def SoundEnergyDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-8 item 8-8 sound energy */ + attribute soundEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 8-8 sound energy + * symbol(s): `Q` + * application domain: generic + * name: SoundEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: integral of sound energy density (item 8-7) over a specified volume + * remarks: The sound energy in region `R` can be expressed by: `Q = oint_R w(x) d^3x`, where `d^3x` is an element of volume. + */ + } + + /* ISO-80000-8 item 8-9 sound power */ + attribute soundPower: PowerValue :> scalarQuantities { + doc + /* + * source: item 8-9 sound power + * symbol(s): `P`, `W` + * application domain: generic + * name: SoundPower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W, kg*m^2*s^-3 + * tensor order: 0 + * definition: integral over a surface of the product of sound pressure, `p` (item 8-2.2), and the component `u_n` of the particle velocity (item 8-4) in the direction normal to the surface, at a point on the surface + * remarks: This definition holds for waves in the volume of homogenous fluids or gases. This definition can become inapplicable in situations with a high mean fluid flow. Sound power is for example used to indicate the rate at which energy is radiated by a sound source. Sound power is an oscillatory quantity that can be positive or negative. A positive sound power indicates that the sound power is radiated out of the surface. A negative sound power indicates that the sound power is absorbed into the surface. + */ + } + + /* ISO-80000-8 item 8-10 sound intensity */ + attribute def SoundIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 8-10 sound intensity (magnitude) + * symbol(s): `I` + * application domain: generic + * name: SoundIntensity + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2, kg*s^-3 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity given by: `vec(I) = p vec(u)`, where `p` is sound pressure (item 8-2.2) and `vec(u)` is sound particle velocity (item 8-4) + * remarks: This definition can become inapplicable in situations with a high mean fluid flow. + */ + attribute :>> num: Real; + attribute :>> mRef: SoundIntensityUnit[1]; + } + + attribute soundIntensity: SoundIntensityValue[*] nonunique :> scalarQuantities; + + attribute def SoundIntensityUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + attribute def CartesianSoundIntensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 8-10 sound intensity (vector) + * symbol(s): `vec(I)` + * application domain: generic + * name: SoundIntensity + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2, kg*s^-3 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity given by: `vec(I) = p vec(u)`, where `p` is sound pressure (item 8-2.2) and `vec(u)` is sound particle velocity (item 8-4) + * remarks: This definition can become inapplicable in situations with a high mean fluid flow. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSoundIntensity3dCoordinateFrame[1]; + } + + attribute cartesianSoundIntensity3dVector: CartesianSoundIntensity3dVector :> vectorQuantities; + + attribute def CartesianSoundIntensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: SoundIntensityUnit[3]; + } + + /* ISO-80000-8 item 8-11 sound exposure */ + attribute def SoundExposureValue :> ScalarQuantityValue { + doc + /* + * source: item 8-11 sound exposure + * symbol(s): `E` + * application domain: generic + * name: SoundExposure + * quantity dimension: L^-2*M^2*T^-3 + * measurement unit(s): Pa^2*s, kg^2*m^-2*s^-3 + * tensor order: 0 + * definition: time-integrated squared sound pressure (item 8-2.2) + * remarks: In formula form: `E = int_(t_1)^(t_2) p^2 dt`, where `t_1` and `t_2` are the starting and ending times for the integral and `p` is sound pressure (item 8-2.2). In airborne acoustics, the sound pressure is frequency-weighted and frequency-band-limited. If frequency weightings as specified in IEC 61672-1 are applied, this should be indicated by appropriate subscripts to the symbol `E`. In underwater acoustics, the term "sound exposure" indicates an unweighted quantity unless indicated otherwise. + */ + attribute :>> num: Real; + attribute :>> mRef: SoundExposureUnit[1]; + } + + attribute soundExposure: SoundExposureValue[*] nonunique :> scalarQuantities; + + attribute def SoundExposureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-8 item 8-12 characteristic impedance of a medium for longitudinal waves */ + attribute def CharacteristicImpedanceOfAMediumForLongitudinalWavesValue :> ScalarQuantityValue { + doc + /* + * source: item 8-12 characteristic impedance of a medium for longitudinal waves + * symbol(s): `Z_c` + * application domain: generic + * name: CharacteristicImpedanceOfAMediumForLongitudinalWaves + * quantity dimension: L^-2*M^1*T^-1 + * measurement unit(s): Pa*s/m, kg*m^-2*s^-1 + * tensor order: 0 + * definition: quotient of sound pressure (item 8-2.2) and the component of the sound particle velocity (item 8-4) in the direction of the wave propagation + * remarks: The definition is limited to a progressive plane wave in a non-dissipative homogenous gas or fluid. Characteristic impedance is a property of the medium and is equal to `ρ c` where `ρ` is the time-averaged density (ISO 80000-4) of the medium and `c` the phase speed of sound (ISO 80000-3). Longitudinal waves are waves in which the displacement of the medium is in the same direction as, or the opposite direction to, the direction of propagation of the wave. + */ + attribute :>> num: Real; + attribute :>> mRef: CharacteristicImpedanceOfAMediumForLongitudinalWavesUnit[1]; + } + + attribute characteristicImpedanceOfAMediumForLongitudinalWaves: CharacteristicImpedanceOfAMediumForLongitudinalWavesValue[*] nonunique :> scalarQuantities; + + attribute def CharacteristicImpedanceOfAMediumForLongitudinalWavesUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-8 item 8-13 acoustic impedance */ + attribute def AcousticImpedanceValue :> ScalarQuantityValue { + doc + /* + * source: item 8-13 acoustic impedance + * symbol(s): `Z_a` + * application domain: generic + * name: AcousticImpedance + * quantity dimension: L^-4*M^1*T^-1 + * measurement unit(s): Pa*s/m^3, kg*m^-4*s^-1 + * tensor order: 0 + * definition: at a surface, quotient of the average sound pressure (item 8-2.2) over that surface and the sound volume flow rate (item 8-6) through that surface + * remarks: This definition applies to a sound pressure that is in phase with the volume flow rate. In this situation, the acoustic impedance is real. Both the sound pressure, `p`, and sound volume flow rate, `q`, are real quantities that fluctuate with time. If the fluctuations are in phase (phase difference equal to zero), the quotient `p/q` is a constant. If they are out of phase (phase difference not equal to zero), they can be represented by complex quantities in the frequency domain, the quotient of which is also complex. + */ + attribute :>> num: Real; + attribute :>> mRef: AcousticImpedanceUnit[1]; + } + + attribute acousticImpedance: AcousticImpedanceValue[*] nonunique :> scalarQuantities; + + attribute def AcousticImpedanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -4; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-8 item 8-14 sound pressure level */ + attribute def SoundPressureLevelValue :> ScalarQuantityValue { + doc + /* + * source: item 8-14 sound pressure level + * symbol(s): `L_p` + * application domain: generic + * name: SoundPressureLevel + * quantity dimension: 1 + * measurement unit(s): dB + * tensor order: 0 + * definition: quantity given by: `L_p = 10 log_10((p_"RMS"^2)/p_0^2) "[dB]"`, where `p_"RMS"` is the root-mean-square sound pressure in the time domain and `p_0` is the reference value of sound pressure + * remarks: For sound in air and other gases, the reference value of sound pressure is given by `p_0 = 20 "[μPa]"`. For sound in water and other liquids, the reference value of sound pressure is given by `p_0 = 1 "[μPa]"`. When stating a value of sound pressure level, the reference value shall be specified. The value of sound pressure level depends on the selected frequency range and time duration. When stating a value of sound pressure level, the frequency range and time duration shall be specified. In accordance with ISO 80000-1, any attachment to the unit symbol as a means of giving information about the special nature of the quantity or context of measurement under consideration is not permitted. If specific frequency and time weightings as specified in IEC 61672-1 or specific frequency bands or time duration are applied, this should be indicated by appropriate subscripts to the quantity symbol. In some applications the level of the peak sound pressure is required. This is obtained by replacing the root-mean-square sound pressure, with the instantaneous sound pressure having the greatest absolute value during a stated time interval, in the definition of sound pressure level. + */ + attribute :>> num: Real; + attribute :>> mRef: SoundPressureLevelUnit[1]; + } + + attribute soundPressureLevel: SoundPressureLevelValue[*] nonunique :> scalarQuantities; + + attribute def SoundPressureLevelUnit :> DimensionOneUnit { + } + + /* ISO-80000-8 item 8-15 sound power level */ + attribute def SoundPowerLevelValue :> ScalarQuantityValue { + doc + /* + * source: item 8-15 sound power level + * symbol(s): `L_P`, `L_W` + * application domain: generic + * name: SoundPowerLevel + * quantity dimension: 1 + * measurement unit(s): dB + * tensor order: 0 + * definition: quantity given by: `L_P = 10 log_10 ((P_m)/P_0) "[dB]"`, where `P_m` is the magnitude of the time-averaged sound power (item 8-9) and `P_0` is the reference value of sound power + * remarks: The reference value of sound power is given by `P_0 = 1 "[pW]"`. When stating a value of sound power level, the reference value shall be specified. The value of sound power level depends on the selected frequency range and time duration. When stating a value of sound power level, the frequency range and time duration shall be specified. In accordance with ISO 80000-1, any attachment to the unit symbol as a means of giving information about the special nature of the quantity or context of measurement under consideration is not permitted. If specific frequency and time weightings as specified in IEC 61672-1 or specific frequency bands or time duration are applied, this should be indicated by appropriate subscripts to the quantity symbol. + */ + attribute :>> num: Real; + attribute :>> mRef: SoundPowerLevelUnit[1]; + } + + attribute soundPowerLevel: SoundPowerLevelValue[*] nonunique :> scalarQuantities; + + attribute def SoundPowerLevelUnit :> DimensionOneUnit { + } + + /* ISO-80000-8 item 8-16 sound exposure level */ + attribute def SoundExposureLevelValue :> ScalarQuantityValue { + doc + /* + * source: item 8-16 sound exposure level + * symbol(s): `L_E` + * application domain: generic + * name: SoundExposureLevel + * quantity dimension: 1 + * measurement unit(s): dB + * tensor order: 0 + * definition: quantity given by: `L_E = 10 log_10(E/E_0) "[dB]"`, where `E` is sound exposure (item 8-11) and `E_0` is the reference value of sound exposure + * remarks: For sound in air and other gases, the reference value of sound exposure is given by `E_0 = 400 "@"["μPa"^2*"s"]`. For sound in water and other liquids, the reference value of sound exposure is given by `E_0 = 1"@"["μPa"^2*"s"]`. When stating a value of sound exposure level, the reference value shall be specified. The value of sound exposure level depends on the selected frequency range and time duration. When stating a value of sound exposure level, the frequency range and time duration shall be specified. In accordance with ISO 80000-1, any attachment to the unit symbol as a means of giving information about the special nature of the quantity or context of measurement under consideration is not permitted. If specific frequency and time weightings as specified in IEC 61672-1 or specific frequency bands or time duration are applied, this should be indicated by appropriate subscripts to the quantity symbol. + */ + attribute :>> num: Real; + attribute :>> mRef: SoundExposureLevelUnit[1]; + } + + attribute soundExposureLevel: SoundExposureLevelValue[*] nonunique :> scalarQuantities; + + attribute def SoundExposureLevelUnit :> DimensionOneUnit { + } + + /* ISO-80000-8 item 8-17 reverberation time */ + attribute reverberationTime: DurationValue :> scalarQuantities { + doc + /* + * source: item 8-17 reverberation time + * symbol(s): `T` + * application domain: generic + * name: ReverberationTime (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: time duration (ISO 80000-3) required for the space-averaged sound energy density (item 8-7) to decrease to `10^(−6)` of its initial value (i.e. for its level to decrease by `60 "[dB]"`) after the source emission has stopped + * remarks: The reverberation time can be evaluated based on a dynamic range smaller than `60 "[dB]"` and extrapolated to a decay time of `60 "[dB]"`. It is then labelled accordingly `T_n`, where `n` is the dynamic range in `"[dB]"`. See also ISO 3382-1. + */ + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml new file mode 100644 index 00000000..5689efdf --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml @@ -0,0 +1,2726 @@ +standard library package ISQAtomicNuclear { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-10:2019 "Atomic and nuclear physics" + * see also https://www.iso.org/standard/64980.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQChemistryMolecular::DiffusionCoefficientUnit; + private import ISQChemistryMolecular::DiffusionCoefficientValue; + private import ISQChemistryMolecular::diffusionCoefficient; + private import ISQElectromagnetism::ElectricChargeValue; + private import ISQSpaceTime::AngularFrequencyValue; + private import ISQSpaceTime::AreaValue; + private import ISQThermodynamics::EnergyValue; + + /* ISO-80000-10 item 10-1.1 atomic number, proton number */ + attribute atomicNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-1.1 atomic number, proton number + * symbol(s): `Z` + * application domain: generic + * name: AtomicNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of protons in an atomic nucleus + * remarks: A nuclide is a species of atom with specified numbers of protons and neutrons. Nuclides with the same value of `Z` but different values of `N` are called isotopes of an element. The ordinal number of an element in the periodic table is equal to the atomic number. The atomic number equals the quotient of the charge (IEC 80000-6) of the nucleus and the elementary charge (ISO 80000-1). + */ + } + + alias protonNumber for atomicNumber; + + /* ISO-80000-10 item 10-1.2 neutron number */ + attribute neutronNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-1.2 neutron number + * symbol(s): `N` + * application domain: generic + * name: NeutronNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of neutrons in an atomic nucleus + * remarks: Nuclides with the same value of `N` but different values of `Z` are called isotones. `N - Z` is called the neutron excess number. + */ + } + + /* ISO-80000-10 item 10-1.3 nucleon number, mass number */ + attribute nucleonNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-1.3 nucleon number, mass number + * symbol(s): `A` + * application domain: generic + * name: NucleonNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of nucleons in an atomic nucleus + * remarks: `A` = `Z` + `N` Nuclides with the same value of `A` are called isobars. + */ + } + + alias massNumber for nucleonNumber; + + /* ISO-80000-10 item 10-2 rest mass, proper mass */ + attribute restMass: MassValue :> scalarQuantities { + doc + /* + * source: item 10-2 rest mass, proper mass + * symbol(s): `m(X)`, `m_X` + * application domain: generic + * name: RestMass (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg, Da, u + * tensor order: 0 + * definition: for particle X, mass (ISO 80000-4) of that particle at rest in an inertial frame + * remarks: EXAMPLE `m(H_2O)` for a water molecule, `m_e` for an electron. Rest mass is often denoted `m_0`. 1 u is equal to 1/12 times the mass of a free carbon 12 atom, at rest and in its ground state. 1 Da = 1 u + */ + } + + alias properMass for restMass; + + /* ISO-80000-10 item 10-3 rest energy */ + attribute restEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-3 rest energy + * symbol(s): `E_0` + * application domain: generic + * name: RestEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, N*m, kg*m^2*s^-2 + * tensor order: 0 + * definition: energy `E_0` (ISO 80000-5) of a particle at rest: `E_0 = m_0 c_0^2` where `m_0` is the rest mass (item 10-2) of that particle, and `c_0` is speed of light in vacuum (ISO 80000-1) + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-4.1 atomic mass */ + attribute atomicMass: MassValue :> scalarQuantities { + doc + /* + * source: item 10-4.1 atomic mass + * symbol(s): `m(X)`, `m_X` + * application domain: generic + * name: AtomicMass (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg, Da, u + * tensor order: 0 + * definition: rest mass (item 10-2) of an atom X in the ground state + * remarks: `m(X)/m_u` is called the relative atomic mass. 1 u is equal to 1/12 times the mass of a free carbon 12 atom, at rest and in its ground state. 1 Da = 1 u + */ + } + + /* ISO-80000-10 item 10-4.2 nuclidic mass */ + attribute nuclidicMass: MassValue :> scalarQuantities { + doc + /* + * source: item 10-4.2 nuclidic mass + * symbol(s): `m(X)`, `m_X` + * application domain: generic + * name: NuclidicMass (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg, Da, u + * tensor order: 0 + * definition: rest mass (item 10-2) of a nuclide X in the ground state + * remarks: 1 u is equal to 1/12 times the mass of a free carbon 12 atom, at rest and in its ground state. 1 Da = 1 u + */ + } + + /* ISO-80000-10 item 10-4.3 unified atomic mass constant */ + attribute unifiedAtomicMassConstant: MassValue :> scalarQuantities { + doc + /* + * source: item 10-4.3 unified atomic mass constant + * symbol(s): `m_u` + * application domain: generic + * name: UnifiedAtomicMassConstant (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg, Da, u + * tensor order: 0 + * definition: 1/12 of the mass (ISO 80000-4) of an atom of the nuclide ^(12)C in the ground state at rest + * remarks: 1 u is equal to 1/12 times the mass of a free carbon 12 atom, at rest and in its ground state. 1 Da = 1 u + */ + } + + /* ISO-80000-10 item 10-5.1 elementary charge */ + attribute elementaryCharge: ElectricChargeValue :> scalarQuantities { + doc + /* + * source: item 10-5.1 elementary charge + * symbol(s): `e` + * application domain: generic + * name: ElementaryCharge (specializes ElectricCharge) + * quantity dimension: T^1*I^1 + * measurement unit(s): C, s*A + * tensor order: 0 + * definition: one of the fundamental constants in the SI system (ISO 80000-1), equal to the charge of the proton and opposite to the charge of the electron + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-5.2 charge number, ionization number */ + attribute def ChargeNumberValue :> DimensionOneValue { + doc + /* + * source: item 10-5.2 charge number, ionization number + * symbol(s): `c` + * application domain: generic + * name: ChargeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for a particle, quotient of the electric charge (IEC 80000-6) and the elementary charge (ISO 80000-1) + * remarks: A particle is said to be electrically neutral if its charge number is equal to zero. The charge number of a particle can be positive, negative, or zero. The state of charge of a particle may be presented as a superscript to the symbol of that particle, e.g. `H^+, He^(++), Al^(3+), Cl^-, S^(--), N^(3-)`. + */ + } + attribute chargeNumber: ChargeNumberValue :> scalarQuantities; + + alias ionizationNumber for chargeNumber; + + /* ISO-80000-10 item 10-6 Bohr radius */ + attribute bohrRadius: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-6 Bohr radius + * symbol(s): `a_0` + * application domain: generic + * name: BohrRadius (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m, Å + * tensor order: 0 + * definition: radius (ISO 80000-3) of the electron orbital in the hydrogen atom in its ground state in the Bohr model of the atom: `a_0 = (4 π ε_0 ℏ^2)/(m_e e^2)` where `ε_0` is the electric constant (IEC 80000-6), `ℏ` is the reduced Planck constant (ISO 80000-1), `m_e` is the rest mass (item 10-2) of electron, and `e` is the elementary charge (ISO 80000-1) + * remarks: The radius of the electron orbital in the H atom in its ground state is `a_0` in the Bohr model of the atom. ångström (Å), `1 Å := 10^-10 m`. + */ + } + + /* ISO-80000-10 item 10-7 Rydberg constant */ + attribute def RydbergConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 10-7 Rydberg constant + * symbol(s): `R_∞` + * application domain: generic + * name: RydbergConstant + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: spectroscopic constant that determines the wave numbers of the lines in the spectrum of hydrogen: `R_(oo) = e^2/(8 π ε_0 a_0 h c_0)` where `e` is the elementary charge (ISO 80000-1), `ε_0` is the electric constant (IEC 80000-6), `a_0` is the Bohr radius (item 10-6), `h` is the Planck constant (ISO 80000-1), and `c_0` is the speed of light in vacuum (ISO 80000-1) + * remarks: The quantity `R_y = R_∞ h c_0` is called the Rydberg energy. + */ + attribute :>> num: Real; + attribute :>> mRef: RydbergConstantUnit[1]; + } + + attribute rydbergConstant: RydbergConstantValue[*] nonunique :> scalarQuantities; + + attribute def RydbergConstantUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-8 Hartree energy */ + attribute def HartreeEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 10-8 Hartree energy + * symbol(s): `E_H`, `E_h` + * application domain: generic + * name: HartreeEnergy + * quantity dimension: L^6*M^3*T^-6 + * measurement unit(s): eV*J*kg*m^2*s^-2 + * tensor order: 0 + * definition: energy (ISO 80000-5) of the electron in a hydrogen atom in its ground state: `E_H = e^2/(4 π ε_0 a_0)` where `e` is the elementary charge (ISO 80000-1), `ε_0` is the electric constant (IEC 80000-6), and `a_0` is the Bohr radius (item 10-6) + * remarks: The energy of the electron in an H atom in its ground state is `E_H`. + */ + attribute :>> num: Real; + attribute :>> mRef: HartreeEnergyUnit[1]; + } + + attribute hartreeEnergy: HartreeEnergyValue[*] nonunique :> scalarQuantities; + + attribute def HartreeEnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 6; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -6; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-10 item 10-9.1 magnetic dipole moment */ + attribute def MagneticDipoleMomentValue :> ScalarQuantityValue { + doc + /* + * source: item 10-9.1 magnetic dipole moment (magnitude) + * symbol(s): `μ` + * application domain: atomic physics + * name: MagneticDipoleMoment + * quantity dimension: L^2*I^1 + * measurement unit(s): m^2*A + * tensor order: 0 + * definition: for a particle, vector (ISO 80000-2) quantity causing a change to its energy (ISO 80000-5) `ΔW` in an external magnetic field of field flux density `vec(B)` (IEC 80000-6): `ΔW` = -`vec(μ)` · `vec(B)` + * remarks: For an atom or nucleus, this energy is quantized and can be written as: `W` = `g μ_x M B` where `g` is the appropriate `g` factor (item 10-14.1 or item 10-14.2), `μ_x` is mostly the Bohr magneton or nuclear magneton (item 10-9.2 or item 10-9.3), `M` is magnetic quantum number (item 10-13.4), and `B` is magnitude of the magnetic flux density. See also IEC 80000-6. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticDipoleMomentUnit[1]; + } + + attribute magneticDipoleMoment: MagneticDipoleMomentValue[*] nonunique :> scalarQuantities; + + attribute def MagneticDipoleMomentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianMagneticDipoleMoment3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 10-9.1 magnetic dipole moment (vector) + * symbol(s): `vec(μ)` + * application domain: atomic physics + * name: MagneticDipoleMoment + * quantity dimension: L^2*I^1 + * measurement unit(s): m^2*A + * tensor order: 1 + * definition: for a particle, vector (ISO 80000-2) quantity causing a change to its energy (ISO 80000-5) `ΔW` in an external magnetic field of field flux density `vec(B)` (IEC 80000-6): `ΔW` = -`vec(μ)` · `vec(B)` + * remarks: For an atom or nucleus, this energy is quantized and can be written as: `W` = `g μ_x M B` where `g` is the appropriate `g` factor (item 10-14.1 or item 10-14.2), `μ_x` is mostly the Bohr magneton or nuclear magneton (item 10-9.2 or item 10-9.3), `M` is magnetic quantum number (item 10-13.4), and `B` is magnitude of the magnetic flux density. See also IEC 80000-6. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagneticDipoleMoment3dCoordinateFrame[1]; + } + + attribute cartesianMagneticDipoleMoment3dVector: CartesianMagneticDipoleMoment3dVector :> vectorQuantities; + + attribute def CartesianMagneticDipoleMoment3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticDipoleMomentUnit[3]; + } + + /* ISO-80000-10 item 10-9.2 Bohr magneton */ + attribute bohrMagneton: MagneticDipoleMomentValue :> scalarQuantities { + doc + /* + * source: item 10-9.2 Bohr magneton + * symbol(s): `μ_B` + * application domain: generic + * name: BohrMagneton (specializes MagneticDipoleMoment) + * quantity dimension: L^2*I^1 + * measurement unit(s): m^2*A + * tensor order: 0 + * definition: magnitude of the magnetic moment of an electron in a state with orbital angular momentum quantum number `l`=1 (item 10-13.3) due to its orbital motion: `μ_B = (e ℏ)/(2 m_e)` where `e` is the elementary charge (ISO 80000-1), `ℏ` is the reduced Planck constant (ISO 80000-1), and `m_e` is the rest mass (item 10-2) of electron + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-9.3 nuclear magneton */ + attribute nuclearMagneton: MagneticDipoleMomentValue :> scalarQuantities { + doc + /* + * source: item 10-9.3 nuclear magneton + * symbol(s): `μ_N` + * application domain: generic + * name: NuclearMagneton (specializes MagneticDipoleMoment) + * quantity dimension: L^2*I^1 + * measurement unit(s): m^2*A + * tensor order: 0 + * definition: absolute value of the magnetic moment of a nucleus: `μ_N = (e ℏ)/(2 m_p)` where `e` is the elementary charge (ISO 80000-1), `ℏ` is the reduced Planck constant (ISO 80000-1), and `m_p` is the rest mass (item 10-2) of proton + * remarks: Subscript N stands for nucleus. For the neutron magnetic moment, subscript n is used. The magnetic moments of protons and neutrons differ from this quantity by their specific `g` factors (item 10-14.2). + */ + } + + /* ISO-80000-10 item 10-10 spin */ + attribute def SpinValue :> ScalarQuantityValue { + doc + /* + * source: item 10-10 spin (magnitude) + * symbol(s): `s` + * application domain: generic + * name: Spin + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): kg*m^2*s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity expressing the internal angular momentum (ISO 80000-4) of a particle or a particle system + * remarks: Spin is an additive vector quantity. + */ + attribute :>> num: Real; + attribute :>> mRef: SpinUnit[1]; + } + + attribute spin: SpinValue[*] nonunique :> scalarQuantities; + + attribute def SpinUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianSpin3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 10-10 spin (vector) + * symbol(s): `vec(s)` + * application domain: generic + * name: Spin + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): kg*m^2*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity expressing the internal angular momentum (ISO 80000-4) of a particle or a particle system + * remarks: Spin is an additive vector quantity. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSpin3dCoordinateFrame[1]; + } + + attribute cartesianSpin3dVector: CartesianSpin3dVector :> vectorQuantities; + + attribute def CartesianSpin3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: SpinUnit[3]; + } + + /* ISO-80000-10 item 10-11 total angular momentum */ + attribute def TotalAngularMomentumValue :> ScalarQuantityValue { + doc + /* + * source: item 10-11 total angular momentum (magnitude) + * symbol(s): `J` + * application domain: generic + * name: TotalAngularMomentum + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): J*s*eV*s, kg*m^2*s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity in a quantum system composed of the vectorial sum of angular momentum `vec(L)` (ISO 80000-4) and spin `vec(s)` (item 10-10) + * remarks: In atomic and nuclear physics, orbital angular momentum is usually denoted by `vec(l)` or `vec(L)`. The magnitude of `vec(J)` is quantized so that: `J^2 = ℏ^2 j (j+1)` where `j` is the total angular momentum quantum number (item 10-13.6). Total angular momentum and magnetic dipole moment have the same direction. `j` is not the magnitude of the total angular momentum `vec(J)` but its projection onto the quantization axis, divided by `ℏ`. + */ + attribute :>> num: Real; + attribute :>> mRef: TotalAngularMomentumUnit[1]; + } + + attribute totalAngularMomentum: TotalAngularMomentumValue[*] nonunique :> scalarQuantities; + + attribute def TotalAngularMomentumUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianTotalAngularMomentum3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 10-11 total angular momentum (vector) + * symbol(s): `vec(J)` + * application domain: generic + * name: TotalAngularMomentum + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): J*s*eV*s, kg*m^2*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity in a quantum system composed of the vectorial sum of angular momentum `vec(L)` (ISO 80000-4) and spin `vec(s)` (item 10-10) + * remarks: In atomic and nuclear physics, orbital angular momentum is usually denoted by `vec(l)` or `vec(L)`. The magnitude of `vec(J)` is quantized so that: `J^2 = ℏ^2 j (j+1)` where `j` is the total angular momentum quantum number (item 10-13.6). Total angular momentum and magnetic dipole moment have the same direction. `j` is not the magnitude of the total angular momentum `vec(J)` but its projection onto the quantization axis, divided by `ℏ`. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianTotalAngularMomentum3dCoordinateFrame[1]; + } + + attribute cartesianTotalAngularMomentum3dVector: CartesianTotalAngularMomentum3dVector :> vectorQuantities; + + attribute def CartesianTotalAngularMomentum3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: TotalAngularMomentumUnit[3]; + } + + /* ISO-80000-10 item 10-12.1 gyromagnetic ratio, magnetogyric ratio, gyromagnetic coefficient */ + attribute def GyromagneticRatioValue :> ScalarQuantityValue { + doc + /* + * source: item 10-12.1 gyromagnetic ratio, magnetogyric ratio, gyromagnetic coefficient + * symbol(s): `γ` + * application domain: generic + * name: GyromagneticRatio + * quantity dimension: M^-1*T^1*I^1 + * measurement unit(s): A*m^2*J^-1*s^-1, A*s/kg, kg^-1*s*A + * tensor order: 0 + * definition: proportionality constant between the magnetic dipole moment and the angular momentum: `vec(μ)` = `γ` `vec(J)` where `vec(μ)` is the magnetic dipole moment (item 10-9.1), and `vec(J)` is the total angular momentum (item 10-11) + * remarks: 1 A·m^2/(J·s) = 1 A·s/kg = 1 T^-1·s^-1 The systematic name is "gyromagnetic coefficient", but "gyromagnetic ratio" is more usual. The gyromagnetic ratio of the proton is denoted by `γ_p`. The gyromagnetic ratio of the neutron is denoted by `γ_n`. + */ + attribute :>> num: Real; + attribute :>> mRef: GyromagneticRatioUnit[1]; + } + + attribute gyromagneticRatio: GyromagneticRatioValue[*] nonunique :> scalarQuantities; + + attribute def GyromagneticRatioUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF); } + } + + alias MagnetogyricRatioUnit for GyromagneticRatioUnit; + alias MagnetogyricRatioValue for GyromagneticRatioValue; + alias magnetogyricRatio for gyromagneticRatio; + + alias GyromagneticCoefficientUnit for GyromagneticRatioUnit; + alias GyromagneticCoefficientValue for GyromagneticRatioValue; + alias gyromagneticCoefficient for gyromagneticRatio; + + /* ISO-80000-10 item 10-12.2 gyromagnetic ratio of the electron, magnetogyric ratio of the electron, gyromagnetic coefficient of the electron */ + attribute def GyromagneticRatioOfTheElectronValue :> ScalarQuantityValue { + doc + /* + * source: item 10-12.2 gyromagnetic ratio of the electron, magnetogyric ratio of the electron, gyromagnetic coefficient of the electron + * symbol(s): `γ_e` + * application domain: generic + * name: GyromagneticRatioOfTheElectron + * quantity dimension: M^-1*T^1*I^1 + * measurement unit(s): A*m^2*J^-1*s^-1, A*s/kg, kg^-1*s*A + * tensor order: 0 + * definition: proportionality constant between the magnetic dipole moment and the angular momentum of the electron `vec(μ)` = `γ_e` `vec(J)` where `vec(μ)` is the magnetic dipole moment (item 10-9.1), and `vec(J)` is the total angular momentum (item 10-11) + * remarks: 1 A·m^2/(J·s) = 1 A·s/kg = 1 T^-1·s^-1 + */ + attribute :>> num: Real; + attribute :>> mRef: GyromagneticRatioOfTheElectronUnit[1]; + } + + attribute gyromagneticRatioOfTheElectron: GyromagneticRatioOfTheElectronValue[*] nonunique :> scalarQuantities; + + attribute def GyromagneticRatioOfTheElectronUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF); } + } + + alias MagnetogyricRatioOfTheElectronUnit for GyromagneticRatioOfTheElectronUnit; + alias MagnetogyricRatioOfTheElectronValue for GyromagneticRatioOfTheElectronValue; + alias magnetogyricRatioOfTheElectron for gyromagneticRatioOfTheElectron; + + alias GyromagneticCoefficientOfTheElectronUnit for GyromagneticRatioOfTheElectronUnit; + alias GyromagneticCoefficientOfTheElectronValue for GyromagneticRatioOfTheElectronValue; + alias gyromagneticCoefficientOfTheElectron for gyromagneticRatioOfTheElectron; + + /* ISO-80000-10 item 10-13.1 quantum number */ + attribute def QuantumNumberValue :> DimensionOneValue { + doc + /* + * source: item 10-13.1 quantum number + * symbol(s): `N`, `L`, `M`, `j`, `s`, `F` + * application domain: generic + * name: QuantumNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number describing a particular state of a quantum system + * remarks: Electron states determine the binding energy `E = E(n,l,m,j,s,f)` in an atom. Upper case letters `N, L, M, J, S, F` are usually used for the whole system. The spatial probability distribution of an electron is given by `|Ψ|^2`, where `Ψ` is its wave function. For an electron in an H atom in a non-relativistic approximation, the wave function can be presented as: `Ψ(r,θ,φ) = R_(nl)(r)*Y_l^m(θ,φ)`, where `r,θ,φ` are spherical coordinates (ISO 80000-2) with respect to the nucleus and to a given (quantization) axis, `R_(nl)(r)` is the radial distribution function, and `Y_l^m(θ,φ)` are spherical harmonics. In the Bohr model of one-electron atoms, `n`, `l`, and `m` define the possible orbits of an electron about the nucleus. + */ + } + attribute quantumNumber: QuantumNumberValue :> scalarQuantities; + + /* ISO-80000-10 item 10-13.2 principal quantum number */ + attribute principalQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.2 principal quantum number + * symbol(s): `n` + * application domain: generic + * name: PrincipalQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: atomic quantum number related to the number `n`-1 of radial nodes of one-electron wave functions + * remarks: In the Bohr model, `n = 1,2,…,∞` is related to the binding energy of an electron and the radius of spherical orbits (principal axis of the elliptic orbits). For an electron in an H atom, the semi-classical radius of its orbit is `r_n = a_0 n^2` and its binding energy is `E_n = E_H/n^2`. + */ + } + + /* ISO-80000-10 item 10-13.3 orbital angular momentum quantum number */ + attribute orbitalAngularMomentumQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.3 orbital angular momentum quantum number + * symbol(s): `l`, `l_i`, `L` + * application domain: generic + * name: OrbitalAngularMomentumQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: atomic quantum number related to the orbital angular momentum `l` of a one-electron state + * remarks: `abs(l)^2 = ℏ^2 l (l-1)` , `l = 0, 1, …, n-1` where `vec(l)` is the orbital angular momentum and `ℏ` is the reduced Planck constant (ISO 80000-1). If reference is made to a specific particle `i`, the symbol `l_i` is used instead of `l`; if reference is made to the whole system, the symbol `L` is used instead of `l`. An electron in an H atom for `l = 0` appears as a spherical cloud. In the Bohr model, it is related to the form of the orbit. + */ + } + + /* ISO-80000-10 item 10-13.4 magnetic quantum number */ + attribute magneticQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.4 magnetic quantum number + * symbol(s): `m`, `m_i`, `M` + * application domain: generic + * name: MagneticQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: atomic quantum number related to the `z` component `l_z`, `j_z` or `s_z`, of the orbital, total, or spin angular momentum + * remarks: `l_z = m_l ℏ` , `j_z = m_j ℏ` , and `s_z = m_s ℏ` , with the ranges from `-l` to `l`, from `-j` to `j`, and `±1/2`, respectively. `m_i` refers to a specific particle `i`. `M` is used for the whole system. Subscripts `l`, `s`, `j`, etc., as appropriate, indicate the angular momentum involved. `ℏ` is the reduced Planck constant (ISO 80000-1). + */ + } + + /* ISO-80000-10 item 10-13.5 spin quantum number */ + attribute spinQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.5 spin quantum number + * symbol(s): `s` + * application domain: generic + * name: SpinQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: characteristic quantum number `s` of a particle, related to its spin (item 10-10), `vec(s)`: `s^2 = ℏ^2 s (s+1)` where `ℏ` is the reduced Planck constant (ISO 80000-1) + * remarks: Spin quantum numbers of fermions are odd multiples of 1/2, and those of bosons are integers. + */ + } + + /* ISO-80000-10 item 10-13.6 total angular momentum quantum number */ + attribute totalAngularMomentumQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.6 total angular momentum quantum number + * symbol(s): `j`, `j_i`, `J` + * application domain: generic + * name: TotalAngularMomentumQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantum number in an atom describing the magnitude of total angular momentum `vec(J)` (item 10-11) + * remarks: `j_i` refers to a specific particle `i`; `J` is used for the whole system. The quantum number `J` and the magnitude of total angular momentum `vec(J)` (item 10-11) are different quantities. The two values of `j` are `l`±1/2. (See item 10-13.3.) + */ + } + + /* ISO-80000-10 item 10-13.7 nuclear spin quantum number */ + attribute nuclearSpinQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.7 nuclear spin quantum number + * symbol(s): `I` + * application domain: generic + * name: NuclearSpinQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantum number related to the total angular momentum (item 10-11), `vec(J)`, of a nucleus in any specified state, normally called nuclear spin: `vec(J)^2 = ℏ^2 I (I+1)` where `ℏ` is the reduced Planck constant (ISO 80000-1) + * remarks: Nuclear spin is composed of spins of the nucleons (protons and neutrons) and their (orbital) motions. In principle there is no upper limit for the nuclear spin quantum number. It has possible values `I` = 0,1,2,… for even `A` and `I = 1/2, 3/2, …` for odd `A`. In nuclear and particle physics, `vec(J)` is often used. + */ + } + + /* ISO-80000-10 item 10-13.8 hyperfine structure quantum number */ + attribute hyperfineStructureQuantumNumber: CountValue :> scalarQuantities { + doc + /* + * source: item 10-13.8 hyperfine structure quantum number + * symbol(s): `F` + * application domain: generic + * name: HyperfineStructureQuantumNumber (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantum number of an atom describing the inclination of the nuclear spin with respect to a quantization axis given by the magnetic field produced by the orbital electrons + * remarks: The interval of `F` is │`I`-`J`│, │`I`-`J`│+1, ..., `I`-`J`. This is related to the hyperfine splitting of the atomic energy levels due to the interaction between the electron and nuclear magnetic moments. + */ + } + + /* ISO-80000-10 item 10-14.1 Lande factor, g factor of atom */ + attribute def LandeFactorValue :> DimensionOneValue { + doc + /* + * source: item 10-14.1 Lande factor, g factor of atom + * symbol(s): `g` + * application domain: generic + * name: LandeFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the magnetic dipole moment of an atom, and the product of the total angular momentum quantum number and the Bohr magneton: `g = μ/(J*μ_B)` where `μ` is magnitude of magnetic dipole moment (item 10-9.1), `J` is total angular momentum quantum number (item 10-13.6), and `μ_B` is the Bohr magneton (item 10-9.2) + * remarks: These quantities are also called `g` values. The Landé factor can be calculated from the expression: `g(L, S, J) = 1 + (g_e -1) xx (J(J+1) + S(S+1) - L(L+1))/(2J(J+1))` where `g_e` is the` g` factor of the electron. + */ + } + attribute landeFactor: LandeFactorValue :> scalarQuantities; + + alias gFactorOfAtom for landeFactor; + + /* ISO-80000-10 item 10-14.2 g factor of nucleus or nuclear particle */ + attribute def GFactorOfNucleusOrNuclearParticleValue :> DimensionOneValue { + doc + /* + * source: item 10-14.2 g factor of nucleus or nuclear particle + * symbol(s): `g` + * application domain: generic + * name: GFactorOfNucleusOrNuclearParticle (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the magnetic dipole moment of an atom, and the product of the nuclear spin quantum number and the nuclear magneton: `g = μ/(I*μ_N)` where `μ` is magnitude of magnetic dipole moment (item 10-9.1), `I` is nuclear spin quantum number (item 10-13.7), and `μ_N` is the nuclear magneton (item 10-9.3) + * remarks: The `g` factors for nuclei or nucleons are known from measurements. + */ + } + attribute gFactorOfNucleusOrNuclearParticle: GFactorOfNucleusOrNuclearParticleValue :> scalarQuantities; + + /* ISO-80000-10 item 10-15.1 Larmor angular frequency */ + attribute larmorAngularFrequency: AngularFrequencyValue :> scalarQuantities { + doc + /* + * source: item 10-15.1 Larmor angular frequency + * symbol(s): `ω_L` + * application domain: generic + * name: LarmorAngularFrequency (specializes AngularFrequency) + * quantity dimension: T^-1 + * measurement unit(s): rad*s^-1, s^-1 + * tensor order: 0 + * definition: angular frequency (ISO 80000-3) of the electron angular momentum (ISO 80000-4) vector precession about the axis of an external magnetic field: `ω_L = e/(2 m_e) B` where `e` is the elementary charge (ISO 80000-1), `m_e` is the rest mass (item 10-2) of electron, and `B` is magnetic flux density (IEC 80000-6) + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-15.2 Larmor frequency */ + attribute def LarmorFrequencyValue :> ScalarQuantityValue { + doc + /* + * source: item 10-15.2 Larmor frequency + * symbol(s): `ν_L` + * application domain: generic + * name: LarmorFrequency + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: quotient of Larmor angular frequency (ISO 80000-3) and 2π + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: LarmorFrequencyUnit[1]; + } + + attribute larmorFrequency: LarmorFrequencyValue[*] nonunique :> scalarQuantities; + + attribute def LarmorFrequencyUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-10 item 10-15.3 nuclear precession angular frequency */ + attribute nuclearPrecessionAngularFrequency: AngularFrequencyValue :> scalarQuantities { + doc + /* + * source: item 10-15.3 nuclear precession angular frequency + * symbol(s): `ω_N` + * application domain: generic + * name: NuclearPrecessionAngularFrequency (specializes AngularFrequency) + * quantity dimension: T^-1 + * measurement unit(s): rad*s^-1, s^-1 + * tensor order: 0 + * definition: frequency (ISO 80000-3) by which the nucleus angular momentum vector (ISO 80000-4) precesses about the axis of an external magnetic field: `ω_N` = `γ` `B` where `γ` is the gyromagnetic ratio (item 10-12.1), and `B` is magnetic flux density (IEC 80000-6) + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-16 cyclotron angular frequency */ + attribute cyclotronAngularFrequency: AngularFrequencyValue :> scalarQuantities { + doc + /* + * source: item 10-16 cyclotron angular frequency + * symbol(s): `ω_c` + * application domain: generic + * name: CyclotronAngularFrequency (specializes AngularFrequency) + * quantity dimension: T^-1 + * measurement unit(s): rad*s^-1, s^-1 + * tensor order: 0 + * definition: quotient of the product of the electric charge of a particle and the magnitude of the magnetic flux density of the magnetic field, and the particle mass: `ω_c = abs(q)/m B` where `q` is the electric charge (IEC 80000-6) of the particle, `m` is the mass (ISO 80000-4) of the particle, and `B` is the absolute value of the magnetic flux density (IEC 80000-6) + * remarks: The quantity `v_c` = `ω_c`/2π is called the cyclotron frequency. + */ + } + + /* ISO-80000-10 item 10-17 gyroradius, Larmor radius */ + attribute gyroradius: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-17 gyroradius, Larmor radius + * symbol(s): `r_g`, `r_L` + * application domain: generic + * name: Gyroradius (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: radius (ISO 80000-3) of circular movement of a particle with mass (ISO 80000-4), velocity `vec(v)` (ISO 80000-3), and electric charge `q` (IEC 80000-6), moving in a magnetic field with magnetic flux density `vec(B)` (IEC 80000-6): `r_g = (m abs(vec(v) xx vec(B)))/(q B^2)` + * remarks: None. + */ + } + + alias larmorRadius for gyroradius; + + /* ISO-80000-10 item 10-18 nuclear quadrupole moment */ + attribute def NuclearQuadrupoleMomentValue :> ScalarQuantityValue { + doc + /* + * source: item 10-18 nuclear quadrupole moment + * symbol(s): `Q` + * application domain: generic + * name: NuclearQuadrupoleMoment + * quantity dimension: L^2 + * measurement unit(s): m^2 + * tensor order: 0 + * definition: `z` component of the diagonalized tensor of nuclear quadrupole moment: `Q = (1/e) int (3z^2 - r^2) ρ(x, y, z) dV` in the quantum state with the nuclear spin in the field direction (`z`), where `e` is the elementary charge (ISO 80000-1), `r^2 = x^2 + y^2 + z^2`, `ρ(x,y,z)` is the nuclear electric charge density (IEC 80000-6), and `dV` is the volume element `dx dy dz` + * remarks: The electric nuclear quadrupole moment is `eQ`. This value is equal to the `z` component of the diagonalized tensor of quadrupole moment. + */ + attribute :>> num: Real; + attribute :>> mRef: NuclearQuadrupoleMomentUnit[1]; + } + + attribute nuclearQuadrupoleMoment: NuclearQuadrupoleMomentValue[*] nonunique :> scalarQuantities; + + attribute def NuclearQuadrupoleMomentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-19.1 nuclear radius */ + attribute nuclearRadius: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-19.1 nuclear radius + * symbol(s): `R` + * application domain: generic + * name: NuclearRadius (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: conventional radius (ISO 80000-3) of sphere in which the nuclear matter is included + * remarks: This quantity is not exactly defined. It is given approximately for nuclei in their ground state by: `R = r_0 A^(1//3)` where `r_0 ~~ 1.2 * 10^-15` m, and `A` is the nucleon number (item 10-1.3). Nuclear radius is usually expressed in femtometres, 1 fm = 10^(-15) m. + */ + } + + /* ISO-80000-10 item 10-19.2 electron radius */ + attribute electronRadius: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-19.2 electron radius + * symbol(s): `r_e` + * application domain: generic + * name: ElectronRadius (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: radius of a sphere such that the relativistic electron energy is distributed uniformly: `r_e = e^2/(4 π ε_0 m_e c_0^2)` where `e` is the elementary charge (ISO 80000-1), `ε_0` is the electric constant (IEC 80000-6), `m_e` is the rest mass (item 10-2) of electron, and `c_0` is the speed of light in vacuum (ISO 80000-1) + * remarks: This quantity corresponds to the electrostatic energy `E` of a charge distributed inside a sphere of radius `r_e` as if all the rest energy (item 10-3) of the electron were attributed to the energy of electromagnetic origin, using the relation `E = m_e c_0^2`. + */ + } + + /* ISO-80000-10 item 10-20 Compton wavelength */ + attribute comptonWavelength: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-20 Compton wavelength + * symbol(s): `λ_C` + * application domain: generic + * name: ComptonWavelength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: quotient of the Planck constant and the product of the mass of the particle and the speed of light in vacuum: `λ_C = h / (m c_0)` where `h` is the Planck constant (ISO 80000-1), `m` is the rest mass (item 10-2) of a particle, and `c_0` is the speed of light in vacuum (ISO 80000-1) + * remarks: The wavelength of electromagnetic radiation scattered from free electrons (Compton scattering) is larger than that of the incident radiation by a maximum of 2`λ_C`. + */ + } + + /* ISO-80000-10 item 10-21.1 mass excess */ + attribute massExcess: MassValue :> scalarQuantities { + doc + /* + * source: item 10-21.1 mass excess + * symbol(s): `Δ` + * application domain: generic + * name: MassExcess (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg, Da, u + * tensor order: 0 + * definition: difference between the mass of an atom, and the product of its mass number and the unified mass constant: `Δ = m_a - A*m_u`, where `m_a` is the rest mass (item 10-2) of the atom, `A` is its nucleon number (item 10-1.3), and `m_u` is the unified atomic mass constant (item 10-4.3) + * remarks: The mass excess is usually expressed in daltons, 1 Da = 1 u. See item 10-2. + */ + } + + /* ISO-80000-10 item 10-21.2 mass defect */ + attribute massDefect: MassValue :> scalarQuantities { + doc + /* + * source: item 10-21.2 mass defect + * symbol(s): `B` + * application domain: generic + * name: MassDefect (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg, Da, u + * tensor order: 0 + * definition: sum of the product of the proton number and the hydrogen atomic mass, and the neutron rest mass, minus the rest mass of the atom: `B = Z*m(⁢^1"H") + N*m_n - m_a` where `Z` is the proton number (item 10-1.1) of the atom, `m(⁢^1"H")` is atomic mass (item 10-4.1) of `⁢^1"H"`, `N` is neutron number (item 10-1.2), `m_n` is the rest mass (item 10-2) of the neutron, and `m_a` is the rest mass (item 10-2) of the atom + * remarks: The mass excess is usually expressed in daltons, 1 Da = 1 u. If the binding energy of the orbital electrons is neglected, `B c_0^2` is equal to the binding energy of the nucleus. + */ + } + + /* ISO-80000-10 item 10-22.1 relative mass excess */ + attribute def RelativeMassExcessValue :> DimensionOneValue { + doc + /* + * source: item 10-22.1 relative mass excess + * symbol(s): `Δ_r` + * application domain: generic + * name: RelativeMassExcess (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass excess and the unified atomic mass constant: `Δ_r = Δ/m_u` where `Δ` is mass excess (item 10-21.1), and `m_u` is the unified atomic mass constant (item 10-4.3) + * remarks: None. + */ + } + attribute relativeMassExcess: RelativeMassExcessValue :> scalarQuantities; + + /* ISO-80000-10 item 10-22.2 relative mass defect */ + attribute def RelativeMassDefectValue :> DimensionOneValue { + doc + /* + * source: item 10-22.2 relative mass defect + * symbol(s): `B_r` + * application domain: generic + * name: RelativeMassDefect (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass defect and the unified atomic mass constant: `B_r = B/m_u` where `B` is mass defect (item 10-21.2), and `m_u` is the unified atomic mass constant (item 10-4.3) + * remarks: None. + */ + } + attribute relativeMassDefect: RelativeMassDefectValue :> scalarQuantities; + + /* ISO-80000-10 item 10-23.1 packing fraction */ + attribute def PackingFractionValue :> DimensionOneValue { + doc + /* + * source: item 10-23.1 packing fraction + * symbol(s): `f` + * application domain: generic + * name: PackingFraction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of relative mass excess and the nucleon number: `f` = Δ_r/A` where `Δ_r` is relative mass excess (item 10-22.1), and `A` is the nucleon number (item 10-1.3) + * remarks: None. + */ + } + attribute packingFraction: PackingFractionValue :> scalarQuantities; + + /* ISO-80000-10 item 10-23.2 binding fraction */ + attribute def BindingFractionValue :> DimensionOneValue { + doc + /* + * source: item 10-23.2 binding fraction + * symbol(s): `b` + * application domain: generic + * name: BindingFraction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of relative mass defect and the nucleon number: `b = B_r/A` where `B_r` is relative mass defect (item 10-22.2), and `A` is the nucleon number (item 10-1.3) + * remarks: None. + */ + } + attribute bindingFraction: BindingFractionValue :> scalarQuantities; + + /* ISO-80000-10 item 10-24 decay constant, disintegration constant */ + attribute def DecayConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 10-24 decay constant, disintegration constant + * symbol(s): `λ` + * application domain: generic + * name: DecayConstant + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: quotient of `(-dN)/N` and `dt`, where `(dN)/N` is the mean fractional change in the number of nuclei in a particular energy state due to spontaneous transformations in a time interval of duration (ISO 80000-3) `dt`: `λ = -1/N (dN)/(dt)` + * remarks: For exponential decay, this quantity is constant. For more than one decay channel, `λ = sum λ_a` where `λ_a` denotes the decay constant for a specified final state and the sum is taken over all final states. + */ + attribute :>> num: Real; + attribute :>> mRef: DecayConstantUnit[1]; + } + + attribute decayConstant: DecayConstantValue[*] nonunique :> scalarQuantities; + + attribute def DecayConstantUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + alias DisintegrationConstantUnit for DecayConstantUnit; + alias DisintegrationConstantValue for DecayConstantValue; + alias disintegrationConstant for decayConstant; + + /* ISO-80000-10 item 10-25 mean duration of life, mean life time */ + attribute meanDurationOfLife: DurationValue :> scalarQuantities { + doc + /* + * source: item 10-25 mean duration of life, mean life time + * symbol(s): `τ` + * application domain: atomic and nuclear physics + * name: MeanDurationOfLife (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: reciprocal of the decay constant `λ` (item 10-24): `τ = 1/λ` + * remarks: Mean duration of life is the expected value of the duration of life of an unstable particle or an excited state of a particle when the number of decay events in a short time interval follows a Poisson distribution. + */ + } + + alias meanLifeTime for meanDurationOfLife; + + /* ISO-80000-10 item 10-26 level width */ + attribute levelWidth: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-26 level width + * symbol(s): `Γ` + * application domain: generic + * name: LevelWidth (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: quotient of the reduced Planck constant and the mean life: `Γ = ℏ/τ` where `ℏ` is the reduced Planck constant (ISO 80000-1), and `τ` is mean duration of life (item 10-25) + * remarks: Level width is the uncertainty of the energy of an unstable particle or an excited state of a system due to the Heisenberg principle. The term energy level refers to the configuration of the distribution function of the density of states. Energy levels may be considered as discrete, like those in an atom, or may have a finite width, like e.g. this item or like e.g. the valence or conduction band in solid state physics. Energy levels are applicable to both real and virtual particles, e.g. electrons and phonons, respectively. + */ + } + + /* ISO-80000-10 item 10-27 nuclear activity */ + attribute def NuclearActivityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-27 nuclear activity + * symbol(s): `A` + * application domain: generic + * name: NuclearActivity + * quantity dimension: T^-1 + * measurement unit(s): Bq, s^-1 + * tensor order: 0 + * definition: differential quotient of `N` with respect to time, where `N` is the mean change in the number of nuclei in a particular energy state due to spontaneous nuclear transformations in a time interval of duration (ISO 80000-3) `dt`: `A = -(dN)/(dt)` + * remarks: For exponential decay, `A = λN`, where `λ` is the decay constant (item 10-24). The becquerel (Bq) is a special name for second to the power minus one, to be used as the coherent SI unit of activity. In report 85a of the ICRU a definition with an equivalent meaning is given as: The activity, `A`, of an amount of a radionuclide in a particular energy state at a given time is the quotient of `-dN` by `dt`, where `dN` is the mean change in the number of nuclei in that energy state due to spontaneous nuclear transformations in the time interval `dt`: `A = -(dN)/(dt)`. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: NuclearActivityUnit[1]; + } + + attribute nuclearActivity: NuclearActivityValue[*] nonunique :> scalarQuantities; + + attribute def NuclearActivityUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-10 item 10-28 specific activity, massic activity */ + attribute def SpecificActivityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-28 specific activity, massic activity + * symbol(s): `a` + * application domain: generic + * name: SpecificActivity + * quantity dimension: M^-1*T^-1 + * measurement unit(s): Bq/kg, kg^-1*s^-1 + * tensor order: 0 + * definition: quotient of the activity `A` (item 10-27) of a sample and the mass `m` (ISO 80000-4) of that sample: `a = A/m` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificActivityUnit[1]; + } + + attribute specificActivity: SpecificActivityValue[*] nonunique :> scalarQuantities; + + attribute def SpecificActivityUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + alias MassicActivityUnit for SpecificActivityUnit; + alias MassicActivityValue for SpecificActivityValue; + alias massicActivity for specificActivity; + + /* ISO-80000-10 item 10-29 activity density, volumic activity, activity concentration */ + attribute def ActivityDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-29 activity density, volumic activity, activity concentration + * symbol(s): `c_A` + * application domain: generic + * name: ActivityDensity + * quantity dimension: L^-3*T^-1 + * measurement unit(s): Bq/m^3, m^-3*s^-1 + * tensor order: 0 + * definition: quotient of the activity `A` (item 10-27) of a sample and the mass `m` (ISO 80000-4) of that sample: `a = A/m` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: ActivityDensityUnit[1]; + } + + attribute activityDensity: ActivityDensityValue[*] nonunique :> scalarQuantities; + + attribute def ActivityDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + alias VolumicActivityUnit for ActivityDensityUnit; + alias VolumicActivityValue for ActivityDensityValue; + alias volumicActivity for activityDensity; + + alias ActivityConcentrationUnit for ActivityDensityUnit; + alias ActivityConcentrationValue for ActivityDensityValue; + alias activityConcentration for activityDensity; + + /* ISO-80000-10 item 10-30 surface-activity density */ + attribute def SurfaceActivityDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-30 surface-activity density + * symbol(s): `a_S` + * application domain: generic + * name: SurfaceActivityDensity + * quantity dimension: L^-2*T^-1 + * measurement unit(s): Bq/m^2, m^-2*s^-1 + * tensor order: 0 + * definition: quotient of the activity `A` (item 10-27) of a sample and the total area `S` (ISO 80000-3) of the surface of that sample: `a_S` = `A`/`S` + * remarks: This value is usually defined for flat sources, where `S` corresponds to the total area of surface of one side of the source. + */ + attribute :>> num: Real; + attribute :>> mRef: SurfaceActivityDensityUnit[1]; + } + + attribute surfaceActivityDensity: SurfaceActivityDensityValue[*] nonunique :> scalarQuantities; + + attribute def SurfaceActivityDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-31 half life */ + attribute halfLife: DurationValue :> scalarQuantities { + doc + /* + * source: item 10-31 half life + * symbol(s): `T_(1/2)` + * application domain: generic + * name: HalfLife (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: mean duration (ISO 80000-3) required for the decay of one half of the atoms or nuclei + * remarks: For exponential decay, `T_(1/2) = (ln2)/λ`, where `λ` is the decay constant (item 10-24). + */ + } + + /* ISO-80000-10 item 10-32 alpha disintegration energy */ + attribute alphaDisintegrationEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-32 alpha disintegration energy + * symbol(s): `Q_α` + * application domain: generic + * name: AlphaDisintegrationEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: sum of the kinetic energy (ISO 80000-4) of the α-particle produced in the disintegration process and the recoil energy (ISO 80000-5) of the product atom in a reference frame in which the emitting nucleus is at rest before its disintegration + * remarks: The ground-state alpha disintegration energy, `Q_(α,0)`, also includes the energy of any nuclear transitions that take place in the daughter produced. + */ + } + + /* ISO-80000-10 item 10-33 maximum beta-particle energy */ + attribute maximumBetaParticleEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-33 maximum beta-particle energy + * symbol(s): `E_β` + * application domain: generic + * name: MaximumBetaParticleEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: maximum kinetic energy (ISO 80000-4) of the emitted beta particle produced in the nuclear disintegration process + * remarks: The maximum kinetic energy corresponds to the highest energy of the beta spectrum. + */ + } + + /* ISO-80000-10 item 10-34 beta disintegration energy */ + attribute betaDisintegrationEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-34 beta disintegration energy + * symbol(s): `Q_β` + * application domain: generic + * name: BetaDisintegrationEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: sum of the maximum beta-particle kinetic energy (item 10-33) and the recoil energy (ISO 80000-5) of the atom produced in a reference frame in which the emitting nucleus is at rest before its disintegration + * remarks: For positron emitters, the energy for the production of the annihilation radiation created in the combination of an electron with the positron is part of the beta disintegration energy. The ground-state beta disintegration energy, `Q_(β,0)`, also includes the energy of any nuclear transitions that take place in the daughter product. + */ + } + + /* ISO-80000-10 item 10-35 internal conversion factor */ + attribute def InternalConversionFactorValue :> DimensionOneValue { + doc + /* + * source: item 10-35 internal conversion factor + * symbol(s): `α` + * application domain: generic + * name: InternalConversionFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the number of internal conversion electrons and the number of gamma quanta emitted by the radioactive atom in a given transition, where a conversion electron represents an orbital electron emitted through the radioactive decay + * remarks: The quantity `α/(α+1)` is also used and called the internal-conversion fraction. Partial conversion fractions referring to the various electron shells `K, L, ...` are indicated by `α_K`, `α_L`, ... `α_K/α_L` is called the K-to-L internal conversion ratio. + */ + } + attribute internalConversionFactor: InternalConversionFactorValue :> scalarQuantities; + + /* ISO-80000-10 item 10-36 particle emission rate */ + attribute def ParticleEmissionRateValue :> ScalarQuantityValue { + doc + /* + * source: item 10-36 particle emission rate + * symbol(s): `dot(N)` + * application domain: generic + * name: ParticleEmissionRate + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: differential quotient of `N` with respect to time, where `N` is the number of particles being emitted from an infinitesimally small volume element in the time interval of duration `dt` (ISO 80000-3), and `dt`: `dot(N) = (dN)/(dt)` + * remarks: Usually the kind of particles is specified, e.g. neutron emission rate or alpha particle emission rate. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleEmissionRateUnit[1]; + } + + attribute particleEmissionRate: ParticleEmissionRateValue[*] nonunique :> scalarQuantities; + + attribute def ParticleEmissionRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-10 item 10-37.1 reaction energy */ + attribute reactionEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-37.1 reaction energy + * symbol(s): `Q` + * application domain: generic + * name: ReactionEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: in a nuclear reaction, sum of the kinetic energies (ISO 80000-4) and photon energies (ISO 80000-5) of the reaction products minus the sum of the kinetic and photon energies of the reactants + * remarks: For exothermic nuclear reactions, `Q>0`. For endothermic nuclear reactions, `Q<0`. + */ + } + + /* ISO-80000-10 item 10-37.2 resonance energy */ + attribute resonanceEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-37.2 resonance energy + * symbol(s): `E_r`, `E_"res"` + * application domain: generic + * name: ResonanceEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: kinetic energy (ISO 80000-4) of an incident particle, in the reference frame of the target, corresponding to a resonance in a nuclear reaction + * remarks: The energy of the resonance corresponds to the difference of the energy levels involved of the nucleus. + */ + } + + /* ISO-80000-10 item 10-38.1 cross section */ + attribute crossSection: AreaValue :> scalarQuantities { + doc + /* + * source: item 10-38.1 cross section + * symbol(s): `σ` + * application domain: atomic physics + * name: CrossSection (specializes Area) + * quantity dimension: L^2 + * measurement unit(s): m^2, b + * tensor order: 0 + * definition: for a specified target entity and for a specified reaction or process produced by incident charged or uncharged particles of a given type and energy, the quotient of the mean number of such reactions or processes and the incident-particle fluence (item 10-43) + * remarks: The type of process is indicated by subscripts, e.g. absorption cross section `σ_a`, scattering cross section `σ_s`, fission cross section `σ_f`. `1 "barn" ("b") = 10^(-28) "m"^2`. + */ + } + + /* ISO-80000-10 item 10-38.2 total cross section */ + attribute totalCrossSection: AreaValue :> scalarQuantities { + doc + /* + * source: item 10-38.2 total cross section + * symbol(s): `σ_"tot"`, `σ_"T"` + * application domain: atomic physics + * name: TotalCrossSection (specializes Area) + * quantity dimension: L^2 + * measurement unit(s): m^2, b + * tensor order: 0 + * definition: sum of all cross sections (item 10-38.1) corresponding to the various reactions or processes between an incident particle of specified type and energy (ISO 80000-5) and a target entity + * remarks: In the case of a narrow unidirectional beam of incident particles, this is the effective cross section for the removal of an incident particle from the beam. See the Remarks for item 10-52. `1 "barn" ("b") = 10^(-28) "m"^2`. + */ + } + + /* ISO-80000-10 item 10-39 direction distribution of cross section */ + attribute def DirectionDistributionOfCrossSectionValue :> ScalarQuantityValue { + doc + /* + * source: item 10-39 direction distribution of cross section + * symbol(s): `σ_Ω` + * application domain: atomic physics + * name: DirectionDistributionOfCrossSection + * quantity dimension: L^2 + * measurement unit(s): m^2*sr^-1, m^2 + * tensor order: 0 + * definition: differential quotient of `σ` with respect to `Ω`, where `σ` is the cross section (item 10-38.1) for ejecting or scattering a particle into a specified direction, and `Ω` is the solid angle (ISO 80000-3) around that direction: `σ_Ω = (dσ)/(dΩ)` + * remarks: Quantities listed under items 10-39, 10-40 and 10-41 are sometimes called differential cross sections. The type of interaction needs to be specified. + */ + attribute :>> num: Real; + attribute :>> mRef: DirectionDistributionOfCrossSectionUnit[1]; + } + + attribute directionDistributionOfCrossSection: DirectionDistributionOfCrossSectionValue[*] nonunique :> scalarQuantities; + + attribute def DirectionDistributionOfCrossSectionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-40 energy distribution of cross section */ + attribute def EnergyDistributionOfCrossSectionValue :> ScalarQuantityValue { + doc + /* + * source: item 10-40 energy distribution of cross section + * symbol(s): `σ_E` + * application domain: atomic physics + * name: EnergyDistributionOfCrossSection + * quantity dimension: M^-1*T^2 + * measurement unit(s): m^2/J, kg^-1*s^2 + * tensor order: 0 + * definition: differential quotient of `σ` with respect to energy, where `σ` is the cross section (item 10-38.1) for a process in which the energy `E` (ISO 80000-5) of the ejected or scattered particle is between `E` and `E + dE`: `σ_E = (dσ)/(dE)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: EnergyDistributionOfCrossSectionUnit[1]; + } + + attribute energyDistributionOfCrossSection: EnergyDistributionOfCrossSectionValue[*] nonunique :> scalarQuantities; + + attribute def EnergyDistributionOfCrossSectionUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-10 item 10-41 direction and energy distribution of cross section */ + attribute def DirectionAndEnergyDistributionOfCrossSectionValue :> ScalarQuantityValue { + doc + /* + * source: item 10-41 direction and energy distribution of cross section + * symbol(s): `σ_(Ω,E)` + * application domain: atomic physics + * name: DirectionAndEnergyDistributionOfCrossSection + * quantity dimension: M^-1*T^2 + * measurement unit(s): m^2/(J*sr), kg^-1*s^2 + * tensor order: 0 + * definition: partial differential quotient of `σ` with respect to solid angle and energy, where `σ` is the cross section (item 10-38.1) for ejecting or scattering a particle into a solid angle `dΩ` around a specified direction and with an energy between `E` and `E+dE`: `σ_(Ω,E) = (del^2 σ) / (del Ω del E)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: DirectionAndEnergyDistributionOfCrossSectionUnit[1]; + } + + attribute directionAndEnergyDistributionOfCrossSection: DirectionAndEnergyDistributionOfCrossSectionValue[*] nonunique :> scalarQuantities; + + attribute def DirectionAndEnergyDistributionOfCrossSectionUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-10 item 10-42.1 volumic cross section, macroscopic cross section */ + attribute def VolumicCrossSectionValue :> ScalarQuantityValue { + doc + /* + * source: item 10-42.1 volumic cross section, macroscopic cross section + * symbol(s): `Σ` + * application domain: atomic physics + * name: VolumicCrossSection + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: product of the number density `n_a` of the atoms and of the cross section (item 10-38.1) `σ_a` for a given type of atoms: `Σ = n_a σ_a` + * remarks: When the target particles of the medium are at rest, `Σ = 1/l`, where `l` is the mean free path (item 10-71). + */ + attribute :>> num: Real; + attribute :>> mRef: VolumicCrossSectionUnit[1]; + } + + attribute volumicCrossSection: VolumicCrossSectionValue[*] nonunique :> scalarQuantities; + + attribute def VolumicCrossSectionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias MacroscopicCrossSectionUnit for VolumicCrossSectionUnit; + alias MacroscopicCrossSectionValue for VolumicCrossSectionValue; + alias macroscopicCrossSection for volumicCrossSection; + + /* ISO-80000-10 item 10-42.2 volumic total cross section, macroscopic total cross section */ + attribute def VolumicTotalCrossSectionValue :> ScalarQuantityValue { + doc + /* + * source: item 10-42.2 volumic total cross section, macroscopic total cross section + * symbol(s): `Σ_"tot"`, `Σ_"T"` + * application domain: atomic physics + * name: VolumicTotalCrossSection + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: product of the number density `n_a` of the atoms and the cross section (item 10-38.1) `σ_"tot"` for a given type of atoms: `Σ_"tot" = n_a*σ_"tot"` + * remarks: See the Remarks for item 10-49. + */ + attribute :>> num: Real; + attribute :>> mRef: VolumicTotalCrossSectionUnit[1]; + } + + attribute volumicTotalCrossSection: VolumicTotalCrossSectionValue[*] nonunique :> scalarQuantities; + + attribute def VolumicTotalCrossSectionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias MacroscopicTotalCrossSectionUnit for VolumicTotalCrossSectionUnit; + alias MacroscopicTotalCrossSectionValue for VolumicTotalCrossSectionValue; + alias macroscopicTotalCrossSection for volumicTotalCrossSection; + + /* ISO-80000-10 item 10-43 particle fluence */ + attribute def ParticleFluenceValue :> ScalarQuantityValue { + doc + /* + * source: item 10-43 particle fluence + * symbol(s): `Φ` + * application domain: generic + * name: ParticleFluence + * quantity dimension: L^-2 + * measurement unit(s): m^-2 + * tensor order: 0 + * definition: differential quotient of `N` with respect to `a`, where `N` is the number of particles incident on a sphere of cross-sectional area `a` (item 10-38.1): `Φ = (dN)/(da)` + * remarks: The word "particle" is usually replaced by the name of a specific particle, for example `proton` fluence. If a flat area of size `dA` is passed perpendicularly by a number of `dN` particles, the corresponding particle fluence is: `Φ = (dN)/(dA)`. A plane area of size `dA` crossed at an angle `α` with respect to the surface normal by a number of `dN` particles results in the particle fluence: `Φ = (dN)/(cos(α) dA)` In report 85a of the ICRU a definition with an equivalent meaning is given as: The fluence, `Φ` , is the quotient of `dN` and `da`, where `dN` is the number of particles incident on a sphere of cross-sectional area `da`: `Φ = (dN)/(dA)`. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleFluenceUnit[1]; + } + + attribute particleFluence: ParticleFluenceValue[*] nonunique :> scalarQuantities; + + attribute def ParticleFluenceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-44 particle fluence rate */ + attribute def ParticleFluenceRateValue :> ScalarQuantityValue { + doc + /* + * source: item 10-44 particle fluence rate + * symbol(s): `dot(Φ)` + * application domain: generic + * name: ParticleFluenceRate + * quantity dimension: L^-2*T^-1 + * measurement unit(s): m^-2*s^-1 + * tensor order: 0 + * definition: differential quotient of fluence `Φ` (item 10-43) with respect to time (ISO 80000-3): `dot(Φ) = (dΦ)/(dA)` + * remarks: The word "particle" is usually replaced by the name of a specific particle, for example proton fluence rate. The distribution function expressed in terms of speed and energy, `dot(Φ)_v` and `dot(Φ)_E` , are related to by: `dot(Φ) = int dot(Φ)_v dv = int dot(Φ)_E dE`. This quantity has also been termed particle flux density. Because the word "density" has several connotations, the term "fluence rate" is preferred. For a radiation field composed of particles of velocity `v`, the fluence rate is equal to `n`·`v` where `n` is the particle number density. See Remarks for item 10-43. In report 85a of the ICRU a definition with an equivalent meaning is given as: The fluence rate, `dot(Φ)` , is the quotient of `d Φ` and `dt`, where `d Φ` is the increment of the fluence in the time interval `dt`: `dot(Φ) = (dΦ)/(dt)`. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleFluenceRateUnit[1]; + } + + attribute particleFluenceRate: ParticleFluenceRateValue[*] nonunique :> scalarQuantities; + + attribute def ParticleFluenceRateUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-45 radiant energy */ + attribute radiantEnergyForIonizingRadiation: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-45 radiant energy + * symbol(s): `R` + * application domain: ionizing radiation + * name: RadiantEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: mean energy (ISO 80000-5), excluding rest energy (item 10-3), of the particles that are emitted, transferred, or received + * remarks: For particles of energy `E` (excluding rest energy), the radiant energy, `R`, is equal to the product `N·E` where `N` is the number of the particles that are emitted, transferred, or received The distributions, `N_E` and `R_E`, of the particle number and the radiant energy with respect to energy are given by `N_E` = `dN`/d`E` and `R_E` = `dR`/d`E`, respectively, where `dN` is the number of particles with energy between `E` and `E`+d`E`, and `dR` is their radiant energy. The two distributions are related by `R_E` = `E`·`N_E`. + */ + } + + /* ISO-80000-10 item 10-46 energy fluence */ + attribute def EnergyFluenceValue :> ScalarQuantityValue { + doc + /* + * source: item 10-46 energy fluence + * symbol(s): `Ψ` + * application domain: generic + * name: EnergyFluence + * quantity dimension: M^1*T^-2 + * measurement unit(s): eV/m^2, J/m^2, kg*s^-2 + * tensor order: 0 + * definition: differential quotient of radiant energy `R` (item 10-45) incident on a sphere of cross-sectional area (item 10-38.1) `a` with respect to that area: `Ψ = (dR)/(da)` + * remarks: In report 85a of the ICRU a definition with an equivalent meaning is given as: The energy fluence, `Ψ` is the quotient of `dR` and `da`, where `dR` is the radiant energy incident on a sphere of cross-sectional area `da`: `Ψ = (dR)/(da)`. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: EnergyFluenceUnit[1]; + } + + attribute energyFluence: EnergyFluenceValue[*] nonunique :> scalarQuantities; + + attribute def EnergyFluenceUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-10 item 10-47 energy fluence rate */ + attribute def EnergyFluenceRateValue :> ScalarQuantityValue { + doc + /* + * source: item 10-47 energy fluence rate + * symbol(s): `dot(Ψ)` + * application domain: generic + * name: EnergyFluenceRate + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2, kg*s^-3 + * tensor order: 0 + * definition: differential quotient of the energy fluence `Ψ` (item 10-46) with respect to time (ISO 80000-3): `dot(Ψ) = (d Ψ)/(dt)` + * remarks: In report 85a of the ICRU a definition with an equivalent meaning is given as: The energy-fluence rate, `dot(Ψ)` , is the quotient of `d Ψ` by `dt`, where `d Ψ` is the increment of the energy fluence in the time interval `dt`: `dot(Ψ) = (d Ψ)/(dt)`. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: EnergyFluenceRateUnit[1]; + } + + attribute energyFluenceRate: EnergyFluenceRateValue[*] nonunique :> scalarQuantities; + + attribute def EnergyFluenceRateUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-10 item 10-48 particle current density */ + attribute def ParticleCurrentDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-48 particle current density (magnitude) + * symbol(s): `J`, `S` + * application domain: generic + * name: ParticleCurrentDensity + * quantity dimension: L^-2*T^-1 + * measurement unit(s): m^-2*s^-1 + * tensor order: 0 + * definition: vector whose component in direction of an area normal is given by: `vec(J_n) = int Φ_Ω(θ, α) cos(θ) dΩ` where `Φ_Ω(θ, α)` is the directional distribution of the particle fluence rate (item 10-44), and ` θ` and `α` are polar and azimuthal angles, respectively + * remarks: Usually the word "particle" is replaced by the name of a specific particle, for example proton current. Symbol `vec(S)` is recommended when there is a possibility of confusion with the symbol `vec(J)` for electric current density. For neutron current, the symbol `vec(J)` is generally used. The distribution functions expressed in terms of speed and energy, `vec(J_v)` and `vec(J_E)`, are related to `vec(J)` by: `vec(J) = int vec(J_v) dv = int vec(J_E) dE`. The directional distribution of the particle fluence rate is also denoted as particle radiance. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleCurrentDensityUnit[1]; + } + + attribute particleCurrentDensity: ParticleCurrentDensityValue[*] nonunique :> scalarQuantities; + + attribute def ParticleCurrentDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + attribute def CartesianParticleCurrentDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 10-48 particle current density (vector) + * symbol(s): `vec(J)`, `vec(S)` + * application domain: generic + * name: ParticleCurrentDensity + * quantity dimension: L^-2*T^-1 + * measurement unit(s): m^-2*s^-1 + * tensor order: 1 + * definition: vector whose component in direction of an area normal is given by: `vec(J_n) = int Φ_Ω(θ, α) cos(θ) dΩ` where `Φ_Ω(θ, α)` is the directional distribution of the particle fluence rate (item 10-44), and ` θ` and `α` are polar and azimuthal angles, respectively + * remarks: Usually the word "particle" is replaced by the name of a specific particle, for example proton current. Symbol `vec(S)` is recommended when there is a possibility of confusion with the symbol `vec(J)` for electric current density. For neutron current, the symbol `vec(J)` is generally used. The distribution functions expressed in terms of speed and energy, `vec(J_v)` and `vec(J_E)`, are related to `vec(J)` by: `vec(J) = int vec(J_v) dv = int vec(J_E) dE`. The directional distribution of the particle fluence rate is also denoted as particle radiance. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianParticleCurrentDensity3dCoordinateFrame[1]; + } + + attribute cartesianParticleCurrentDensity3dVector: CartesianParticleCurrentDensity3dVector :> vectorQuantities; + + attribute def CartesianParticleCurrentDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ParticleCurrentDensityUnit[3]; + } + + /* ISO-80000-10 item 10-49 linear attenuation coefficient */ + attribute def LinearAttenuationCoefficientForIonizingRadiationValue :> ScalarQuantityValue { + doc + /* + * source: item 10-49 linear attenuation coefficient + * symbol(s): `μ`, `μ_l` + * application domain: ionizing radiation + * name: LinearAttenuationCoefficient + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: for uncharged particles of a given type and energy the differential quotient `n` with respect to `l,` where `n` is the fraction of `N` incoming particles that experience interactions in traversing a distance (ISO 80000-3) `l` in a given material: `μ = (dn)/(dl) = 1/N (dN)/(dl)` where `dN` is the number of particles that experience interactions in traversing `dl` + * remarks: `μ` is equal to the macroscopic total cross section `Σ_"tot"` for the removal of particles from the beam. Using the relation `μ_m = μ/ρ` between the linear attenuation coefficient `μ`, the mass attenuation coefficient `μ_m` (item 10-50) and the density `ρ`, the definition given for the mass attenuation coefficient in report 85a of the ICRU can be applied to the linear attenuation coefficient resulting in: The linear attenuation coefficient, `μ`, of a material, for uncharged particles of a given type and energy, is the quotient of `(dN)/N` by `dl`, where `(dN)/N` is the mean fraction of the particles that experience interactions in traversing a distance `dl` in the material: `μ = 1/(dl) (dN)/(N)`. This definition has an equivalent meaning as the one given in column 4 of this item. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearAttenuationCoefficientForIonizingRadiationUnit[1]; + } + + attribute linearAttenuationCoefficientForIonizingRadiation: LinearAttenuationCoefficientForIonizingRadiationValue[*] nonunique :> scalarQuantities; + + attribute def LinearAttenuationCoefficientForIonizingRadiationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-50 mass attenuation coefficient */ + attribute def MassAttenuationCoefficientForIonizingRadiationValue :> ScalarQuantityValue { + doc + /* + * source: item 10-50 mass attenuation coefficient + * symbol(s): `μ_m` + * application domain: ionizing radiation + * name: MassAttenuationCoefficient + * quantity dimension: L^2*M^-1 + * measurement unit(s): kg^-1*m^2 + * tensor order: 0 + * definition: quotient of the linear attenuation coefficient `µ` (item 10-49) and the mass density `ρ` (ISO 80000-4) of the medium: `μ_m = μ/ρ` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MassAttenuationCoefficientForIonizingRadiationUnit[1]; + } + + attribute massAttenuationCoefficientForIonizingRadiation: MassAttenuationCoefficientForIonizingRadiationValue[*] nonunique :> scalarQuantities; + + attribute def MassAttenuationCoefficientForIonizingRadiationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-10 item 10-51 molar attenuation coefficient */ + attribute def MolarAttenuationCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 10-51 molar attenuation coefficient + * symbol(s): `μ_c` + * application domain: generic + * name: MolarAttenuationCoefficient + * quantity dimension: L^2*N^-1 + * measurement unit(s): m^2*mol^-1 + * tensor order: 0 + * definition: quotient of linear attenuation coefficient `µ` (item 10-49) and the amount c (ISO 80000-9) of the medium: `μ_c = μ/c` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarAttenuationCoefficientUnit[1]; + } + + attribute molarAttenuationCoefficient: MolarAttenuationCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def MolarAttenuationCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); } + } + + /* ISO-80000-10 item 10-52 atomic attenuation coefficient */ + attribute def AtomicAttenuationCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 10-52 atomic attenuation coefficient + * symbol(s): `μ_a` + * application domain: generic + * name: AtomicAttenuationCoefficient + * quantity dimension: L^2 + * measurement unit(s): m^2 + * tensor order: 0 + * definition: quotient of the linear attenuation coefficient `µ` (item 10-49) and the number density (item 10-62.1), `n`, of atoms in the substance: `μ_a = μ/n` + * remarks: `μ` is equal to the total cross section `σ_"tot"` for the removal of particles from the beam. See also item 10-38.2. + */ + attribute :>> num: Real; + attribute :>> mRef: AtomicAttenuationCoefficientUnit[1]; + } + + attribute atomicAttenuationCoefficient: AtomicAttenuationCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def AtomicAttenuationCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-53 half-value thickness */ + attribute halfValueThickness: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-53 half-value thickness + * symbol(s): `d_(1//2)` + * application domain: generic + * name: HalfValueThickness (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: thickness (ISO 80000-3) of the attenuating layer that reduces the quantity of interest of a unidirectional beam of infinitesimal width to half of its initial value + * remarks: For exponential attenuation, `d_(1/2) = ln(2)/μ`. The quantity of interest is often the air kerma or exposure. + */ + } + + /* ISO-80000-10 item 10-54 total linear stopping power, linear stopping power */ + attribute def TotalLinearStoppingPowerValue :> ScalarQuantityValue { + doc + /* + * source: item 10-54 total linear stopping power, linear stopping power + * symbol(s): `S`, `S_l` + * application domain: generic + * name: TotalLinearStoppingPower + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): eV/m, J/m, kg*m*s^-2 + * tensor order: 0 + * definition: for charged particles of a given type and energy `E_0` the differential quotient of `E` with respect to `x,` where `E` is the mean energy (ISO 80000-4) lost by the charged particles in traversing a distance (ISO 80000-3) `x` in the given material: `S = -(dE)/(dx)` + * remarks: The total linear stopping power is sometimes also called stopping power. Both electronic losses and radiative losses are included. The quotient of the total linear stopping power of a substance and that of a reference substance is called the relative linear stopping power. See also item 10-85. Using the relation `S_m = S/ρ` between the total mass stopping power `S_m` (item 10-55), the total linear stopping power `S`, and the density `ρ`, the definition given for the mass stopping in report 85a of the ICRU can be applied to that of the total linear stopping power resulting in: The linear stopping power, `S`, of a material, for charged particles of a given type and energy, is the quotient of `dE` by `dl`, where `dE` is the mean energy lost by the charged particles in traversing a distance `dl` in the material: `S = -(dE)/(dx)`. This definition has an equivalent meaning as the one given in column 4 of this item. See also section 0.3. + */ + attribute :>> num: Real; + attribute :>> mRef: TotalLinearStoppingPowerUnit[1]; + } + + attribute totalLinearStoppingPower: TotalLinearStoppingPowerValue[*] nonunique :> scalarQuantities; + + attribute def TotalLinearStoppingPowerUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias LinearStoppingPowerUnit for TotalLinearStoppingPowerUnit; + alias LinearStoppingPowerValue for TotalLinearStoppingPowerValue; + alias linearStoppingPower for totalLinearStoppingPower; + + /* ISO-80000-10 item 10-55 total mass stopping power, mass stopping power */ + attribute def TotalMassStoppingPowerValue :> ScalarQuantityValue { + doc + /* + * source: item 10-55 total mass stopping power, mass stopping power + * symbol(s): `S_m` + * application domain: generic + * name: TotalMassStoppingPower + * quantity dimension: L^4*T^-2 + * measurement unit(s): eV*m^-2/kg, J*m^2/kg, m^4*s^-2 + * tensor order: 0 + * definition: quotient of the total linear stopping power `S` (item 10-54) and the mass density `ρ` (ISO 80000-4) of the material: `S_m = S/ρ` + * remarks: The quotient of total mass stopping power of a material and that of a reference material is called relative mass stopping power. + */ + attribute :>> num: Real; + attribute :>> mRef: TotalMassStoppingPowerUnit[1]; + } + + attribute totalMassStoppingPower: TotalMassStoppingPowerValue[*] nonunique :> scalarQuantities; + + attribute def TotalMassStoppingPowerUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + alias MassStoppingPowerUnit for TotalMassStoppingPowerUnit; + alias MassStoppingPowerValue for TotalMassStoppingPowerValue; + alias massStoppingPower for totalMassStoppingPower; + + /* ISO-80000-10 item 10-56 mean linear range */ + attribute meanLinearRange: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-56 mean linear range + * symbol(s): `R`, `R_l` + * application domain: generic + * name: MeanLinearRange (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: mean total rectified path length (ISO 80000-3) travelled by a particle in the course of slowing down to rest in a given material averaged over a group of particles having the same initial energy (ISO 80000-5) + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-57 mean mass range */ + attribute def MeanMassRangeValue :> ScalarQuantityValue { + doc + /* + * source: item 10-57 mean mass range + * symbol(s): `R_ρ`, `R_m` + * application domain: generic + * name: MeanMassRange + * quantity dimension: L^-2*M^1 + * measurement unit(s): kg*m^-2 + * tensor order: 0 + * definition: product of the mean linear range (item 10-56) `R` and the mass density `ρ` (ISO 80000-4) of the material: `R_ρ = R*ρ` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MeanMassRangeUnit[1]; + } + + attribute meanMassRange: MeanMassRangeValue[*] nonunique :> scalarQuantities; + + attribute def MeanMassRangeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-10 item 10-58 linear ionization */ + attribute def LinearIonizationValue :> ScalarQuantityValue { + doc + /* + * source: item 10-58 linear ionization + * symbol(s): `N_{i_l}` + * application domain: generic + * name: LinearIonization + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: differential quotient of `q` with respect to `l`, where `q` is the average total charge (IEC 80000-6) of all positive ions produced by an ionizing charged particle over a path `l` (ISO 80000-3), divided by the elementary charge, `e` (ISO 80000-1): `N_{i_l} = 1/e*(dq)/(dl)` + * remarks: Ionization due to secondary ionizing particles is included. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearIonizationUnit[1]; + } + + attribute linearIonization: LinearIonizationValue[*] nonunique :> scalarQuantities; + + attribute def LinearIonizationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-59 total ionization */ + attribute def TotalIonizationValue :> DimensionOneValue { + doc + /* + * source: item 10-59 total ionization + * symbol(s): `N_i` + * application domain: generic + * name: TotalIonization (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the total mean charge of all positive ions produced by an ionizing charged particle along its entire path and along the paths of any secondary charged particles, and the elementary charge, `e` (ISO 80000-1) + * remarks: `N_i = int N_(il) dl` See item 10-58. + */ + } + attribute totalIonization: TotalIonizationValue :> scalarQuantities; + + /* ISO-80000-10 item 10-60 average energy loss per elementary charge produced */ + attribute def AverageEnergyLossPerElementaryChargeProducedValue :> ScalarQuantityValue { + doc + /* + * source: item 10-60 average energy loss per elementary charge produced + * symbol(s): `W_i` + * application domain: generic + * name: AverageEnergyLossPerElementaryChargeProduced + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: quotient of the initial kinetic energy `E_k` (ISO 80000-4) of an ionizing charged particle and the total ionization `N_i` (item 10-59) produced by that particle: `W_i = E_k/N_i` + * remarks: The name "average energy loss per ion pair formed" is usually used, although it is ambiguous. In the practical dosimetry of ionizing radiation the term `W`/`e`, the quotient of `W`, the average energy deposited in dry air per ion pair formed, and `e`, the elementary charge, is used as the factor which, when multiplied with the electric charge of one sign carried by all ion pairs formed in dry air of given mass, gives the energy deposited in this amount of dry air in the form of excitations and ionizations. In ICRU Report 85a, the mean energy expended in a gas per ion pair formed, `W`, is the quotient of `E` by `N,` where `N` is the mean total liberated charge of either sign, divided by the elementary charge when the initial kinetic energy `E` of a charged particle introduced into the gas is completely dissipated in the gas. Thus, `W` = `E`/`N`. It follows from the definition of `W` that the ions produced by bremsstrahlung or other secondary radiation emitted by the initial and secondary charged particles are included in `N`. + */ + attribute :>> num: Real; + attribute :>> mRef: AverageEnergyLossPerElementaryChargeProducedUnit[1]; + } + + attribute averageEnergyLossPerElementaryChargeProduced: AverageEnergyLossPerElementaryChargeProducedValue[*] nonunique :> scalarQuantities; + + attribute def AverageEnergyLossPerElementaryChargeProducedUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-10 item 10-61 mobility */ + attribute def MobilityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-61 mobility + * symbol(s): `μ`, `μ_m` + * application domain: generic + * name: Mobility + * quantity dimension: M^-1*T^2*I^1 + * measurement unit(s): m^2/(V*s), kg^-1*s^2*A + * tensor order: 0 + * definition: quotient of average drift speed (ISO 80000-3) imparted to a charged particle in a medium by an electric field, and the electric field strength (IEC 80000-6) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MobilityUnit[1]; + } + + attribute mobility: MobilityValue[*] nonunique :> scalarQuantities; + + attribute def MobilityUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF); } + } + + /* ISO-80000-10 item 10-62.1 particle number density */ + attribute def ParticleNumberDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-62.1 particle number density + * symbol(s): `n` + * application domain: generic + * name: ParticleNumberDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of the mean number `N` of particles in the volume (ISO 80000-3) `V` and volume: `n = N/V` + * remarks: `n` is the general symbol for the number density of particles. The distribution functions expressed in terms of speed and energy, `n_v` and `n_E`, are related to `n` by: `n = int n_v dv = int n_E dE`. The word "particle" is usually replaced by the name of a specific particle, for example `neutron` number density. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleNumberDensityUnit[1]; + } + + attribute particleNumberDensity: ParticleNumberDensityValue[*] nonunique :> scalarQuantities; + + attribute def ParticleNumberDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-10 item 10-62.2 ion number density, ion density */ + attribute def IonNumberDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-62.2 ion number density, ion density + * symbol(s): `n^"+"`, `n^"-"` + * application domain: generic + * name: IonNumberDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of the number of positive and negative ions, `N^"+"` and `N^"-"`, respectively, in the volume `V` (ISO 80000-3), and that volume: `n^"+" = N^"+" / V`, `n^"-" = N^"-" / V` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: IonNumberDensityUnit[1]; + } + + attribute ionNumberDensity: IonNumberDensityValue[*] nonunique :> scalarQuantities; + + attribute def IonNumberDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias IonDensityUnit for IonNumberDensityUnit; + alias IonDensityValue for IonNumberDensityValue; + alias ionDensity for ionNumberDensity; + + /* ISO-80000-10 item 10-63 Recombination coefficient */ + attribute def RecombinationCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 10-63 Recombination coefficient + * symbol(s): `α` + * application domain: generic + * name: RecombinationCoefficient + * quantity dimension: L^3*T^-1 + * measurement unit(s): m^3*s^-1 + * tensor order: 0 + * definition: coefficient in the law of recombination: `-(dn^"+")/(dt) = -(dn^"-")/(dt) = α*n^"+"*n^"-"`, where `n^"+"` and `n^"-"` are the ion number densities (item 10-62.2) of positive and negative ions, respectively, recombined during a time interval of duration `dt` (ISO 80000-3) + * remarks: The widely used term "recombination factor" is not correct because "factor" should only be used for quantities with dimension 1. The terms `(dn^"+")/(dt)` , `(dn^"-")/(dt)` are differential quotients. + */ + attribute :>> num: Real; + attribute :>> mRef: RecombinationCoefficientUnit[1]; + } + + attribute recombinationCoefficient: RecombinationCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def RecombinationCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-64 diffusion coefficient, diffusion coefficient for particle number density */ + /* Refer to declaration for DiffusionCoefficient in ISQChemistryMolecular item 9-39 diffusion coefficient */ + + alias DiffusionCoefficientForParticleNumberDensityUnit for DiffusionCoefficientUnit; + alias DiffusionCoefficientForParticleNumberDensityValue for DiffusionCoefficientValue; + alias diffusionCoefficientForParticleNumberDensity for diffusionCoefficient; + + /* ISO-80000-10 item 10-65 diffusion coefficient for fluence rate */ + attribute diffusionCoefficientForFluenceRate: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-65 diffusion coefficient for fluence rate + * symbol(s): `D_ϕ`, `D` + * application domain: generic + * name: DiffusionCoefficientForFluenceRate (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: proportionality constant between the particle current density `vec(J )`(item 10-48) and the gradient of the particle fluence rate `dot(Φ)` (item 10-44): `vec(J) = -vec(D) * nabla Φ` + * remarks: For a particle of a given speed `v`: `D_Ψ(v) = -J_{v,x}/(partial Ψ // partial x)` and `vec(v) * vec(D_Ψ)(v) = -vec(D_n)(v)` + */ + } + + /* ISO-80000-10 item 10-66 particle source density */ + attribute def ParticleSourceDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-66 particle source density + * symbol(s): `S` + * application domain: generic + * name: ParticleSourceDensity + * quantity dimension: L^-3*T^-1 + * measurement unit(s): m^-3*s^-1 + * tensor order: 0 + * definition: quotient of the mean rate of production of particles in a volume, and that volume (ISO 80000-3) + * remarks: The word "particle" is usually replaced by the name of a specific particle, for example `proton` source density. The distribution functions expressed in terms of speed and energy, `S_v` and `S_E`, are related to `S` by: `S = int S_v dv = int S_E dE`. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleSourceDensityUnit[1]; + } + + attribute particleSourceDensity: ParticleSourceDensityValue[*] nonunique :> scalarQuantities; + + attribute def ParticleSourceDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-67 slowing-down density */ + attribute def SlowingDownDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-67 slowing-down density + * symbol(s): `q` + * application domain: generic + * name: SlowingDownDensity + * quantity dimension: L^-3*T^-1 + * measurement unit(s): m^-3*s^-1 + * tensor order: 0 + * definition: differential quotient of `n` with respect to time, where `n` is the number density of particles that are slowed down in a time interval of duration (ISO 80000-3) `t`: `q = -(dn)/(dt)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SlowingDownDensityUnit[1]; + } + + attribute slowingDownDensity: SlowingDownDensityValue[*] nonunique :> scalarQuantities; + + attribute def SlowingDownDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-68 resonance escape probability */ + attribute def ResonanceEscapeProbabilityValue :> DimensionOneValue { + doc + /* + * source: item 10-68 resonance escape probability + * symbol(s): `p` + * application domain: generic + * name: ResonanceEscapeProbability (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: in an infinite medium, the probability that a neutron slowing down will traverse all or some specified portion of the range of resonance energies (item 10-37.2) without being absorbed + * remarks: None. + */ + } + attribute resonanceEscapeProbability: ResonanceEscapeProbabilityValue :> scalarQuantities; + + /* ISO-80000-10 item 10-69 lethargy */ + attribute def LethargyValue :> DimensionOneValue { + doc + /* + * source: item 10-69 lethargy + * symbol(s): `u` + * application domain: generic + * name: Lethargy (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for a neutron of kinetic energy `E` (ISO 80000-4) : `u = ln(E_0/E)`, where `E_0` is a reference energy + * remarks: Lethargy is also referred to as logarithmic energy decrement. + */ + } + attribute lethargy: LethargyValue :> scalarQuantities; + + /* ISO-80000-10 item 10-70 average logarithmic energy decrement */ + attribute def AverageLogarithmicEnergyDecrementValue :> DimensionOneValue { + doc + /* + * source: item 10-70 average logarithmic energy decrement + * symbol(s): `ζ` + * application domain: generic + * name: AverageLogarithmicEnergyDecrement (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: average value of the increase in lethargy (item 10-69) in elastic collisions between neutrons and nuclei whose kinetic energy (ISO 80000-4) is negligible compared with that of the neutrons + * remarks: None. + */ + } + attribute averageLogarithmicEnergyDecrement: AverageLogarithmicEnergyDecrementValue :> scalarQuantities; + + /* ISO-80000-10 item 10-71 mean free path */ + attribute meanFreePathForAtomicPhysics: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-71 mean free path + * symbol(s): `l`, `λ` + * application domain: atomic physics + * name: MeanFreePath (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: average distance (ISO 80000-3) that particles travel between two successive specified reactions or processes + * remarks: See the Remarks for item 10-42.1. + */ + } + + /* ISO-80000-10 item 10-72.1 slowing-down area */ + attribute slowingDownArea: AreaValue :> scalarQuantities { + doc + /* + * source: item 10-72.1 slowing-down area + * symbol(s): `L_s^2`, `L_"sl"^2` + * application domain: generic + * name: SlowingDownArea (specializes Area) + * quantity dimension: L^2 + * measurement unit(s): m^2 + * tensor order: 0 + * definition: in an infinite homogenous medium, one-sixth of the mean square of the distance (ISO 80000-3) between the neutron source and the point where a neutron reaches a given energy (ISO 80000-5) + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-72.2 diffusion area */ + attribute diffusionArea: AreaValue :> scalarQuantities { + doc + /* + * source: item 10-72.2 diffusion area + * symbol(s): `L^2` + * application domain: generic + * name: DiffusionArea (specializes Area) + * quantity dimension: L^2 + * measurement unit(s): m^2 + * tensor order: 0 + * definition: in an infinite homogenous medium, one-sixth of the mean square distance (ISO 80000-3) between the point where a neutron enters a specified class and the point where it leaves this class + * remarks: The class of neutrons must be specified, e.g. thermal. + */ + } + + /* ISO-80000-10 item 10-72.3 migration area */ + attribute migrationArea: AreaValue :> scalarQuantities { + doc + /* + * source: item 10-72.3 migration area + * symbol(s): `M^2` + * application domain: generic + * name: MigrationArea (specializes Area) + * quantity dimension: L^2 + * measurement unit(s): m^2 + * tensor order: 0 + * definition: sum of the slowing-down area (item 10-72.1) from fission energy to thermal energy (ISO 80000-5) and the diffusion area (item 10-72.2) for thermal neutrons + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-73.1 slowing-down length */ + attribute slowingDownLength: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-73.1 slowing-down length + * symbol(s): `L_s`, `L_"sl"` + * application domain: generic + * name: SlowingDownLength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: square root of the slowing down area `L_s^2` (item 10-72.1): `L_s = sqrt(L_s^2)` + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-73.2 diffusion length */ + attribute diffusionLength: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-73.2 diffusion length + * symbol(s): `L` + * application domain: atomic physics + * name: DiffusionLength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: square root of the diffusion area `L^2` (item 10-72.2): `L = sqrt(L^2)` + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-73.3 migration length */ + attribute migrationLength: LengthValue :> scalarQuantities { + doc + /* + * source: item 10-73.3 migration length + * symbol(s): `M` + * application domain: generic + * name: MigrationLength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: square root of the migration area `M^2` (item 10-72.3): `M = sqrt(M^2)` + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-74.1 neutron yield per fission */ + attribute neutronYieldPerFission: CountValue :> scalarQuantities { + doc + /* + * source: item 10-74.1 neutron yield per fission + * symbol(s): `ν` + * application domain: generic + * name: NeutronYieldPerFission (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: average number of fission neutrons, both prompt and delayed, emitted per fission event + * remarks: None. + */ + } + + /* ISO-80000-10 item 10-74.2 neutron yield per absorption */ + attribute neutronYieldPerAbsorption: CountValue :> scalarQuantities { + doc + /* + * source: item 10-74.2 neutron yield per absorption + * symbol(s): `η` + * application domain: generic + * name: NeutronYieldPerAbsorption (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: average number of fission neutrons, both prompt and delayed, emitted per neutron absorbed in a fissionable nuclide or in a nuclear fuel, as specified + * remarks: `ν/η` is equal to the quotient of the macroscopic cross section for fission and that for absorption, both for neutrons in the fuel material. + */ + } + + /* ISO-80000-10 item 10-75 fast fission factor */ + attribute def FastFissionFactorValue :> ScalarQuantityValue { + doc + /* + * source: item 10-75 fast fission factor + * symbol(s): `φ` + * application domain: generic + * name: FastFissionFactor + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: in an infinite medium, the quotient of the mean number of neutrons produced by fission due to neutrons of all energies (ISO 80000-5) and the mean number of neutrons produced by fissions due to thermal neutrons only + * remarks: The class of neutrons must be specified, e.g. thermal. + */ + attribute :>> num: Real; + attribute :>> mRef: FastFissionFactorUnit[1]; + } + + attribute fastFissionFactor: FastFissionFactorValue[*] nonunique :> scalarQuantities; + + attribute def FastFissionFactorUnit :> DimensionOneUnit { + } + + /* ISO-80000-10 item 10-76 thermal utilization factor */ + attribute def ThermalUtilizationFactorValue :> ScalarQuantityValue { + doc + /* + * source: item 10-76 thermal utilization factor + * symbol(s): `f` + * application domain: generic + * name: ThermalUtilizationFactor + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: in an infinite medium, the quotient of the number of thermal neutrons absorbed in a fissionable nuclide or in a nuclear fuel, as specified, and the total number of thermal neutrons absorbed + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalUtilizationFactorUnit[1]; + } + + attribute thermalUtilizationFactor: ThermalUtilizationFactorValue[*] nonunique :> scalarQuantities; + + attribute def ThermalUtilizationFactorUnit :> DimensionOneUnit { + } + + /* ISO-80000-10 item 10-77 non-leakage probability */ + attribute def NonLeakageProbabilityValue :> ScalarQuantityValue { + doc + /* + * source: item 10-77 non-leakage probability + * symbol(s): `Λ` + * application domain: generic + * name: NonLeakageProbability + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: probability that a neutron will not escape from the reactor during the slowing-down process or while it diffuses as a thermal neutron + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: NonLeakageProbabilityUnit[1]; + } + + attribute nonLeakageProbability: NonLeakageProbabilityValue[*] nonunique :> scalarQuantities; + + attribute def NonLeakageProbabilityUnit :> DimensionOneUnit { + } + + /* ISO-80000-10 item 10-78.1 multiplication factor */ + attribute def MultiplicationFactorValue :> ScalarQuantityValue { + doc + /* + * source: item 10-78.1 multiplication factor + * symbol(s): `k` + * application domain: generic + * name: MultiplicationFactor + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the total number of fission or fission-dependent neutrons produced in the duration of a time interval and the total number of neutrons lost by absorption and leakage in that duration + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MultiplicationFactorUnit[1]; + } + + attribute multiplicationFactor: MultiplicationFactorValue[*] nonunique :> scalarQuantities; + + attribute def MultiplicationFactorUnit :> DimensionOneUnit { + } + + /* ISO-80000-10 item 10-78.2 infinite multiplication factor */ + attribute def InfiniteMultiplicationFactorValue :> ScalarQuantityValue { + doc + /* + * source: item 10-78.2 infinite multiplication factor + * symbol(s): `k_∞` + * application domain: generic + * name: InfiniteMultiplicationFactor + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: multiplication factor (item 10-78.1) for an infinite medium or for an infinite repeating lattice + * remarks: For a thermal reactor, `k_∞ = η*ε*p*f` + */ + attribute :>> num: Real; + attribute :>> mRef: InfiniteMultiplicationFactorUnit[1]; + } + + attribute infiniteMultiplicationFactor: InfiniteMultiplicationFactorValue[*] nonunique :> scalarQuantities; + + attribute def InfiniteMultiplicationFactorUnit :> DimensionOneUnit { + } + + /* ISO-80000-10 item 10-79 reactor time constant */ + attribute reactorTimeConstant: DurationValue :> scalarQuantities { + doc + /* + * source: item 10-79 reactor time constant + * symbol(s): `T` + * application domain: generic + * name: ReactorTimeConstant (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: duration (ISO 80000-3) required for the neutron fluence rate (item 10-44) in a reactor to change by the factor e when the fluence rate is rising or falling exponentially + * remarks: Also called reactor period. + */ + } + + /* ISO-80000-10 item 10-80.1 energy imparted */ + attribute energyImparted: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-80.1 energy imparted + * symbol(s): `ε` + * application domain: generic + * name: EnergyImparted (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: sum of all energy deposits in a given volume: `ε = sum_i ε_i` where the summation is performed over all energy (ISO 80000-5) deposits `ε_i` of interaction `i` in that volume + * remarks: Energy imparted is a stochastic quantity. `ε_i` is given by: `ε_i = ε_(i n) - ε_"out" + Q` where `ε_(i n)` is the energy (ISO 80000-5) of the incident ionizing particle, excluding rest energy (item 10-3), `ε_"out"` is the sum of the energies (ISO 80000-5) of all ionizing particles leaving the interaction, excluding rest energy (item 10-3), and `Q` is the change in the rest energies (item 10-3) of the nucleus and of all particles involved in the interaction. `Q > 0` means decrease of rest energy; `Q < 0` means increase of rest energy. Stochastic quantities such as the energy imparted and the specific energy imparted (item 10-81.2) and their probability distributions have been introduced as they describe the discontinuous nature of the ionizing radiations as a determinant of radiochemical and radiobiological effects. In radiation applications involving large numbers of ionizing particles, e.g. in medicine, radiation protection and materials testing and processing, these fluctuations are adequately represented by the expectation values of the probability distributions. Non-stochastic quantities such as particle fluence (item 10-43), absorbed dose (item 10-81.1) and kerma (item 10-86.1) are based on these expectation values. + */ + } + + /* ISO-80000-10 item 10-80.2 mean energy imparted */ + attribute meanEnergyImparted: EnergyValue :> scalarQuantities { + doc + /* + * source: item 10-80.2 mean energy imparted + * symbol(s): `bar(ε)` + * application domain: generic + * name: MeanEnergyImparted (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): eV, J, kg*m^2*s^-2 + * tensor order: 0 + * definition: expectation value of the energy imparted (item 10-80.1): `bar(ε) = R_"in" - R_"out" + sum Q` where `R_"in"` is the radiant energy (item 10-45) of all those charged and uncharged ionizing particles that enter the volume, `R_"out"` is the radiant energy of all those charged and uncharged ionizing particles that leave the volume, and `sum Q` is the sum of all changes of the rest energy (item 10-3) of nuclei and elementary particles that occur in that volume + * remarks: Sometimes, it has been called the integral absorbed dose. `Q > 0` means decrease of rest energy; `Q < 0` means increase of rest energy. + */ + } + + /* ISO-80000-10 item 10-81.1 absorbed dose */ + attribute def AbsorbedDoseValue :> ScalarQuantityValue { + doc + /* + * source: item 10-81.1 absorbed dose + * symbol(s): `D` + * application domain: generic + * name: AbsorbedDose + * quantity dimension: L^2*T^-2 + * measurement unit(s): Gy, J/kg, m^2*s^-2 + * tensor order: 0 + * definition: differential quotient of `bar(ε)` with respect to `m`, where `bar(ε)` is the mean energy (ISO 80000-5) imparted by ionizing radiation to matter of mass (ISO 80000-4) `m`: `D = (d bar(ε))/(dm)` + * remarks: The gray is a special name for joule per kilogram, to be used as the coherent SI unit for absorbed dose. `1 "Gy" = 1 "J"/"kg"`. `bar(ε) = int D dm` where `dm` is the element of mass of the irradiated matter. In the limit of a small domain, the mean specific energy `bar(z) = (Δ bar(ε))/(Δ m)` is equal to the absorbed dose `D`. The absorbed dose can also be expressed in terms of the volume of the mass element by: `D = (d bar(ε))/(dm) = (d bar(ε))/(ρ dV)` where `ρ` is the mass density of the mass element. In report 85a of the ICRU a definition with an equivalent meaning is given as: The absorbed dose, `D`, is the quotient of `d bar(ε)` by dm, where `d bar(ε)` is the mean energy imparted by ionizing radiation to matter of mass `dm`: `D = (d bar(ε))/(dm)`. + */ + attribute :>> num: Real; + attribute :>> mRef: AbsorbedDoseUnit[1]; + } + + attribute absorbedDose: AbsorbedDoseValue[*] nonunique :> scalarQuantities; + + attribute def AbsorbedDoseUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-81.2 specific energy imparted */ + attribute specificEnergyImparted: AbsorbedDoseValue :> scalarQuantities { + doc + /* + * source: item 10-81.2 specific energy imparted + * symbol(s): `z` + * application domain: generic + * name: SpecificEnergyImparted (specializes AbsorbedDose) + * quantity dimension: L^2*T^-2 + * measurement unit(s): Gy, J/kg, m^2*s^-2 + * tensor order: 0 + * definition: quotient of the energy imparted `ε` (item 10-80.1) and the mass `m` (ISO 80000-4) of the matter in a given volume element: `z = ε / m` + * remarks: `z` is a stochastic quantity. In the limit of a small domain, the mean specific energy `bar(z)` is equal to the absorbed dose `D`. The specific energy imparted can be due to one or more (energy-deposition) events. + */ + } + + /* ISO-80000-10 item 10-82 quality factor */ + attribute def QualityFactorForIonizingRadiationValue :> ScalarQuantityValue { + doc + /* + * source: item 10-82 quality factor + * symbol(s): `Q` + * application domain: ionizing radiation + * name: QualityFactor + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: factor in the calculation and measurement of dose equivalent (item 10-83.1), by which the absorbed dose (item 10-81.1) is to be weighted in order to account for different biological effectiveness of radiations, for radiation protection purposes + * remarks: `Q` is determined by the linear energy transfer (item 10-85) for `Δ -> ∞` , `L_∞` (often denoted as `L` or LET), of charged particles passing through a small volume element at this point (the value of `L_∞` refers to water, not to tissue; the difference, however, is small). The relationship between `L` and `Q` is given in ICRP Publication 103 (ICRP, 2007). + */ + attribute :>> num: Real; + attribute :>> mRef: QualityFactorForIonizingRadiationUnit[1]; + } + + attribute qualityFactorForIonizingRadiation: QualityFactorForIonizingRadiationValue[*] nonunique :> scalarQuantities; + + attribute def QualityFactorForIonizingRadiationUnit :> DimensionOneUnit { + } + + /* ISO-80000-10 item 10-83.1 dose equivalent */ + attribute def DoseEquivalentValue :> ScalarQuantityValue { + doc + /* + * source: item 10-83.1 dose equivalent + * symbol(s): `H` + * application domain: generic + * name: DoseEquivalent + * quantity dimension: L^2*T^-2 + * measurement unit(s): Sv, J/kg, m^2*s^-2 + * tensor order: 0 + * definition: product of the absorbed dose `D` (item 10-81.1) to tissue at the point of interest and the quality factor `Q` (item 10-82) at that point: `H = DQ` + * remarks: The sievert (Sv) is a special name for joule per kilogram, and is the coherent SI unit for dose equivalent. `1 "Sv" = 1 "J/kg"`. The dose equivalent at a point in tissue is given by: `H = int_0^∞ Q(L) D_L dL` where `D_L = (dD)/(dL)` is the distribution of `D` in `L` at the point of interest. See ICRP Publication 103 (ICRP, 2007). The quantities measured with radiation protection dosimeters are based on the definition `H = Q*D`. If various radiation qualities `i` have to be simultaneously accounted for, the definition is: `H = sum_i Q_i*D_i`. In ICRU 51 this quantity is denoted as "dose equivalent". In order to quantify the radiation exposition of the human body and to specify dose limits, use is made of a quantity defined in ICRP 103, the "equivalent dose to a tissue or organ": `H_T = w_T*sum_R w_R*D_{T,R}`. The weighting factors `w_T` for various tissues and organs `T` and `w_R` for various radiation qualities `R` have been numerically laid down in ICRP 103. `D_{T,R}` is the mean absorbed dose to tissue within a tissue or organ `T`, imparted by radiation with radiation quality `R`. + */ + attribute :>> num: Real; + attribute :>> mRef: DoseEquivalentUnit[1]; + } + + attribute doseEquivalent: DoseEquivalentValue[*] nonunique :> scalarQuantities; + + attribute def DoseEquivalentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-83.2 dose equivalent rate */ + attribute doseEquivalentRate: DoseEquivalentValue :> scalarQuantities { + doc + /* + * source: item 10-83.2 dose equivalent rate + * symbol(s): `dot(H)` + * application domain: generic + * name: DoseEquivalentRate (specializes DoseEquivalent) + * quantity dimension: L^2*T^-3 + * measurement unit(s): Sv/s, W/kg, m^2*s^-3 + * tensor order: 0 + * definition: differential quotient of dose equivalent `H` (item 10-83.1) with respect to time (ISO 80000-3): `dot(H) = (dH)/(dt)` + * remarks: `1 "Sv/s" = 1 "W/kg"`. See the remarks for item 10-83.1. + */ + } + + /* ISO-80000-10 item 10-84 absorbed-dose rate */ + attribute def AbsorbedDoseRateValue :> ScalarQuantityValue { + doc + /* + * source: item 10-84 absorbed-dose rate + * symbol(s): `dot(D)` + * application domain: generic + * name: AbsorbedDoseRate + * quantity dimension: L^2*T^-3 + * measurement unit(s): Gy/s, W/kg, m^2*s^-3 + * tensor order: 0 + * definition: differential quotient of the absorbed dose `D` (item 10-81.1) with respect to time (ISO 80000-3): `dot(D) = (dD)/(dt)` + * remarks: `1 "Gy/s" = 1 "W/kg"` See the remarks for item 10-81.1. In report 85a of the ICRU a definition with an equivalent meaning is given as: The absorbed-does rate, `dot(D)` , is the quotient of `dD` by `dt`, where `dD` is the increment of absorbed does in the time interval `dt`: `dot(D) = (dD)/(dt)`. + */ + attribute :>> num: Real; + attribute :>> mRef: AbsorbedDoseRateUnit[1]; + } + + attribute absorbedDoseRate: AbsorbedDoseRateValue[*] nonunique :> scalarQuantities; + + attribute def AbsorbedDoseRateUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-85 linear energy transfer */ + attribute def LinearEnergyTransferValue :> ScalarQuantityValue { + doc + /* + * source: item 10-85 linear energy transfer + * symbol(s): `L_Δ` + * application domain: generic + * name: LinearEnergyTransfer + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): eV/m, J/m, kg*m*s^-2 + * tensor order: 0 + * definition: quotient of the mean energy (ISO 80000-4) `dE_Δ` lost by the charged particles due to electronic interactions in traversing a distance (ISO 80000-3) `dl`, minus the mean sum of the kinetic energies in excess of `Δ` of all the electrons released by the charged particles and `dl`: `L_Δ = (dE_Δ)/(dl)` + * remarks: This quantity is not completely defined unless `Δ` is specified, i.e. the maximum kinetic energy of secondary electrons whose energy is considered to be "locally deposited". `Δ` may be expressed in `"eV"`. Note that the abbreviation LET specifically refers to the quantity `L_∞` mentioned in the remark to 10-82. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearEnergyTransferUnit[1]; + } + + attribute linearEnergyTransfer: LinearEnergyTransferValue[*] nonunique :> scalarQuantities; + + attribute def LinearEnergyTransferUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-10 item 10-86.1 kerma */ + attribute def KermaValue :> ScalarQuantityValue { + doc + /* + * source: item 10-86.1 kerma + * symbol(s): `K` + * application domain: generic + * name: Kerma + * quantity dimension: L^2*T^-2 + * measurement unit(s): Gy, J/kg, m^2*s^-2 + * tensor order: 0 + * definition: for uncharged ionizing radiation, differential quotient of `E_(`tr) with respect to `m`, where `E_(`tr) is the mean sum of the initial kinetic energies (ISO 80000-4) of all the charged ionizing particles liberated in a mass (ISO 80000-4) `m` of a material: `K = (dE_tr)/(dm)` + * remarks: `1 "Gy" = 1 "J/kg"` See the remarks for item 10-81.1. The name "kerma" is derived from Kinetic Energy Released in MAtter (or MAss or MAterial). The quantity `dE_(tr)` includes also the kinetic energy of the charged particles emitted in the decay of excited atoms, molecules, or nuclei. When the mass element `dm` consists of air the term air kerma is used. It can be convenient to refer to a value of air kerma in free space or at a point inside a material different from air, e.g. to the air kerma at a point inside a water phantom. In report 85a of the ICRU a definition with an equivalent meaning is given as: The kerma, `K`, for ionizing uncharged particles, is the quotient of `dE_(tr)` by `dm`, where `dE_(tr)` is the mean sum of the initial kinetic energies of all the charged particles liberated in a mass `dm` of a material by the uncharged particles incident on `dm`: `K = (dE_(tr))/(dm)`. + */ + attribute :>> num: Real; + attribute :>> mRef: KermaUnit[1]; + } + + attribute kerma: KermaValue[*] nonunique :> scalarQuantities; + + attribute def KermaUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-86.2 kerma rate */ + attribute def KermaRateValue :> ScalarQuantityValue { + doc + /* + * source: item 10-86.2 kerma rate + * symbol(s): `dot(K)` + * application domain: generic + * name: KermaRate + * quantity dimension: L^2*T^-3 + * measurement unit(s): Gy/s, W/kg, m^2*s^-3 + * tensor order: 0 + * definition: differential quotient of kerma (item 10-86.1) with respect to time (ISO 80000-3): `dot(K) = (dK)/(dt)` + * remarks: `1 "Gy/s" = 1 "W/kg"`. See the Remarks for item 10-81.1. In report 85a of the ICRU a definition with an equivalent meaning is given as: The kerma rate, `dot(K)` , is the quotient of `dK` by `dt`, where `dK` is the increment of kerma in the time interval `dt`: `dot(K) = (dK)/(dt)`. + */ + attribute :>> num: Real; + attribute :>> mRef: KermaRateUnit[1]; + } + + attribute kermaRate: KermaRateValue[*] nonunique :> scalarQuantities; + + attribute def KermaRateUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-10 item 10-87 mass energy-transfer coefficient */ + attribute def MassEnergyTransferCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 10-87 mass energy-transfer coefficient + * symbol(s): `μ_"tr"/ρ` + * application domain: generic + * name: MassEnergyTransferCoefficient + * quantity dimension: L^2*M^-1 + * measurement unit(s): kg^-1*m^2 + * tensor order: 0 + * definition: for ionizing uncharged particles of a given type and energy, the differential quotient of `R_"tr"` with respect to `l`: `m_"tr"/ρ = 1/ρ 1/R (dR_"tr")/(dl)` where `R_"tr"` is the mean energy (ISO 80000-5) that is transferred to kinetic energy (ISO 80000-4) of charged particles by interactions of the uncharged particles of incident radiant energy `R` (item 10-45) in traversing a distance (ISO 80000-3) `l` in the material of density (ISO 80000-4) `ρ`, divided by `ρ` and `R` + * remarks: `m_(tr)/ρ = (dot(K))/ψ` , where `dot(K)` is kerma rate (item 10-86.2) and `ψ` is energy fluence rate (item 10-47). The quantity: `μ_(en)/ρ = μ_(tr)/ρ(1-g)` where `g` is mean fraction of the kinetic energy of the liberated charged particles that is lost in radiative processes in the material, is called mass energy-absorption coefficient. The mass energy-absorption coefficient of a compound material depends on the stopping power of the material. Thus, its evaluation cannot, in principle, be reduced to a simple summation of the mass energy-absorption coefficient of the atomic constituents. Such a summation can provide an adequate approximation when the value of `g` is sufficiently small. In report 85a of the ICRU a definition with an equivalent meaning is given as: The mass energy-transfer coefficient, `μ_(tr)/ρ` , of a material, for uncharged particles of a given type and energy, is the quotient of `(dR_(tr))/R` by `ρ dl`, where `dR_(tr)` is the mean energy that is transferred to kinetic energy of charged particles by interactions of the uncharged particles of incident radiant energy `R` in traversing a distance `dl` in the material of density `ρ` : `μ_(tr)/ρ = 1/(ρ dl) (d R_(tr))/R`. + */ + attribute :>> num: Real; + attribute :>> mRef: MassEnergyTransferCoefficientUnit[1]; + } + + attribute massEnergyTransferCoefficient: MassEnergyTransferCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def MassEnergyTransferCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-10 item 10-88 exposure */ + attribute def ExposureValue :> ScalarQuantityValue { + doc + /* + * source: item 10-88 exposure + * symbol(s): `X` + * application domain: ionizing radiation + * name: Exposure + * quantity dimension: M^-1*T^1*I^1 + * measurement unit(s): C/kg, kg^-1*s*A + * tensor order: 0 + * definition: for X- or gamma radiation the differential quotient of `q` with respect to `m`, where `q` is the absolute value of the mean total electric charge of the ions of one sign produced when all the electrons and positrons liberated or created by photons incident on an element of dry air with mass `m` (ISO 80000-4) are completely stopped in dry air: `X = (dq)/(dm)` + * remarks: The ionization produced by electrons emitted in atomic or molecular relaxation is included in `dq`. The ionization due to photons emitted by radiative processes (i.e. bremsstrahlung and fluorescence photons) is not included in `dq`. This quantity should not be confused with the quantity photon exposure (ISO 80000-7), radiation exposure (ISO 80000-7), or the quantity luminous exposure (ISO 80000-7). It can be convenient to refer to a value of exposure in free space or at a point inside a material different from air, e.g. to the exposure at a point inside a water phantom. The exposure is related to the air kerma, `K_a`, (see item 10-86.1) by: `X = (e (1-g))/W K_a` , where `e` is the elementary charge (ISO 80000-1), `W` the average energy loss per elementary charge produced (item 10-60), and `g` is the fraction of the kinetic energy of liberated charged particles that is lost in radiative processes. In report 85a of the ICRU a definition with an equivalent meaning is given as: The exposure, `X`, is the quotient of `dq` by `dm`, where `dq` is the absolute value of the mean total charge of the ions of one sign produced when all the electrons and positrons liberated or created by photons incident on a mass `dm` of dry air are completely stopped in dry air: `X = (dq)/(dm)`. + */ + attribute :>> num: Real; + attribute :>> mRef: ExposureUnit[1]; + } + + attribute exposure: ExposureValue[*] nonunique :> scalarQuantities; + + attribute def ExposureUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF); } + } + + /* ISO-80000-10 item 10-89 exposure rate */ + attribute def ExposureRateValue :> ScalarQuantityValue { + doc + /* + * source: item 10-89 exposure rate + * symbol(s): `dot(X)` + * application domain: generic + * name: ExposureRate + * quantity dimension: M^-1*I^1 + * measurement unit(s): C/(kg*s), kg^-1*A + * tensor order: 0 + * definition: differential quotient of the exposure `X` (item 10-88) with respect to time (ISO 80000-3): `dot(X) = (dX)/(dt)` + * remarks: `1 "C/(kg s)" = 1 "A/kg"`. In report 85a of the ICRU a definition with an equivalent meaning is given as: The exposure rate, `dot(X)` , is the quotient of `dX` by `dt`, where `dX` is the increment of exposure in the time interval `dt`: `dot(X) = (dX)/(dt)`. + */ + attribute :>> num: Real; + attribute :>> mRef: ExposureRateUnit[1]; + } + + attribute exposureRate: ExposureRateValue[*] nonunique :> scalarQuantities; + + attribute def ExposureRateUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, electricCurrentPF); } + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQBase.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQBase.sysml new file mode 100644 index 00000000..da34d2e5 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQBase.sysml @@ -0,0 +1,206 @@ +standard library package ISQBase { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO/IEC 80000 + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + + /* ISO-80000-3 item 3-1.1 length */ + attribute def LengthValue :> ScalarQuantityValue { + doc + /* + * source: item 3-1.1 length + * symbol(s): `l`, `L` + * application domain: generic + * name: Length + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: linear extent in space between any two points + * remarks: Length does not need to be measured along a straight line. Length is one of the seven base quantities in the International System of Units (ISO 80000-1). + */ + attribute :>> num: Real; + attribute :>> mRef: LengthUnit[1]; + } + + attribute length: LengthValue[*] nonunique :> scalarQuantities; + + attribute def LengthUnit :> SimpleUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-3 item 3-9 duration, time */ + attribute def DurationValue :> ScalarQuantityValue { + doc + /* + * source: item 3-9 duration, time + * symbol(s): `t` + * application domain: generic + * name: Duration + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: measure of the time difference between two events + * remarks: Duration is often just called time. Time is one of the seven base quantities in the International System of Quantities, ISQ (see ISO 80000-1). Duration is a measure of a time interval. + */ + attribute :>> num: Real; + attribute :>> mRef: DurationUnit[1]; + } + + attribute duration: DurationValue[*] nonunique :> scalarQuantities; + + attribute def DurationUnit :> SimpleUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-4 item 4-1 mass */ + attribute def MassValue :> ScalarQuantityValue { + doc + /* + * source: item 4-1 mass + * symbol(s): `m` + * application domain: generic + * name: Mass + * quantity dimension: M^1 + * measurement unit(s): kg + * tensor order: 0 + * definition: property of a body which expresses itself in terms of inertia with regard to changes in its state of motion as well as its gravitational attraction to other bodies + * remarks: The kilogram (kg) is one of the seven base units (see ISO 80000-1) of the International System of Units, the SI. See also IEC 60050-113. + */ + attribute :>> num: Real; + attribute :>> mRef: MassUnit[1]; + } + + attribute mass: MassValue[*] nonunique :> scalarQuantities; + + attribute def MassUnit :> SimpleUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = massPF; } + } + + /* ISO-80000-5 item 5-1 thermodynamic temperature, temperature */ + attribute def ThermodynamicTemperatureValue :> ScalarQuantityValue { + doc + /* + * source: item 5-1 thermodynamic temperature, temperature + * symbol(s): `T`, `Θ` + * application domain: generic + * name: ThermodynamicTemperature + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: partial derivative of internal energy with respect to entropy at constant volume and constant number of particles in the system: `T = ((partial U)/(partial S))_(V,N)` where `U` is internal energy (item 5-20.2), `S` is entropy (item 5-18), `V` is volume (ISO 80000-3), and `N` is number of particles + * remarks: It is measured with a primary thermometer, examples of which are gas thermometers of different kinds, noise thermometers, or radiation thermometers. The Boltzmann constant (ISO 80000-1) relates energy at the individual particle level with thermodynamic temperature. Differences of thermodynamic temperatures or changes may be expressed either in kelvin, symbol K, or in degrees Celsius, symbol °C (item 5-2). Thermodynamic temperature is one of the seven base quantities in the International System of Quantities, ISQ (see ISO 80000-1). The International Temperature Scale of 1990. For the purpose of practical measurements, the International Temperature Scale of 1990, ITS-90, was adopted by CIPM in 1989, which is a close approximation to the thermodynamic temperature scale. The quantities defined by this scale are denoted `T_90` and `t_90`, respectively (replacing `T_68` and `t_68` defined by the International Practical Temperature Scale of 1968, IPTS-68), where `t_90/(1 °C) = T_90/(1 K) - 273,15`. The units of `T_90` and `t_90` are the kelvin, symbol K, and the degree Celsius, symbol °C (item 5-2), respectively. For further information, see References [5], [6]. For ready conversion between temperatures reported on the International Temperature Scale and thermodynamic temperatures the systematic deviations can be found in Reference [7]. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermodynamicTemperatureUnit[1]; + } + + attribute thermodynamicTemperature: ThermodynamicTemperatureValue[*] nonunique :> scalarQuantities; + + attribute def ThermodynamicTemperatureUnit :> SimpleUnit { + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; } + } + + /* IEC-80000-6 item 6-1 electric current */ + attribute def ElectricCurrentValue :> ScalarQuantityValue { + doc + /* + * source: item 6-1 electric current + * symbol(s): `I`, `i` + * application domain: generic + * name: ElectricCurrent + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: electric current is one of the base quantities in the International System of Quantities, ISQ, on which the International System of Units, SI, is based + * remarks: Electric current is the quantity that can often be measured with an ammeter. The electric current through a surface is the quotient of the electric charge (item 6-2) transferred through the surface during a time interval by the duration of that interval. For a more complete definition, see item 6-8 and IEC 60050-121, item 121-11-13. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricCurrentUnit[1]; + } + + attribute electricCurrent: ElectricCurrentValue[*] nonunique :> scalarQuantities; + + attribute def ElectricCurrentUnit :> SimpleUnit { + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = electricCurrentPF; } + } + + /* ISO-80000-7 item 7-14 luminous intensity */ + attribute def LuminousIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 7-14 luminous intensity + * symbol(s): `I_v`, `(I)` + * application domain: generic + * name: LuminousIntensity + * quantity dimension: J^1 + * measurement unit(s): cd + * tensor order: 0 + * definition: density of luminous flux with respect to solid angle in a specified direction, expressed by `I_v = (dΦ_v)/(dΩ)` where `Φ_v` is the luminous flux (item 7-13) emitted in a specified direction, and `Ω` is the solid angle (ISO 80000-3) containing that direction + * remarks: The definition holds strictly only for a point source. The distribution of the luminous intensities as a function of the direction of emission, e.g. given by the polar angles `(θ,ϕ)`, is used to determine the luminous flux (item 7-13) within a certain solid angle (ISO 80000-3) `Ω` of a source: `Φ_v = int int_Ω I_v(θ,φ) sin(θ) dφ dθ`. Luminous intensity can be derived from the spectral radiant intensity distribution by `I_v = K_m int_0^∞ I_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `I_(e,λ)(λ)` is the spectral radiant intensity (item 7-5.2) at wavelength `λ` (ISO 80000-3), and `V(λ)` is spectral luminous efficiency (item 7-10.2). The corresponding radiometric quantity is "radiant intensity" (item 7-5.1). The corresponding quantity for photons is "photon intensity" (item 7-21). + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousIntensityUnit[1]; + } + + attribute luminousIntensity: LuminousIntensityValue[*] nonunique :> scalarQuantities; + + attribute def LuminousIntensityUnit :> SimpleUnit { + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = luminousIntensityPF; } + } + + /* ISO-80000-9 item 9-2 amount of substance, number of moles */ + attribute def AmountOfSubstanceValue :> ScalarQuantityValue { + doc + /* + * source: item 9-2 amount of substance, number of moles + * symbol(s): `n(X)` + * application domain: generic + * name: AmountOfSubstance + * quantity dimension: N^1 + * measurement unit(s): mol + * tensor order: 0 + * definition: quotient of number `N` of specified elementary entities of kind `X` (item 9-1) in a sample, and the Avogadro constant `N_A` (ISO 80000-1): `n(X) = N(X)/N_A` + * remarks: Amount of substance is one of the seven base quantities in the International System of Quantities, ISQ (see ISO 80000-1). Elementary entities, such as molecules, atoms, ions, electrons, holes and other quasi-particles, double bonds can be used. It is necessary to specify precisely the entity involved, e.g. atoms of hydrogen `H` vs. molecules of hydrogen `H_2`, preferably by giving the molecular chemical formula of the material involved. In the name "amount of substance", the words "of substance" could be replaced by words specifying the substance concerned, e.g. "amount of hydrogen chloride, `HCl`", or "amount of benzene, `C_6H_6`". The name "number of moles" is often used for "amount of substance", but this is deprecated because the name of a quantity should be distinguished from the name of the unit. + */ + attribute :>> num: Real; + attribute :>> mRef: AmountOfSubstanceUnit[1]; + } + + attribute amountOfSubstance: AmountOfSubstanceValue[*] nonunique :> scalarQuantities; + + attribute def AmountOfSubstanceUnit :> SimpleUnit { + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = amountOfSubstancePF; } + } + + attribute 'International System of Quantities': SystemOfQuantities { + doc + /* + * Declaration of the International System of Quantities (ISQ), + * including its base quantities and symbols as specified in ISO 80000-1:2009. + */ + attribute :>> baseQuantities = ( L, M, T, I, 'Θ', N, J ); + + attribute L: LengthValue[1]; + attribute M: MassValue[1]; + attribute T: DurationValue[1]; + attribute I: ElectricCurrentValue[1]; + attribute 'Θ': ThermodynamicTemperatureValue[1]; + attribute N: AmountOfSubstanceValue[1]; + attribute J: LuminousIntensityValue[1]; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml new file mode 100644 index 00000000..24925e4d --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml @@ -0,0 +1,1991 @@ +standard library package ISQCharacteristicNumbers { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-11:2019 "Characteristic numbers" + * see also https://www.iso.org/standard/64982.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* ISO-80000-11 item 11-4.1 Reynolds number */ + attribute def ReynoldsNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.1 Reynolds number + * symbol(s): `Re` + * application domain: generic + * name: ReynoldsNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of inertial forces and viscous forces in a fluid flow, expressed by `Re = (ρ*v*l)/η = (v*l)/ν`, where `ρ` is mass density (ISO 80000-4), `v` is speed (ISO 80000-3), `l` is characteristic length (ISO 80000-3), `η` is dynamic viscosity (ISO 80000-4), and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: The value of the Reynolds number gives an estimate on the flow state: laminar flow or turbulent flow. In rotating movement, the speed `v = ω*l`, where `l` is the distance from the rotation axis and `ω` is the angular velocity. + */ + } + attribute reynoldsNumber: ReynoldsNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.2 Euler number */ + attribute def EulerNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.2 Euler number + * symbol(s): `Eu` + * application domain: generic + * name: EulerNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relationship between pressure drop in a flow and the kinetic energy per volume for flow of fluids in a pipe, expressed by `Eu = (Δp)/(ρ*v^2)`, where `Δp` is drop of pressure (ISO 80000-4), `ρ` is mass density (ISO 80000-4), and `v` is speed (ISO 80000-3) + * remarks: The Euler number is used to characterize losses in the flow. A modification of the Euler number is considering the dimensions of the containment (pipe): `Eu^"'" = d/l*Eu`, where `d` is inner diameter (ISO 80000-3) of the pipe, and `l` is length (ISO 80000-3). + */ + } + attribute eulerNumber: EulerNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.3 Froude number */ + attribute def FroudeNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.3 Froude number + * symbol(s): `Fr` + * application domain: generic + * name: FroudeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of a body’s inertial forces and its gravitational forces for flow of fluids, expressed by `Fr = v/sqrt(l*g)`, where `v` is speed (ISO 80000-3) of flow, `l` is characteristic length (ISO 80000-3), and `g` is acceleration of free fall (ISO 80000-3) + * remarks: The Froude number can be modified by buoyancy. Sometimes the square and sometimes the inverse of the Froude number as defined here is wrongly used. + */ + } + attribute froudeNumber: FroudeNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.4 Grashof number */ + attribute def GrashofNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.4 Grashof number + * symbol(s): `Gr` + * application domain: generic + * name: GrashofNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of buoyancy forces due to thermal expansion which results in a change of mass density and viscous forces for free convection due to temperature differences, expressed by `Gr = l^3*g*α_V*(ΔT)/ν^2`, where `l` is characteristic length (ISO 80000-3), `g` is acceleration of free fall (ISO 80000-3), `α_V` is thermal cubic expansion coefficient (ISO 80000-5), `ΔT` is difference of thermodynamic temperature `T` (ISO 80000-5) between surface of the body and the fluid far away from the body, and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: Heating can occur near hot vertical walls, in pipes, or by a bluff body. The characteristic length can be the vertical height of a hot plate, the diameter of a pipe, or the effective length of a body. See also Rayleigh number (item 11-5.3). + */ + } + attribute grashofNumber: GrashofNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.5 Weber number */ + attribute def WeberNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.5 Weber number + * symbol(s): `We` + * application domain: generic + * name: WeberNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertial forces and capillary forces due to surface tension at the interface between two different fluids, expressed by `We = (ρ*v^2*l)/γ`, where `ρ` is mass density (ISO 80000-4), `v` is speed (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `γ` is surface tension (ISO 80000-4) + * remarks: The fluids can be gases or liquids. The different fluids often are drops moving in a gas or bubbles in a liquid. The characteristic length is commonly the diameter of bubbles or drops. The square root of the Weber number is called Rayleigh number. Sometimes the square root of the Weber number as defined here is called the Weber number. That definition is deprecated. Interfaces only exist between two fluids which are not miscible. + */ + } + attribute weberNumber: WeberNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.6 Mach number */ + attribute def MachNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.6 Mach number + * symbol(s): `Ma` + * application domain: generic + * name: MachNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the speed of flow and the speed of sound, expressed by `Ma = v/c`, where `v` is speed (ISO 80000-3) of the body, and `c` is speed of sound (ISO 80000-8) in the fluid + * remarks: The Mach number represents the relationship of inertial forces compared to compression forces. For an ideal gas `c = sqrt(γ p/rho) = sqrt(γ (RT)/M) = sqrt(γ (kT)/m)`, where `γ` is ratio of the specific heat capacity (ISO 80000-5). + */ + } + attribute machNumber: MachNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.7 Knudsen number */ + attribute def KnudsenNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.7 Knudsen number + * symbol(s): `Kn` + * application domain: generic + * name: KnudsenNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of free path length of a particle and a characteristic length, expressed by `Kn = λ/l`, where `λ` is mean free path (ISO 80000-9), and `l` is characteristic length (ISO 80000-3) + * remarks: The Knudsen number is a measure to estimate whether the gas in flow behaves like a continuum. The characteristic length, `l`, can be a characteristic size of the gas flow region like a pipe diameter. + */ + } + attribute knudsenNumber: KnudsenNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.8 Strouhal number, Thomson number */ + attribute def StrouhalNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.8 Strouhal number, Thomson number + * symbol(s): `Sr`, `Sh` + * application domain: generic + * name: StrouhalNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between a characteristic frequency and a characteristic speed for unsteady flow with periodic behaviour, expressed by `Sr = f*l/v`, where `f` is frequency (ISO 80000-3) of vortex shedding, `l` is characteristic length (ISO 80000-3), and `v` is speed (ISO 80000-3) of flow + * remarks: The characteristic length, `l`, can be the diameter of an obstacle in the flow which can cause vortex shedding, or the length of it. + */ + } + attribute strouhalNumber: StrouhalNumberValue :> scalarQuantities; + + alias thomsonNumber for strouhalNumber; + + /* ISO-80000-11 item 11-4.9 drag coefficient */ + /* Refer to declaration for DragCoefficient in ISQMechanics item 4-23.4 drag coefficient */ + + /* ISO-80000-11 item 11-4.10 Bagnold number */ + attribute def BagnoldNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.10 Bagnold number + * symbol(s): `Bg` + * application domain: generic + * name: BagnoldNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of drag force and gravitational force for a body moving in a fluid, expressed by `Bg = (c_D*ρ*v^2)/(l*g*ρ_b)`, where `c_D` is drag coefficient (item 11-4.9) of the body, `ρ` is mass density (ISO 80000-4) of the fluid, `v` is speed (ISO 80000-3) of the body, `l` is characteristic length (ISO 80000-3), `g` is acceleration of free fall (ISO 80000-3), and `ρ_b` is mass density (ISO 80000-4) of the body + * remarks: The characteristic length, `l`, is the body’s volume divided by its cross-sectional area. + */ + } + attribute bagnoldNumber: BagnoldNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.11 Bagnold number */ + attribute def BagnoldNumberForSolidParticlesValue :> DimensionOneValue { + doc + /* + * source: item 11-4.11 Bagnold number + * symbol(s): `Ba_2` + * application domain: solid particles + * name: BagnoldNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of drag force and viscous force in a fluid transferring solid particles, expressed by `Ba_2 = (ρ_s*d^2*dot(γ))/η*sqrt(1/(f_s^(1/2) - 1))`, where `ρ_s` is mass density (ISO 80000-4) of particles, `d` is diameter (ISO 80000-3) of particles, `dot(γ) = v/d` is shear rate time-derivative of shear strain (ISO 80000-4), `η` is dynamic viscosity (ISO 80000-4) of fluid, and `f_s` is volumic fraction of solid particles + * remarks: None. + */ + } + attribute bagnoldNumberForSolidParticles: BagnoldNumberForSolidParticlesValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.12 lift coefficient */ + attribute def LiftCoefficientValue :> DimensionOneValue { + doc + /* + * source: item 11-4.12 lift coefficient + * symbol(s): `c_l`, `c_A` + * application domain: generic + * name: LiftCoefficient (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the lift force available from a wing at a given angle and the inertial force for a wing shaped body moving in a fluid, expressed by `c_l = ( 2*F_l)/(ρ*v^2*S) = F_l/(q*S)`, where `F_l` is lift force (ISO 80000-4) on the wing, `ρ` is mass density (ISO 80000-4) of the fluid, `v` is speed (ISO 80000-3) of the body, `S = A*cos(α)` is effective area (ISO 80000-3) when `α` is the angle of attack and `A` is area of the wing, and `q = 1/2*ρ*v^2` is dynamic pressure + * remarks: The lift coefficient is dependant on the shape of the wing. + */ + } + attribute liftCoefficient: LiftCoefficientValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.13 thrust coefficient */ + attribute def ThrustCoefficientValue :> DimensionOneValue { + doc + /* + * source: item 11-4.13 thrust coefficient + * symbol(s): `c_t` + * application domain: generic + * name: ThrustCoefficient (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the effective thrust force available from a propeller and the inertial force in a fluid, expressed by `c_t = F_T/(ρ*n^2*d^4)`, where `F_T` is thrust force (ISO 80000-4) of the propeller, `ρ` is mass density (ISO 80000-4) of the fluid, `n` is rotational frequency (ISO 80000-3), and `d` is tip diameter (ISO 80000-3) of the propeller + * remarks: The thrust coefficient is dependant on the shape of the propeller. + */ + } + attribute thrustCoefficient: ThrustCoefficientValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.14 Dean number */ + attribute def DeanNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.14 Dean number + * symbol(s): `Dn` + * application domain: generic + * name: DeanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between centrifugal force and inertial force, for flows of fluids in curved pipes, expressed by `Dn = (2*v*r)/ν*sqrt(r/R)`, where `v` is (axial) speed (ISO 80000-3), `r` is radius (ISO 80000-3) of the pipe, `ν` is kinematic viscosity (ISO 80000-4) of the fluid, and `R` is radius of curvature (ISO 80000-3) of the path of the pipe + * remarks: None. + */ + } + attribute deanNumber: DeanNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.15 Bejan number */ + attribute def BejanNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.15 Bejan number + * symbol(s): `Be` + * application domain: generic + * name: BejanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mechanical work and frictional energy loss in fluid dynamics in a pipe, expressed by `Be = (Δp*ρ*l^2)/(η*ν)`, where `p` is drop of pressure (ISO 80000-4) along the pipe, `l` is characteristic length (ISO 80000-3), `η` is dynamic viscosity (ISO 80000-4), `ν` is kinematic viscosity (ISO 80000-4), and `ρ` is mass density (ISO 80000-4) + * remarks: A similar number exists for heat transfer (item 11-5.9). The kinematic viscosity is also called momentum diffusivity. + */ + } + attribute bejanNumber: BejanNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.16 Lagrange number */ + attribute def LagrangeNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.16 Lagrange number + * symbol(s): `Lg` + * application domain: generic + * name: LagrangeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mechanical work and frictional energy loss in fluid dynamics in a pipe, expressed by `Lg = (l*Δp)/(η*v)`, where `l` is length (ISO 80000-3) of the pipe, `Δp` is drop of pressure (ISO 80000-4) along the pipe, `η` is dynamic viscosity (ISO 80000-4), and `v` is speed (ISO 80000-3) + * remarks: The Lagrange number is also given by `Lg = Re*Eu`, where `Re` is the Reynolds number (item 11-4.1), and `Eu` is the Euler number (item 11-4.2). + */ + } + attribute lagrangeNumber: LagrangeNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.17 Bingham number, plasticity number */ + attribute def BinghamNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.17 Bingham number, plasticity number + * symbol(s): `Bm`, `Bn` + * application domain: generic + * name: BinghamNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of yield stress and viscous stress in a viscous material for flow of viscoplastic material in channels, expressed by `Bm = (τ*d)/(η*v)`, where `τ` is shear stress (ISO 80000-4), `d` is characteristic diameter (ISO 80000-3), e.g. effective channel width, `η` is dynamic viscosity (ISO 80000-4), and `v` is speed (ISO 80000-3) + * remarks: None. + */ + } + attribute binghamNumber: BinghamNumberValue :> scalarQuantities; + + alias plasticityNumber for binghamNumber; + + /* ISO-80000-11 item 11-4.18 Hedström number */ + attribute def 'HedströmNumberValue' :> DimensionOneValue { + doc + /* + * source: item 11-4.18 Hedström number + * symbol(s): `He`, `Hd` + * application domain: generic + * name: HedströmNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of yield stress and viscous stress of a viscous material at flow limit for visco-plastic material in a channel, expressed by `He = (τ_0*d^2*ρ)/η^2`, where `τ_0` is shear stress (ISO 80000-4) at flow limit, `d` is characteristic diameter (ISO 80000-3), e.g. effective channel width, `ρ` is mass density (ISO 80000-4), and `η` is dynamic viscosity (ISO 80000-4) + * remarks: None. + */ + } + attribute 'hedströmNumber': 'HedströmNumberValue' :> scalarQuantities; + + /* ISO-80000-11 item 11-4.19 Bodenstein number */ + attribute def BodensteinNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.19 Bodenstein number + * symbol(s): `Bd` + * application domain: generic + * name: BodensteinNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: mathematical expression of the transfer of matter by convection in reactors with respect to diffusion, `Bd = (v*l)/D`, where `v` is speed (ISO 80000-3), `l` is length (ISO 80000-3) of the reactor, and `D` is diffusion coefficient (ISO 80000-9) + * remarks: The Bodenstein number is also given by `Bd = Pe^"*" = Re*Sc`, where `Pe^"*"` is the Péclet number for mass transfer (item 11-6.2), `Re` is the Reynolds number (item 11-4.1), and `Sc = η/(ρ*D) = ν/D` is the Schmidt number (item 11-7.2). + */ + } + attribute bodensteinNumber: BodensteinNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.20 Rossby number, Kiebel number */ + attribute def RossbyNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.20 Rossby number, Kiebel number + * symbol(s): `Ro` + * application domain: generic + * name: RossbyNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of inertial forces and Coriolis forces in the context of transfer of matter in geophysics, expressed by `Ro = v/(2*l*ω_E*sin(φ)`, where `v` is speed (ISO 80000-3) of motion, `l` is characteristic length (ISO 80000-3), the scale of the phenomenon, `ω_E` is angular velocity (ISO 80000-3) of the Earth's rotation, and `φ` is angle (ISO 80000-3) of latitude + * remarks: The Rossby number represents the effect of Earth's rotation on flow in pipes, rivers, ocean currents, tornadoes, etc. The quantity `ω_E*sin(φ)` is called Coriolis frequency. + */ + } + attribute rossbyNumber: RossbyNumberValue :> scalarQuantities; + + alias kiebelNumber for rossbyNumber; + + /* ISO-80000-11 item 11-4.21 Ekman number */ + attribute def EkmanNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.21 Ekman number + * symbol(s): `Ek` + * application domain: generic + * name: EkmanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of viscous forces and Coriolis forces in the context of transfer of matter for the flow of a rotating fluid, expressed by `Ek = ν/(2*l^2*ω_E*sin(φ))`, where `ν` is kinematic viscosity (ISO 80000-4), `l` is characteristic length (ISO 80000-3), the scale of the phenomenon, `ω_E` is angular frequency (ISO 80000-3) of the Earth’s rotation, and `φ` is angle of latitude + * remarks: In plasma physics, the square root of this number is used. The Ekman number is also given by `Ek = (Ro)/(Re)`, where `Ro` is the Rossby number (item 11-4.20), and `Re` is the Reynolds number (item 11-4.1). + */ + } + attribute ekmanNumber: EkmanNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.22 elasticity number */ + attribute def ElasticityNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.22 elasticity number + * symbol(s): `El` + * application domain: generic + * name: ElasticityNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between relaxation time and diffusion time in viscoelastic flows, expressed by `El = (t_r*ν)/r^2`, where `t_r` is relaxation time (ISO 80000-12), `ν` is kinematic viscosity (ISO 80000-4), and `r` is radius (ISO 80000-3) of pipe + * remarks: See also Deborah number (item 11-7.8). + */ + } + attribute elasticityNumber: ElasticityNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.23 Darcy friction factor, Moody friction factor */ + attribute def DarcyFrictionFactorValue :> DimensionOneValue { + doc + /* + * source: item 11-4.23 Darcy friction factor, Moody friction factor + * symbol(s): `f_D` + * application domain: generic + * name: DarcyFrictionFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: representation of pressure loss in a pipe due to friction within a laminar or turbulent flow of a fluid in a pipe, expressed by `f_D = (2*Δp)/(ρ*v^2)*d/l`, where `Δp` is drop of pressure (ISO 80000-4) due to friction, `ρ` is mass density (ISO 80000-4) of the fluid, `v` is (average) speed (ISO 80000-3) of the fluid in the pipe, `d` is diameter (ISO 80000-3) of the pipe, and `l` is length (ISO 80000-3) of the pipe + * remarks: None. + */ + } + attribute darcyFrictionFactor: DarcyFrictionFactorValue :> scalarQuantities; + + alias moodyFrictionFactor for darcyFrictionFactor; + + /* ISO-80000-11 item 11-4.24 Fanning number */ + attribute def FanningNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.24 Fanning number + * symbol(s): `f_n`, `f` + * application domain: generic + * name: FanningNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between shear stress and dynamic pressure in the flow of a fluid in a containment, expressed by `f_n = (2*τ)/(ρ*v^2)`, where `τ` is shear stress (ISO 80000-4) at the wall, `ρ` is mass density (ISO 80000-4) of the fluid, and `v` is speed (ISO 80000-3) of the fluid in the pipe + * remarks: The Fanning number describes the flow of fluids in a pipe with friction at the walls represented by its shear stress. Symbol `f` may be used where no conflicts are possible. + */ + } + attribute fanningNumber: FanningNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.25 Goertler number, Goertler parameter */ + attribute def GoertlerNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.25 Goertler number, Goertler parameter + * symbol(s): `Go` + * application domain: generic + * name: GoertlerNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: characterization of the stability of laminar boundary layer flows in transfer of matter in a boundary layer on curved surfaces, expressed by `Go = (v*l_b)/ν * sqrt(l_b/r_c)`, where `v` is speed (ISO 80000-3), `l_b` is boundary layer thickness (ISO 80000-3), `ν` is kinematic viscosity (ISO 80000-4), and `r_c` is radius of curvature (ISO 80000-3) + * remarks: The Goertler number represents the ratio of centrifugal effects to viscous effects. + */ + } + attribute goertlerNumber: GoertlerNumberValue :> scalarQuantities; + + alias goertlerParameter for goertlerNumber; + + /* ISO-80000-11 item 11-4.26 Hagen number */ + attribute def HagenNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.26 Hagen number + * symbol(s): `Hg`, `Ha` + * application domain: generic + * name: HagenNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: generalization of the Grashof number for forced or free convection in laminar flow, expressed by `Hg = -1/ρ*(dp)/(dx)*l^3/ν^2`, where `ρ` is mass density (ISO 80000-4) of fluid, `(dp)/(dx)` is gradient of pressure (ISO 80000-4), `l` is characteristic length (ISO 80000-3), and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: For free thermal convection with `(dp)/(dx) = ρ*g*α_V*ΔT`, the Hagen number then coincides with the Grashof number (item 11-4.4). See also the Poiseuille number (item 11-4.28). + */ + } + attribute hagenNumber: HagenNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.27 Laval number */ + attribute def LavalNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.27 Laval number + * symbol(s): `La` + * application domain: generic + * name: LavalNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of speed and the (critical) sound speed at the throat of a nozzle, expressed by `La = v/sqrt((R_s*T*2*γ)/(γ+1))`, where `v` is speed (ISO 80000-3),  `R_s = R/M` is specific gas constant, where `R` is molar gas constant (ISO 80000-9), and `M` is molar mass (ISO 80000-9), `T` is thermodynamic temperature (ISO 80000-5), and `γ` is ratio of the specific heat capacities (ISO 80000-5) + * remarks: The Laval number is a specific kind of Mach number (item 11-4.6). + */ + } + attribute lavalNumber: LavalNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.28 Poiseuille number */ + attribute def PoiseuilleNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.28 Poiseuille number + * symbol(s): `Poi` + * application domain: generic + * name: PoiseuilleNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of propulsive force by pressure and viscous force for a flow of fluids in a pipe, expressed by `Poi = -(Δp)/l*d^2/(η*v)`, where `Δp` is drop of pressure (ISO 80000-4) along the pipe, `l` is length (ISO 80000-3) of the pipe, `d` is diameter (ISO 80000-3) of the pipe, `η` is dynamic viscosity (ISO 80000-4) of the fluid, and `v` is characteristic speed (ISO 80000-3) of the fluid + * remarks: The Poiseuille number is `Poi=32` for laminar flow in a round pipe. See also the Hagen number (item 11-4.26). + */ + } + attribute poiseuilleNumber: PoiseuilleNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.29 power number */ + attribute def PowerNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.29 power number + * symbol(s): `Pn` + * application domain: generic + * name: PowerNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of power consumption by agitators due to drag and rotational inertial power in fluids, expressed by `Pn = P/(ρ*n^3*d^5)`, where `P` is active power (IEC 80000-6) consumed by a stirrer, `ρ` is mass density (ISO 80000-4) of fluid, `n` is rotational frequency (ISO 80000-3), and `d` is diameter (ISO 80000-3) of stirrer + * remarks: None. + */ + } + attribute powerNumber: PowerNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.30 Richardson number */ + attribute def RichardsonNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.30 Richardson number + * symbol(s): `Ri` + * application domain: generic + * name: RichardsonNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of potential energy and kinetic energy for a falling body, expressed by `Ri = (g*h)/v^2`, where `g` is acceleration of free fall (ISO 80000-3), `h` is characteristic height (ISO 80000-3), and `v` is characteristic speed (ISO 80000-3) + * remarks: In geophysics differences of these quantities are of interest. + */ + } + attribute richardsonNumber: RichardsonNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.31 Reech number */ + attribute def ReechNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.31 Reech number + * symbol(s): `Ree` + * application domain: generic + * name: ReechNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between the speed of an object submerged in water relative to the water, and wave propagation speed, expressed by `Ree = (g*l)/v`, where `g` is acceleration of free fall (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `v` is speed (ISO 80000-3) of the object relative to the water + * remarks: The Reech number can be used to determine the resistance of a partially submerged object (e.g. a ship) of length `l` (in direction of the motion) moving through water. A similar quantity is defined as the Boussinesq number `Bs = v/sqrt(2*g*l)` . + */ + } + attribute reechNumber: ReechNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.32 Stokes number */ + attribute def StokesNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.32 Stokes number + * symbol(s): `Stk` + * application domain: time-related + * name: StokesNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of friction and inertia forces for particles in a fluid or in a plasma, expressed by `Stk = t_r/t_a`, where `t_r` is relaxation time (ISO 80000-12) of particles to achieve fluid’s velocity due to friction (viscosity), and `t_a` is time (ISO 80000-3) of fluid to alter its velocity under external influence + * remarks: In most cases `t_r = l/v`, where `l` is characteristic length, and `v` is speed of fluid. The characteristic length can be the diameter of an obstacle or hole. + */ + } + attribute stokesNumber: StokesNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.33 Stokes number */ + attribute def StokesNumberForVibratingParticlesValue :> DimensionOneValue { + doc + /* + * source: item 11-4.33 Stokes number + * symbol(s): `Stk_1` + * application domain: vibrating particles + * name: StokesNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of friction and inertia forces for the special case of particles vibrating in a fluid or plasma, expressed by `Stk_1 = ν/(d^2*f)`, where `ν` is kinematic viscosity (ISO 80000-4) of the fluid or plasma, `d` is diameter (ISO 80000-3) of particle, and `f` is frequency (ISO 80000-3) of particle vibrations + * remarks: Sometimes the inverse of this number is wrongly used. + */ + } + attribute stokesNumberForVibratingParticles: StokesNumberForVibratingParticlesValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.34 Stokes number, power coefficient */ + attribute def StokesNumberForRotameterValue :> DimensionOneValue { + doc + /* + * source: item 11-4.34 Stokes number, power coefficient + * symbol(s): `Stk_2` + * application domain: rotameter + * name: StokesNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: Stokes number for calibration of rotameters metering vertical flows of fluids by means of a floating body, expressed by `Stk_2 = (r^3*g*m*ρ)/(η^2) * (ρ_b-ρ)/(ρ_b) = (r^3*g*m)/ν^2 * (1/ρ-1/ρ_b)`, where `r` is ratio of pipe and float radii, `g` is acceleration of free fall (ISO 80000-3), `m` is mass (ISO 80000-4) of the body, `ρ` is mass density (ISO 80000-4) of the fluid, `η` is dynamic viscosity (ISO 80000-4) of the fluid, `ρ_b` is mass density (ISO 80000-4) of the body, and `ν` is kinematic viscosity (ISO 80000-4) of the fluid + * remarks: In general use, this value is multiplied by 1,042. See also the Archimedes number (item 11-6.12). + */ + } + attribute stokesNumberForRotameter: StokesNumberForRotameterValue :> scalarQuantities; + + alias powerCoefficient for stokesNumber; + + /* ISO-80000-11 item 11-4.35 Stokes number */ + attribute def StokesNumberForGravityValue :> DimensionOneValue { + doc + /* + * source: item 11-4.35 Stokes number + * symbol(s): `Stk_3` + * application domain: gravity + * name: StokesNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between viscous forces and gravity forces for particles falling in a fluid, expressed by `Stk_3 = (v*ν)/(g*l^2)`, where `v` is characteristic speed (ISO 80000-3) of particles, `ν` is kinematic viscosity (ISO 80000-4) of the fluid, `g` is acceleration of free fall (ISO 80000-3), and `l` is length (ISO 80000-3) of fall + * remarks: None. + */ + } + attribute stokesNumberForGravity: StokesNumberForGravityValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.36 Stokes number */ + attribute def StokesNumberForDragValue :> DimensionOneValue { + doc + /* + * source: item 11-4.36 Stokes number + * symbol(s): `Stk_4` + * application domain: drag + * name: StokesNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of drag force and internal friction forces for particles dragged in a fluid `Stk_4 = F_D/(η*v*l)`, where `F_D` is drag force (ISO 80000-4), `η` is dynamic viscosity (ISO 80000-4), `v` is speed (ISO 80000-3), and `l` is characteristic length (ISO 80000-3) + * remarks: None. + */ + } + attribute stokesNumberForDrag: StokesNumberForDragValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.37 Laplace number, Suratman number */ + attribute def LaplaceNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.37 Laplace number, Suratman number + * symbol(s): `La`, `Su` + * application domain: generic + * name: LaplaceNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between capillary forces and viscous forces when characterizing free surface flow, expressed by `La = Su = (γ*ρ*l)/η^2`, where `γ` is surface tension (ISO 80000-4), `ρ` is mass density (ISO 80000-4) of the fluid, `l` is characteristic length (ISO 80000-3), and `η` is dynamic viscosity (ISO 80000-4) of the fluid + * remarks: The Laplace number is also the ratio of surface tension to momentum transfer, especially dissipation, inside a fluid. The Laplace number is also given by `La = Su = 1/(Oh)^2 = (Re)^2/(We)`, where `Oh` is the Ohnesorge number (item 11-7.4), `Re` is the Reynolds number (item 11-4.1), and `We` is the Weber number (item 11-4.5). + */ + } + attribute laplaceNumber: LaplaceNumberValue :> scalarQuantities; + + alias suratmanNumber for laplaceNumber; + + /* ISO-80000-11 item 11-4.38 Blake number */ + attribute def BlakeNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.38 Blake number + * symbol(s): `Bl` + * application domain: generic + * name: BlakeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertial forces and viscous forces in a porous material, expressed by `Bl = (v*ρ*l)/(η*(1-ε))`, where `v` is speed (ISO 80000-3) of the fluid, `ρ` is mass density (ISO 80000-4) of the fluid, `l` is characteristic length (ISO 80000-3) defined as the volume of a particle divided by its surface area, `η` is dynamic viscosity (ISO 80000-4) of the fluid, and `ε` is porosity of the material (=void fraction) + * remarks: The Blake number can be interpreted as a Reynolds number for flow in porous material. + */ + } + attribute blakeNumber: BlakeNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.39 Sommerfeld number */ + attribute def SommerfeldNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.39 Sommerfeld number + * symbol(s): `So`, `Sm` + * application domain: generic + * name: SommerfeldNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between viscous force and load force in a lubrication boundary, expressed by `So = (η*n)/p*(r/c)^2`, where `η` is dynamic viscosity (ISO 80000-4) of the lubricant, `n` is rotational frequency (ISO 80000-3), `p` is mean bearing pressure (ISO 80000-4), `r` is radius (ISO 80000-3) of the shaft, and `c` is radial distance (ISO 80000-3) between rotating shaft and annulus + * remarks: Sometimes the inverse of this number is wrongly used. + */ + } + attribute sommerfeldNumber: SommerfeldNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.40 Taylor number */ + attribute def TaylorNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.40 Taylor number + * symbol(s): `Ta` + * application domain: momentum transfer + * name: TaylorNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between centrifugal force and viscous force of a rotating shaft, expressed by `Ta = (4*ω^2*l^4)/ν^2`, where `ω` is angular velocity (ISO 80000-3) of rotation, `l` is length (ISO 80000-3) perpendicular to the rotation axis, and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: Sometimes the square root of this quantity is wrongly used. The Taylor number for a rotating shaft relative to an annulus is given by `Ta_a = (ω/nu)^2*r*a^3`, where `ω` is angular velocity (ISO 80000-3) of the shaft, `nu` is kinematic viscosity (ISO 80000-4), `r = (r_2+r_1)/2` is mean radius (ISO 80000-3) of the annulus, and `a = (r_2 - r_1)` is width of the annulus, where `r_1` is inner radius of the annulus, and `r_2` is outer radius of the annulus. Sometimes the square root of this quantity is used; this use is deprecated. + */ + } + attribute taylorNumber: TaylorNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.41 Galilei number */ + attribute def GalileiNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.41 Galilei number + * symbol(s): `Ga` + * application domain: generic + * name: GalileiNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between gravitational force and viscous force in fluid films flowing over walls, expressed by `Ga = (g*l^3)/ν^2`, where `g` is acceleration of free fall (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `ν` is kinematic viscosity (ISO 80000-4) of the fluid + * remarks: The Galilei number is also given by `Ga = Re^2*Ri` or `Ga = {:Re:}^2/{:Fr:}^2`, where `Re` is the Reynolds number (item 11-4.1), `Ri` is the Richardson number (item 11-4.30), and `Fr` is the Froude number (item 11-4.3). + */ + } + attribute galileiNumber: GalileiNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-4.42 Womersley number */ + attribute def WomersleyNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-4.42 Womersley number + * symbol(s): `Wo`, `α` + * application domain: generic + * name: WomersleyNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertial forces and viscous forces in oscillating flows of fluids in pipes, expressed by `Wo = R*sqrt(ω/ν)`, where `R` is (effective) radius (ISO 80000-3) of the pipe, `ω` is angular frequency (ISO 80000-3) of oscillations, and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: The Womersley number is used for pulsating flows e.g. in blood flow. + */ + } + attribute womersleyNumber: WomersleyNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.1 Fourier number */ + attribute def FourierNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.1 Fourier number + * symbol(s): `Fo` + * application domain: heat transfer + * name: FourierNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat conduction rate and the rate of thermal energy storage in a body for conductive heat transfer into a body, expressed by `Fo = (a*t)/l^2`, where `a` is thermal diffusivity (ISO 80000-5), `t` is time (ISO 80000-3), and `l` is characteristic length (ISO 80000-3) + * remarks: The characteristic length `l` of the body is often defined as the quotient of the body’s volume and its heated surface. Sometimes the reciprocal of this number is wrongly used. + */ + } + attribute fourierNumber: FourierNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.2 Péclet number */ + attribute def 'PécletNumberValue' :> DimensionOneValue { + doc + /* + * source: item 11-5.2 Péclet number + * symbol(s): `Pe` + * application domain: heat transfer + * name: PécletNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between convective heat transfer rate and conductive heat transfer rate, expressed by `Pe = (v*l)/a`, where `v` is speed (ISO 80000-3), `l` is length (ISO 80000-3) in the direction of heat transfer, and `a` is thermal diffusivity (ISO 80000-5) + * remarks: The thermal Péclet number is also given by `Pe = Re*Pr`, where `Re` is the Reynolds number (item 11-4.1), and `Pr` is the Prandtl number (item 11-7.1). Compare with item 11-6.2, Péclet number for mass transfer. + */ + } + attribute 'pécletNumber': 'PécletNumberValue' :> scalarQuantities; + + /* ISO-80000-11 item 11-5.3 Rayleigh number */ + attribute def RayleighNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.3 Rayleigh number + * symbol(s): `Ra` + * application domain: generic + * name: RayleighNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between buoyancy forces due to thermal expansion and viscous forces in free convection in buoyancy driven flow near a heated surface perpendicular to the gravity force, expressed by `Ra = (l^3*g*α_V*ΔT)/(ν*a)`, where `l` is distance (ISO 80000-3) from the wall, `g` is acceleration of free fall (ISO 80000-3), `α_V` is cubic expansion coefficient (ISO 80000-5) of the fluid, `ΔT` is difference of thermodynamic temperature (ISO 80000-5) between surface of the wall and the fluid far away from the wall, `ν` is kinematic viscosity (ISO 80000-4) of the fluid, and `a` is thermal diffusivity (ISO 80000-5) of the fluid + * remarks: The Rayleigh number is also given by `Ra = Gr*Pr`, where `Gr` is the Grashof number (item 11-4.4), and `Pr` is the Prandtl number (item 11-7.1). + */ + } + attribute rayleighNumber: RayleighNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.4 Froude number */ + attribute def FroudeNumberForHeatTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-5.4 Froude number + * symbol(s): `Fr^"*"` + * application domain: heat transfer + * name: FroudeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of gravitational forces and thermodiffusion forces for heat transfer in forced convection of fluids, expressed by `Fr^"*" = (g*l^3)/a^2`, where `g` is acceleration of free fall (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `a` is thermal diffusivity (ISO 80000-5)" + * remarks: None. + */ + } + attribute froudeNumberForHeatTransfer: FroudeNumberForHeatTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.5 Nusselt number */ + attribute def NusseltNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.5 Nusselt number + * symbol(s): `Nu` + * application domain: heat transfer + * name: NusseltNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between the internal thermal resistance of a body and its surface thermal resistance in a body transferring heat from a surface into its interior or vice versa, expressed by `Nu = (K*l)/λ = (K*l)/(a*ρ*c_p)`, where `K` is coefficient of heat transfer (ISO 80000-5) through the surface, `l` is length (ISO 80000-3) of the body in direction of heat flow, `λ` is thermal conductivity (ISO 80000-5) of the surface, `a` is thermal diffusivity (ISO 80000-5), `ρ` is mass density (ISO 80000-4), and `c_p` is specific heat capacity at constant pressure (ISO 80000-5) + * remarks: The body under consideration can be a solid body, a fluid, or their combination, and additional heat transfer due to convective motion can occur. In case of merely conductive heat transfer especially in a solid body, the "Biot number for heat transfer" (item 11-5.6) is used. + */ + } + attribute nusseltNumber: NusseltNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.6 Biot number */ + attribute def BiotNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.6 Biot number + * symbol(s): `Bi` + * application domain: heat transfer + * name: BiotNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: special case of the Nusselt number for heat transfer (item 11-5.5) in case of conductive heat transfer in a solid body, expressed by `Bi = (K*l)/λ`, where `K` is coefficient of heat transfer (ISO 80000-5) through the surface, `l` is characteristic length (ISO 80000-3), and `λ` is thermal conductivity (ISO 80000-5) of the body + * remarks: The characteristic length is commonly defined as the volume of the body divided by its surface area. + */ + } + attribute biotNumber: BiotNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.7 Stanton number */ + attribute def StantonNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.7 Stanton number + * symbol(s): `St` + * application domain: heat transfer + * name: StantonNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat transfer into a fluid from a surface and its heat transfer by convection, expressed by `St = K/(ρ*v*c_p)`, where `K` is coefficient of heat transfer (ISO 80000-5) through the surface, `ρ` is mass density (ISO 80000-4), `v` is speed (ISO 80000-3), and `c_p` is specific heat capacity at constant pressure (ISO 80000-5) of the fluid + * remarks: The Stanton number is also given by `St = (Nu)/(Re*Pr) = (Nu)/(Pe)`, where `Nu` is Nusselt number for heat transfer (item 11-5.5), `Re` is the Reynolds number (item 11-4.1), `Pr` is the Prandtl number (item 11-7.1), and Pe is the Péclet number (item 11-5.2). Sometimes this quantity is called Margoulis number, symbol `Ms` or `Mg`. + */ + } + attribute stantonNumber: StantonNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.8 j-factor, heat transfer factor, Colburn number */ + attribute def JFactorValue :> DimensionOneValue { + doc + /* + * source: item 11-5.8 j-factor, heat transfer factor, Colburn number + * symbol(s): `j`, `Co`, `Jq` + * application domain: heat transfer + * name: JFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat transfer and mass transfer in a fluid, expressed by `j = K/(c_p*ρ*v)*((c_p*η)/λ)^(2/3)`, where `K` is coefficient of heat transfer (ISO 80000-5), `c_p` is specific heat capacity at constant pressure (ISO 80000-5), `ρ` is mass density (ISO 80000-4), `v` is speed (ISO 80000-3), `η` is dynamic viscosity (ISO 80000-4), and `λ` is thermal conductivity (ISO 80000-5) + * remarks: The heat transfer factor is also given by `j = St*Pr^(2/3)`, where `St` is the Stanton number for heat transfer (item 11-5.7), and `Pr` is the Prandtl number (item 11-7.1). See also mass transfer factor (item 11-6.7). + */ + } + attribute jFactor: JFactorValue :> scalarQuantities; + + alias heatTransferFactor for jFactor; + + alias colburnNumber for jFactor; + + /* ISO-80000-11 item 11-5.9 Bejan number */ + attribute def BejanNumberForHeatTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-5.9 Bejan number + * symbol(s): `Be_1` + * application domain: heat transfer + * name: BejanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mechanical work and frictional and thermal diffusion energy losses for a forced flow, expressed by `Be_1 = (Δp*l^2)/(η*a)`, where `Δp` is drop of pressure (ISO 80000-4) along a pipe, `l` is length (ISO 80000-3) of the pipe, `η` is dynamic viscosity (ISO 80000-4), and `a` is thermal diffusivity (ISO 80000-5) + * remarks: None. + */ + } + attribute bejanNumberForHeatTransfer: BejanNumberForHeatTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.10 Bejan number */ + attribute def BejanNumberForEntropyValue :> DimensionOneValue { + doc + /* + * source: item 11-5.10 Bejan number + * symbol(s): `Be_S` + * application domain: entropy + * name: BejanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: efficiency of heat transfer by a fluid, expressed by `Be_S = (S(ΔT))/(S(ΔT)+S(Δp))`, where `S(ΔT)` is entropy generation contributed by heat transfer, and `S(Δp)` is entropy generation contributed by fluid friction + * remarks: None. + */ + } + attribute bejanNumberForEntropy: BejanNumberForEntropyValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.11 Stefan number */ + attribute def StefanNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.11 Stefan number + * symbol(s): `Ste`, `Stf` + * application domain: phase transition + * name: StefanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat content and latent heat content in a binary mixture undergoing a phase transition, expressed by `Ste = (c_p*ΔT)/Q`, where `c_p` is specific heat capacity at constant pressure (ISO 80000-5), `ΔT` is difference of thermodynamic temperature T (ISO 80000-5) between the phases, and `Q` is quotient of latent heat of phase transition (ISO 80000-5) and mass (ISO 80000-4) + * remarks: None. + */ + } + attribute stefanNumber: StefanNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.12 Brinkman number */ + attribute def BrinkmanNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.12 Brinkman number + * symbol(s): `Br`, `N_(Br)` + * application domain: generic + * name: BrinkmanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat produced by viscosity and heat conducted from a wall adjacent to a fluid moving relative to it, expressed by `Br = (η*v^2)/(λ*ΔT)`, where `η` is dynamic viscosity (ISO 80000-4), `v` is characteristic speed (ISO 80000-3), `λ` is thermal conductivity (ISO 80000-5), and `ΔT = T_W - T_0` is difference of thermodynamic temperature `T` (ISO 80000-5), where `T_0` is bulk fluid temperature, and `T_W` is wall temperature + * remarks: None. + */ + } + attribute brinkmanNumber: BrinkmanNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.13 Clausius number */ + attribute def ClausiusNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.13 Clausius number + * symbol(s): `Cl` + * application domain: generic + * name: ClausiusNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between energy transfer associated with fluid momentum and energy transfer by thermal conduction in forced heating, expressed by `Cl = (v^3*l*ρ)/(λ*ΔT)`, where `v` is speed (ISO 80000-3), `l` is length (ISO 80000-3) of the path of energy transfer, `ρ` is mass density (ISO 80000-4), `λ` is thermal conductivity (ISO 80000-5), and `ΔT` is difference of thermodynamic temperature `T` (ISO 80000-5) along length `l` + * remarks: None. + */ + } + attribute clausiusNumber: ClausiusNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.14 Carnot number */ + attribute def CarnotNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.14 Carnot number + * symbol(s): `Ca` + * application domain: generic + * name: CarnotNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: theoretical maximum efficiency (ISO 80000-5) of a Carnot cycle operating between temperature reservoirs `Ca = (T_2 - T_1)/T_2`, where `T` is thermodynamic temperature (ISO 80000-5), and `T_2`, `T_1` are the thermodynamic temperatures of a heat source and a heat sink, respectively + * remarks: None. + */ + } + attribute carnotNumber: CarnotNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.15 Eckert number, Dulong number */ + attribute def EckertNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.15 Eckert number, Dulong number + * symbol(s): `Ec` + * application domain: generic + * name: EckertNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between the kinetic energy of a flow and its enthalpy change in fluid dynamics exhibiting dissipation, expressed by `Ec = v^2/(c_p*ΔT)`, where `v` is characteristic speed (ISO 80000-3), `c_p` is specific heat capacity at constant pressure (ISO 80000-5) of the flow, and `ΔT` is difference of thermodynamic temperature `T` (ISO 80000-5) due to dissipation (by friction) + * remarks: None. + */ + } + attribute eckertNumber: EckertNumberValue :> scalarQuantities; + + alias dulongNumber for eckertNumber; + + /* ISO-80000-11 item 11-5.16 Graetz number */ + attribute def GraetzNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.16 Graetz number + * symbol(s): `Gz` + * application domain: heat transfer + * name: GraetzNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat transferred by convection and heat transferred by conduction in a laminar flow in a pipe, expressed by `Gz = (v*d^2)/(a*l)`, where `v` is speed (ISO 80000-3) of the fluid, `d` is diameter (ISO 80000-3) of the pipe, `a` is thermal diffusivity (ISO 80000-5) of the fluid, and `l` is length (ISO 80000-3) of the pipe + * remarks: None. + */ + } + attribute graetzNumber: GraetzNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.17 heat transfer number */ + attribute def HeatTransferNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.17 heat transfer number + * symbol(s): `K_Q` + * application domain: generic + * name: HeatTransferNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat transferred by a flow and its kinetic energy, expressed by `K_Q = Φ/(v^3*l^2*ρ)`, where `Φ` is heat flow rate (ISO 80000-5), `v` is characteristic speed (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `ρ` is mass density (ISO 80000-4) + * remarks: None. + */ + } + attribute heatTransferNumber: HeatTransferNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.18 Pomerantsev number */ + attribute def PomerantsevNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.18 Pomerantsev number + * symbol(s): `Po`, `Pov` + * application domain: heat transfer + * name: PomerantsevNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between heat generated in a body and conducted heat in the body, expressed by `Po = (Q_m*l^2)/(λ*ΔT)`, where `Q_m` is (constant) volumic heat generation rate, `l` is characteristic length (ISO 80000-3), `λ` is thermal conductivity (ISO 80000-5), and `ΔT = T_m - T_0` is difference of thermodynamic temperature (ISO 80000-5) between that of the medium (T_m) and the initial temperature of the body (T_0) + * remarks: Similar numbers are known for areic, lineic and point sources of heat, each with decreasing power of length `l` respectively. + */ + } + attribute pomerantsevNumber: PomerantsevNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.19 Boltzmann number */ + attribute def BoltzmannNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.19 Boltzmann number + * symbol(s): `Bz`, `Bol`, `Bo` + * application domain: generic + * name: BoltzmannNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between convective heat and radiant heat for a fluid in a channel, expressed by `Bz = (ρ*v*c_p)/(ε*σ*T^3)`, where `ρ` is mass density (ISO 80000-4) of the fluid, `v` is characteristic speed (ISO 80000-3) of the fluid, `c_p` is specific heat capacity at constant pressure (ISO 80000-5), `ε` is emissivity (ISO 80000-7), `σ` is the Stefan-Boltzmann constant (ISO 80000-7), and `T` is thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + attribute boltzmannNumber: BoltzmannNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-5.20 Stark number */ + attribute def StarkNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-5.20 Stark number + * symbol(s): `Sk` + * application domain: generic + * name: StarkNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between radiant heat and conductive heat multiplied by the relative temperature difference for a body, expressed by `Sk = (ε*σ*T^3*l)/λ`, where `ε` is emissivity (ISO 80000-7) of the surface, `σ` is the Stefan-Boltzmann constant (ISO 80000-7), `T` is thermodynamic temperature (ISO 80000-5), `l` is characteristic length (ISO 80000-3), and `λ` is thermal conductivity (ISO 80000-5) + * remarks: The relative temperature difference is defined by `(ΔT)/T`, where `ΔT = T_s - T_l` is the difference of the temperature at the surface, `T_s`, and the temperature at a layer at a distance `l` from the surface, `T_l`. Sometimes this characteristic number is wrongly defined without the factor `ε`. Deprecated names are: Stefan number and Biot radiation number. + */ + } + attribute starkNumber: StarkNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.1 Fourier number */ + attribute def FourierNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.1 Fourier number + * symbol(s): `Fo^"*"` + * application domain: mass transfer + * name: FourierNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between diffusive mass transfer within a given duration and mass storage rate in transient mass transfer, expressed by `Fo^"*" = (D*t)/l^2`, where `D` is diffusion coefficient (ISO 80000-9), `t` is duration (ISO 80000-3) of observation, and `l` is length (ISO 80000-3) of transfer" + * remarks: The Fourier number for mass transfer is also given by `Fo^*" = (Fo)/(Le)`, where `Fo` is the Fourier number for heat transfer (item 11-5.1), and `Le` is the Lewis number (item 11-7.3). See also the Fourier number for heat transfer (item 11-5.1)." + */ + } + attribute fourierNumberForMassTransfer: FourierNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.2 Péclet number */ + attribute def 'PécletNumberForMassTransferValue' :> DimensionOneValue { + doc + /* + * source: item 11-6.2 Péclet number + * symbol(s): `Pe^"*"`, `Bd`, `Bod` + * application domain: mass transfer + * name: PécletNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between advective mass transfer rate and longitudinal diffusive mass transfer rate for mass transfer in reactors, expressed by `Pe^*" = (v*l)/D`, where `v` is speed (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `D` is diffusion coefficient (ISO 80000-9)" + * remarks: The Péclet number for mass transfer is also given by `Pe^"*" = Pe*Le = Re*Sc`, where `Pe` is the Péclet number for heat transfer, `Le` is the Lewis number (item 11-7.3), `Re` is the Reynolds number (item 11-4.1), and `Sc` is the Schmidt number (item 11-7.2). Compare with item 11-5.2, the Péclet number for heat transfer. + */ + } + attribute 'pécletNumberForMassTransfer': 'PécletNumberForMassTransferValue' :> scalarQuantities; + + /* ISO-80000-11 item 11-6.3 Grashof number */ + attribute def GrashofNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.3 Grashof number + * symbol(s): `Gr^"*"` + * application domain: mass transfer + * name: GrashofNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between buoyancy forces and viscous forces in natural convection of fluids, expressed by `Gr^"*" = (l^3*g*β*Δx)/ν^2`, where `l` is characteristic length (ISO 80000-3), `g` is acceleration of free fall (ISO 80000-3), `β = -1/ρ*((del ρ)/(del x))_(T,p)`, where `ρ` is mass density (ISO 80000-4) of the fluid, and `x` is amount-of-substance fraction (ISO 80000-9), `Δx` is difference of amount-of-substance fraction (ISO 80000-9) along length `l`, and `ν` is kinematic viscosity (ISO 80000-4)" + * remarks: Instead of "amount-of-substance fraction" the "amount-of-substance concentration" (ISO 80000-9) is used also. Compare with item 11-4.4, the Grashof number. + */ + } + attribute grashofNumberForMassTransfer: GrashofNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.4 Nusselt number */ + attribute def NusseltNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.4 Nusselt number + * symbol(s): `Nu^"*"` + * application domain: mass transfer + * name: NusseltNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between mass flux at an interface and specific flux by pure molecular diffusion in a layer of thickness `l` for mass transfer at the boundary of a fluid, expressed by `Nu^"*" = (k’*l)/(ρ*D)`, where `k’` is mass flux density `q_m/A` through the surface, where `q_m` is mass flow rate (ISO 80000-4), and `A` is area (ISO 80000-3), `l` is thickness (ISO 80000-3), `ρ` is mass density (ISO 80000-4) of the fluid, and `D` is diffusion coefficient (ISO 80000-9)" + * remarks: Sometimes this quantity is called the Sherwood number, `Sh`. Compare with item 11-5.5, Nusselt number for heat transfer. + */ + } + attribute nusseltNumberForMassTransfer: NusseltNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.5 Stanton number */ + attribute def StantonNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.5 Stanton number + * symbol(s): `St^"*"` + * application domain: mass transfer + * name: StantonNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between mass transfer perpendicular to the surface of a fluid flow and mass transfer parallel to the surface in a free surface flow, expressed by `St^"*" = k^"*" + * remarks: The Stanton number for mass transfer is also given by `St^*" = (Nu^"*")/(Pe^"*"*)`, where `Nu^"*"` is the Nusselt number for mass transfer (item 11-6.4), and `Pe^"*"` is the Péclet number for mass transfer (item 11-6.2). Compare with item 11-5.7, the Stanton number for heat transfer." + */ + } + attribute stantonNumberForMassTransfer: StantonNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.6 Graetz number */ + attribute def GraetzNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.6 Graetz number + * symbol(s): `Gz^"*"` + * application domain: mass transfer + * name: GraetzNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of advective mass transfer rate and radial diffusive mass transfer rate for mass transfer in pipes, expressed by `Gz^"*" = (v*d)/D = d/l*Pe^"*"`, where `v` is characteristic speed (ISO 80000-3) of the fluid, `d` is hydraulic diameter (ISO 80000-3) of the pipe, `D` is diffusion coefficient (ISO 80000-9), `l` is length (ISO 80000-3) of the pipe, and `Pe^"*"` is the Péclet number for mass transfer (item 11-6.2)" + * remarks: None. + */ + } + attribute graetzNumberForMassTransfer: GraetzNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.7 mass transfer factor */ + attribute def MassTransferFactorValue :> DimensionOneValue { + doc + /* + * source: item 11-6.7 mass transfer factor + * symbol(s): `j^"*"` + * application domain: mass transfer + * name: MassTransferFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between mass transfer perpendicular to the surface of a fluid and mass transfer parallel to the surface in an open flow of fluids, expressed by `j^*" = k/v * (ν/D)^(2/3)`, where `k` is the mass transfer coefficient through the surface, `k = k^'/ρ`, where `ρ` is mass density (ISO 80000-4), `k^'` is mass flux density `q_m/A` through the surface, where `q_m` is mass flow rate (ISO 80000-4), and `A` is area (ISO 80000-3), `v` is speed (ISO 80000-3), `ν` is kinematic viscosity (ISO 80000-4), and `D` is diffusion coefficient (ISO 80000-9)" + * remarks: The mass transfer factor is also given by `j_m = j^*" = St^"*" * (Sc)^(2/3)` where `St^"*"` is the Stanton number for mass transfer (item 11-6.5), and `Sc` is the Schmidt number (item 11-7.2). See also heat transfer factor (item 11-5.17)." + */ + } + attribute massTransferFactor: MassTransferFactorValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.8 Atwood number */ + attribute def AtwoodNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.8 Atwood number + * symbol(s): `At` + * application domain: generic + * name: AtwoodNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: scaled density difference of heavier and lighter fluids, expressed by `At = (ρ_1 - ρ_2)/(ρ_1 + ρ_2)`, where `ρ_1` is density of heavier fluid, and `ρ_2` is density of lighter fluid + * remarks: The Atwood number is used in the study of hydrodynamic instabilities in density stratified flows. + */ + } + attribute atwoodNumber: AtwoodNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.9 Biot number */ + attribute def BiotNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.9 Biot number + * symbol(s): `Bi^"*"` + * application domain: mass transfer + * name: BiotNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between mass transfer rate at the interface and mass transfer rate in the interior of a body, expressed by `Bi^*" = (k*l)/D_"int"`, where `k` is the mass transfer coefficient through the surface, `k = k^'/ρ`, where `ρ` is mass density (ISO 80000-4), `k^'` is mass flux density `q_m/A` through the surface, where `q_m` is mass flow rate (ISO 80000-4), and `A` is area (ISO 80000-3), `l` is thickness (ISO 80000-3) of layer, and `D_"int"` is diffusion coefficient (ISO 80000-9) at the interface" + * remarks: None. + */ + } + attribute biotNumberForMassTransfer: BiotNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.10 Morton number */ + attribute def MortonNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.10 Morton number + * symbol(s): `Mo` + * application domain: generic + * name: MortonNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of gravitational forces and viscous forces for gas bubbles in a liquid, or liquid drops in a gas, expressed by `Mo = (g*η^4)/(ρ*γ^3)*(ρ_b/ρ - 1)`, where `g` is acceleration of free fall (ISO 80000-3), `η` is dynamic viscosity (ISO 80000-4) of the surrounding fluid, `ρ` is mass density (ISO 80000-4) of the surrounding fluid, `γ` is surface tension (ISO 80000-4) of the interface, and `ρ_b` is mass density (ISO 80000-4) of the bubble or drop + * remarks: The Morton number is used to determine the shape of bubbles or drops. The Morton number is also given by `Mo = We^3*Fr^-2*Re^-4`, where `We` is the Weber number (item 11-4.5), `Fr` is the Froude number (item 11-4.3), and `Re` is the Reynolds number (item 11-4.1). + */ + } + attribute mortonNumber: MortonNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.11 Bond number, Eötvös number */ + attribute def BondNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.11 Bond number, Eötvös number + * symbol(s): `Bo`, `Eo` + * application domain: generic + * name: BondNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of inertial force and capillary force for gas bubbles or liquid drops in a fluid, expressed by `Bo = a/γ * ρ*l^2*(ρ_b/ρ - 1)`, where `a` is the acceleration of the body (ISO 80000-3), mostly acceleration of free fall, `g` (ISO 80000-3), `γ` is surface tension (ISO 80000-4) of the interface, `ρ` is density (ISO 80000-4) of the medium, `l` is characteristic length (ISO 80000-3) (radius of a drop or radius of a capillary tube), and `ρ_b` is mass density (ISO 80000-4) of the drop or bubble + * remarks: In the case of gravity `a = g` acceleration of free fall (ISO 80000-3), the name Eötvös number is mostly used. The Bond number is also given by `Bo = (We)/(Fr)`, where `We` is the Weber number (item 11-4.5), and `Fr` is the Froude number (item11-4.3). The Bond number is also used for capillary action driven by buoyancy. + */ + } + attribute bondNumber: BondNumberValue :> scalarQuantities; + + alias 'eötvösNumber' for bondNumber; + + /* ISO-80000-11 item 11-6.12 Archimedes number */ + attribute def ArchimedesNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.12 Archimedes number + * symbol(s): `Ar` + * application domain: generic + * name: ArchimedesNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of buoyancy forces and viscous forces in fluids motion due to density differences for a body in a fluid, expressed by `Ar = (g*l^3)/v^2*(ρ_b/ρ - 1)`, where `g` is acceleration of free fall (ISO 80000-3), `l` is characteristic length (ISO 80000-3) of the body, `ν` is kinematic viscosity (ISO 80000-4) of the fluid, `ρ_b` is mass density (ISO 80000-4) of the body, and `ρ` is mass density (ISO 80000-4) of the fluid + * remarks: In this definition, the body can be replaced by an immiscible fluid. See also Stokes number (item 11-4.34). + */ + } + attribute archimedesNumber: ArchimedesNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.13 expansion number */ + attribute def ExpansionNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.13 expansion number + * symbol(s): `Ex` + * application domain: generic + * name: ExpansionNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of buoyancy force and inertial force in moving fluids due to density differences for gas bubbles rising in a liquid, expressed by `Ex = (g*d)/v^2*(1-ρ_b/ρ)`, where `g` is acceleration of free fall (ISO 80000-3), `d` is diameter (ISO 80000-3) of bubbles, `v` is speed (ISO 80000-3) of bubbles, `ρ_b` is mass density (ISO 80000-4) of bubbles, and `ρ` is mass density (ISO 80000-4) of the liquid + * remarks: None. + */ + } + attribute expansionNumber: ExpansionNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.14 Marangoni number */ + attribute def MarangoniNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.14 Marangoni number + * symbol(s): `Mg`, `Mar` + * application domain: generic + * name: MarangoniNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of heat transferred by Marangoni convection and heat transferred by thermal diffusivity in thermo-capillary convection of liquid films on a free surface, expressed by `Mg = l*ΔT/(η*a)*((dγ)/(dT))`, where `l` is characteristic thickness (ISO 80000-3) of the film, `ΔT` is difference of thermodynamic temperature `T` (ISO 80000-5) between surface and outer surface of the film, `η` is dynamic viscosity (ISO 80000-4) of the liquid, `a` is thermal diffusivity (ISO 80000-5) of the liquid, and `γ` is surface tension (ISO 80000-4) of the film + * remarks: The Marangoni convection is free surface flow due to different surface tensions caused by a temperature gradient. This quantity is sometimes called Thompson number. + */ + } + attribute marangoniNumber: MarangoniNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.15 Lockhart-Martinelli parameter */ + attribute def LockhartMartinelliParameterValue :> DimensionOneValue { + doc + /* + * source: item 11-6.15 Lockhart-Martinelli parameter + * symbol(s): `Lp` + * application domain: generic + * name: LockhartMartinelliParameter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass flow rates multiplied by the square root of density in a two-phase flow, expressed by `Lp = dot(m)_l/dot(m)_g*sqrt(ρ_m/ρ_l)`, where `dot(m)_l = q_m` is liquid phase mass flow rate (ISO 80000-4), `dot(m)_g` is gas phase mass flow rate, `ρ_g` is gas density (ISO 80000-4), and `ρ_l` is liquid density + * remarks: The Lockhart-Martinelli parameter is used, for example, in boiling or condensing. + */ + } + attribute lockhartMartinelliParameter: LockhartMartinelliParameterValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.16 Bejan number */ + attribute def BejanNumberForMassTransferValue :> DimensionOneValue { + doc + /* + * source: item 11-6.16 Bejan number + * symbol(s): `Be^"*"`, `Be_2` + * application domain: mass transfer + * name: BejanNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mechanical work and frictional and diffusion energy loss in viscous flow of fluids in pipes, expressed by `Be^*" = (Δp*l^2)/(η*D)`, where `Δp` is drop of pressure (ISO 80000-4) along a pipe or channel, `l` is length (ISO 80000-3) of channel, `η` is dynamic viscosity (ISO 80000-4) of the fluid, and `D` is diffusion coefficient (ISO 80000-9), mass diffusivity" + * remarks: A similar quantity exists for heat transfer (item 11-5.9). + */ + } + attribute bejanNumberForMassTransfer: BejanNumberForMassTransferValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.17 cavitation number */ + attribute def CavitationNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.17 cavitation number + * symbol(s): `Ca`, `Cn` + * application domain: generic + * name: CavitationNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the excess of local static head over vapour pressure head and velocity head for fast flow in liquids, expressed by `Ca = (p-p_v)/(1/2*ρ*v^2)`, where `p` is local static pressure (ISO 80000-4), `p_v` is vapour pressure (ISO 80000-4) of the fluid, `ρ` is mass density (ISO 80000-4) of the fluid, and `v` is characteristic speed (ISO 80000-3) of the flow + * remarks: The cavitation number represents the ratio of the excess of local static head over vapour pressure head to velocity head. + */ + } + attribute cavitationNumber: CavitationNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.18 absorption number */ + attribute def AbsorptionNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.18 absorption number + * symbol(s): `Ab` + * application domain: generic + * name: AbsorptionNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between mass flow rate and surface area for gas absorption at wetted walls, expressed by `Ab = k*sqrt((l*d)/(D*q_V))`, where `k` is the mass transfer coefficient through the surface, `k = k^'/ρ`, where `ρ` is mass density (ISO 80000-4), and `k^'` is mass flux density through the surface, `k^' = q_m/A`, where `q_m` is mass flow rate (ISO 80000-4), and `A` is area (ISO 80000-3), `l` is length (ISO 80000-3) of wetted surface, `d` is thickness (ISO 80000-3) of liquid film, `D` is diffusion coefficient (ISO 80000-9), and `q_V` is volume flow rate (ISO 80000-4) per wetted perimeter + * remarks: None. + */ + } + attribute absorptionNumber: AbsorptionNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.19 capillary number */ + attribute def CapillaryNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.19 capillary number + * symbol(s): `Ca` + * application domain: generic + * name: CapillaryNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of gravitational forces and capillary forces for fluids in narrow pipes, expressed by `Ca = (d^2*ρ*g)/γ`, where `d` is diameter (ISO 80000-3) of the pipe, `ρ` is mass density (ISO 80000-4) of the fluid, `g` is acceleration of free fall (ISO 80000-3), and `γ` is surface tension (ISO 80000-4) of the fluid + * remarks: None. + */ + } + attribute capillaryNumber: CapillaryNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-6.20 dynamic capillary number */ + attribute def DynamicCapillaryNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-6.20 dynamic capillary number + * symbol(s): `Ca^"*"`, `Cn` + * application domain: generic + * name: DynamicCapillaryNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of viscous force and capillary force acting across an interface between a liquid and a gas, or between two immiscible liquids for a flow of fluid influenced by interfacial tension, expressed by `Ca^*" = (η*v)/γ`, where `η` is dynamic viscosity (ISO 80000-4) of the fluid, `v` is characteristic speed (ISO 80000-3), and `γ` is surface or interfacial tension (ISO 80000-4)" + * remarks: The dynamic capillary number is also given by the quotient of the Weber number and the Reynolds number. + */ + } + attribute dynamicCapillaryNumber: DynamicCapillaryNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.1 Prandtl number */ + attribute def PrandtlNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.1 Prandtl number + * symbol(s): `Pr` + * application domain: generic + * name: PrandtlNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of kinematic viscosity and thermal diffusivity for a fluid, expressed by `Pr = ν/a`, where `ν` is kinematic viscosity (ISO 80000-4), and `a` is thermal diffusivity (ISO 80000-5) + * remarks: The Prandtl number also represents the quotient of heat produced by viscosity and heat transferred by thermal diffusivity. The mass transfer analogue of the Prandtl number is the Schmidt number (item 11-7.2). The Prandtl number is also given by `Pr = (Pe)/(Re)`; where `Pe` is the Péclet number (item 11-5.2), and `Re` is the Reynolds number (item 11-4.1). + */ + } + attribute prandtlNumber: PrandtlNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.2 Schmidt number */ + attribute def SchmidtNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.2 Schmidt number + * symbol(s): `Sc` + * application domain: generic + * name: SchmidtNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of kinematic viscosity and diffusion coefficient for a fluid, expressed by `Sc = ν/D`, where `ν` is kinematic viscosity (ISO 80000-4), and `D` is diffusion coefficient (ISO 80000-9) + * remarks: The heat transfer analogue of the Schmidt number is the Prandtl number (item 11-7.1). A deprecated name is Colburn number. + */ + } + attribute schmidtNumber: SchmidtNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.3 Lewis number */ + attribute def LewisNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.3 Lewis number + * symbol(s): `Le` + * application domain: generic + * name: LewisNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of thermal diffusivity and diffusion coefficient for heat transfer in a fluid, expressed by `Le = a/D`, where `a` is thermal diffusivity (ISO 80000-5), and `D` is diffusion coefficient (ISO 80000-9) + * remarks: The Lewis number is also given by `Le = (Sc)/(Pr)`, where `Sc` is the Schmidt number (item 11-7.2), and `Pr` is the Prandtl number (item 11-7.1). Compare with item 11-5.2. The Lewis number is sometimes defined as reciprocal of this quantity. + */ + } + attribute lewisNumber: LewisNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.4 Ohnesorge number */ + attribute def OhnesorgeNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.4 Ohnesorge number + * symbol(s): `Oh` + * application domain: generic + * name: OhnesorgeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between viscous force and the square root of the product of inertia force and capillary force for atomization of liquids, expressed by `Oh = η/sqrt(γ*ρ*l)`, where `η` is dynamic viscosity (ISO 80000-4), `γ` is surface tension (ISO 80000-4), `ρ` is mass density (ISO 80000-4), and `l` is characteristic length (ISO 80000-3) + * remarks: The Ohnesorge number is also given by `Oh = sqrt(We)/(Re)` where `We` is the Weber number (item 11-4.5), and `Re` is the Reynolds number (item 11-4.1). See also Laplace number (item 11-4.37). The characteristic length typically is the drop diameter. + */ + } + attribute ohnesorgeNumber: OhnesorgeNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.5 Cauchy number, aeroelasticity parameter */ + attribute def CauchyNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.5 Cauchy number, aeroelasticity parameter + * symbol(s): `Cy` + * application domain: generic + * name: CauchyNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertia forces and compression forces in compressible fluids, expressed by `Cy = `, where `ρ` is mass density (ISO 80000-4), `v` is speed (ISO 80000-3), and `K` is modulus of compression, bulk modulus (ISO 80000-4) + * remarks: None. + */ + } + attribute cauchyNumber: CauchyNumberValue :> scalarQuantities; + + alias aeroelasticityParameter for cauchyNumber; + + /* ISO-80000-11 item 11-7.6 Hooke number */ + attribute def HookeNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.6 Hooke number + * symbol(s): `Ho_2` + * application domain: generic + * name: HookeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertia forces and linear stress forces in elastic fluids, expressed by `Ho_2 = (ρ*v^2)/E`, where `ρ` is mass density (ISO 80000-4), `v` is speed (ISO 80000-3), and `E` is modulus of elasticity (ISO 80000-4) + * remarks: None. + */ + } + attribute hookeNumber: HookeNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.7 Weissenberg number */ + attribute def WeissenbergNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.7 Weissenberg number + * symbol(s): `Wi` + * application domain: generic + * name: WeissenbergNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: product of time derivative of shear rate and relaxation time in viscoelastic flows, expressed by `Wi = dot(γ)*t_r`, where `dot(γ)` is time derivative of shear strain (ISO 80000-4), and `t_r` is relaxation time (ISO 80000-12) + * remarks: The Weissenberg number represents the relative importance of viscous forces when compared to elastic forces. The time derivative of shear strain is sometimes called the shear rate. + */ + } + attribute weissenbergNumber: WeissenbergNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.8 Deborah number */ + attribute def DeborahNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.8 Deborah number + * symbol(s): `De` + * application domain: generic + * name: DeborahNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of relaxation time of viscoelastic fluids and observation duration in rheology of viscoelastic fluids, expressed by `De = t_c/t_p`, where `t_c` is stress relaxation time, and `t_p` is observation duration (ISO 80000-3) + * remarks: The stress relaxation time is sometimes called the Maxwell relaxation time. + */ + } + attribute deborahNumber: DeborahNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.9 Lorentz number */ + attribute def LorentzNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.9 Lorentz number + * symbol(s): `Lo` + * application domain: generic + * name: LorentzNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of electrical conductivity and thermal conductivity, expressed by `Lo = (σ*(ΔU)^2)/(λ*ΔT)`, where `σ` is electrical conductivity (IEC 80000-6), `ΔU` is difference of voltage `U` (ISO 80000-6) between two reference points, `λ` is thermal conductivity (ISO 80000-5), and `ΔT` is difference in thermodynamic temperature `T` (ISO 80000-5) between the reference points + * remarks: None. + */ + } + attribute lorentzNumber: LorentzNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-7.10 compressibility number */ + attribute def CompressibilityNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-7.10 compressibility number + * symbol(s): `Z` + * application domain: generic + * name: CompressibilityNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of isothermal compressibility (ISO 80000-5) of a gas and that of an ideal gas, expressed by `Z = p/(ρ*R_s*T)`, where `p` is pressure (ISO 80000-4), `ρ` is mass density (ISO 80000-4), `R_s` is specific gas constant (ISO 80000-5), and `T` is thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + attribute compressibilityNumber: CompressibilityNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.1 Reynolds magnetic number */ + attribute def ReynoldsMagneticNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.1 Reynolds magnetic number + * symbol(s): `Rm` + * application domain: generic + * name: ReynoldsMagneticNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertial force and magneto-dynamic viscous force in an electrically conducting fluid, expressed by `Rm = v*l*μ*σ = (v*l)/ν_m`, where `v` is speed (ISO 80000-3) of the fluid, `l` is characteristic length (ISO 80000-3), `μ` is magnetic permeability (IEC 80000-6), `σ` is electrical conductivity (IEC 80000-6), and `ν_m = 1/(μ*σ)` is magnetic viscosity (magnetic diffusivity) + * remarks: This number is also called magnetic Reynolds number. The Reynolds magnetic number is also given by `Rm = Re*Pr_m`, where `Re` is the Reynolds number (item 11-4.1), and `Pr_m` is the Prandtl magnetic number (item 11-8.10). + */ + } + attribute reynoldsMagneticNumber: ReynoldsMagneticNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.2 Batchelor number */ + attribute def BatchelorNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.2 Batchelor number + * symbol(s): `Bt` + * application domain: generic + * name: BatchelorNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between inertia and magneto-dynamic diffusion in an electrically conducting liquid, expressed by `Bt = (v*l*σ*μ)/(ε_r*μ_r)`, where `v` is speed (ISO 80000-3), `l` is characteristic length (ISO 80000-3), `σ` is electrical conductivity (IEC 80000-6), `μ` is magnetic permeability (IEC 80000-6), `ε_r` is relative permittivity (IEC 80000-6), and `μ_r` is relative permeability (IEC 80000-6) + * remarks: None. + */ + } + attribute batchelorNumber: BatchelorNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.3 Nusselt electric number */ + attribute def NusseltElectricNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.3 Nusselt electric number + * symbol(s): `Ne` + * application domain: generic + * name: NusseltElectricNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between convective current and diffusive current of ions in electrochemistry, expressed by `Ne = (v*l)/D^*"`, where `v` is speed (ISO 80000-3), `l` is characteristic length (ISO 80000-3), and `D^"*" = D^"+" + D^"-"`, where `D^"+"`, `D^"-"` are diffusion coefficients (ISO 80000-9) of positive or negative ions respectively" + * remarks: This number is also called electric Nusselt number. Sometimes this quantity is called the Reynolds electric number. + */ + } + attribute nusseltElectricNumber: NusseltElectricNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.4 Alfvén number, Mach magnetic number, Kárman number */ + attribute def 'AlfvénNumberValue' :> DimensionOneValue { + doc + /* + * source: item 11-8.4 Alfvén number, Mach magnetic number, Kárman number + * symbol(s): `Al` + * application domain: generic + * name: AlfvénNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between speed of a plasma and the Alfvén wave speed, expressed by `Al = v/(B/sqrt(ρ*μ))`, where `v` is speed (ISO 80000-3), `B` is magnetic flux density (IEC 80000-6), `ρ` is mass density (ISO 80000-4), and `μ` is magnetic permeability (IEC 80000-6) + * remarks: Often, the inverse of this number is wrongly used. The name "Alfvén Mach number" is used in investigations on the solar wind. The quantity `v_A = B/sqrt(ρ*μ)` is called Alfvén wave speed, where `B` is magnetic flux density (IEC 80000-6), `ρ` is mass density (ISO 80000-4), and `μ` is magnetic permeability (IEC 80000-6). + */ + } + attribute 'alfvénNumber': 'AlfvénNumberValue' :> scalarQuantities; + + alias machMagneticNumber for 'alfvénNumber'; + + alias 'kármanNumber' for 'alfvénNumber'; + + /* ISO-80000-11 item 11-8.5 Hartmann number */ + attribute def HartmannNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.5 Hartmann number + * symbol(s): `Ha` + * application domain: generic + * name: HartmannNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between magnetically induced stress and hydrodynamic shear stress in an electrically conducting fluid, expressed by `Ha = B*l*sqrt(σ/η)`, where `B` is magnetic flux density (IEC 80000-6), `l` is characteristic length (ISO 80000-3), `σ` is electrical conductivity (IEC 80000-6), and `η` is dynamic viscosity (ISO 80000-4) + * remarks: The Hartmann number represents also the ratio of magnetic force to viscous force. + */ + } + attribute hartmannNumber: HartmannNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.6 Cowling number, Euler magnetic number */ + attribute def CowlingNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.6 Cowling number, Euler magnetic number + * symbol(s): `Co` + * application domain: magnetism + * name: CowlingNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of magnetic and kinematic energy density in a plasma, expressed by `Co = B^2/(μ*ρ*v^2)`, where `B` is magnetic flux density (IEC 80000-6), `μ` is magnetic permeability (IEC 80000-6), `ρ` is mass density (ISO 80000-4), and `v` is speed (ISO 80000-3) + * remarks: The Cowling number also represents the ratio of magnetic to dynamic pressure. This quantity is equal to the square of the inverse of the Alfvén number. This quantity is often called the second Cowling number, `Co_2`. The first Cowling number is then defined as `Co_1 = Co*Rm`, where `Rm` is the Reynolds magnetic number (item 11-8.1). + */ + } + attribute cowlingNumber: CowlingNumberValue :> scalarQuantities; + + alias eulerMagneticNumber for cowlingNumber; + + /* ISO-80000-11 item 11-8.7 Stuart electrical number */ + attribute def StuartElectricalNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.7 Stuart electrical number + * symbol(s): `Se` + * application domain: generic + * name: StuartElectricalNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of electric energy density and kinematic energy density in a plasma, expressed by `Se = (ε*E^2)/(ρ*v^2)`, where `ε` is electric permittivity (IEC 80000-6), E is electric field strength (IEC 80000-6), ρ is mass density (ISO 80000-4), and `v` is speed (ISO 80000-3) + * remarks: The Stuart electrical number is the electrical counterpart of the Cowling number (item 11-8.6). + */ + } + attribute stuartElectricalNumber: StuartElectricalNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.8 magnetic pressure number */ + attribute def MagneticPressureNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.8 magnetic pressure number + * symbol(s): `N_(mp)` + * application domain: generic + * name: MagneticPressureNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of gas pressure and magnetic pressure in a gas or plasma, expressed by `N_(mp) = p*(2*μ)/B^2`, where `p` is pressure (ISO 80000-4), `μ` is magnetic permeability (IEC 80000-6), and `B` is magnetic flux density (IEC 80000-6) + * remarks: The quantity `p_m = B^2/(2*μ)` is called magnetic pressure, where `B` is magnetic flux density (IEC 80000-6), and `μ` is magnetic permeability (IEC 80000-6). + */ + } + attribute magneticPressureNumber: MagneticPressureNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.9 Chandrasekhar number */ + attribute def ChandrasekharNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.9 Chandrasekhar number + * symbol(s): `Q`, `Ch` + * application domain: generic + * name: ChandrasekharNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of Lorentz force and viscous force in magnetic convection in a fluid, expressed by `Q = ((B*l)^2*σ)/(ρ*ν)`, where `B` is magnetic flux density (IEC 80000-6), `l` is characteristic length (ISO 80000-3), a length scale of the system, `σ` is electrical conductivity (IEC 80000-6), `ρ` is mass density (ISO 80000-4), and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: The Chandrasekhar number is also given by `Q = Ha^2` where `Ha` is the Hartmann number (item 11-8.5). + */ + } + attribute chandrasekharNumber: ChandrasekharNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.10 Prandtl magnetic number */ + attribute def PrandtlMagneticNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.10 Prandtl magnetic number + * symbol(s): `Pr_m` + * application domain: generic + * name: PrandtlMagneticNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of kinematic viscosity and magnetic viscosity in an electrically conducting liquid, expressed by `Pr_m = ν*σ*μ`, where `ν` is kinematic viscosity (ISO 80000-4), `σ` is electrical conductivity (IEC 80000-6), and `μ` is magnetic permeability (IEC 80000-6) + * remarks: The quantity `ν_m = 1/(μ*σ)` is called magnetic viscosity or magnetic diffusivity. See item 11-8.11. The Prandtl magnetic number is also given by `Pr_m = (Rm)/(Re)`, where `Rm` is the Reynolds magnetic number (item 11-8.1), and `Re` is the Reynolds number (item 11-4.1). This number is also called magnetic Prandtl number. + */ + } + attribute prandtlMagneticNumber: PrandtlMagneticNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.11 Roberts number */ + attribute def RobertsNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.11 Roberts number + * symbol(s): `Ro` + * application domain: generic + * name: RobertsNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of thermal diffusivity and magnetic viscosity in an electrically conducting liquid, expressed by `Ro = a*σ*μ`, where `a` is thermal diffusivity (ISO 80000-5), `σ` is electrical conductivity (IEC 80000-6), and `μ` is magnetic permeability (IEC 80000-6) + * remarks: The quantity `ν_m = 1/(μ*σ)` is called magnetic viscosity or magnetic diffusivity; where `μ` is magnetic permeability (IEC 80000-6), and `σ` is electrical conductivity (IEC 80000-6). + */ + } + attribute robertsNumber: RobertsNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.12 Stuart number */ + attribute def StuartNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.12 Stuart number + * symbol(s): `Stw` + * application domain: generic + * name: StuartNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of magnetic forces and inertia forces in an electrically conducting liquid, expressed by `Stw = (B^2*l*σ)/(v*ρ)`, where `B` is magnetic flux density (IEC 80000-6), `l` is characteristic length (ISO 80000-3), `σ` is electrical conductivity (IEC 80000-6), `v` is characteristic speed (ISO 80000-3), and `ρ` is mass density (ISO 80000-4) + * remarks: The Stuart number sometimes is called magnetic force parameter. Sometimes the square root is wrongly used. The Stuart number is also given by `Stw = (Ha^2)/(Re)`, where `Ha` is the Hartmann number, and `Re` is the Reynolds number. + */ + } + attribute stuartNumber: StuartNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.13 magnetic number */ + attribute def MagneticNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.13 magnetic number + * symbol(s): `N_(mg)` + * application domain: generic + * name: MagneticNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of magnetic forces and viscous forces in an electrically conducting fluid, expressed by `N_(mg) = B*sqrt((l*σ)/(η*v))`, where `B` is magnetic flux density (IEC 80000-6), `l` is characteristic length (ISO 80000-3), `σ` is electrical conductivity (IEC 80000-6), `η` is dynamic viscosity (ISO 80000-4), and `v` is speed (ISO 80000-3) + * remarks: None. + */ + } + attribute magneticNumber: MagneticNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.14 electric field parameter */ + attribute def ElectricFieldParameterValue :> DimensionOneValue { + doc + /* + * source: item 11-8.14 electric field parameter + * symbol(s): `Ef` + * application domain: generic + * name: ElectricFieldParameter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of Coulomb force and Lorentz force on moving electrically charged material or particles, expressed by `Ef = E/(v*B)`, where `E` is electric field strength (IEC 80000-6), `v` is speed (ISO 80000-3), and `B` is magnetic flux density (IEC 80000-6) + * remarks: None. + */ + } + attribute electricFieldParameter: ElectricFieldParameterValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.15 Hall number */ + attribute def HallNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.15 Hall number + * symbol(s): `Hc`, `CH` + * application domain: generic + * name: HallNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of gyro frequency and collision frequency in a plasma, expressed by `H_c = (ω_c*λ)/(2*π*v)`, where `ω_c` is cyclotron angular frequency (ISO 80000-10), `λ` is mean free path (ISO 80000-9), and `v` is average speed (ISO 80000-3) + * remarks: Sometimes the inverse of this number is wrongly used. `2*π` times this quantity is called the Hall parameter. + */ + } + attribute hallNumber: HallNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.16 Lundquist number */ + attribute def LundquistNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.16 Lundquist number + * symbol(s): `Lu` + * application domain: generic + * name: LundquistNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of Alfvén speed and magneto-dynamic speed in a plasma, expressed by `Lu = B*l*σ*sqrt(μ/ρ)`, where `B` is magnetic flux density (IEC 80000-6), `l` is characteristic length (ISO 80000-3), `σ` is electrical conductivity (IEC 80000-6), `μ` is magnetic permeability (IEC 80000-6), and `ρ` is mass density (ISO 80000-4) + * remarks: The quantity `v_A = B/sqrt(ρ*μ)` is called Alfvén wave speed. See item 11-8.4. The quantity `v_m = 1/(l*σ*μ)` is called magneto dynamic speed, where `l` is characteristic length (ISO 80000-3), `σ` is electrical conductivity (IEC 80000-6), and `μ` is magnetic permeability (IEC 80000-6). The Lundquist number is also given by `Lu = (Rm)/(Al)`, where `Rm` is the Reynolds magnetic number (item 11-8.1), and `Al` is the Alfvén number (item 11-8.4). See also Hartmann number (item 11-8.5). + */ + } + attribute lundquistNumber: LundquistNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.17 Joule magnetic number */ + attribute def JouleMagneticNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.17 Joule magnetic number + * symbol(s): `Jo_m` + * application domain: generic + * name: JouleMagneticNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of Joule heating energy and magnetic field energy in a plasma, expressed by `Jo_m = (2*ρ*μ*c_p*ΔT)/B^2`, where `ρ` is mass density (ISO 80000-4), `μ` is magnetic permeability (IEC 80000-6), `c_p` is specific heat capacity at constant pressure (ISO 80000-5), `T` is thermodynamic temperature (ISO 80000-5), and `B` is magnetic flux density (IEC 80000-6) + * remarks: This number is also called magnetic Joule number. + */ + } + attribute jouleMagneticNumber: JouleMagneticNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.18 Grashof magnetic number */ + attribute def GrashofMagneticNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.18 Grashof magnetic number + * symbol(s): `Gr_m` + * application domain: generic + * name: GrashofMagneticNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: mathematical expression for the heat transfer by free thermo-magnetic convection of a paramagnetic fluid under gravity, `Gr_m = (4*π*σ_e*μ_e*g*α_V*ΔT*l^3)/ν`, where `σ_e` is electrical conductivity (IEC 80000-6), `μ_e` is magnetic permeability (IEC 80000-6), `g` is acceleration of free fall (ISO 80000-3), `α_V` is cubic expansion coefficient (ISO 80000-5), `ΔT = T_S - T_∞` is difference of thermodynamic temperature `T` (ISO 80000-5), where `T_S` is surface temperature and `T_∞` is bulk temperature, `l` is characteristic length (ISO 80000-3), and `ν` is kinematic viscosity (ISO 80000-4) + * remarks: This number is also called magnetic Grashof number. See also Grashof number (item 11-4.4). + */ + } + attribute grashofMagneticNumber: GrashofMagneticNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.19 Naze number */ + attribute def NazeNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.19 Naze number + * symbol(s): `Na` + * application domain: generic + * name: NazeNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of velocity of Alfvén waves and velocity of sound in a plasma, expressed by `Na = B/(c*sqrt(ρ*μ))`, where `B` is magnetic flux density (IEC 80000-6), `c` is speed of sound (ISO 80000-8), `ρ` is mass density (ISO 80000-4), and `μ` is magnetic permeability (IEC 80000-6) + * remarks: The quantity `v_A = B/sqrt(ρ*μ)` is called Alfvén wave speed. See item 11-8.4. + */ + } + attribute nazeNumber: NazeNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.20 Reynolds electric number */ + attribute def ReynoldsElectricNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-8.20 Reynolds electric number + * symbol(s): `Re_e` + * application domain: generic + * name: ReynoldsElectricNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of speed of a fluid and average drift speed of the charged particles in an electrically conducting fluid, expressed by `Re_e = (v*ε_e)/(ρ_e*l*μ)`, where `v` is characteristic speed (ISO 80000-3) of the fluid, `ε_e` is electric permittivity (IEC 80000-6), `ρ_e` is electric charge density (IEC 80000-6), `l` is characteristic length (ISO 80000-3), and `μ` is mobility (ISO 80000-10) of charge carriers + * remarks: This number is also called electrical Reynolds number. The drift speed of the charged particles in an electric field is given by `v_d = 1/(μ*E)`, where `E` is electric field strength (IEC 80000-6), and `μ` is mobility (ISO 80000-10) of charge carriers. + */ + } + attribute reynoldsElectricNumber: ReynoldsElectricNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-8.21 Ampère number */ + attribute def 'AmpèreNumberValue' :> DimensionOneValue { + doc + /* + * source: item 11-8.21 Ampère number + * symbol(s): `Am` + * application domain: generic + * name: AmpèreNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: relation between electric surface current and magnetic field strength in an electrically conducting liquid, expressed by `Am = I_A/(l*H)`, where `I_A` is electric surface current, `l` is characteristic length (ISO 80000-3), and `H` is magnetic field strength (IEC 80000-6) + * remarks: This number is also called magnetic field number. The electric surface current is given by `I_A = ρ_A*l*µ*E`, where `ρ_A` is surface density of electric charge (IEC 80000-6), `l` is characteristic length (ISO 80000-3), `µ` is mobility (ISO 80000-10) of charge carriers, and `E` is electric field strength (IEC 80000-6). + */ + } + attribute 'ampèreNumber': 'AmpèreNumberValue' :> scalarQuantities; + + /* ISO-80000-11 item 11-9.1 Arrhenius number */ + attribute def ArrheniusNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-9.1 Arrhenius number + * symbol(s): `α` + * application domain: generic + * name: ArrheniusNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of chemical activation energy and thermal energy; in a chemical reaction it is the exponential factor of the reaction rate constant, `k`, expressed by `k ~ exp(α)`, with `α = E_0/(R*T)`, where `E_0` is activation energy (ISO 80000-5), `R` is molar gas constant (ISO 80000-9), and `T` is thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + attribute arrheniusNumber: ArrheniusNumberValue :> scalarQuantities; + + /* ISO-80000-11 item 11-9.2 Landau-Ginzburg number */ + attribute def LandauGinzburgNumberValue :> DimensionOneValue { + doc + /* + * source: item 11-9.2 Landau-Ginzburg number + * symbol(s): `κ` + * application domain: generic + * name: LandauGinzburgNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of penetration depth of a magnetic field into a superconductor and the coherence length of thermodynamic fluctuations within a superconducting phase in a material at zero thermodynamic temperature, expressed by `κ = λ_L/(ξ*sqrt(2))`, where `λ_L` is London penetration depth (ISO 80000-12), and `ξ` is coherence length (ISO 80000-12) + * remarks: None. + */ + } + attribute landauGinzburgNumber: LandauGinzburgNumberValue :> scalarQuantities; + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml new file mode 100644 index 00000000..deeb4056 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml @@ -0,0 +1,1353 @@ +standard library package ISQChemistryMolecular { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-9:2019 "Physical chemistry and molecular physics" + * see also https://www.iso.org/standard/64979.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQSpaceTime::AngularMeasureValue; + private import ISQThermodynamics::EnergyValue; + + /* ISO-80000-9 item 9-1 number of entities */ + attribute numberOfEntities: CountValue :> scalarQuantities { + doc + /* + * source: item 9-1 number of entities + * symbol(s): `N(X)`, `N_X` + * application domain: generic + * name: NumberOfEntities (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of elementary entities of kind `X` in a system + * remarks: The elementary entities must be specified and can be atoms, molecules, ions, electrons, other particle, or a specified group of such particles. It is important to always give a precise specification of the entity involved; this should preferably be done by the empirical chemical formula of the material involved. + */ + } + + /* ISO-80000-9 item 9-2 amount of substance, number of moles */ + /* See package ISQBase for the declarations of AmountOfSubstanceValue and AmountOfSubstanceUnit */ + + alias NumberOfMolesUnit for AmountOfSubstanceUnit; + alias NumberOfMolesValue for AmountOfSubstanceValue; + alias numberOfMoles for amountOfSubstance; + + /* ISO-80000-9 item 9-3 relative atomic mass */ + attribute def RelativeAtomicMassValue :> DimensionOneValue { + doc + /* + * source: item 9-3 relative atomic mass + * symbol(s): `A_r(X)` + * application domain: generic + * name: RelativeAtomicMass (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the average mass (ISO 80000-4) of atom `X` and the unified atomic mass (ISO 80000-10) + * remarks: A similar quantity "relative molecular mass" can be defined for molecules. EXAMPLE `A_r(Cl) ~~ 35.453` `A_r(CO_2) ~~ 44` The relative atomic or relative molecular mass depends on the nuclidic composition. The International Union of Pure and Applied Chemistry (IUPAC) accepts the use of the special names "atomic weight" and "molecular weight" for the quantities "relative atomic mass" and "relative molecular mass", respectively. The use of these traditional names is deprecated. + */ + } + attribute relativeAtomicMass: RelativeAtomicMassValue :> scalarQuantities; + + /* ISO-80000-9 item 9-4 molar mass */ + attribute def MolarMassValue :> ScalarQuantityValue { + doc + /* + * source: item 9-4 molar mass + * symbol(s): `M(X)` + * application domain: generic + * name: MolarMass + * quantity dimension: M^1*N^-1 + * measurement unit(s): g/mol, kg*mol^-1 + * tensor order: 0 + * definition: for a pure substance `X`, quotient of mass `m(X)` (ISO 80000-4) and amount `n` of substance (item 9-2): `M = m/n` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarMassUnit[1]; + } + + attribute molarMass: MolarMassValue[*] nonunique :> scalarQuantities; + + attribute def MolarMassUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-5 molar volume */ + attribute def MolarVolumeValue :> ScalarQuantityValue { + doc + /* + * source: item 9-5 molar volume + * symbol(s): `V_m` + * application domain: generic + * name: MolarVolume + * quantity dimension: L^3*N^-1 + * measurement unit(s): m^3*mol^-1 + * tensor order: 0 + * definition: for a pure substance, quotient of its volume `V` (ISO 80000-3) and amount `n` of substance (item 9-2): `V_m = V/n` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarVolumeUnit[1]; + } + + attribute molarVolume: MolarVolumeValue[*] nonunique :> scalarQuantities; + + attribute def MolarVolumeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-6.1 molar internal energy */ + attribute def MolarInternalEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 9-6.1 molar internal energy + * symbol(s): `U_m` + * application domain: generic + * name: MolarInternalEnergy + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: quotient of internal energy `U` (ISO 80000-5) and amount `n` of substance (item 9-2): `U_m = U/n` + * remarks: Molar quantities are normally only used with reference to pure substances. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarInternalEnergyUnit[1]; + } + + attribute molarInternalEnergy: MolarInternalEnergyValue[*] nonunique :> scalarQuantities; + + attribute def MolarInternalEnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-6.2 molar enthalpy */ + attribute def MolarEnthalpyValue :> ScalarQuantityValue { + doc + /* + * source: item 9-6.2 molar enthalpy + * symbol(s): `H_m` + * application domain: generic + * name: MolarEnthalpy + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: quotient of enthalpy `H` (ISO 80000-5) and amount `n` of substance (item 9-2): `H_m = H/n` + * remarks: Molar quantities are normally only used with reference to pure substances. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarEnthalpyUnit[1]; + } + + attribute molarEnthalpy: MolarEnthalpyValue[*] nonunique :> scalarQuantities; + + attribute def MolarEnthalpyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-6.3 molar Helmholtz energy */ + attribute def MolarHelmholtzEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 9-6.3 molar Helmholtz energy + * symbol(s): `F_m` + * application domain: generic + * name: MolarHelmholtzEnergy + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: quotient of the Helmholtz energy `F` (ISO 80000-5) and amount `n` of substance (item 9-2): `F_m = F/n` + * remarks: Molar quantities are normally only used with reference to pure substances. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarHelmholtzEnergyUnit[1]; + } + + attribute molarHelmholtzEnergy: MolarHelmholtzEnergyValue[*] nonunique :> scalarQuantities; + + attribute def MolarHelmholtzEnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-6.4 molar Gibbs energy */ + attribute def MolarGibbsEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 9-6.4 molar Gibbs energy + * symbol(s): `G_m` + * application domain: generic + * name: MolarGibbsEnergy + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: quotient of the Gibbs energy `G` (ISO 80000-5) and amount `n` of substance (item 9-2): `G_m = G/n` + * remarks: Molar quantities are normally only used with reference to pure substances. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarGibbsEnergyUnit[1]; + } + + attribute molarGibbsEnergy: MolarGibbsEnergyValue[*] nonunique :> scalarQuantities; + + attribute def MolarGibbsEnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-7 molar heat capacity */ + attribute def MolarHeatCapacityValue :> ScalarQuantityValue { + doc + /* + * source: item 9-7 molar heat capacity + * symbol(s): `C_m` + * application domain: generic + * name: MolarHeatCapacity + * quantity dimension: L^2*M^1*T^-2*Θ^-1*N^-1 + * measurement unit(s): J/(mol*K), kg*m^2*s^-2*K^-1*mol^-1 + * tensor order: 0 + * definition: quotient of heat capacity `C` (ISO 80000-5) and amount of substance `n` (item 9-2): `C_m = C/n` + * remarks: Conditions (constant pressure or volume etc.) must be specified. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarHeatCapacityUnit[1]; + } + + attribute molarHeatCapacity: MolarHeatCapacityValue[*] nonunique :> scalarQuantities; + + attribute def MolarHeatCapacityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-8 molar entropy */ + attribute def MolarEntropyValue :> ScalarQuantityValue { + doc + /* + * source: item 9-8 molar entropy + * symbol(s): `S_m` + * application domain: generic + * name: MolarEntropy + * quantity dimension: L^2*M^1*T^-2*Θ^-1*N^-1 + * measurement unit(s): J/(mol*K), kg*m^2*s^-2*K^-1*mol^-1 + * tensor order: 0 + * definition: quotient of entropy `S` (ISO 80000-5) and amount `n` of substance (item 9-2): `S_m = S/n` + * remarks: Conditions (constant pressure or volume etc.) must be specified. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarEntropyUnit[1]; + } + + attribute molarEntropy: MolarEntropyValue[*] nonunique :> scalarQuantities; + + attribute def MolarEntropyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-9.1 particle concentration */ + attribute def ParticleConcentrationValue :> ScalarQuantityValue { + doc + /* + * source: item 9-9.1 particle concentration + * symbol(s): `n`, `(C)` + * application domain: generic + * name: ParticleConcentration + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of number `N` of particles (item 9-1) and volume `V `(ISO 80000-3): `n = N/V` + * remarks: The term "number density" is also used. + */ + attribute :>> num: Real; + attribute :>> mRef: ParticleConcentrationUnit[1]; + } + + attribute particleConcentration: ParticleConcentrationValue[*] nonunique :> scalarQuantities; + + attribute def ParticleConcentrationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-9 item 9-9.2 molecular concentration */ + attribute molecularConcentration: ParticleConcentrationValue :> scalarQuantities { + doc + /* + * source: item 9-9.2 molecular concentration + * symbol(s): `C(X)`, `C_X` + * application domain: generic + * name: MolecularConcentration (specializes ParticleConcentration) + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: for substance `X` in a mixture, quotient of number `N_X` of molecules of substance `X` and volume `V` (ISO 80000-3) of the mixture: `C_X = N_X/V` + * remarks: None. + */ + } + + /* ISO-80000-9 item 9-10 mass concentration */ + attribute def MassConcentrationValue :> ScalarQuantityValue { + doc + /* + * source: item 9-10 mass concentration + * symbol(s): `γ_X`, `(ρ_X)` + * application domain: generic + * name: MassConcentration + * quantity dimension: L^-3*M^1 + * measurement unit(s): g/l, kg*m^-3 + * tensor order: 0 + * definition: for substance `X` in a mixture, quotient of mass `m_X` (ISO 80000-4) of substance `X` and volume `V` (ISO 80000-3) of the mixture: `γ_X = m_X/V` + * remarks: Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre. + */ + attribute :>> num: Real; + attribute :>> mRef: MassConcentrationUnit[1]; + } + + attribute massConcentration: MassConcentrationValue[*] nonunique :> scalarQuantities; + + attribute def MassConcentrationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-9 item 9-11 mass fraction */ + attribute def MassFractionValue :> DimensionOneValue { + doc + /* + * source: item 9-11 mass fraction + * symbol(s): `w_X` + * application domain: generic + * name: MassFraction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for substance `X` in a mixture, quotient of mass `m_X` (ISO 80000-4) of substance `X` and total mass `m` of the mixture: `w_X = m_X/m` + * remarks: None. + */ + } + attribute massFraction: MassFractionValue :> scalarQuantities; + + /* ISO-80000-9 item 9-12.1 amount-of-substance concentration */ + attribute def AmountOfSubstanceConcentrationValue :> ScalarQuantityValue { + doc + /* + * source: item 9-12.1 amount-of-substance concentration + * symbol(s): `c_X` + * application domain: generic + * name: AmountOfSubstanceConcentration + * quantity dimension: L^-3*N^1 + * measurement unit(s): mol/l, mol*m^-3 + * tensor order: 0 + * definition: for substance `X` in a mixture, quotient of amount `n_X` of substance (item 9-2) of `X` and volume `V` (ISO 80000-3) of the mixture: `c_X = n_X/V` + * remarks: In chemistry, the name "amount-of-substance concentration" is generally abbreviated to the single word "concentration", it being assumed that the adjective "amount-of-substance" is intended. For this reason, however, the word "mass" should never be omitted from the name "mass concentration" in item 9-10. Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre. + */ + attribute :>> num: Real; + attribute :>> mRef: AmountOfSubstanceConcentrationUnit[1]; + } + + attribute amountOfSubstanceConcentration: AmountOfSubstanceConcentrationValue[*] nonunique :> scalarQuantities; + + attribute def AmountOfSubstanceConcentrationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-12.2 standard amount-of-substance concentration */ + attribute standardAmountOfSubstanceConcentration: AmountOfSubstanceConcentrationValue :> scalarQuantities { + doc + /* + * source: item 9-12.2 standard amount-of-substance concentration + * symbol(s): `c^!(X)` + * application domain: generic + * name: StandardAmountOfSubstanceConcentration (specializes AmountOfSubstanceConcentration) + * quantity dimension: L^-3*N^1 + * measurement unit(s): mol/l, mol*m^-3 + * tensor order: 0 + * definition: for substance `X`, one mole per litre + * remarks: Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre. + */ + } + + /* ISO-80000-9 item 9-13 amount-of-substance fraction mole fraction */ + attribute def AmountOfSubstanceFractionMoleFractionValue :> DimensionOneValue { + doc + /* + * source: item 9-13 amount-of-substance fraction mole fraction + * symbol(s): `x_X`, `y_X` + * application domain: generic + * name: AmountOfSubstanceFractionMoleFraction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for substance `X` in a mixture, quotient of amount of substance `n_X` (item 9-2) of `X` and total amount `n` of substance (item 9-2) in the mixture: `x_X = n_X/n` + * remarks: For condensed phases, `x_X` is used, and for gaseous mixtures `y_X` may be used. The unsystematic name "mole fraction" is still used. However, the use of this name is deprecated. For this quantity, the entity used to define the amount of substance should always be a single molecule for every species in the mixture. + */ + } + attribute amountOfSubstanceFractionMoleFraction: AmountOfSubstanceFractionMoleFractionValue :> scalarQuantities; + + /* ISO-80000-9 item 9-14 volume fraction */ + attribute def VolumeFractionValue :> ScalarQuantityValue { + doc + /* + * source: item 9-14 volume fraction + * symbol(s): `φ_X` + * application domain: generic + * name: VolumeFraction + * quantity dimension: 1 + * measurement unit(s): ml/l, 1 + * tensor order: 0 + * definition: for substance `X`, quotient of product of amount of substance fraction `x_X` (item 9-13) of `X` and molar volume `V_(m,X)` (item 9-5) of the pure substance `X` at the same temperature (ISO 80000-5) and pressure (ISO 80000-4), and sum over all substances `i` of products of amount-of-substance fractions `x_i` (item 9-13) of substance `i` and their molar volumes `V_(m,i)` (item 9-5): `φ_X = (x_X V_(m,X))/(sum_i x_i V_(m,i))` + * remarks: Generally, the volume fraction is temperature dependent. Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre. + */ + attribute :>> num: Real; + attribute :>> mRef: VolumeFractionUnit[1]; + } + + attribute volumeFraction: VolumeFractionValue[*] nonunique :> scalarQuantities; + + attribute def VolumeFractionUnit :> DimensionOneUnit { + } + + /* ISO-80000-9 item 9-15 molality */ + attribute def MolalityValue :> ScalarQuantityValue { + doc + /* + * source: item 9-15 molality + * symbol(s): `b_B`, `m_B` + * application domain: generic + * name: Molality + * quantity dimension: M^-1*N^1 + * measurement unit(s): mol/kg + * tensor order: 0 + * definition: quotient of amount of substance (item 9-2) of solute `B` and mass `m_A` (ISO 80000-4) of the solvent substance `A`: `b_B = n_B/m_A` + * remarks: The alternative symbol `m_B` should be avoided in situations where it might be mistaken for the mass of substance B. However, the symbol `m_B` is much more commonly used than the symbol `b_B` for molality, despite the possible confusion with mass. + */ + attribute :>> num: Real; + attribute :>> mRef: MolalityUnit[1]; + } + + attribute molality: MolalityValue[*] nonunique :> scalarQuantities; + + attribute def MolalityUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-16 latent heat of phase transition, enthalpy of phase transition */ + attribute latentHeatOfPhaseTransition: EnergyValue :> scalarQuantities { + doc + /* + * source: item 9-16 latent heat of phase transition, enthalpy of phase transition + * symbol(s): `C_"pt"` + * application domain: generic + * name: LatentHeatOfPhaseTransition (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: energy (ISO 80000-5) necessary to be added or subtracted isothermally and isobarically to a system to completely undergo the phase transition + * remarks: Mostly, molar or specific quantity is used and phase transition is expressed explicitly, e.g. molar latent heat of evaporation. The subscript "pt" is the qualifier for the phase transition, which may be changed to e.g. "l-g". The term "enthalpy of phase transition" is mainly used in theory. + */ + } + + alias enthalpyOfPhaseTransition for latentHeatOfPhaseTransition; + + /* ISO-80000-9 item 9-17 chemical potential */ + attribute def ChemicalPotentialValue :> ScalarQuantityValue { + doc + /* + * source: item 9-17 chemical potential + * symbol(s): `μ_X` + * application domain: chemistry + * name: ChemicalPotential + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: partial derivative of the Gibbs energy (ISO 80000-5) with respect to amount `n_X` of substance `X` (item 9-2) at constant temperature `T` (ISO 80000-5) and pressure `p `(ISO 80000-4): `μ_X = ((del G)/(del n_X))_(T,p)` + * remarks: For a pure substance, where `G_m` is the molar Gibbs energy. In a mixture, `μ_B` is the partial molar Gibbs energy. In condensed matter physics, the chemical potential of electrons is energy. + */ + attribute :>> num: Real; + attribute :>> mRef: ChemicalPotentialUnit[1]; + } + + attribute chemicalPotential: ChemicalPotentialValue[*] nonunique :> scalarQuantities; + + attribute def ChemicalPotentialUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-18 absolute activity */ + attribute def AbsoluteActivityValue :> DimensionOneValue { + doc + /* + * source: item 9-18 absolute activity + * symbol(s): `λ_X` + * application domain: generic + * name: AbsoluteActivity (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for substance `X`, exponential of quotient of chemical potential `μ_X` of substance `B` (item 9-17), and product of molar gas constant `R` (item 9-37.1) and thermodynamic temperature `T` (ISO 80000-5): `λ_X = exp(μ_X/(RT))` + * remarks: None. + */ + } + attribute absoluteActivity: AbsoluteActivityValue :> scalarQuantities; + + /* ISO-80000-9 item 9-19 partial pressure */ + attribute def PartialPressureValue :> ScalarQuantityValue { + doc + /* + * source: item 9-19 partial pressure + * symbol(s): `p_X` + * application domain: generic + * name: PartialPressure + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, kg*m^-1*s^-2 + * tensor order: 0 + * definition: for substance `X` in a gaseous mixture, product of amount-of-substance fraction `y_X` of substance X (item 9-13) and total pressure `p` (ISO 80000-4): `p_X = y_X p` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: PartialPressureUnit[1]; + } + + attribute partialPressure: PartialPressureValue[*] nonunique :> scalarQuantities; + + attribute def PartialPressureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-9 item 9-20 fugacity */ + attribute def FugacityValue :> ScalarQuantityValue { + doc + /* + * source: item 9-20 fugacity + * symbol(s): `tilde(p)_X` + * application domain: generic + * name: Fugacity + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, kg*m^-1*s^-2 + * tensor order: 0 + * definition: for substance `X`, quantity proportional to the absolute activity, `λ_X` (item 9-18), the proportionality factor, which is a function of temperature (ISO 80000-5) only, being determined by the condition that, at constant temperature and composition, `p_X/tilde(p)_X` tends to 1 for an indefinitely dilute gas + * remarks: `tilde(p)_X = λ_X * lim_(p->0) (p_X/λ_X)` where `p` is total pressure (ISO 80000-4). The IUPAC preferred symbol for fugacity is `f`. + */ + attribute :>> num: Real; + attribute :>> mRef: FugacityUnit[1]; + } + + attribute fugacity: FugacityValue[*] nonunique :> scalarQuantities; + + attribute def FugacityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-9 item 9-21 standard chemical potential */ + attribute def StandardChemicalPotentialValue :> ScalarQuantityValue { + doc + /* + * source: item 9-21 standard chemical potential + * symbol(s): `μ_B^!`, `μ^!` + * application domain: generic + * name: StandardChemicalPotential + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: for substance `B`, value of the chemical potential (item 9-17) at specified standard conditions + * remarks: `μ_B^! = RT ln(λ^!)` where `μ_B^!` is a function of temperature `T` at the standard pressure `p = p^!` The standard chemical potential depends on the choice of standard state, which must be specified. In a liquid or solid solution, the standard state is referenced to the ideal dilute behaviour of the solute (substance `B`). + */ + attribute :>> num: Real; + attribute :>> mRef: StandardChemicalPotentialUnit[1]; + } + + attribute standardChemicalPotential: StandardChemicalPotentialValue[*] nonunique :> scalarQuantities; + + attribute def StandardChemicalPotentialUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-22 activity factor */ + attribute def ActivityFactorValue :> DimensionOneValue { + doc + /* + * source: item 9-22 activity factor + * symbol(s): `f_X` + * application domain: generic + * name: ActivityFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for substance `X` in a liquid or a solid mixture, quotient of absolute activity `λ_X` (item 9-18) of substance `X` and the product of absolute activity `λ_X^"*"` of the pure substance `X` at the same temperature (ISO 80000-5) and pressure (ISO 80000-4) and amount-of-substance fraction `x_X` of substance `X` (item 9-13): `f_X = λ_X/(λ_X^"*" x_X)` + * remarks: The systematic name is "activity factor", but the name "activity coefficient" is also commonly used (see item 9-25). Activity factors can also be obtained applying Raoult’s law or Henry’s law. + */ + } + attribute activityFactor: ActivityFactorValue :> scalarQuantities; + + /* ISO-80000-9 item 9-23 standard absolute activity in mixture */ + attribute def StandardAbsoluteActivityInMixtureValue :> DimensionOneValue { + doc + /* + * source: item 9-23 standard absolute activity in mixture + * symbol(s): `λ_X^!` + * application domain: in a mixture + * name: StandardAbsoluteActivityInMixture (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for substance `X` in a liquid or a solid mixture, absolute activity `λ_X^"*"` (item 9-18) of the pure substance `X` at the same temperature (ISO 80000-5) but at standard pressure (ISO 80000-4) `10^5 ["Pa"]`: `λ_X^! = λ_X"*" (p^!)` + * remarks: This quantity is a function of temperature only. + */ + } + attribute standardAbsoluteActivityInMixture: StandardAbsoluteActivityInMixtureValue :> scalarQuantities; + + /* ISO-80000-9 item 9-24 activity of solute, relative activity of solute */ + attribute def ActivityOfSoluteValue :> DimensionOneValue { + doc + /* + * source: item 9-24 activity of solute, relative activity of solute + * symbol(s): `a_X`, `a_(m,X)` + * application domain: generic + * name: ActivityOfSolute (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for a solute `X` in a solution, quantity proportional to the absolute activity, `λ_X` (item 9-18), the proportionality factor, which is a function of temperature (ISO 80000-5) and pressure (ISO 80000-4) only, being determined by the condition that, at constant temperature and pressure, `a_X` divided by the molality (item 9-15) ratio, `b_X/b^!` tends to 1 at infinite dilution; `b_X` is the molality of solute `X` (item 9-15), and `b^!` is standard molality: `a_X = λ_X * lim_(sum b_X -> 0) (b_X//b^!)/λ_X` + * remarks: The quantity `a_(c,X)` , similarly defined in terms of the concentration ratio `c_X/c^!` , is also called the activity or relative activity of solute `X`; `c^!` is a standard amount-of-substance concentration (item 9-12.2): `a_(c,X) = λ_X * lim_(sum c_X -> 0) (c_X//c^!)/λ_X`, where `sum` denotes summation over all the solute substances. This especially applies to a dilute liquid solution. + */ + } + attribute activityOfSolute: ActivityOfSoluteValue :> scalarQuantities; + + alias relativeActivityOfSolute for activityOfSolute; + + /* ISO-80000-9 item 9-25 activity coefficient */ + attribute def ActivityCoefficientValue :> DimensionOneValue { + doc + /* + * source: item 9-25 activity coefficient + * symbol(s): `γ_B` + * application domain: generic + * name: ActivityCoefficient (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for a solute `B` in a solution, quotient of activity `a_B` of solute `B` (item 9-24), and quotient of the molality (item 9-15) `b_B` of substance `B` and standard molality `b^!`: `γ_B = a_B/(b_B//b^!)` + * remarks: The name "activity coefficient of solute B" is also used for the quantity `γ_B` defined as: `γ_B = a_(c,B)/(c_B//c^!)` See item 9-22. + */ + } + attribute activityCoefficient: ActivityCoefficientValue :> scalarQuantities; + + /* ISO-80000-9 item 9-26 standard absolute activity in solution */ + attribute def StandardAbsoluteActivityInSolutionValue :> DimensionOneValue { + doc + /* + * source: item 9-26 standard absolute activity in solution + * symbol(s): `λ_B^!` + * application domain: in a solution + * name: StandardAbsoluteActivityInSolution (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for a solute `B` in a solution: `λ_B^! = lim_(sum b_B -> 0) [λ_B ((p^!)b^!)/b_B]` where ∑ denotes summation over all solutes, `p^!` is a standard pressure (ISO 80000-4), `b^!` is standard molality, and `b_B` is the molality of substance `B` (item 9-15) + * remarks: This quantity is a function of temperature only. It especially applies to a dilute liquid solution. The standard pressure is `10^5 ["Pa"]`. + */ + } + attribute standardAbsoluteActivityInSolution: StandardAbsoluteActivityInSolutionValue :> scalarQuantities; + + /* ISO-80000-9 item 9-27.1 activity of solvent, relative activity of solvent */ + attribute def ActivityOfSolventValue :> DimensionOneValue { + doc + /* + * source: item 9-27.1 activity of solvent, relative activity of solvent + * symbol(s): `a_A` + * application domain: generic + * name: ActivityOfSolvent (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for the solvent `A` in a solution, quotient of the absolute activity of substance `A`, `λ_A` (item 9-18), and that, `λ_A^"*"` , of the pure solvent at the same temperature (ISO 80000-5) and pressure (ISO 80000-4): `a_A = λ_A/λ_A^"*"` + * remarks: None. + */ + } + attribute activityOfSolvent: ActivityOfSolventValue :> scalarQuantities; + + alias relativeActivityOfSolvent for activityOfSolvent; + + /* ISO-80000-9 item 9-27.2 osmotic factor of solvent, osmotic coefficient of solvent A */ + attribute def OsmoticFactorOfSolventValue :> DimensionOneValue { + doc + /* + * source: item 9-27.2 osmotic factor of solvent, osmotic coefficient of solvent A + * symbol(s): `φ` + * application domain: generic + * name: OsmoticFactorOfSolvent (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by: `φ = -(M_A sum b_B)^-1 ln(a_A)` where `M_A` is the molar mass (item 9-4) of the solvent A, ∑ denotes summation over all the solutes, `b_B` is the molality of solute B (item 9-15), and `a_A` is the activity of solvent A (item 9-27.1) + * remarks: The name "osmotic coefficient" is generally used, although the name "osmotic factor" is more systematic. This concept especially applies to a dilute liquid solution. + */ + } + attribute osmoticFactorOfSolvent: OsmoticFactorOfSolventValue :> scalarQuantities; + + alias osmoticCoefficientOfSolventA for osmoticFactorOfSolvent; + + /* ISO-80000-9 item 9-27.3 standard absolute activity of solvent */ + attribute def StandardAbsoluteActivityOfSolventValue :> DimensionOneValue { + doc + /* + * source: item 9-27.3 standard absolute activity of solvent + * symbol(s): `λ_A^!` + * application domain: in a dilute solution + * name: StandardAbsoluteActivityOfSolvent (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for solvent `A`, standard absolute activity (item 9-23) of the pure substance `A` at the same temperature (ISO 80000-5) and at a standard pressure `p^!` (ISO 80000-4): `λ_A^! = λ_A^"*" p^!` + * remarks: None. + */ + } + attribute standardAbsoluteActivityOfSolvent: StandardAbsoluteActivityOfSolventValue :> scalarQuantities; + + /* ISO-80000-9 item 9-28 osmotic pressure */ + attribute def OsmoticPressureValue :> ScalarQuantityValue { + doc + /* + * source: item 9-28 osmotic pressure + * symbol(s): `Π` + * application domain: generic + * name: OsmoticPressure + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, kg*m^-1*s^-2 + * tensor order: 0 + * definition: excess pressure (ISO 80000-4) required to maintain osmotic equilibrium between a solution and the pure solvent separated by a membrane permeable to the solvent only + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: OsmoticPressureUnit[1]; + } + + attribute osmoticPressure: OsmoticPressureValue[*] nonunique :> scalarQuantities; + + attribute def OsmoticPressureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-9 item 9-29 stoichiometric number of substance */ + attribute def StoichiometricNumberOfSubstanceValue :> DimensionOneValue { + doc + /* + * source: item 9-29 stoichiometric number of substance + * symbol(s): `ν_B` + * application domain: generic + * name: StoichiometricNumberOfSubstance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for substance `B`, an integer number or a simple fraction, being negative for a reactant and positive for a product, occurring in the expression for a chemical reaction: `0 = sum ν_B` where the symbol `B` denotes the reactants and products involved in the reaction + * remarks: EXAMPLE `(1/2)"N"_2 + (3/2)"H"_2 = "N""H"_3` ; `ν("N"_2) = -1/2`, `ν("H"_2) = -3/2`, `ν("N""H"_3) = +1`. + */ + } + attribute stoichiometricNumberOfSubstance: StoichiometricNumberOfSubstanceValue :> scalarQuantities; + + /* ISO-80000-9 item 9-30 affinity of a chemical reaction */ + attribute def AffinityOfAChemicalReactionValue :> ScalarQuantityValue { + doc + /* + * source: item 9-30 affinity of a chemical reaction + * symbol(s): `A` + * application domain: generic + * name: AffinityOfAChemicalReaction + * quantity dimension: L^2*M^1*T^-2*N^-1 + * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1 + * tensor order: 0 + * definition: negative of the sum over all substances `B` of products of stoichiometric number `ν_B` of substance `B` (item 9-29) and chemical potential `μ_B` of substance `B` (item 9-17): `A = -sum ν_B μ_B` + * remarks: The affinity of a reaction is a measure of the "driving force" of the reaction. When it is positive, the reaction goes spontaneously from reactants to products, and when it is negative, the reaction goes in the opposite direction. Another way to write the definition is: `A = ((del G)/(del ξ))_(p,T)` where `G` is Gibbs energy (ISO 80000-5) and `ξ` is the extent of the reaction (item 9-31). Note that `ν_B` is negative for reactants and positive for products. + */ + attribute :>> num: Real; + attribute :>> mRef: AffinityOfAChemicalReactionUnit[1]; + } + + attribute affinityOfAChemicalReaction: AffinityOfAChemicalReactionValue[*] nonunique :> scalarQuantities; + + attribute def AffinityOfAChemicalReactionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-31 extent of reaction */ + attribute extentOfReaction: AmountOfSubstanceValue :> scalarQuantities { + doc + /* + * source: item 9-31 extent of reaction + * symbol(s): `ξ` + * application domain: generic + * name: ExtentOfReaction (specializes AmountOfSubstance) + * quantity dimension: N^1 + * measurement unit(s): mol + * tensor order: 0 + * definition: difference of initial amount `n_(B "in")` of substance `B` (item 9-2) and equilibrium amount `n_(B "eq")` of substance `B` (item 9-2) divided by stoichiometric number `ν_B` of substance `B` (item 9-29): `ξ = (n_(B "eq") - n_(B "in"))/ν_B` + * remarks: See remark to item 9-30. + */ + } + + /* ISO-80000-9 item 9-32 standard equilibrium constant, thermodynamic equilibrium constant */ + attribute def StandardEquilibriumConstantValue :> DimensionOneValue { + doc + /* + * source: item 9-32 standard equilibrium constant, thermodynamic equilibrium constant + * symbol(s): `K^!` + * application domain: generic + * name: StandardEquilibriumConstant (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for a chemical reaction, product for all substances `B` of standard absolute activity `λ_B^!` of substance `B` (item 9-26) in power of minus stoichiometric number `ν_B` of substance `B` (item 9-29): `K^! = prod_B (tilde(a) λ_B^!)^(-ν_B)` + * remarks: This quantity is a function of temperature only. Others depend on temperature, pressure, and composition. One can define in an analogous way an equilibrium constant in terms of fugacity, `K_f`, molality, `K_m`, etc. + */ + } + attribute standardEquilibriumConstant: StandardEquilibriumConstantValue :> scalarQuantities; + + alias thermodynamicEquilibriumConstant for standardEquilibriumConstant; + + /* ISO-80000-9 item 9-33 equilibrium constant on pressure basis */ + attribute def EquilibriumConstantOnPressureBasisValue :> ScalarQuantityValue { + doc + /* + * source: item 9-33 equilibrium constant on pressure basis + * symbol(s): `K_p` + * application domain: pressure basis + * name: EquilibriumConstantOnPressureBasis + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, kg*m^-1*s^-2 + * tensor order: 0 + * definition: for gases, product for all substances `B` of partial pressure `p_B` of substance `B` (item 9-19) in power of its stoichiometric number `ν_B` (item 9-29): `K_p = prod_B (p_B)^(ν_B)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: EquilibriumConstantOnPressureBasisUnit[1]; + } + + attribute equilibriumConstantOnPressureBasis: EquilibriumConstantOnPressureBasisValue[*] nonunique :> scalarQuantities; + + attribute def EquilibriumConstantOnPressureBasisUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-9 item 9-34 equilibrium constant on concentration basis */ + attribute def EquilibriumConstantOnConcentrationBasisValue :> ScalarQuantityValue { + doc + /* + * source: item 9-34 equilibrium constant on concentration basis + * symbol(s): `K_c` + * application domain: concentration basis + * name: EquilibriumConstantOnConcentrationBasis + * quantity dimension: L^-3*N^1 + * measurement unit(s): mol/m^3 + * tensor order: 0 + * definition: for solutions, product for all substances `B` of concentration `c_B` of substance `B` (item 9-9.1) in power of its stoichiometric number `ν_B` (item 9-29): `K_c = prod_B (c_B)^(ν_B)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: EquilibriumConstantOnConcentrationBasisUnit[1]; + } + + attribute equilibriumConstantOnConcentrationBasis: EquilibriumConstantOnConcentrationBasisValue[*] nonunique :> scalarQuantities; + + attribute def EquilibriumConstantOnConcentrationBasisUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-35.1 microcanonical partition function */ + attribute microcanonicalPartitionFunction: CountValue :> scalarQuantities { + doc + /* + * source: item 9-35.1 microcanonical partition function + * symbol(s): `Ω` + * application domain: generic + * name: MicrocanonicalPartitionFunction (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of all quantum states `r` consistent with given energy `E` (ISO 80000-4), volume (ISO 80000-3), and external fields: `Ω = sum_r 1` + * remarks: `S = k ln(Ω)` where `S` is entropy (ISO 80000-5) and `k` is the Boltzmann constant (ISO 80000-1). + */ + } + + /* ISO-80000-9 item 9-35.2 canonical partition function */ + attribute def CanonicalPartitionFunctionValue :> DimensionOneValue { + doc + /* + * source: item 9-35.2 canonical partition function + * symbol(s): `Z` + * application domain: generic + * name: CanonicalPartitionFunction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: sum over quantum states of energy `E_r` (ISO 80000-4), expressed by: `Z = sum_r exp(-E_r/(kT))` where `k` is the Boltzmann constant (ISO 80000-1), and `T` is thermodynamic temperature (ISO 80000-5) + * remarks: `A = -kT ln(Z)` where `A` is Helmholtz energy (ISO 80000-5). + */ + } + attribute canonicalPartitionFunction: CanonicalPartitionFunctionValue :> scalarQuantities; + + /* ISO-80000-9 item 9-35.3 grand-canonical partition function, grand partition function */ + attribute def GrandCanonicalPartitionFunctionValue :> DimensionOneValue { + doc + /* + * source: item 9-35.3 grand-canonical partition function, grand partition function + * symbol(s): `Ξ` + * application domain: generic + * name: GrandCanonicalPartitionFunction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: sum of canonical partition function `Z(N_A,N_B,…)` for the given number of particles `A,B` multiplied by absolute activities (item 9-18) `λ_A, λ_B, ...` of particles `A, B`: `Ξ = sum_(N_A, N_B, ...) Z(N_A, N_B, …) * λ_A^(N_A) * λ_B^(N_B) * ...` + * remarks: `A - sum μ_B n_B = -kT ln(Ξ)` where `A` is Helmholtz energy (ISO 80000-5), `μ_B` is the chemical potential of substance `B`, and `n_B` is the amount of substance `B`. + */ + } + attribute grandCanonicalPartitionFunction: GrandCanonicalPartitionFunctionValue :> scalarQuantities; + + alias grandPartitionFunction for grandCanonicalPartitionFunction; + + /* ISO-80000-9 item 9-35.4 molecular partition function, partition function of a molecule */ + attribute def MolecularPartitionFunctionValue :> DimensionOneValue { + doc + /* + * source: item 9-35.4 molecular partition function, partition function of a molecule + * symbol(s): `q` + * application domain: generic + * name: MolecularPartitionFunction (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by: `q = sum_r exp(-ε_r/(kT))` where `ε_r` is the energy (ISO 80000-5) of the `r`-th level of the molecule consistent with given volume (ISO 80000-3) and external fields, `k` is the Boltzmann constant (ISO 80000-1), and `T` is thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + attribute molecularPartitionFunction: MolecularPartitionFunctionValue :> scalarQuantities; + + alias partitionFunctionOfAMolecule for molecularPartitionFunction; + + /* ISO-80000-9 item 9-36.1 statistical weight of subsystem */ + attribute statisticalWeightOfSubsystem: CountValue :> scalarQuantities { + doc + /* + * source: item 9-36.1 statistical weight of subsystem + * symbol(s): `g` + * application domain: generic + * name: StatisticalWeightOfSubsystem (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of different microstates in a subsystem + * remarks: None. + */ + } + + /* ISO-80000-9 item 9-36.2 degeneracy, multiplicity */ + attribute def DegeneracyValue :> DimensionOneValue { + doc + /* + * source: item 9-36.2 degeneracy, multiplicity + * symbol(s): `g` + * application domain: generic + * name: Degeneracy (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for quantum level, statistical weight of that level + * remarks: If `g = 1`, the level is called non-degenerate. + */ + } + attribute degeneracy: DegeneracyValue :> scalarQuantities; + + alias multiplicity for degeneracy; + + /* ISO-80000-9 item 9-37.1 molar gas constant */ + attribute def MolarGasConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 9-37.1 molar gas constant + * symbol(s): `R` + * application domain: generic + * name: MolarGasConstant + * quantity dimension: L^2*M^1*T^-2*Θ^-1*N^-1 + * measurement unit(s): J/(mol*K), kg*m^2*s^-2*K^-1*mol^-1 + * tensor order: 0 + * definition: product of the Boltzmann constant (ISO 80000-1) and the Avogadro constant (ISO 80000-1) + * remarks: For an ideal gas, `pV_m = RT` + */ + attribute :>> num: Real; + attribute :>> mRef: MolarGasConstantUnit[1]; + } + + attribute molarGasConstant: MolarGasConstantValue[*] nonunique :> scalarQuantities; + + attribute def MolarGasConstantUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-37.2 specific gas constant */ + /* Refer to declaration for SpecificGasConstant in ISQThermodynamics item 5-26 specific gas constant */ + + /* ISO-80000-9 item 9-38 mean free path */ + attribute meanFreePath: LengthValue :> scalarQuantities { + doc + /* + * source: item 9-38 mean free path + * symbol(s): `l`, `λ` + * application domain: chemistry + * name: MeanFreePath (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: for a particle, the average distance `d` (ISO 80000-3) between two successive collisions with other particles + * remarks: None. + */ + } + + /* ISO-80000-9 item 9-39 diffusion coefficient */ + attribute def DiffusionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 9-39 diffusion coefficient + * symbol(s): `D` + * application domain: chemistry + * name: DiffusionCoefficient + * quantity dimension: L^2*T^-1 + * measurement unit(s): m^2*s^-1 + * tensor order: 0 + * definition: proportionality coefficient of local molecular concentration `C_B` (item 9-9.2) of substance `B` in the mixture multiplied by the local average velocity (ISO 80000-3) `v_B` of the molecules of `B`, and minus the gradient of the local molecular concentration `C_B` (item 9-9.2) of substance `B` in the mixture, expressed by: `C_B(v_B) = -D grad C_B` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: DiffusionCoefficientUnit[1]; + } + + attribute diffusionCoefficient: DiffusionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def DiffusionCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-9 item 9-40.1 thermal diffusion ratio */ + attribute def ThermalDiffusionRatioValue :> DimensionOneValue { + doc + /* + * source: item 9-40.1 thermal diffusion ratio + * symbol(s): `k_T` + * application domain: generic + * name: ThermalDiffusionRatio (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: in a steady-state of a binary mixture in which thermal diffusion occurs, proportionality factor between gradient of the amount-of-subsstance fraction `x_B` (item 9-13) of the heavier substance `B`, and negative gradient of the local thermodynamic temperature `T` (ISO 80000-5) divided by that temperature (ISO 80000-5): `grad x_B = -(k_T/T) grad T` + * remarks: None. + */ + } + attribute thermalDiffusionRatio: ThermalDiffusionRatioValue :> scalarQuantities; + + /* ISO-80000-9 item 9-40.2 thermal diffusion factor */ + attribute def ThermalDiffusionFactorValue :> DimensionOneValue { + doc + /* + * source: item 9-40.2 thermal diffusion factor + * symbol(s): `α_T` + * application domain: generic + * name: ThermalDiffusionFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the thermal diffusion ratio `k_T` (item 9-40.1), and the product of the local amount-of-substance fractions `x_A`, `x_B` (item 9-13) of two substances `A` and `B`: `α_T = k_T//(x_A x_B)` + * remarks: None. + */ + } + attribute thermalDiffusionFactor: ThermalDiffusionFactorValue :> scalarQuantities; + + /* ISO-80000-9 item 9-41 thermal diffusion coefficient */ + attribute def ThermalDiffusionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 9-41 thermal diffusion coefficient + * symbol(s): `D_T` + * application domain: generic + * name: ThermalDiffusionCoefficient + * quantity dimension: L^2*T^-1 + * measurement unit(s): m^2*s^-1 + * tensor order: 0 + * definition: product of the thermal diffusion ratio `k_T` (item 9-40.1) and the diffusion coefficient `D` (item 9-39): `D_T = k_T*D` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalDiffusionCoefficientUnit[1]; + } + + attribute thermalDiffusionCoefficient: ThermalDiffusionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def ThermalDiffusionCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-9 item 9-42 ionic strength */ + attribute def IonicStrengthValue :> ScalarQuantityValue { + doc + /* + * source: item 9-42 ionic strength + * symbol(s): `I` + * application domain: generic + * name: IonicStrength + * quantity dimension: M^-1*N^1 + * measurement unit(s): mol*kg^-1 + * tensor order: 0 + * definition: in a sample, one half of the sum of square of the charge number `z_i` (ISO 80000-10) of `i`-th ion multiplied by its molality `b_i` (item 9-15) over any involved ion: `I = 1/2 sum z_i^2 b_i` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: IonicStrengthUnit[1]; + } + + attribute ionicStrength: IonicStrengthValue[*] nonunique :> scalarQuantities; + + attribute def IonicStrengthUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-43 degree of dissociation, dissociation fraction */ + attribute def DegreeOfDissociationValue :> DimensionOneValue { + doc + /* + * source: item 9-43 degree of dissociation, dissociation fraction + * symbol(s): `α` + * application domain: generic + * name: DegreeOfDissociation (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: in a sample, quotient of the number `n_d` of dissociated molecules and the total number `n` of molecules: `α = n_D / n` + * remarks: None. + */ + } + attribute degreeOfDissociation: DegreeOfDissociationValue :> scalarQuantities; + + alias dissociationFraction for degreeOfDissociation; + + /* ISO-80000-9 item 9-44 electrolytic conductivity */ + attribute def ElectrolyticConductivityValue :> ScalarQuantityValue { + doc + /* + * source: item 9-44 electrolytic conductivity + * symbol(s): `κ` + * application domain: generic + * name: ElectrolyticConductivity + * quantity dimension: L^-3*M^-1*T^3*I^2 + * measurement unit(s): S/m, kg^-1*m^-3*s^3*A^2 + * tensor order: 0 + * definition: quotient of the magnitude of electric current density `J` (IEC 80000-6) and the magnitude electric field strength `E` (IEC 80000-6) in an electrolyte: `κ = J/E` + * remarks: For anisotropic media, `κ` is a tensor. In IEC 80000-6 the symbols `σ`, `γ` are used. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectrolyticConductivityUnit[1]; + } + + attribute electrolyticConductivity: ElectrolyticConductivityValue[*] nonunique :> scalarQuantities; + + attribute def ElectrolyticConductivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* ISO-80000-9 item 9-45 molar conductivity */ + attribute def MolarConductivityValue :> ScalarQuantityValue { + doc + /* + * source: item 9-45 molar conductivity + * symbol(s): `Λ_m` + * application domain: generic + * name: MolarConductivity + * quantity dimension: M^-1*T^3*I^2*N^-1 + * measurement unit(s): S*m^2/mol, kg^-1*s^3*A^2*mol^-1 + * tensor order: 0 + * definition: in an electrolyte, quotient of electrolytic conductivity `κ` (item 9-44) and amount-of-substance concentration `c_B` (item 9-12.1): `Λ_m = κ/c_B` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarConductivityUnit[1]; + } + + attribute molarConductivity: MolarConductivityValue[*] nonunique :> scalarQuantities; + + attribute def MolarConductivityUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-46 transport number of the ion B, current fraction of the ion B */ + attribute def TransportNumberOfTheIonBValue :> DimensionOneValue { + doc + /* + * source: item 9-46 transport number of the ion B, current fraction of the ion B + * symbol(s): `t_B` + * application domain: generic + * name: TransportNumberOfTheIonB (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for the ion `B`, quotient of electric current `i_B` (IEC 80000-6) carried by the ion `B` and total electric current `i` (IEC 80000-6) in an electrolyte: `t_B = i_B/i` + * remarks: None. + */ + } + attribute transportNumberOfTheIonB: TransportNumberOfTheIonBValue :> scalarQuantities; + + alias currentFractionOfTheIonB for transportNumberOfTheIonB; + + /* ISO-80000-9 item 9-47 angle of optical rotation */ + attribute angleOfOpticalRotation: AngularMeasureValue :> scalarQuantities { + doc + /* + * source: item 9-47 angle of optical rotation + * symbol(s): `α` + * application domain: generic + * name: AngleOfOpticalRotation (specializes AngularMeasure) + * quantity dimension: 1 + * measurement unit(s): rad + * tensor order: 0 + * definition: angle through which plane-polarized light is rotated clockwise, as seen when facing the light source, in passing through an optically active medium + * remarks: None. + */ + } + + /* ISO-80000-9 item 9-48 molar optical rotatory power */ + attribute def MolarOpticalRotatoryPowerValue :> ScalarQuantityValue { + doc + /* + * source: item 9-48 molar optical rotatory power + * symbol(s): `α_n` + * application domain: generic + * name: MolarOpticalRotatoryPower + * quantity dimension: L^2*N^-1 + * measurement unit(s): rad*m^2/mol, m^2*mol^-1 + * tensor order: 0 + * definition: angle `α` of optical rotation (item 9-47), multiplied by the quotient of cross-sectional area `A` (ISO 80000-3) of a linearly polarized light beam and the amount of substance `n` (item 9-2) of the optically active component in the path of the beam: `α_n = (α A)/n` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarOpticalRotatoryPowerUnit[1]; + } + + attribute molarOpticalRotatoryPower: MolarOpticalRotatoryPowerValue[*] nonunique :> scalarQuantities; + + attribute def MolarOpticalRotatoryPowerUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); } + } + + /* ISO-80000-9 item 9-49 specific optical rotatory power */ + attribute def SpecificOpticalRotatoryPowerValue :> ScalarQuantityValue { + doc + /* + * source: item 9-49 specific optical rotatory power + * symbol(s): `α_m` + * application domain: generic + * name: SpecificOpticalRotatoryPower + * quantity dimension: L^2*M^-1 + * measurement unit(s): rad*m^2/kg, kg^-1*m^2 + * tensor order: 0 + * definition: angle `α` of optical rotation (item 9-47), multiplied by the quotient of cross-sectional area `A` (ISO 80000-3) of a linearly polarized light beam and the mass `m` (ISO 80000-4) of the optically active component in the path of the beam: `α_m = (α A)/m` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificOpticalRotatoryPowerUnit[1]; + } + + attribute specificOpticalRotatoryPower: SpecificOpticalRotatoryPowerValue[*] nonunique :> scalarQuantities; + + attribute def SpecificOpticalRotatoryPowerUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml new file mode 100644 index 00000000..3f46f353 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml @@ -0,0 +1,1223 @@ +standard library package ISQCondensedMatter { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-12:2019 "Condensed matter physics" + * see also https://www.iso.org/standard/63480.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQElectromagnetism::ElectricPotentialDifferenceValue; + private import ISQElectromagnetism::MagneticFluxDensityValue; + private import ISQElectromagnetism::ResistivityValue; + private import ISQSpaceTime::CartesianSpatial3dCoordinateFrame; + private import ISQSpaceTime::AngularFrequencyValue; + private import ISQSpaceTime::AngularMeasureValue; + private import ISQSpaceTime::RepetencyValue; + private import ISQThermodynamics::EnergyValue; + + /* ISO-80000-12 item 12-1.1 lattice vector */ + attribute def CartesianLattice3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-1.1 lattice vector + * symbol(s): `vec(R)` + * application domain: generic + * name: LatticeVector (specializes Displacement) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: translation vector that maps the crystal lattice on itself + * remarks: The non-SI unit ångström (Å) is widely used by x-ray crystallographers and structural chemists. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianLattice3dVector: CartesianLattice3dVector :> vectorQuantities; + + /* ISO-80000-12 item 12-1.2 fundamental lattice vector */ + attribute def CartesianFundamentalLattice3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-1.2 fundamental lattice vector + * symbol(s): `vec(a_1),vec(a_2),vec(a_3)`, `vec(a),vec(b),vec(c)` + * application domain: generic + * name: FundamentalLatticeVector (specializes Displacement) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: fundamental translation vectors for the crystal lattice + * remarks: The lattice vector (item 12-1.1) can be given as `vec(R) = n_1 vec(a_1) + n_2 vec(a_2) + n_3 vec(a_3)` where `n_1`, `n_2` and `n_3` are integers. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianFundamentalLattice3dVector: CartesianFundamentalLattice3dVector :> vectorQuantities; + + /* ISO-80000-12 item 12-2.1 angular reciprocal lattice vector */ + attribute def AngularReciprocalLatticeVectorMagnitudeValue :> ScalarQuantityValue { + doc + /* + * source: item 12-2.1 angular reciprocal lattice vector (magnitude) + * symbol(s): `G` + * application domain: generic + * name: AngularReciprocalLatticeVectorMagnitude + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: vector whose scalar products with all fundamental lattice vectors are integral multiples of `2π` + * remarks: In crystallography, however, the quantity `G/(2π)` is sometimes used. + */ + attribute :>> num: Real; + attribute :>> mRef: AngularReciprocalLatticeVectorMagnitudeUnit[1]; + } + + attribute angularReciprocalLatticeVectorMagnitude: AngularReciprocalLatticeVectorMagnitudeValue[*] nonunique :> scalarQuantities; + + attribute def AngularReciprocalLatticeVectorMagnitudeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + attribute def CartesianAngularReciprocalLattice3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-2.1 angular reciprocal lattice vector + * symbol(s): `vec(G)` + * application domain: generic + * name: AngularReciprocalLatticeVector + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 1 + * definition: vector whose scalar products with all fundamental lattice vectors are integral multiples of `2π` + * remarks: In crystallography, however, the quantity `G/(2π)` is sometimes used. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAngularReciprocalLattice3dCoordinateFrame[1]; + } + + attribute cartesianAngularReciprocalLattice3dVector: CartesianAngularReciprocalLattice3dVector :> vectorQuantities; + + attribute def CartesianAngularReciprocalLattice3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: AngularReciprocalLatticeVectorMagnitudeUnit[3]; + } + + /* ISO-80000-12 item 12-2.2 fundamental reciprocal lattice vector */ + attribute def FundamentalReciprocalLatticeVectorMagnitudeValue :> ScalarQuantityValue { + doc + /* + * source: item 12-2.2 fundamental reciprocal lattice vector (magnitude) + * symbol(s): `b_1,b_2,b_3` + * application domain: generic + * name: FundamentalReciprocalLatticeVectorMagnitude + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: fundamental translation vectors for the reciprocal lattice + * remarks: `vec(a_i) * vec(b_i) = 2π δ_(ij)`. In crystallography, however, the quantities `vec(b_j)/(2π)` are also often used. + */ + attribute :>> num: Real; + attribute :>> mRef: FundamentalReciprocalLatticeVectorMagnitudeUnit[1]; + } + + attribute fundamentalReciprocalLatticeVectorMagnitude: FundamentalReciprocalLatticeVectorMagnitudeValue[*] nonunique :> scalarQuantities; + + attribute def FundamentalReciprocalLatticeVectorMagnitudeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + attribute def CartesianFundamentalReciprocalLattice3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-2.2 fundamental reciprocal lattice vector + * symbol(s): `vec(b_1),vec(b_2),vec(b_3)` + * application domain: generic + * name: FundamentalReciprocalLatticeVector + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 1 + * definition: fundamental translation vectors for the reciprocal lattice + * remarks: `vec(a_i) * vec(b_i) = 2π δ_(ij)`. In crystallography, however, the quantities `vec(b_j)/(2π)` are also often used. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianFundamentalReciprocalLattice3dCoordinateFrame[1]; + } + + attribute cartesianFundamentalReciprocalLattice3dVector: CartesianFundamentalReciprocalLattice3dVector :> vectorQuantities; + + attribute def CartesianFundamentalReciprocalLattice3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: FundamentalReciprocalLatticeVectorMagnitudeUnit[3]; + } + + /* ISO-80000-12 item 12-3 lattice plane spacing */ + attribute latticePlaneSpacing: LengthValue :> scalarQuantities { + doc + /* + * source: item 12-3 lattice plane spacing + * symbol(s): `d` + * application domain: generic + * name: LatticePlaneSpacing (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: distance (ISO 80000-3) between successive lattice planes + * remarks: The non-SI unit ångström (Å) is widely used by x-ray crystallographers and structural chemists. + */ + } + + /* ISO-80000-12 item 12-4 Bragg angle */ + attribute braggAngle: AngularMeasureValue :> scalarQuantities { + doc + /* + * source: item 12-4 Bragg angle + * symbol(s): `ϑ` + * application domain: generic + * name: BraggAngle (specializes AngularMeasure) + * quantity dimension: 1 + * measurement unit(s): °, 1 + * tensor order: 0 + * definition: angle between the scattered ray and the lattice plane + * remarks: Bragg angle `ϑ` is given by `2d sin ϑ = nλ`, where `d` is the lattice plane spacing (item 12-3), `λ` is the wavelength (ISO 80000-7) of the radiation, and `n` is the order of reflexion which is an integer. + */ + } + + /* ISO-80000-12 item 12-5.1 short-range order parameter */ + attribute def ShortRangeOrderParameterValue :> DimensionOneValue { + doc + /* + * source: item 12-5.1 short-range order parameter + * symbol(s): `r`, `σ` + * application domain: generic + * name: ShortRangeOrderParameter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: fraction of nearest-neighbour atom pairs in an Ising ferromagnet having magnetic moments in one direction, minus the fraction having magnetic moments in the opposite direction + * remarks: Similar definitions apply to other order-disorder phenomena. Other symbols are frequently used. + */ + } + attribute shortRangeOrderParameter: ShortRangeOrderParameterValue :> scalarQuantities; + + /* ISO-80000-12 item 12-5.2 long-range order parameter */ + attribute def LongRangeOrderParameterValue :> DimensionOneValue { + doc + /* + * source: item 12-5.2 long-range order parameter + * symbol(s): `R`, `s` + * application domain: generic + * name: LongRangeOrderParameter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: fraction of atoms in an Ising ferromagnet having magnetic moments in one direction, minus the fraction having magnetic moments in the opposite direction + * remarks: Similar definitions apply to other order-disorder phenomena. Other symbols are frequently used. + */ + } + attribute longRangeOrderParameter: LongRangeOrderParameterValue :> scalarQuantities; + + /* ISO-80000-12 item 12-5.3 atomic scattering factor */ + attribute def AtomicScatteringFactorValue :> DimensionOneValue { + doc + /* + * source: item 12-5.3 atomic scattering factor + * symbol(s): `f` + * application domain: generic + * name: AtomicScatteringFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of radiation amplitude scattered by the atom and radiation amplitude scattered by a single electron + * remarks: The atomic scattering factor can be expressed by: `f = E_a/(E_e`, where `E_a` is the radiation amplitude scattered by the atom and `E_e` is the radiation amplitude scattered by a single electron. + */ + } + attribute atomicScatteringFactor: AtomicScatteringFactorValue :> scalarQuantities; + + /* ISO-80000-12 item 12-5.4 structure factor */ + attribute def StructureFactorValue :> DimensionOneValue { + doc + /* + * source: item 12-5.4 structure factor + * symbol(s): `F(h,k,l)` + * application domain: generic + * name: StructureFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by: `F(h,k,l) = sum_(n=1)^N f_n exp[2π i (h x_n + k y_n + l z_n)]`, where `f_n` is the atomic scattering factor (item 12-5.3) for atom `n`, `x_n`, `y_n`, `z_n` are fractional coordinates of its position, `N` is the total number of atoms in the unit cell and `h`, `k`, `l` are the Miller indices + * remarks: For the Miller indices `h`, `k`, `l`, see Annex A. + */ + } + attribute structureFactor: StructureFactorValue :> scalarQuantities; + + /* ISO-80000-12 item 12-6 Burgers vector */ + attribute def CartesianBurgers3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-6 Burgers vector + * symbol(s): `vec(b)` + * application domain: generic + * name: BurgersVector (specializes Displacement) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: closing vector in a sequence of vectors encircling a dislocation + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianBurgers3dVector: CartesianBurgers3dVector :> vectorQuantities; + + /* ISO-80000-12 item 12-7.1 particle position vector */ + attribute def CartesianParticlePosition3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-7.1 particle position vector + * symbol(s): `vec(r)`, `vec(R)` + * application domain: generic + * name: ParticlePositionVector (specializes PositionVector) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: position vector (ISO 80000-3) of a particle + * remarks: Often, `r` is used for electrons and `R` is used for atoms and other heavier particles. + */ + attribute :>> isBound = true; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianParticlePosition3dVector: CartesianParticlePosition3dVector :> vectorQuantities; + + /* ISO-80000-12 item 12-7.2 equilibrium position vector */ + attribute def CartesianEquilibriumPosition3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-7.2 equilibrium position vector + * symbol(s): `vec(R_0)` + * application domain: condensed matter physics + * name: EquilibriumPositionVector (specializes PositionVector) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: position vector (ISO 80000-3) of an ion or atom in equilibrium + * remarks: None. + */ + attribute :>> isBound = true; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianEquilibriumPosition3dVector: CartesianEquilibriumPosition3dVector :> vectorQuantities; + + /* ISO-80000-12 item 12-7.3 displacement vector */ + attribute def CartesianDisplacement3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 12-7.3 displacement vector + * symbol(s): `vec(u)` + * application domain: condensed matter physics + * name: DisplacementVector (specializes Displacement) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: difference between the position vector (ISO 80000-3) of an ion or atom and its position vector in equilibrium + * remarks: The displacement vector can be expressed by: `vec(u) = vec(R) − vec(R_0)`, where `vec(R)` is particle position vector (item 12-7.1) and `vec(R_0)` is position vector of an ion or atom in equilibrium (item 12-7.2). + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1]; + } + + attribute cartesianDisplacement3dVector: CartesianDisplacement3dVector :> vectorQuantities; + + /* ISO-80000-12 item 12-8 Debye-Waller factor */ + attribute def DebyeWallerFactorValue :> DimensionOneValue { + doc + /* + * source: item 12-8 Debye-Waller factor + * symbol(s): `D`, `B` + * application domain: generic + * name: DebyeWallerFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: factor by which the intensity of a diffraction line is reduced because of the lattice vibrations + * remarks: `D` is sometimes expressed as `D = exp(−2W)`; in Mössbauer spectroscopy, it is also called the `f` factor and denoted by `f`. + */ + } + attribute debyeWallerFactor: DebyeWallerFactorValue :> scalarQuantities; + + /* ISO-80000-12 item 12-9.1 angular wavenumber, angular repetency */ + attribute angularWavenumber: RepetencyValue :> scalarQuantities { + doc + /* + * source: item 12-9.1 angular wavenumber, angular repetency + * symbol(s): `k`, `q` + * application domain: condensed matter physics + * name: AngularWavenumber (specializes Repetency) + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: quotient of momentum (ISO 80000-4) and the reduced Planck constant (ISO 80000-1) + * remarks: The corresponding vector (ISO 80000-2) quantity is called wave vector (ISO 80000-3), expressed by: `vec(k) = vec(p)/ħ`, where `vec(p)` is the momentum (ISO 80000-4) of quasi free electrons in an electron gas, and `ħ` is the reduced Planck constant (ISO 80000-1); for phonons, its magnitude is `k = 2π/λ`, where `λ` is the wavelength (ISO 80000-3) of the lattice vibrations. When a distinction is needed between `k` and the symbol for the Boltzmann constant (ISO 80000-1), `k_B` can be used for the latter. When a distinction is needed, `q` should be used for phonons, and `k` for particles such as electrons and neutrons. The method of cut-off must be specified. In condensed matter physics, angular wavenumber is often called wavenumber. + */ + } + + alias angularRepetency for angularWavenumber; + + /* ISO-80000-12 item 12-9.2 Fermi angular wavenumber, Fermi angular repetency */ + attribute fermiAngularWavenumber: RepetencyValue :> scalarQuantities { + doc + /* + * source: item 12-9.2 Fermi angular wavenumber, Fermi angular repetency + * symbol(s): `k_F` + * application domain: generic + * name: FermiAngularWavenumber (specializes Repetency) + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: angular wavenumber (item 12-9.1) of electrons in states on the Fermi sphere + * remarks: In condensed matter physics, angular wavenumber is often called wavenumber. + */ + } + + alias fermiAngularRepetency for fermiAngularWavenumber; + + /* ISO-80000-12 item 12-9.3 Debye angular wavenumber, Debye angular repetency */ + attribute debyeAngularWavenumber: RepetencyValue :> scalarQuantities { + doc + /* + * source: item 12-9.3 Debye angular wavenumber, Debye angular repetency + * symbol(s): `q_D` + * application domain: generic + * name: DebyeAngularWavenumber (specializes Repetency) + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: cut-off angular wavenumber (item 12-9.1) in the Debye model of the vibrational spectrum of a solid + * remarks: The method of cut-off must be specified. In condensed matter physics, angular wavenumber is often called wavenumber. + */ + } + + alias debyeAngularRepetency for debyeAngularWavenumber; + + /* ISO-80000-12 item 12-10 Debye angular frequency */ + attribute debyeAngularFrequency: AngularFrequencyValue :> scalarQuantities { + doc + /* + * source: item 12-10 Debye angular frequency + * symbol(s): `ω_D` + * application domain: generic + * name: DebyeAngularFrequency (specializes AngularFrequency) + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: cut-off angular frequency (ISO 80000-3) in the Debye model of the vibrational spectrum of a solid + * remarks: The method of cut-off must be specified. + */ + } + + /* ISO-80000-12 item 12-11 Debye temperature */ + attribute debyeTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 12-11 Debye temperature + * symbol(s): `Θ_D` + * application domain: generic + * name: DebyeTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: in the Debye model, quantity given by: `Θ_D = ħ*ω_D/k`, where `k` is the Boltzmann constant, (ISO 80000-1), `ħ` is the reduced Planck constant (ISO 80000-1), and `ω_D` is Debye angular frequency (item 12-10) + * remarks: A Debye temperature can also be defined by fitting a Debye model result to a certain quantity, for instance, the heat capacity at a certain temperature. + */ + } + + /* ISO-80000-12 item 12-12 density of vibrational states */ + attribute def DensityOfVibrationalStatesValue :> ScalarQuantityValue { + doc + /* + * source: item 12-12 density of vibrational states + * symbol(s): `g` + * application domain: angular frequency + * name: DensityOfVibrationalStates + * quantity dimension: L^-3*T^1 + * measurement unit(s): m^-3*s + * tensor order: 0 + * definition: quotient of the number of vibrational modes in an infinitesimal interval of angular frequency (ISO 80000-3), and the product of the width of that interval and volume (ISO 80000-3) + * remarks: `g(ω) = n_ω = (dn(ω))/(dω)`, where `n(ω)` is the total number of vibrational modes per volume with angular frequency less than `ω`. The density of states may also be normalized in other ways instead of with respect to volume. See also item 12-16. + */ + attribute :>> num: Real; + attribute :>> mRef: DensityOfVibrationalStatesUnit[1]; + } + + attribute densityOfVibrationalStates: DensityOfVibrationalStatesValue[*] nonunique :> scalarQuantities; + + attribute def DensityOfVibrationalStatesUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-12 item 12-13 thermodynamic Grüneisen parameter */ + attribute def 'ThermodynamicGrüneisenParameterValue' :> DimensionOneValue { + doc + /* + * source: item 12-13 thermodynamic Grüneisen parameter + * symbol(s): `γ_G`, `Γ_G` + * application domain: generic + * name: ThermodynamicGrüneisenParameter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by: `γ_G = (α_V)/(κ_T c_V ρ)`, where `α_V` is cubic expansion coefficient (ISO 80000-5), `κ_T` is isothermal compressibility (ISO 80000-5), `c_V` is specific heat capacity at constant volume (ISO 80000-5), and `ρ` is mass density (ISO 80000-4) + * remarks: None. + */ + } + attribute 'thermodynamicGrüneisenParameter': 'ThermodynamicGrüneisenParameterValue' :> scalarQuantities; + + /* ISO-80000-12 item 12-14 Grüneisen parameter */ + attribute def 'GrüneisenParameterValue' :> DimensionOneValue { + doc + /* + * source: item 12-14 Grüneisen parameter + * symbol(s): `γ` + * application domain: generic + * name: GrüneisenParameter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by minus the partial differential quotient: `γ = -(del ln ω)/(del ln V)`, where `ω` is a lattice vibration frequency (ISO 80000-3), and `V` is volume (ISO 80000-3) + * remarks: `ω` can also refer to an average of the vibrational spectrum, for instance as represented by a Debye angular frequency (item 12-10). + */ + } + attribute 'grüneisenParameter': 'GrüneisenParameterValue' :> scalarQuantities; + + /* ISO-80000-12 item 12-15.1 mean free path of phonons */ + attribute meanFreePathOfPhonons: LengthValue :> scalarQuantities { + doc + /* + * source: item 12-15.1 mean free path of phonons + * symbol(s): `l_p` + * application domain: generic + * name: MeanFreePathOfPhonons (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: average distance (ISO 80000-3) that phonons travel between two successive interactions + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-15.2 mean free path of electrons */ + attribute meanFreePathOfElectrons: LengthValue :> scalarQuantities { + doc + /* + * source: item 12-15.2 mean free path of electrons + * symbol(s): `l_e` + * application domain: generic + * name: MeanFreePathOfElectrons (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: average distance (ISO 80000-3) that electrons travel between two successive interactions + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-16 energy density of states */ + attribute def EnergyDensityOfStatesValue :> ScalarQuantityValue { + doc + /* + * source: item 12-16 energy density of states + * symbol(s): `n_E(E)`, `ρ(E)` + * application domain: generic + * name: EnergyDensityOfStates + * quantity dimension: L^-5*M^-1*T^2 + * measurement unit(s): J^-1*m^-3*eV^-1*m^-3, kg^-1*m^-5*s^2 + * tensor order: 0 + * definition: quantity given by the differential quotient with respect to energy: `n_E(E) = (dn(E))/(dE)`, where `n_E(E)` is the total number of one-electron states per volume (ISO 80000-3) with energy less than `E` (ISO 80000-5) + * remarks: Density of states refers to electrons or other entities, e.g. phonons. It may be normalized in other ways instead of with respect to volume, e.g. with respect to amount of substance. See also item 12-12. + */ + attribute :>> num: Real; + attribute :>> mRef: EnergyDensityOfStatesUnit[1]; + } + + attribute energyDensityOfStates: EnergyDensityOfStatesValue[*] nonunique :> scalarQuantities; + + attribute def EnergyDensityOfStatesUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -5; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-12 item 12-17 residual resistivity */ + attribute residualResistivity: ResistivityValue :> scalarQuantities { + doc + /* + * source: item 12-17 residual resistivity + * symbol(s): `ρ_0` + * application domain: generic + * name: ResidualResistivity (specializes Resistivity) + * quantity dimension: L^3*M^1*T^-3*I^-2 + * measurement unit(s): Ω*m, kg*m^3*s^-3*A^-2 + * tensor order: 0 + * definition: for metals, the resistivity (IEC 80000-6) extrapolated to zero thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-18 Lorenz coefficient */ + attribute def LorenzCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 12-18 Lorenz coefficient + * symbol(s): `L` + * application domain: generic + * name: LorenzCoefficient + * quantity dimension: L^4*M^2*T^-6*I^-2*Θ^-2 + * measurement unit(s): V^2/K^2, kg^2*m^4*s^-6*A^-2*K^-2 + * tensor order: 0 + * definition: quotient of thermal conductivity (ISO 80000-5), and the product of electric conductivity (IEC 80000-6) and thermodynamic temperature (ISO 80000-3) + * remarks: The Lorenz coefficient can be expressed by `L = λ/(σT)`, where `λ` is thermal conductivity (ISO 80000-5), `σ` is electric conductivity (IEC 80000-6), and `T` is thermodynamic temperature (ISO 80000-5). + */ + attribute :>> num: Real; + attribute :>> mRef: LorenzCoefficientUnit[1]; + } + + attribute lorenzCoefficient: LorenzCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def LorenzCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -6; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-12 item 12-19 Hall coefficient */ + attribute def HallCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 12-19 Hall coefficient + * symbol(s): `R_H`, `A_H` + * application domain: generic + * name: HallCoefficient + * quantity dimension: L^3*T^-1*I^-1 + * measurement unit(s): m^3/C, m^3*s^-1*A^-1 + * tensor order: 0 + * definition: in an isotropic conductor, relation between electric field strength, `vec(E)`, (IEC 80000-6) and electric current density, `vec(J)`, (IEC 80000-6) expressed as: `vec(E) = ρ vec(J) + R_H (vec(B) xx vec(J))`, where `ρ` is resistivity (IEC 80000-6), and `vec(B)` is magnetic flux density (IEC 80000-6) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: HallCoefficientUnit[1]; + } + + attribute hallCoefficient: HallCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def HallCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + /* ISO-80000-12 item 12-20 thermoelectric voltage (between substances a and b) */ + attribute thermoelectricVoltageBetweenSubstancesAAndB: ElectricPotentialDifferenceValue :> scalarQuantities { + doc + /* + * source: item 12-20 thermoelectric voltage (between substances a and b) + * symbol(s): `E_(ab)` + * application domain: generic + * name: ThermoelectricVoltageBetweenSubstancesAAndB (specializes ElectricPotentialDifference) + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V, kg*m^2*s^-3*A^-1 + * tensor order: 0 + * definition: voltage (IEC 80000-6) between substances `a` and `b` caused by the thermoelectric effect + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-21 Seebeck coefficient (for substances a and b) */ + attribute def SeebeckCoefficientForSubstancesAAndBValue :> ScalarQuantityValue { + doc + /* + * source: item 12-21 Seebeck coefficient (for substances a and b) + * symbol(s): `S_(ab)` + * application domain: generic + * name: SeebeckCoefficientForSubstancesAAndB + * quantity dimension: L^2*M^1*T^-3*I^-1*Θ^-1 + * measurement unit(s): V/K, kg*m^2*s^-3*A^-1*K^-1 + * tensor order: 0 + * definition: differential quotient of thermoelectric voltage with respect to thermodynamic temperature: `S_(ab) = (dE_(ab))/(dT)`, where `E_(ab)` is the thermoelectric voltage between substances `a` and `b` (item 12-20) and `T` is thermodynamic temperature (ISO 80000-5) + * remarks: This term is also called "thermoelectric power". + */ + attribute :>> num: Real; + attribute :>> mRef: SeebeckCoefficientForSubstancesAAndBUnit[1]; + } + + attribute seebeckCoefficientForSubstancesAAndB: SeebeckCoefficientForSubstancesAAndBValue[*] nonunique :> scalarQuantities; + + attribute def SeebeckCoefficientForSubstancesAAndBUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-12 item 12-22 Peltier coefficient (for substances a and b) */ + attribute peltierCoefficientForSubstancesAAndB: ElectricPotentialDifferenceValue :> scalarQuantities { + doc + /* + * source: item 12-22 Peltier coefficient (for substances a and b) + * symbol(s): `Π_(ab)` + * application domain: generic + * name: PeltierCoefficientForSubstancesAAndB (specializes ElectricPotentialDifference) + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V, kg*m^2*s^-3*A^-1 + * tensor order: 0 + * definition: quotient of Peltier heat power (ISO 80000-5) developed at a junction, and the electric current (IEC 80000-6) flowing from substance `a` to substance `b` + * remarks: `Π_(ab) = Π_a - Π_b`, where `Π_a` and `Π_b` are the Peltier coefficients of substances `a` and `b`, respectively. + */ + } + + /* ISO-80000-12 item 12-23 Thomson coefficient */ + attribute def ThomsonCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 12-23 Thomson coefficient + * symbol(s): `μ` + * application domain: generic + * name: ThomsonCoefficient + * quantity dimension: L^2*M^1*T^-3*I^-1*Θ^-1 + * measurement unit(s): V/K, kg*m^2*s^-3*A^-1*K^-1 + * tensor order: 0 + * definition: quotient of Thomson heat power (ISO 80000-5) developed, and the electric current (IEC 80000-6) and temperature (ISO 80000-5) difference + * remarks: `μ` is positive if heat is developed when the temperature decreases in the direction of the electric current. + */ + attribute :>> num: Real; + attribute :>> mRef: ThomsonCoefficientUnit[1]; + } + + attribute thomsonCoefficient: ThomsonCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def ThomsonCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-12 item 12-24.1 work function */ + attribute workFunction: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-24.1 work function + * symbol(s): `ϕ` + * application domain: generic + * name: WorkFunction (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: difference between energy (ISO 80000-5) of an electron at rest at infinity and the Fermi energy (item 12-27.1) + * remarks: The term "energy level" is often used for the state of the electron, not only for its energy. The contact potential difference between substances `a` and `b` is given by `V_a - V_b = (ϕ_a - ϕ_b)/e`, where `e` is the elementary charge (ISO 80000-1). A set of energy levels, the energies of which occupy an interval practically continuously, is called an energy band. In semi-conductors `E_d` and `E_a` are used for donors and acceptors, respectively. + */ + } + + /* ISO-80000-12 item 12-24.2 ionization energy */ + attribute ionizationEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-24.2 ionization energy + * symbol(s): `E_i` + * application domain: generic + * name: IonizationEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: difference between energy (ISO 80000-5) of an electron at rest at infinity and a certain energy level which is the energy of an electron in the interior of a substance + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-25 electron affinity */ + attribute electronAffinity: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-25 electron affinity + * symbol(s): `χ` + * application domain: condensed matter physics + * name: ElectronAffinity (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: energy (ISO 80000-5) difference between an electron at rest at infinity and an electron at the lowest level of the conduction band in an insulator or semiconductor + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-26 Richardson constant */ + attribute def RichardsonConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 12-26 Richardson constant + * symbol(s): `A` + * application domain: generic + * name: RichardsonConstant + * quantity dimension: L^-2*I^1*Θ^-2 + * measurement unit(s): A*m^-2*K^-2 + * tensor order: 0 + * definition: parameter in the expression for the thermionic emission current density `J` (IEC 80000-6) for a metal in terms of the thermodynamic temperature `T` (ISO 80000-5) and work function `ϕ`, (item 12-24.1): `J = AT^2 exp(ϕ/(kT))`, where `k` is the Boltzmann constant (ISO 80000-1) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: RichardsonConstantUnit[1]; + } + + attribute richardsonConstant: RichardsonConstantValue[*] nonunique :> scalarQuantities; + + attribute def RichardsonConstantUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-12 item 12-27.1 Fermi energy */ + attribute fermiEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-27.1 Fermi energy + * symbol(s): `E_F` + * application domain: generic + * name: FermiEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: in a metal, highest occupied energy level at zero thermodynamic temperature (ISO 80000-5), where energy level means the energy (ISO 80000-5) of an electron in the interior of a substance + * remarks: The term "energy level" is often used for the state of the electron, not only for its energy. At `T = 0 [K]`, `E_F` is equal to the chemical potential per electron. In condensed matter physics, the reference level for the energy is sometimes chosen so that, for instance, `E_F = 0`. + */ + } + + /* ISO-80000-12 item 12-27.2 gap energy */ + attribute gapEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-27.2 gap energy + * symbol(s): `E_g` + * application domain: generic + * name: GapEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: difference in energy (ISO 80000-5) between the lowest level of conduction band and the highest level of valence band at zero thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-28 Fermi temperature */ + attribute fermiTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 12-28 Fermi temperature + * symbol(s): `T_F` + * application domain: generic + * name: FermiTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: in the free electron model, the Fermi energy (item 12-27.1) divided by the Boltzmann constant (ISO 80000-1) + * remarks: The Fermi temperature is expressed by: `T_F = E_F/k`, where `E_F` is Fermi energy (item 12-27.1) and `k` is the Boltzmann constant (ISO 80000-1). `E_F` is relative to the lowest occupied state. + */ + } + + /* ISO-80000-12 item 12-29.1 electron density */ + attribute def ElectronDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 12-29.1 electron density + * symbol(s): `n` + * application domain: generic + * name: ElectronDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of number of electrons in conduction band and volume (ISO 80000-3) + * remarks: Subscripts `n` and `p` or `-` and `+` are often used to denote electrons and holes, respectively. `n_n` and `n_p` are also used for electron densities, and `p_n` and `p_p` for hole densities, in `n`-type and `p`-type regions, respectively, of a `n`-`p` junction. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectronDensityUnit[1]; + } + + attribute electronDensity: ElectronDensityValue[*] nonunique :> scalarQuantities; + + attribute def ElectronDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-12 item 12-29.2 hole density */ + attribute def HoleDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 12-29.2 hole density + * symbol(s): `p` + * application domain: generic + * name: HoleDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of number of holes in valence band and volume (ISO 80000-3) + * remarks: Subscripts `n` and `p` or `-` and `+` are often used to denote electrons and holes, respectively. `n_n` and `n_p` are also used for electron densities, and `p_n` and `p_p` for hole densities, in `n`-type and `p`-type regions, respectively, of a `n`-`p` junction. + */ + attribute :>> num: Real; + attribute :>> mRef: HoleDensityUnit[1]; + } + + attribute holeDensity: HoleDensityValue[*] nonunique :> scalarQuantities; + + attribute def HoleDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-12 item 12-29.3 intrinsic carrier density */ + attribute def IntrinsicCarrierDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 12-29.3 intrinsic carrier density + * symbol(s): `n_i` + * application domain: generic + * name: IntrinsicCarrierDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quantity given by: `n_i = sqrt(n p)`, where `n` is electron density (item 12-29.1), and `p` is hole + * remarks: Subscripts `n` and `p` or `-` and `+` are often used to denote electrons and holes, respectively. `n_n` and `n_p` are also used for electron densities, and `p_n` and `p_p` for hole densities, in `n`-type and `p`-type regions, respectively, of a `n`-`p` junction. + */ + attribute :>> num: Real; + attribute :>> mRef: IntrinsicCarrierDensityUnit[1]; + } + + attribute intrinsicCarrierDensity: IntrinsicCarrierDensityValue[*] nonunique :> scalarQuantities; + + attribute def IntrinsicCarrierDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-12 item 12-29.4 donor density */ + attribute def DonorDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 12-29.4 donor density + * symbol(s): `n_d` + * application domain: generic + * name: DonorDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of number of donor levels and volume (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: DonorDensityUnit[1]; + } + + attribute donorDensity: DonorDensityValue[*] nonunique :> scalarQuantities; + + attribute def DonorDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-12 item 12-29.5 acceptor density */ + attribute def AcceptorDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 12-29.5 acceptor density + * symbol(s): `n_a` + * application domain: generic + * name: AcceptorDensity + * quantity dimension: L^-3 + * measurement unit(s): m^-3 + * tensor order: 0 + * definition: quotient of number of acceptor levels and volume (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: AcceptorDensityUnit[1]; + } + + attribute acceptorDensity: AcceptorDensityValue[*] nonunique :> scalarQuantities; + + attribute def AcceptorDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-12 item 12-30 effective mass */ + attribute effectiveMass: MassValue :> scalarQuantities { + doc + /* + * source: item 12-30 effective mass + * symbol(s): `m"*"` + * application domain: generic + * name: EffectiveMass (specializes Mass) + * quantity dimension: M^1 + * measurement unit(s): kg + * tensor order: 0 + * definition: quantity given by: `m^"*" = (ħ^2 k) / ((dε)/(dk))`, where `k` is wavenumber (ISO 80000-3), `ε` is the energy (ISO 80000-5) of an electron in the interior of a substance, and `ħ` is the reduced Planck constant (ISO 80000-1) + * remarks: When `k` refers to a state where `ε` has an extremum, `m"*" = (ħ^2 k) / ((d^2ε)/(dk^2))`. The effective mass can be generalized to refer to an anisotropic system with `ε = ε(k)`. + */ + } + + /* ISO-80000-12 item 12-31 mobility ratio */ + attribute def MobilityRatioValue :> DimensionOneValue { + doc + /* + * source: item 12-31 mobility ratio + * symbol(s): `b` + * application domain: generic + * name: MobilityRatio (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mobilities (ISO 80000-10) of electrons and holes, respectively + * remarks: The mobility ratio can be expressed by: `b = μ_n/μ_p`, where `μ_n` and `μ_p` are mobilities (ISO 80000-10) for electrons and holes, respectively. + */ + } + attribute mobilityRatio: MobilityRatioValue :> scalarQuantities; + + /* ISO-80000-12 item 12-32.1 relaxation time */ + attribute relaxationTime: DurationValue :> scalarQuantities { + doc + /* + * source: item 12-32.1 relaxation time + * symbol(s): `τ` + * application domain: condensed matter physics + * name: RelaxationTime (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: time constant (ISO 80000-3) for scattering, trapping or annihilation of charge carriers, phonons or other quasiparticles + * remarks: For electrons in metals, `τ = l/v_F`, where `l` is mean free path (item 12-15.2) and `v_F` is speed (ISO 80000-3) of electrons on the Fermi surface. + */ + } + + /* ISO-80000-12 item 12-32.2 carrier lifetime */ + attribute carrierLifetime: DurationValue :> scalarQuantities { + doc + /* + * source: item 12-32.2 carrier lifetime + * symbol(s): `τ`, `τ_n`, `τ_p` + * application domain: semiconductors + * name: CarrierLifetime (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: time constant (ISO 80000-3) for recombination or trapping of minority charge carriers in semiconductors + * remarks: Indices "n" and "p" denote negative and positive charge carriers, respectively. Positive charge carriers can also be holes. + */ + } + + /* ISO-80000-12 item 12-33 diffusion length */ + attribute diffusionLengthForCondensedMatterPhysics: LengthValue :> scalarQuantities { + doc + /* + * source: item 12-33 diffusion length + * symbol(s): `L`, `L_n`, `L_p` + * application domain: condensed matter physics + * name: DiffusionLength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: square root of the product of diffusion coefficient (ISO 80000-10) and lifetime (ISO 80000-10) + * remarks: The diffusion length can be expressed by: `L = sqrt(Dτ)`, where `D` is the diffusion coefficient (ISO 80000-9) and `τ` is lifetime (ISO 80000-3). + */ + } + + /* ISO-80000-12 item 12-34 exchange integral */ + attribute exchangeIntegral: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-34 exchange integral + * symbol(s): `K`, `J` + * application domain: generic + * name: ExchangeIntegral (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: constituent of the interaction energy (ISO 80000-5) between the spins of adjacent electrons in matter arising from the overlap of electron state functions + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-35.1 Curie temperature */ + attribute curieTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 12-35.1 Curie temperature + * symbol(s): `T_C` + * application domain: generic + * name: CurieTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: critical thermodynamic temperature (ISO 80000-5) of a ferromagnet + * remarks: `T_(cr)` is used for critical thermodynamic temperature in general. + */ + } + + /* ISO-80000-12 item 12-35.2 Néel temperature */ + attribute 'néelTemperature': ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 12-35.2 Néel temperature + * symbol(s): `T_N` + * application domain: generic + * name: NéelTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: critical thermodynamic temperature (ISO 80000-5) of an antiferromagnet + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-35.3 superconduction transition temperature */ + attribute superconductionTransitionTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 12-35.3 superconduction transition temperature + * symbol(s): `T_c` + * application domain: generic + * name: SuperconductionTransitionTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: critical thermodynamic temperature (ISO 80000-5) of a superconductor + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-36.1 thermodynamic critical magnetic flux density */ + attribute thermodynamicCriticalMagneticFluxDensity: MagneticFluxDensityValue :> scalarQuantities { + doc + /* + * source: item 12-36.1 thermodynamic critical magnetic flux density + * symbol(s): `B_c` + * application domain: generic + * name: ThermodynamicCriticalMagneticFluxDensity (specializes MagneticFluxDensity) + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T, kg*s^-2*A^-1 + * tensor order: 0 + * definition: quantity given by: `B_c = sqrt((2μ_0 (G_n - G_s))/V)`, where `G_n` and `G_s` are the Gibbs energies (ISO 80000-5) at zero magnetic flux density (IEC 80000-6) in a normal conductor and superconductor, respectively, `μ_0` is the magnetic constant (IEC 80000-6), and `V` is volume (ISO 80000-3) + * remarks: In type I superconductors, `B_c` is the critical magnetic flux density for disappearance of superconductivity. The symbol `B_(c3)` is used for the critical magnetic flux density for disappearance of surface superconductivity. + */ + } + + /* ISO-80000-12 item 12-36.2 lower critical magnetic flux density */ + attribute lowerCriticalMagneticFluxDensity: MagneticFluxDensityValue :> scalarQuantities { + doc + /* + * source: item 12-36.2 lower critical magnetic flux density + * symbol(s): `B_(c1)` + * application domain: generic + * name: LowerCriticalMagneticFluxDensity (specializes MagneticFluxDensity) + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T, kg*s^-2*A^-1 + * tensor order: 0 + * definition: for type II superconductors, the threshold magnetic flux density (IEC 80000-6) for magnetic flux (IEC 80000-6) entering the superconductor + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-36.3 upper critical magnetic flux density */ + attribute upperCriticalMagneticFluxDensity: MagneticFluxDensityValue :> scalarQuantities { + doc + /* + * source: item 12-36.3 upper critical magnetic flux density + * symbol(s): `B_(c2)` + * application domain: generic + * name: UpperCriticalMagneticFluxDensity (specializes MagneticFluxDensity) + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T, kg*s^-2*A^-1 + * tensor order: 0 + * definition: for type II superconductors, the threshold magnetic flux density (IEC 80000-6) for disappearance of bulk superconductivity + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-37 superconductor energy gap */ + attribute superconductorEnergyGap: EnergyValue :> scalarQuantities { + doc + /* + * source: item 12-37 superconductor energy gap + * symbol(s): `Δ` + * application domain: generic + * name: SuperconductorEnergyGap (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, eV, kg*m^2*s^-2 + * tensor order: 0 + * definition: width of the forbidden energy band (item 12-24.2) in a superconductor + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-38.1 London penetration depth */ + attribute londonPenetrationDepth: LengthValue :> scalarQuantities { + doc + /* + * source: item 12-38.1 London penetration depth + * symbol(s): `λ_L` + * application domain: generic + * name: LondonPenetrationDepth (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: distance (ISO 80000-3) a magnetic field penetrates the plane surface of a semi-finite superconductor according to the expression: `B(x) = B(0) exp(-x/λ_L)`, where `B` is magnetic flux density (IEC 80000-6) and `x` is distance (ISO 80000-3) from the surface + * remarks: None. + */ + } + + /* ISO-80000-12 item 12-38.2 coherence length */ + attribute coherenceLength: LengthValue :> scalarQuantities { + doc + /* + * source: item 12-38.2 coherence length + * symbol(s): `ξ` + * application domain: generic + * name: CoherenceLength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: distance (ISO 80000-3) in a superconductor over which the effect of a perturbation is appreciable at zero thermodynamic temperature (ISO 80000-5) + * remarks: None. + */ + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml new file mode 100644 index 00000000..78689aeb --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml @@ -0,0 +1,2333 @@ +standard library package ISQElectromagnetism { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard IEC-80000-6:2008 "Electromagnetism" + * see also https://www.iso.org/obp/ui/#iso:std:iec:80000:-6:ed-1:v1:en,fr + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQMechanics::PowerValue; + private import ISQSpaceTime::AngularMeasureValue; + private import ISQThermodynamics::EnergyValue; + + /* IEC-80000-6 item 6-1 electric current */ + /* See package ISQBase for the declarations of ElectricCurrentValue and ElectricCurrentUnit */ + + /* IEC-80000-6 item 6-2 electric charge */ + attribute def ElectricChargeValue :> ScalarQuantityValue { + doc + /* + * source: item 6-2 electric charge + * symbol(s): `Q`, `q` + * application domain: generic + * name: ElectricCharge + * quantity dimension: T^1*I^1 + * measurement unit(s): C + * tensor order: 0 + * definition: `d(Q) = I dt` where `I` is electric current (item 6-1) and `t` is time (ISO 80000-3, item 3-7) + * remarks: Electric charge is carried by discrete particles and can be positive or negative. The sign convention is such that the elementary electric charge `e`, i.e. the charge of the proton, is positive. See IEC 60050-121, item121-11-01. To denote a point charge `q` is often used, and that is done in the present document. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricChargeUnit[1]; + } + + attribute electricCharge: ElectricChargeValue[*] nonunique :> scalarQuantities; + + attribute def ElectricChargeUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-3 electric charge density, volumic electric charge */ + attribute def ElectricChargeDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-3 electric charge density, volumic electric charge + * symbol(s): `ρ`, `ρ_V` + * application domain: generic + * name: ElectricChargeDensity + * quantity dimension: L^-3*T^1*I^1 + * measurement unit(s): C/m^3 + * tensor order: 0 + * definition: `ρ = (dQ)/(dV)` where `Q` is electric charge (item 6-2) and `V` is volume (ISO 80000-3, item 3-4) + * remarks: See IEC 60050-121, item 121-11-07. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricChargeDensityUnit[1]; + } + + attribute electricChargeDensity: ElectricChargeDensityValue[*] nonunique :> scalarQuantities; + + attribute def ElectricChargeDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + alias VolumicElectricChargeUnit for ElectricChargeDensityUnit; + alias VolumicElectricChargeValue for ElectricChargeDensityValue; + alias volumicElectricCharge for electricChargeDensity; + + /* IEC-80000-6 item 6-4 surface density of electric charge, areic electric charge */ + attribute def SurfaceDensityOfElectricChargeValue :> ScalarQuantityValue { + doc + /* + * source: item 6-4 surface density of electric charge, areic electric charge + * symbol(s): `ρ_A`, `sigma` + * application domain: generic + * name: SurfaceDensityOfElectricCharge + * quantity dimension: L^-2*T^1*I^1 + * measurement unit(s): C/m^2 + * tensor order: 0 + * definition: `ρ_A = (dQ)/(dA)` where `Q` is electric charge (item 6-2) and `A` is area (ISO 80000-3, item 3-3)` + * remarks: See IEC 60050-121, item 121-11-08. + */ + attribute :>> num: Real; + attribute :>> mRef: SurfaceDensityOfElectricChargeUnit[1]; + } + + attribute surfaceDensityOfElectricCharge: SurfaceDensityOfElectricChargeValue[*] nonunique :> scalarQuantities; + + attribute def SurfaceDensityOfElectricChargeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + alias AreicElectricChargeUnit for SurfaceDensityOfElectricChargeUnit; + alias AreicElectricChargeValue for SurfaceDensityOfElectricChargeValue; + alias areicElectricCharge for surfaceDensityOfElectricCharge; + + /* IEC-80000-6 item 6-5 linear density of electric charge, lineic electric charge */ + attribute def LinearDensityOfElectricChargeValue :> ScalarQuantityValue { + doc + /* + * source: item 6-5 linear density of electric charge, lineic electric charge + * symbol(s): `ρ_l`, `tau` + * application domain: generic + * name: LinearDensityOfElectricCharge + * quantity dimension: L^-1*T^1*I^1 + * measurement unit(s): C/m + * tensor order: 0 + * definition: `ρ_l = (dQ)/(dl)` where `Q` is electric charge (item 6-2) and `l` is length (ISO 80000-3, item 3-1.1) + * remarks: See IEC 60050-121, item121-11-09. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearDensityOfElectricChargeUnit[1]; + } + + attribute linearDensityOfElectricCharge: LinearDensityOfElectricChargeValue[*] nonunique :> scalarQuantities; + + attribute def LinearDensityOfElectricChargeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + alias LineicElectricChargeUnit for LinearDensityOfElectricChargeUnit; + alias LineicElectricChargeValue for LinearDensityOfElectricChargeValue; + alias lineicElectricCharge for linearDensityOfElectricCharge; + + /* IEC-80000-6 item 6-6 electric dipole moment */ + attribute def ElectricDipoleMomentValue :> ScalarQuantityValue { + doc + /* + * source: item 6-6 electric dipole moment (magnitude) + * symbol(s): `p` + * application domain: generic + * name: ElectricDipoleMoment + * quantity dimension: L^1*T^1*I^1 + * measurement unit(s): C*m + * tensor order: 0 + * definition: `vec(p) = q (vec(r_+) - vec(r_-))` where `vec(r_+)` and `vec(r_-)` are the position vectors (ISO 80000-3, item 3-1.11) to carriers of electric charges `q` and `-q` (item 6-2), respectively + * remarks: The electric dipole moment of a substance within a domain is the vector sum of electric dipole moments of electric dipoles included in the domain. See IEC 60050-121, items 121-11-35 and 121-11-36. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricDipoleMomentUnit[1]; + } + + attribute electricDipoleMoment: ElectricDipoleMomentValue[*] nonunique :> scalarQuantities; + + attribute def ElectricDipoleMomentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianElectricDipoleMoment3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-6 electric dipole moment (vector) + * symbol(s): `vec(p)` + * application domain: generic + * name: ElectricDipoleMoment + * quantity dimension: L^1*T^1*I^1 + * measurement unit(s): C*m + * tensor order: 1 + * definition: `vec(p) = q (vec(r_+) - vec(r_-))` where `vec(r_+)` and `vec(r_-)` are the position vectors (ISO 80000-3, item 3-1.11) to carriers of electric charges `q` and `-q` (item 6-2), respectively + * remarks: The electric dipole moment of a substance within a domain is the vector sum of electric dipole moments of electric dipoles included in the domain. See IEC 60050-121, items 121-11-35 and 121-11-36. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianElectricDipoleMoment3dCoordinateFrame[1]; + } + + attribute cartesianElectricDipoleMoment3dVector: CartesianElectricDipoleMoment3dVector :> vectorQuantities; + + attribute def CartesianElectricDipoleMoment3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ElectricDipoleMomentUnit[3]; + } + + /* IEC-80000-6 item 6-7 electric polarization */ + attribute def ElectricPolarizationValue :> ScalarQuantityValue { + doc + /* + * source: item 6-7 electric polarization (magnitude) + * symbol(s): `P` + * application domain: generic + * name: ElectricPolarization + * quantity dimension: L^-2*T^1*I^1 + * measurement unit(s): C/m^2 + * tensor order: 0 + * definition: `vec(P) = (d vec(p))/(dV)` where `vec(p)` is electric dipole moment (item 6-6) of a substance within a domain with volume `V` (ISO 80000-3, item 3-4) + * remarks: See IEC 60050-121, item 121-11-37. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricPolarizationUnit[1]; + } + + attribute electricPolarization: ElectricPolarizationValue[*] nonunique :> scalarQuantities; + + attribute def ElectricPolarizationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianElectricPolarization3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-7 electric polarization (vector) + * symbol(s): `vec(P)` + * application domain: generic + * name: ElectricPolarization + * quantity dimension: L^-2*T^1*I^1 + * measurement unit(s): C/m^2 + * tensor order: 1 + * definition: `vec(P) = (d vec(p))/(dV)` where `vec(p)` is electric dipole moment (item 6-6) of a substance within a domain with volume `V` (ISO 80000-3, item 3-4) + * remarks: See IEC 60050-121, item 121-11-37. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianElectricPolarization3dCoordinateFrame[1]; + } + + attribute cartesianElectricPolarization3dVector: CartesianElectricPolarization3dVector :> vectorQuantities; + + attribute def CartesianElectricPolarization3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ElectricPolarizationUnit[3]; + } + + /* IEC-80000-6 item 6-8 electric current density, areic electric current */ + attribute def ElectricCurrentDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-8 electric current density, areic electric current (magnitude) + * symbol(s): `J` + * application domain: generic + * name: ElectricCurrentDensity + * quantity dimension: L^-2*I^1 + * measurement unit(s): A/m^2 + * tensor order: 0 + * definition: `vec(J) = ρ vec(v)` where `ρ` is electric charge density (item 6-3) and `vec(v)` is velocity (ISO 80000-3, item 3-8.1) + * remarks: Electric current `I` (item 6-1) through a surface `S` is `I = int_S vec(J) * vec(e_n) dA` where `vec(e_n) dA` is vector surface element. See IEC 60050-121, item 121-11-11. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricCurrentDensityUnit[1]; + } + + attribute electricCurrentDensity: ElectricCurrentDensityValue[*] nonunique :> scalarQuantities; + + attribute def ElectricCurrentDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianElectricCurrentDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-8 electric current density, areic electric current (vector) + * symbol(s): `vec(J)` + * application domain: generic + * name: ElectricCurrentDensity + * quantity dimension: L^-2*I^1 + * measurement unit(s): A/m^2 + * tensor order: 1 + * definition: `vec(J) = ρ vec(v)` where `ρ` is electric charge density (item 6-3) and `vec(v)` is velocity (ISO 80000-3, item 3-8.1) + * remarks: Electric current `I` (item 6-1) through a surface `S` is `I = int_S vec(J) * vec(e_n) dA` where `vec(e_n) dA` is vector surface element. See IEC 60050-121, item 121-11-11. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianElectricCurrentDensity3dCoordinateFrame[1]; + } + + attribute cartesianElectricCurrentDensity3dVector: CartesianElectricCurrentDensity3dVector :> vectorQuantities; + + attribute def CartesianElectricCurrentDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ElectricCurrentDensityUnit[3]; + } + + alias CartesianAreicElectricCurrent3dCoordinateFrame for CartesianElectricCurrentDensity3dCoordinateFrame; + alias cartesianAreicElectricCurrent3dVector for cartesianElectricCurrentDensity3dVector; + + /* IEC-80000-6 item 6-9 linear electric current density, lineic electric current */ + attribute def LinearElectricCurrentDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-9 linear electric current density, lineic electric current (magnitude) + * symbol(s): `J_S` + * application domain: generic + * name: LinearElectricCurrentDensity + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 0 + * definition: `vec(J_S) = ρ_A vec(v)` where `ρ_A` is surface density of electric charge (item 6-4) and `vec(v)` is velocity (ISO 80000-3, item 3-8.1) + * remarks: Electric current `I` (item 6-1) through a curve `C` on a surface is `I = int_C vec(J_S) xx vec(e_n) * d vec(r)` where `vec(e_n)` is a unit vector perpendicular to the surface and line vector element and `d vec(r)` is the differential of position vector `vec(r)`. See IEC 60050-121, item 121-11-12. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearElectricCurrentDensityUnit[1]; + } + + attribute linearElectricCurrentDensity: LinearElectricCurrentDensityValue[*] nonunique :> scalarQuantities; + + attribute def LinearElectricCurrentDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianLinearElectricCurrentDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-9 linear electric current density, lineic electric current (vector) + * symbol(s): `vec(J_S)` + * application domain: generic + * name: LinearElectricCurrentDensity + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 1 + * definition: `vec(J_S) = ρ_A vec(v)` where `ρ_A` is surface density of electric charge (item 6-4) and `vec(v)` is velocity (ISO 80000-3, item 3-8.1) + * remarks: Electric current `I` (item 6-1) through a curve `C` on a surface is `I = int_C vec(J_S) xx vec(e_n) * d vec(r)` where `vec(e_n)` is a unit vector perpendicular to the surface and line vector element and `d vec(r)` is the differential of position vector `vec(r)`. See IEC 60050-121, item 121-11-12. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianLinearElectricCurrentDensity3dCoordinateFrame[1]; + } + + attribute cartesianLinearElectricCurrentDensity3dVector: CartesianLinearElectricCurrentDensity3dVector :> vectorQuantities; + + attribute def CartesianLinearElectricCurrentDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: LinearElectricCurrentDensityUnit[3]; + } + + alias CartesianLineicElectricCurrent3dCoordinateFrame for CartesianLinearElectricCurrentDensity3dCoordinateFrame; + alias cartesianLineicElectricCurrent3dVector for cartesianLinearElectricCurrentDensity3dVector; + + /* IEC-80000-6 item 6-10 electric field strength */ + attribute def ElectricFieldStrengthValue :> ScalarQuantityValue { + doc + /* + * source: item 6-10 electric field strength (magnitude) + * symbol(s): `E` + * application domain: generic + * name: ElectricFieldStrength + * quantity dimension: L^1*M^1*T^-3*I^-1 + * measurement unit(s): V/m + * tensor order: 0 + * definition: `vec(E) = vec(F)/q` where `vec(F)` is force (ISO 80000-4, item 4-9.1) and `q` is electric charge (item 6-2) + * remarks: See IEC 60050, item 121-11-18. `q` is the charge of a test particle at rest. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricFieldStrengthUnit[1]; + } + + attribute electricFieldStrength: ElectricFieldStrengthValue[*] nonunique :> scalarQuantities; + + attribute def ElectricFieldStrengthUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianElectricFieldStrength3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-10 electric field strength (vector) + * symbol(s): `vec(E)` + * application domain: generic + * name: ElectricFieldStrength + * quantity dimension: L^1*M^1*T^-3*I^-1 + * measurement unit(s): V/m + * tensor order: 1 + * definition: `vec(E) = vec(F)/q` where `vec(F)` is force (ISO 80000-4, item 4-9.1) and `q` is electric charge (item 6-2) + * remarks: See IEC 60050, item 121-11-18. `q` is the charge of a test particle at rest. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianElectricFieldStrength3dCoordinateFrame[1]; + } + + attribute cartesianElectricFieldStrength3dVector: CartesianElectricFieldStrength3dVector :> vectorQuantities; + + attribute def CartesianElectricFieldStrength3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ElectricFieldStrengthUnit[3]; + } + + /* IEC-80000-6 item 6-11.1 electric potential */ + attribute def ElectricPotentialValue :> ScalarQuantityValue { + doc + /* + * source: item 6-11.1 electric potential + * symbol(s): `V`, `φ` + * application domain: generic + * name: ElectricPotential + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V + * tensor order: 0 + * definition: `-grad(V) = vec(E) + (del A)/(del t)` where `vec(E)` is electric field strength (item 610), `A` is magnetic vector potential (item 6-32) and `t` is time (ISO 80000-3, item 3-7) + * remarks: The electric potential is not unique, since any constant scalar field quantity can be added to it without changing its gradient. See IEC 60050-121, item 121-11-25. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricPotentialUnit[1]; + } + + attribute electricPotential: ElectricPotentialValue[*] nonunique :> scalarQuantities; + + attribute def ElectricPotentialUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-11.2 electric potential difference */ + attribute def ElectricPotentialDifferenceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-11.2 electric potential difference + * symbol(s): `V_(ab)` + * application domain: generic + * name: ElectricPotentialDifference + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V + * tensor order: 0 + * definition: `V_(ab) = int_(vec(r_a))^(vec(r_b)) (vec(E) + (del A)/(del t)) * d vec(r)` where `vec(E)` is electric field strength (item 610), `A` is magnetic vector potential (item 6-32), `t` is time (ISO 80000-3, item 3-7), and `vec(r)` is position vector (ISO 80000-3, item 3-1.11) along a given curve `C` from point `a` to point `b` + * remarks: `V_(ab) = V_a - V_b` where `V_a` and `V_b` are the potentials at points `a` and `b`, respectively. See IEC 60050-121, item 121-11-26. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricPotentialDifferenceUnit[1]; + } + + attribute electricPotentialDifference: ElectricPotentialDifferenceValue[*] nonunique :> scalarQuantities; + + attribute def ElectricPotentialDifferenceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-11.3 voltage, electric tension */ + attribute voltage: ElectricPotentialDifferenceValue :> scalarQuantities { + doc + /* + * source: item 6-11.3 voltage, electric tension + * symbol(s): `U`, `U_(ab)` + * application domain: generic + * name: Voltage (specializes ElectricPotentialDifference) + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V + * tensor order: 0 + * definition: in electric circuit theory, `U_(ab) = V_a - V_b` where `V_a` and `V_b` are the electric potentials (item 6-11.1) at points `a` and `b`, respectively + * remarks: For an electric field within a medium `U_(ab) = int_(vec(r_a) (C))^(vec(r_b)) vec(E) * d vec(r)` where `vec(E)` is electric field strength (item 6-10) and `vec(r)` is position vector (ISO 80000-3, item 3-1.11) along a given curve `C` from point `a` to point `b`. For an irrotational electric field, the voltage is independent of the path between the two points `a` and `b`. See IEC 60050-121, item 121-11-27. + */ + } + + alias electricTension for voltage; + + /* IEC-80000-6 item 6-12 electric flux density, electric displacement */ + attribute def ElectricFluxDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-12 electric flux density, electric displacement (magnitude) + * symbol(s): `D` + * application domain: generic + * name: ElectricFluxDensity + * quantity dimension: L^-2*T^1*I^1 + * measurement unit(s): C/m^2 + * tensor order: 0 + * definition: `vec(D) = ε_0 vec(E) + vec(P)` where `ε_0` is the electric constant (item 6-14.1 ), `vec(E)` is electric field strength (item 6-10), and `vec(P)` is electric polarization (item 6-7) + * remarks: The electric flux density is related to electric charge density via `nabla * vec(D) = ρ` where `nabla * vec(D)` denotes the divergence of `vec(D)`. See IEC 60050-121, item 121-11-40. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricFluxDensityUnit[1]; + } + + attribute electricFluxDensity: ElectricFluxDensityValue[*] nonunique :> scalarQuantities; + + attribute def ElectricFluxDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianElectricFluxDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-12 electric flux density, electric displacement (vector) + * symbol(s): `vec(D)` + * application domain: generic + * name: ElectricFluxDensity + * quantity dimension: L^-2*T^1*I^1 + * measurement unit(s): C/m^2 + * tensor order: 1 + * definition: `vec(D) = ε_0 vec(E) + vec(P)` where `ε_0` is the electric constant (item 6-14.1 ), `vec(E)` is electric field strength (item 6-10), and `vec(P)` is electric polarization (item 6-7) + * remarks: The electric flux density is related to electric charge density via `nabla * vec(D) = ρ` where `nabla * vec(D)` denotes the divergence of `vec(D)`. See IEC 60050-121, item 121-11-40. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianElectricFluxDensity3dCoordinateFrame[1]; + } + + attribute cartesianElectricFluxDensity3dVector: CartesianElectricFluxDensity3dVector :> vectorQuantities; + + attribute def CartesianElectricFluxDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ElectricFluxDensityUnit[3]; + } + + alias CartesianElectricDisplacement3dCoordinateFrame for CartesianElectricFluxDensity3dCoordinateFrame; + alias cartesianElectricDisplacement3dVector for cartesianElectricFluxDensity3dVector; + + /* IEC-80000-6 item 6-13 capacitance */ + attribute def CapacitanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-13 capacitance + * symbol(s): `C` + * application domain: generic + * name: Capacitance + * quantity dimension: L^-2*M^-1*T^4*I^2 + * measurement unit(s): F + * tensor order: 0 + * definition: `C = Q/U` where `Q` is electric charge (item 6-2) and `U` is voltage (6-11.3) + * remarks: See IEC 60050-131, item 131-12-13. + */ + attribute :>> num: Real; + attribute :>> mRef: CapacitanceUnit[1]; + } + + attribute capacitance: CapacitanceValue[*] nonunique :> scalarQuantities; + + attribute def CapacitanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 4; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-14.1 electric constant, permittivity of vacuum */ + attribute def ElectricConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 6-14.1 electric constant, permittivity of vacuum + * symbol(s): `ε_0` + * application domain: generic + * name: ElectricConstant + * quantity dimension: L^-3*M^-1*T^4*I^2 + * measurement unit(s): F/m + * tensor order: 0 + * definition: `ε_0 = 1 / (μ_0 * c_0^2)` where `μ_0` is the magnetic constant (item 6-26.1) and `c_0` is the speed of light (item 6-35.2) + * remarks: `ε_0 = 8.854188 * 10^-12` F/m. See IEC 60050-121, item 121-11-03. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricConstantUnit[1]; + } + + attribute electricConstant: ElectricConstantValue[*] nonunique :> scalarQuantities; + + attribute def ElectricConstantUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 4; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + alias PermittivityOfVacuumUnit for ElectricConstantUnit; + alias PermittivityOfVacuumValue for ElectricConstantValue; + alias permittivityOfVacuum for electricConstant; + + /* IEC-80000-6 item 6-14.2 permittivity */ + attribute def PermittivityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-14.2 permittivity + * symbol(s): `ε` + * application domain: generic + * name: Permittivity + * quantity dimension: L^-3*M^-1*T^4*I^2 + * measurement unit(s): F/m + * tensor order: 0 + * definition: `vec(D) = ε vec(E)` where `vec(D)` is electric flux density (item 6-12) and `vec(E)` is electric field strength (item 6-10) + * remarks: This definition applies to an isotropic medium. For an anisotropic medium, permittivity is a second order tensor. See IEC 60050-121, item 121-12-12. + */ + attribute :>> num: Real; + attribute :>> mRef: PermittivityUnit[1]; + } + + attribute permittivity: PermittivityValue[*] nonunique :> scalarQuantities; + + attribute def PermittivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 4; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-15 relative permittivity */ + attribute def RelativePermittivityValue :> DimensionOneValue { + doc + /* + * source: item 6-15 relative permittivity + * symbol(s): `ε_r` + * application domain: generic + * name: RelativePermittivity (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `ε_r = ε / ε_0` where `ε` is permittivity (item 6-14.2) and `ε_0` is the electric constant (item 6-14.1) + * remarks: See IEC 60050-121, item 121-12-13. + */ + } + attribute relativePermittivity: RelativePermittivityValue :> scalarQuantities; + + /* IEC-80000-6 item 6-16 electric susceptibility */ + attribute def ElectricSusceptibilityValue :> DimensionOneValue { + doc + /* + * source: item 6-16 electric susceptibility + * symbol(s): `χ` + * application domain: generic + * name: ElectricSusceptibility (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `vec(P) = ε_0 χ vec(E)` where `vec(P)` is electric polarization (item 6-7), `ε_0` is the electric constant (item 6-14. 1) and `vec(E)` is electric field strength (item 6-10) + * remarks: `χ = ε_r - 1`. The definition applies to an isotropic medium. For an anisotropic medium, electric susceptibility is a second order tensor. See IEC 60050-121, item 121-12-19. + */ + } + attribute electricSusceptibility: ElectricSusceptibilityValue :> scalarQuantities; + + /* IEC-80000-6 item 6-17 electric flux */ + attribute def ElectricFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 6-17 electric flux + * symbol(s): `Ψ` + * application domain: generic + * name: ElectricFlux + * quantity dimension: T^1*I^1 + * measurement unit(s): C + * tensor order: 0 + * definition: `Ψ = int_S vec(D) * vec(e_n) dA` over a surface `S`, where `vec(D)` is electric flux (item 6-12) en `vec(e_n) dA` is the vector surface element (ISO 80000-3 item 3-3) + * remarks: See IEC 60050-121, item 121-11-41. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectricFluxUnit[1]; + } + + attribute electricFlux: ElectricFluxValue[*] nonunique :> scalarQuantities; + + attribute def ElectricFluxUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-18 displacement current density */ + attribute def DisplacementCurrentDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-18 displacement current density (magnitude) + * symbol(s): `J_D` + * application domain: generic + * name: DisplacementCurrentDensity + * quantity dimension: L^-2*I^1 + * measurement unit(s): A/m^2 + * tensor order: 0 + * definition: `vec(J_D) = (del vec(D))/(del t)` where `vec(D)` is electric flux density (item 6-12) and `t` is time (ISO 80000-3, item 3-7) + * remarks: See IEC 60050-121, item 121-11-42. + */ + attribute :>> num: Real; + attribute :>> mRef: DisplacementCurrentDensityUnit[1]; + } + + attribute displacementCurrentDensity: DisplacementCurrentDensityValue[*] nonunique :> scalarQuantities; + + attribute def DisplacementCurrentDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianDisplacementCurrentDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-18 displacement current density (vector) + * symbol(s): `vec(J_D)` + * application domain: generic + * name: DisplacementCurrentDensity + * quantity dimension: L^-2*I^1 + * measurement unit(s): A/m^2 + * tensor order: 1 + * definition: `vec(J_D) = (del vec(D))/(del t)` where `vec(D)` is electric flux density (item 6-12) and `t` is time (ISO 80000-3, item 3-7) + * remarks: See IEC 60050-121, item 121-11-42. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianDisplacementCurrentDensity3dCoordinateFrame[1]; + } + + attribute cartesianDisplacementCurrentDensity3dVector: CartesianDisplacementCurrentDensity3dVector :> vectorQuantities; + + attribute def CartesianDisplacementCurrentDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: DisplacementCurrentDensityUnit[3]; + } + + /* IEC-80000-6 item 6-19.1 displacement current */ + attribute displacementCurrent: ElectricCurrentValue :> scalarQuantities { + doc + /* + * source: item 6-19.1 displacement current + * symbol(s): `I_D` + * application domain: generic + * name: DisplacementCurrent (specializes ElectricCurrent) + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: `I = int_S vec(J_D) * vec(e_n) dA` over a surface `S`, where `vec(J_D)` is displacement current density (item 6-18) en `vec(e_n) dA` is the vector surface element (ISO 80000-3 item 3-3) + * remarks: See IEC 60050-121, item 121-11-43. + */ + } + + /* IEC-80000-6 item 6-19.2 total current */ + attribute totalCurrent: ElectricCurrentValue :> scalarQuantities { + doc + /* + * source: item 6-19.2 total current + * symbol(s): `I_"tot"`, `I_t` + * application domain: generic + * name: TotalCurrent (specializes ElectricCurrent) + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: `I_(tot) = I + I_D` where `I` is electric current (item 6-1) and `I_D` is displacement current (item 6-19.1) + * remarks: See IEC 60050-121, item 121-11-45. + */ + } + + /* IEC-80000-6 item 6-20 total current density */ + attribute def TotalCurrentDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-20 total current density (magnitude) + * symbol(s): `J_"tot"`, `J_t` + * application domain: generic + * name: TotalCurrentDensity + * quantity dimension: L^-2*I^1 + * measurement unit(s): A/m^2 + * tensor order: 0 + * definition: `vec(J_(tot)) = vec(J) +vec(J_D)` where `vec(J)` is electric current density (item 6-8) and `vec(J_D)` is displacement current density (item 6-18) + * remarks: See IEC 60050-121, item 121-11-44. + */ + attribute :>> num: Real; + attribute :>> mRef: TotalCurrentDensityUnit[1]; + } + + attribute totalCurrentDensity: TotalCurrentDensityValue[*] nonunique :> scalarQuantities; + + attribute def TotalCurrentDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianTotalCurrentDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-20 total current density (vector) + * symbol(s): `vec(J_"tot")`, `vec(J_t)` + * application domain: generic + * name: TotalCurrentDensity + * quantity dimension: L^-2*I^1 + * measurement unit(s): A/m^2 + * tensor order: 1 + * definition: `vec(J_(tot)) = vec(J) +vec(J_D)` where `vec(J)` is electric current density (item 6-8) and `vec(J_D)` is displacement current density (item 6-18) + * remarks: See IEC 60050-121, item 121-11-44. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianTotalCurrentDensity3dCoordinateFrame[1]; + } + + attribute cartesianTotalCurrentDensity3dVector: CartesianTotalCurrentDensity3dVector :> vectorQuantities; + + attribute def CartesianTotalCurrentDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: TotalCurrentDensityUnit[3]; + } + + /* IEC-80000-6 item 6-21 magnetic flux density */ + attribute def MagneticFluxDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-21 magnetic flux density (magnitude) + * symbol(s): `B` + * application domain: generic + * name: MagneticFluxDensity + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T + * tensor order: 0 + * definition: `vec(F) = q vec(v) xx vec(B)` where `vec(F)` is force (ISO 80000-4, item 4-9.1) and `vec(v)` is velocity (ISO 80000-3, item 3-8.1) of any test particle with electric charge `q` (item 6-2) + * remarks: The magnetic flux density has zero divergence, `nabla * vec(B) = 0`. See IEC 60050-121, item 121-11-19. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticFluxDensityUnit[1]; + } + + attribute magneticFluxDensity: MagneticFluxDensityValue[*] nonunique :> scalarQuantities; + + attribute def MagneticFluxDensityUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianMagneticFluxDensity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-21 magnetic flux density (vector) + * symbol(s): `vec(B)` + * application domain: generic + * name: MagneticFluxDensity + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T + * tensor order: 1 + * definition: `vec(F) = q vec(v) xx vec(B)` where `vec(F)` is force (ISO 80000-4, item 4-9.1) and `vec(v)` is velocity (ISO 80000-3, item 3-8.1) of any test particle with electric charge `q` (item 6-2) + * remarks: The magnetic flux density has zero divergence, `nabla * vec(B) = 0`. See IEC 60050-121, item 121-11-19. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagneticFluxDensity3dCoordinateFrame[1]; + } + + attribute cartesianMagneticFluxDensity3dVector: CartesianMagneticFluxDensity3dVector :> vectorQuantities; + + attribute def CartesianMagneticFluxDensity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticFluxDensityUnit[3]; + } + + /* IEC-80000-6 item 6-22.1 magnetic flux */ + attribute def MagneticFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 6-22.1 magnetic flux + * symbol(s): `Φ` + * application domain: generic + * name: MagneticFlux + * quantity dimension: L^2*M^1*T^-2*I^-1 + * measurement unit(s): Wb + * tensor order: 0 + * definition: `Φ = int_S vec(B) * vec(e_n) dA` over a surface `S`, where `vec(B)` is magnetic flux density (item 6-21) and `vec(e_n) dA` is vector surface element (ISO 80000-3, item 3-3) + * remarks: See IEC 60050-121, item 121-11-21. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticFluxUnit[1]; + } + + attribute magneticFlux: MagneticFluxValue[*] nonunique :> scalarQuantities; + + attribute def MagneticFluxUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-22.2 linked flux */ + attribute def LinkedFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 6-22.2 linked flux + * symbol(s): `Ψ_m`, `Ψ` + * application domain: generic + * name: LinkedFlux + * quantity dimension: L^2*M^1*T^-2*I^-1 + * measurement unit(s): Wb + * tensor order: 0 + * definition: `Ψ_m = int_C vec(A) * d vec(r)` where `vec(A)` is magnetic vector potential (item 6-32) and `d vec(r)` is line vector element of the curve `C` + * remarks: Line vector element `d vec(r)` is the differential of position vector `vec(r)` (ISO 80000-3, item 3-1.11). See IEC 60050-121, item 121-11-24. + */ + attribute :>> num: Real; + attribute :>> mRef: LinkedFluxUnit[1]; + } + + attribute linkedFlux: LinkedFluxValue[*] nonunique :> scalarQuantities; + + attribute def LinkedFluxUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-23 magnetic moment, magnetic area moment */ + attribute def MagneticMomentValue :> ScalarQuantityValue { + doc + /* + * source: item 6-23 magnetic moment, magnetic area moment (magnitude) + * symbol(s): `m` + * application domain: generic + * name: MagneticMoment + * quantity dimension: L^2*I^1 + * measurement unit(s): A*m^2 + * tensor order: 0 + * definition: `vec(m) = I vec(e_n) A` where `I` is electric current (item 6-1) in a small closed loop, `vec(e_n)` is a unit vector perpendicular to the loop, and `A` is area (ISO 80000-3, item 3-3) of the loop + * remarks: The magnetic moment of a substance within a domain is the vector sum of the magnetic moments of all entities included in the domain. See IEC 60050-121, items 121-11-49 and 121-11-50. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticMomentUnit[1]; + } + + attribute magneticMoment: MagneticMomentValue[*] nonunique :> scalarQuantities; + + attribute def MagneticMomentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianMagneticMoment3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-23 magnetic moment, magnetic area moment (vector) + * symbol(s): `vec(m)` + * application domain: generic + * name: MagneticMoment + * quantity dimension: L^2*I^1 + * measurement unit(s): A*m^2 + * tensor order: 1 + * definition: `vec(m) = I vec(e_n) A` where `I` is electric current (item 6-1) in a small closed loop, `vec(e_n)` is a unit vector perpendicular to the loop, and `A` is area (ISO 80000-3, item 3-3) of the loop + * remarks: The magnetic moment of a substance within a domain is the vector sum of the magnetic moments of all entities included in the domain. See IEC 60050-121, items 121-11-49 and 121-11-50. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagneticMoment3dCoordinateFrame[1]; + } + + attribute cartesianMagneticMoment3dVector: CartesianMagneticMoment3dVector :> vectorQuantities; + + attribute def CartesianMagneticMoment3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticMomentUnit[3]; + } + + alias CartesianMagneticAreaMoment3dCoordinateFrame for CartesianMagneticMoment3dCoordinateFrame; + alias cartesianMagneticAreaMoment3dVector for cartesianMagneticMoment3dVector; + + /* IEC-80000-6 item 6-24 magnetization */ + attribute def MagnetizationValue :> ScalarQuantityValue { + doc + /* + * source: item 6-24 magnetization (magnitude) + * symbol(s): `M`, `H_i` + * application domain: generic + * name: Magnetization + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 0 + * definition: `vec(M) = (d vec(m)) / (dV)` where `vec(m)` is magnetic moment (item 6-23) of a substance in a domain with volume `V` (ISO 80000-3, item 3-4) + * remarks: See IEC 60050-121, item 121-11-52. + */ + attribute :>> num: Real; + attribute :>> mRef: MagnetizationUnit[1]; + } + + attribute magnetization: MagnetizationValue[*] nonunique :> scalarQuantities; + + attribute def MagnetizationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianMagnetization3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-24 magnetization (vector) + * symbol(s): `vec(M)`, `vec(H_i)` + * application domain: generic + * name: Magnetization + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 1 + * definition: `vec(M) = (d vec(m)) / (dV)` where `vec(m)` is magnetic moment (item 6-23) of a substance in a domain with volume `V` (ISO 80000-3, item 3-4) + * remarks: See IEC 60050-121, item 121-11-52. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagnetization3dCoordinateFrame[1]; + } + + attribute cartesianMagnetization3dVector: CartesianMagnetization3dVector :> vectorQuantities; + + attribute def CartesianMagnetization3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagnetizationUnit[3]; + } + + /* IEC-80000-6 item 6-25 magnetic field strength, magnetizing field */ + attribute def MagneticFieldStrengthValue :> ScalarQuantityValue { + doc + /* + * source: item 6-25 magnetic field strength, magnetizing field (magnitude) + * symbol(s): `H` + * application domain: generic + * name: MagneticFieldStrength + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 0 + * definition: `vec(H) = vec(B)/μ_0 - vec(M)` where `vec(B)` is magnetic flux density (item 6-21), `μ_0` is the magnetic constant (item 6-26.1), and `vec(M)` is magnetization (item 6-24) + * remarks: The magnetic field strength is related to the total current density `vec(J_(t ot))` (item 6-20) via `rot vec(H) = vec(J_(t ot))`. See IEC 60050-121, item 121-11-56. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticFieldStrengthUnit[1]; + } + + attribute magneticFieldStrength: MagneticFieldStrengthValue[*] nonunique :> scalarQuantities; + + attribute def MagneticFieldStrengthUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + attribute def CartesianMagneticFieldStrength3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-25 magnetic field strength, magnetizing field (vector) + * symbol(s): `vec(H)` + * application domain: generic + * name: MagneticFieldStrength + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 1 + * definition: `vec(H) = vec(B)/μ_0 - vec(M)` where `vec(B)` is magnetic flux density (item 6-21), `μ_0` is the magnetic constant (item 6-26.1), and `vec(M)` is magnetization (item 6-24) + * remarks: The magnetic field strength is related to the total current density `vec(J_(t ot))` (item 6-20) via `rot vec(H) = vec(J_(t ot))`. See IEC 60050-121, item 121-11-56. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagneticFieldStrength3dCoordinateFrame[1]; + } + + attribute cartesianMagneticFieldStrength3dVector: CartesianMagneticFieldStrength3dVector :> vectorQuantities; + + attribute def CartesianMagneticFieldStrength3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticFieldStrengthUnit[3]; + } + + alias CartesianMagnetizingField3dCoordinateFrame for CartesianMagneticFieldStrength3dCoordinateFrame; + alias cartesianMagnetizingField3dVector for cartesianMagneticFieldStrength3dVector; + + /* IEC-80000-6 item 6-26.1 magnetic constant, permeability of vacuum */ + attribute def MagneticConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 6-26.1 magnetic constant, permeability of vacuum + * symbol(s): `μ_0` + * application domain: generic + * name: MagneticConstant + * quantity dimension: L^1*M^1*T^-2*I^-2 + * measurement unit(s): H/m + * tensor order: 0 + * definition: `μ_0 = 4 π * 10^-7` H/m + * remarks: For this definition of `μ_0` see item 6-1.a. `μ_0 ~~ 1.256637 * 10^-6` H/m. See IEC 60050-121, item 121-11-14. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticConstantUnit[1]; + } + + attribute magneticConstant: MagneticConstantValue[*] nonunique :> scalarQuantities; + + attribute def MagneticConstantUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + alias PermeabilityOfVacuumUnit for MagneticConstantUnit; + alias PermeabilityOfVacuumValue for MagneticConstantValue; + alias permeabilityOfVacuum for magneticConstant; + + /* IEC-80000-6 item 6-26.2 permeability */ + attribute def PermeabilityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-26.2 permeability + * symbol(s): `μ` + * application domain: generic + * name: Permeability + * quantity dimension: L^1*M^1*T^-2*I^-2 + * measurement unit(s): H/m + * tensor order: 0 + * definition: `vec(B) = μ vec(H)` where `vec(B)` is magnetic flux density (item 6-21) and `vec(H)` is magnetic field strength (item 6-25) + * remarks: This definition applies to an isotropic medium. For an anisotropic medium permeability is a second order tensor. See IEC 60050-121, item 121-12-28. + */ + attribute :>> num: Real; + attribute :>> mRef: PermeabilityUnit[1]; + } + + attribute permeability: PermeabilityValue[*] nonunique :> scalarQuantities; + + attribute def PermeabilityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-27 relative permeability */ + attribute def RelativePermeabilityValue :> DimensionOneValue { + doc + /* + * source: item 6-27 relative permeability + * symbol(s): `μ_r` + * application domain: generic + * name: RelativePermeability (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `μ_r = μ / μ_0` where `μ` is permeability (item 6-24) and `μ_0` is the magnetic constant (item 6-26.1) + * remarks: See IEC 60050-121, item 121-12-29. + */ + } + attribute relativePermeability: RelativePermeabilityValue :> scalarQuantities; + + /* IEC-80000-6 item 6-28 magnetic susceptibility */ + attribute def MagneticSusceptibilityValue :> DimensionOneValue { + doc + /* + * source: item 6-28 magnetic susceptibility + * symbol(s): `κ`, `χ_m` + * application domain: generic + * name: MagneticSusceptibility (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `vec(M) = κ vec(H)` where `vec(M)` is magnetization (item 6-24) and `vec(H)` is magnetic field strength (item 6-25) + * remarks: `κ = μ_r - 1` This definition applies to an isotropic medium. For an anisotropic medium magnetic susceptibility is a second order tensor. See IEC 60050-121, item 121-12-37. + */ + } + attribute magneticSusceptibility: MagneticSusceptibilityValue :> scalarQuantities; + + /* IEC-80000-6 item 6-29 magnetic polarization */ + attribute def MagneticPolarizationValue :> ScalarQuantityValue { + doc + /* + * source: item 6-29 magnetic polarization (magnitude) + * symbol(s): `J_m` + * application domain: generic + * name: MagneticPolarization + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T + * tensor order: 0 + * definition: `vec(J_m) = μ_0 vec(M)` where `μ_0` is the magnetic constant (item 6-26.1), and `vec(M)` is magnetization (item 6-24) + * remarks: See IEC 60050-121, item 121-11-54. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticPolarizationUnit[1]; + } + + attribute magneticPolarization: MagneticPolarizationValue[*] nonunique :> scalarQuantities; + + attribute def MagneticPolarizationUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianMagneticPolarization3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-29 magnetic polarization (vector) + * symbol(s): `vec(J_m)` + * application domain: generic + * name: MagneticPolarization + * quantity dimension: M^1*T^-2*I^-1 + * measurement unit(s): T + * tensor order: 1 + * definition: `vec(J_m) = μ_0 vec(M)` where `μ_0` is the magnetic constant (item 6-26.1), and `vec(M)` is magnetization (item 6-24) + * remarks: See IEC 60050-121, item 121-11-54. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagneticPolarization3dCoordinateFrame[1]; + } + + attribute cartesianMagneticPolarization3dVector: CartesianMagneticPolarization3dVector :> vectorQuantities; + + attribute def CartesianMagneticPolarization3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticPolarizationUnit[3]; + } + + /* IEC-80000-6 item 6-30 magnetic dipole moment */ + attribute def MagneticDipoleMomentValue :> ScalarQuantityValue { + doc + /* + * source: item 6-30 magnetic dipole moment (magnitude) + * symbol(s): `j_m`, `j` + * application domain: generic + * name: MagneticDipoleMoment + * quantity dimension: L^3*M^1*T^-2*I^-1 + * measurement unit(s): Wb*m + * tensor order: 0 + * definition: `vec(j_m) = μ_0 vec(m)` where `μ_0` is the magnetic constant (item 6-26.1), and `vec(m)` is magnetic moment (item 6-23) + * remarks: See IEC 60050-121, item 121-11-55. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticDipoleMomentUnit[1]; + } + + attribute magneticDipoleMoment: MagneticDipoleMomentValue[*] nonunique :> scalarQuantities; + + attribute def MagneticDipoleMomentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianMagneticDipoleMoment3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-30 magnetic dipole moment (vector) + * symbol(s): `vec(j_m)`, `vec(j)` + * application domain: generic + * name: MagneticDipoleMoment + * quantity dimension: L^3*M^1*T^-2*I^-1 + * measurement unit(s): Wb*m + * tensor order: 1 + * definition: `vec(j_m) = μ_0 vec(m)` where `μ_0` is the magnetic constant (item 6-26.1), and `vec(m)` is magnetic moment (item 6-23) + * remarks: See IEC 60050-121, item 121-11-55. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMagneticDipoleMoment3dCoordinateFrame[1]; + } + + attribute cartesianMagneticDipoleMoment3dVector: CartesianMagneticDipoleMoment3dVector :> vectorQuantities; + + attribute def CartesianMagneticDipoleMoment3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticDipoleMomentUnit[3]; + } + + /* IEC-80000-6 item 6-31 coercivity */ + attribute def CoercivityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-31 coercivity + * symbol(s): `H_(c,B)` + * application domain: generic + * name: Coercivity + * quantity dimension: L^-1*I^1 + * measurement unit(s): A/m + * tensor order: 0 + * definition: magnetic field strength (item 6-25) to be applied to bring the magnetic flux density (item 6-21) in a substance from its remaining magnetic flux density to zero + * remarks: See IEC 60050-121, item 121-12-69. Also called coercive field strength. + */ + attribute :>> num: Real; + attribute :>> mRef: CoercivityUnit[1]; + } + + attribute coercivity: CoercivityValue[*] nonunique :> scalarQuantities; + + attribute def CoercivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-32 magnetic vector potential */ + attribute def MagneticVectorPotentialValue :> ScalarQuantityValue { + doc + /* + * source: item 6-32 magnetic vector potential (magnitude) + * symbol(s): `A` + * application domain: generic + * name: MagneticVectorPotential + * quantity dimension: L^1*M^1*T^-2*I^-1 + * measurement unit(s): Wb/m + * tensor order: 0 + * definition: `vec(B) = rot vec(A)` where `vec(B)` is magnetic flux density (item 6-21) + * remarks: The magnetic vector potential is not unique since any irrotational vector field can be added to it without changing its rotation. See IEC 60050-121, item 121-11-23. + */ + attribute :>> num: Real; + attribute :>> mRef: MagneticVectorPotentialUnit[1]; + } + + attribute magneticVectorPotential: MagneticVectorPotentialValue[*] nonunique :> scalarQuantities; + + attribute def MagneticVectorPotentialUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + attribute def CartesianMagneticVectorPotential3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-32 magnetic vector potential (vector) + * symbol(s): `vec(A)` + * application domain: generic + * name: MagneticVectorPotential + * quantity dimension: L^1*M^1*T^-2*I^-1 + * measurement unit(s): Wb/m + * tensor order: 1 + * definition: `vec(B) = rot vec(A)` where `vec(B)` is magnetic flux density (item 6-21) + * remarks: The magnetic vector potential is not unique since any irrotational vector field can be added to it without changing its rotation. See IEC 60050-121, item 121-11-23. + */ + attribute :>> isBound = true; + attribute :>> mRef: CartesianMagneticVectorPotential3dCoordinateFrame[1]; + } + + attribute cartesianMagneticVectorPotential3dVector: CartesianMagneticVectorPotential3dVector :> vectorQuantities; + + attribute def CartesianMagneticVectorPotential3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = true; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MagneticVectorPotentialUnit[3]; + } + + /* IEC-80000-6 item 6-33 electromagnetic energy density, volumic electromagnetic energy */ + attribute def ElectromagneticEnergyDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-33 electromagnetic energy density, volumic electromagnetic energy + * symbol(s): `w` + * application domain: generic + * name: ElectromagneticEnergyDensity + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): J/m^3 + * tensor order: 0 + * definition: `ω = 1/2*(vec(E)*vec(D) + vec(B) * vec(H))` where `vec(E)` is electric field strength (item 6-10), `vec(D)` is electric flux density (item 6-12), `vec(B)` is magnetic flux density (item 6-21), and `vec(H)` is magnetic field strength (item 6-25) + * remarks: See IEC 60050-121, item 121-11-65. + */ + attribute :>> num: Real; + attribute :>> mRef: ElectromagneticEnergyDensityUnit[1]; + } + + attribute electromagneticEnergyDensity: ElectromagneticEnergyDensityValue[*] nonunique :> scalarQuantities; + + attribute def ElectromagneticEnergyDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias VolumicElectromagneticEnergyUnit for ElectromagneticEnergyDensityUnit; + alias VolumicElectromagneticEnergyValue for ElectromagneticEnergyDensityValue; + alias volumicElectromagneticEnergy for electromagneticEnergyDensity; + + /* IEC-80000-6 item 6-34 Poynting vector */ + attribute def PoyntingVectorMagnitudeValue :> ScalarQuantityValue { + doc + /* + * source: item 6-34 Poynting vector (magnitude) + * symbol(s): `S` + * application domain: generic + * name: PoyntingVectorMagnitude + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2 + * tensor order: 0 + * definition: `vec(S) = vec(E) xx vec(H)` where `vec(E)` is electric field strength (item 6-10) and `vec(H)` is magnetic field strength (item 6-25) + * remarks: See IEC 60050-121, item 121-11-66. + */ + attribute :>> num: Real; + attribute :>> mRef: PoyntingVectorMagnitudeUnit[1]; + } + + attribute poyntingVectorMagnitude: PoyntingVectorMagnitudeValue[*] nonunique :> scalarQuantities; + + attribute def PoyntingVectorMagnitudeUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + attribute def CartesianPoynting3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 6-34 Poynting vector + * symbol(s): `vec(S)` + * application domain: generic + * name: PoyntingVector + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2 + * tensor order: 1 + * definition: `vec(S) = vec(E) xx vec(H)` where `vec(E)` is electric field strength (item 6-10) and `vec(H)` is magnetic field strength (item 6-25) + * remarks: See IEC 60050-121, item 121-11-66. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianPoynting3dCoordinateFrame[1]; + } + + attribute cartesianPoynting3dVector: CartesianPoynting3dVector :> vectorQuantities; + + attribute def CartesianPoynting3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: PoyntingVectorMagnitudeUnit[3]; + } + + /* IEC-80000-6 item 6-35.1 phase speed of electromagnetic waves */ + attribute def PhaseSpeedOfElectromagneticWavesValue :> ScalarQuantityValue { + doc + /* + * source: item 6-35.1 phase speed of electromagnetic waves + * symbol(s): `c` + * application domain: generic + * name: PhaseSpeedOfElectromagneticWaves + * quantity dimension: L^1*T^-1 + * measurement unit(s): m/s + * tensor order: 0 + * definition: `c = ω/k` where `ω` is angular frequency (ISO 80000-3, item 3-16) and `k` is angular wavenumber (ISO 80000-3, item 3-19) + * remarks: See ISO 80000-3, item 3-20.1. + */ + attribute :>> num: Real; + attribute :>> mRef: PhaseSpeedOfElectromagneticWavesUnit[1]; + } + + attribute phaseSpeedOfElectromagneticWaves: PhaseSpeedOfElectromagneticWavesValue[*] nonunique :> scalarQuantities; + + attribute def PhaseSpeedOfElectromagneticWavesUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* IEC-80000-6 item 6-35.2 speed of light, light speed */ + attribute def SpeedOfLightValue :> ScalarQuantityValue { + doc + /* + * source: item 6-35.2 speed of light, light speed + * symbol(s): `c_0` + * application domain: generic + * name: SpeedOfLight + * quantity dimension: L^1*T^-1 + * measurement unit(s): m/s + * tensor order: 0 + * definition: speed of electromagnetic waves in vacuum; `c_0 = 299792458` m/s + * remarks: For this value of `c_0` see ISO 80000-3, item 3-1.a. `c_0 = 1/sqrt(ε_0 μ_0)`. See IEC 60050-111, item 111-13-07. + */ + attribute :>> num: Real; + attribute :>> mRef: SpeedOfLightUnit[1]; + } + + attribute speedOfLight: SpeedOfLightValue[*] nonunique :> scalarQuantities; + + attribute def SpeedOfLightUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + alias LightSpeedUnit for SpeedOfLightUnit; + alias LightSpeedValue for SpeedOfLightValue; + alias lightSpeed for speedOfLight; + + /* IEC-80000-6 item 6-36 source voltage, source tension */ + attribute def SourceVoltageValue :> ScalarQuantityValue { + doc + /* + * source: item 6-36 source voltage, source tension + * symbol(s): `U_s` + * application domain: generic + * name: SourceVoltage + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V + * tensor order: 0 + * definition: voltage (item 6-11.3) between the two terminals of a voltage source when there is no electric current (item 6-1) through the source + * remarks: The name "electromotive force" with the abbreviation EMF and the symbol `E` is deprecated. See IEC 60050-131, item 131-12-22. + */ + attribute :>> num: Real; + attribute :>> mRef: SourceVoltageUnit[1]; + } + + attribute sourceVoltage: SourceVoltageValue[*] nonunique :> scalarQuantities; + + attribute def SourceVoltageUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + alias SourceTensionUnit for SourceVoltageUnit; + alias SourceTensionValue for SourceVoltageValue; + alias sourceTension for sourceVoltage; + + /* IEC-80000-6 item 6-37.1 scalar magnetic potential */ + attribute scalarMagneticPotential: ElectricCurrentValue :> scalarQuantities { + doc + /* + * source: item 6-37.1 scalar magnetic potential + * symbol(s): `V_m`, `φ` + * application domain: generic + * name: ScalarMagneticPotential (specializes ElectricCurrent) + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: for an irrotational magnetic field strength `vec(H) = -nabla V_m` where `vec(H)` is magnetic field strength (item 6-25) + * remarks: The magnetic scalar potential is not unique since any constant scalar field can be added to it without changing its gradient. See IEC 60050-121, item 121-11-58. + */ + } + + /* IEC-80000-6 item 6-37.2 magnetic tension */ + attribute magneticTension: ElectricCurrentValue :> scalarQuantities { + doc + /* + * source: item 6-37.2 magnetic tension + * symbol(s): `U_m` + * application domain: generic + * name: MagneticTension (specializes ElectricCurrent) + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: `U_m = int_(vec(r_a) (C))^(vec(r_b)) vec(H) * d(vec(r))` where `vec(H)` is magnetic field strength (item 6-25) and `vec(r)` is position vector (ISO 80000-3, item 3-1.11) along a given curve `C` from point `a` to point `b` + * remarks: For an irrotational magnetic field strength this quantity is equal to the magnetic potential difference. See IEC 60050-121, item121-11-57. + */ + } + + /* IEC-80000-6 item 6-37.3 magnetomotive force */ + attribute def MagnetomotiveForceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-37.3 magnetomotive force + * symbol(s): `F_m` + * application domain: generic + * name: MagnetomotiveForce + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: `F_m = oint_C vec(H) * d vec(r)` where `vec(H)` is magnetic field strength (item 6-25) and `vec(r)` is position vector (ISO 80000-3, item 3-1 .11) along a closed curve `C` + * remarks: This quantity name is under consideration . Compare remark to item 6-36. See IEC 60050-121, item 121-11-60. + */ + attribute :>> num: Real; + attribute :>> mRef: MagnetomotiveForceUnit[1]; + } + + attribute magnetomotiveForce: MagnetomotiveForceValue[*] nonunique :> scalarQuantities; + + attribute def MagnetomotiveForceUnit :> DerivedUnit { + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = electricCurrentPF; } + } + + /* IEC-80000-6 item 6-37.4 current linkage */ + attribute currentLinkage: ElectricCurrentValue :> scalarQuantities { + doc + /* + * source: item 6-37.4 current linkage + * symbol(s): `Θ` + * application domain: generic + * name: CurrentLinkage (specializes ElectricCurrent) + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: net electric current (item 6-1) through a surface delimited by a closed loop + * remarks: When `Θ` results from `N` (item 6-38) equal electric currents `I` (item 6-1 ), then `Θ = N I`. See IEC 60050-121 , item 121 -11-46. + */ + } + + /* IEC-80000-6 item 6-38 number of turns in a winding */ + attribute numberOfTurnsInAWinding: CountValue :> scalarQuantities { + doc + /* + * source: item 6-38 number of turns in a winding + * symbol(s): `N` + * application domain: generic + * name: NumberOfTurnsInAWinding (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of turns in a winding (same as the quantity name) + * remarks: N may be non-integer number, see ISO 80000-3, item 3-14. + */ + } + + /* IEC-80000-6 item 6-39 reluctance */ + attribute def ReluctanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-39 reluctance + * symbol(s): `R_m`, `R` + * application domain: generic + * name: Reluctance + * quantity dimension: L^-2*M^-1*T^2*I^2 + * measurement unit(s): H^-1 + * tensor order: 0 + * definition: `R_m = U_m/Φ` where `U_m` is magnetic tension (item 6-37.2) and `Φ` is magnetic flux (item 6-22 .1) + * remarks: See IEC 60050-131 , item 131-12-28. + */ + attribute :>> num: Real; + attribute :>> mRef: ReluctanceUnit[1]; + } + + attribute reluctance: ReluctanceValue[*] nonunique :> scalarQuantities; + + attribute def ReluctanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-40 permeance */ + attribute def PermeanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-40 permeance + * symbol(s): `Λ` + * application domain: generic + * name: Permeance + * quantity dimension: L^2*M^1*T^-2*I^-2 + * measurement unit(s): H + * tensor order: 0 + * definition: `Λ = 1/R_m` where `R_m` is reluctance (item 6-39) + * remarks: See IEC 60050-131 , item 131-12-29. + */ + attribute :>> num: Real; + attribute :>> mRef: PermeanceUnit[1]; + } + + attribute permeance: PermeanceValue[*] nonunique :> scalarQuantities; + + attribute def PermeanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-41.1 inductance, self inductance */ + attribute def InductanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-41.1 inductance, self inductance + * symbol(s): `L`, `L_m` + * application domain: generic + * name: Inductance + * quantity dimension: L^2*M^1*T^-2*I^-2 + * measurement unit(s): H + * tensor order: 0 + * definition: `L = Ψ / I` where `I` is an electric current (item 6-1) in a thin conducting loop and `Ψ` is the linked flux (item 6-22.2) caused by that electric current + * remarks: The name "self inductance" is used for the quantity associated to mutual inductance when `n = m`. See IEC 60050-131 , items 131-12-19 and 131 -12-35. + */ + attribute :>> num: Real; + attribute :>> mRef: InductanceUnit[1]; + } + + attribute inductance: InductanceValue[*] nonunique :> scalarQuantities; + + attribute def InductanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + alias SelfInductanceUnit for InductanceUnit; + alias SelfInductanceValue for InductanceValue; + alias selfInductance for inductance; + + /* IEC-80000-6 item 6-41.2 mutual inductance */ + attribute mutualInductance: InductanceValue :> scalarQuantities { + doc + /* + * source: item 6-41.2 mutual inductance + * symbol(s): `L_(mn)` + * application domain: generic + * name: MutualInductance (specializes Inductance) + * quantity dimension: L^2*M^1*T^-2*I^-2 + * measurement unit(s): H + * tensor order: 0 + * definition: `L_(mn) = Ψ_m / I_n` where `I_n` is an electric current (item 6-1) in a thin conducting loop `n` and `Ψ_m` is the linked flux (item 6-22.2) caused by that electric current in another loop `m` + * remarks: `L_(mn) = L_(nm)`. For two loops , the symbol `M` is used for `L_(12)`. See IEC 60050-131, items 131-12-36. + */ + } + + /* IEC-80000-6 item 6-42.1 coupling factor */ + attribute def CouplingFactorValue :> DimensionOneValue { + doc + /* + * source: item 6-42.1 coupling factor + * symbol(s): `k` + * application domain: generic + * name: CouplingFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for inductive coupling between two inductive elements `k = |L_(mn)| / sqrt(L_m L_n)` where `L_m` and `L_n` are their self inductances (item 6-41 .1 ), and `L_(mn)` is their mutual inductance (item 6-41.2) + * remarks: See IEC 60050-131 , item 131-12-41. + */ + } + attribute couplingFactor: CouplingFactorValue :> scalarQuantities; + + /* IEC-80000-6 item 6-42.2 leakage factor */ + attribute def LeakageFactorValue :> DimensionOneValue { + doc + /* + * source: item 6-42.2 leakage factor + * symbol(s): `σ` + * application domain: generic + * name: LeakageFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `σ = 1 - k^2` where `k` is the coupling factor (item 6-42 .1) + * remarks: See IEC 60050-131 , item 131-12-42. + */ + } + attribute leakageFactor: LeakageFactorValue :> scalarQuantities; + + /* IEC-80000-6 item 6-43 conductivity */ + attribute def ConductivityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-43 conductivity + * symbol(s): `σ`, `γ` + * application domain: generic + * name: Conductivity + * quantity dimension: L^-3*M^-1*T^3*I^2 + * measurement unit(s): S/m + * tensor order: 0 + * definition: `vec(J) = σ vec(E)` where `vec(J)` is electric current density (item 6-8) and `vec(E)` is electric field strength (item 6-10) + * remarks: This definition applies to an isotropic medium. For an anisotropic medium `σ` is a second order tensor. `κ` is used in electrochemistry. See IEC 60050-121 , item 121-12-03. + */ + attribute :>> num: Real; + attribute :>> mRef: ConductivityUnit[1]; + } + + attribute conductivity: ConductivityValue[*] nonunique :> scalarQuantities; + + attribute def ConductivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-44 resistivity */ + attribute def ResistivityValue :> ScalarQuantityValue { + doc + /* + * source: item 6-44 resistivity + * symbol(s): `ρ` + * application domain: generic + * name: Resistivity + * quantity dimension: L^3*M^1*T^-3*I^-2 + * measurement unit(s): Ω*m + * tensor order: 0 + * definition: `ρ = 1/σ` if is exists, where `σ` is conductivity (item 6-43) + * remarks: See IEC 60050-121, item 121-12-04. + */ + attribute :>> num: Real; + attribute :>> mRef: ResistivityUnit[1]; + } + + attribute resistivity: ResistivityValue[*] nonunique :> scalarQuantities; + + attribute def ResistivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-45 electric power, instantaneous power */ + attribute electricPower: PowerValue :> scalarQuantities { + doc + /* + * source: item 6-45 electric power, instantaneous power + * symbol(s): `p` + * application domain: generic + * name: ElectricPower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W + * tensor order: 0 + * definition: `p = ui` where `u` is instantaneous voltage (item 6-11 .3) and `i` is instantaneous electric current (item 6-1) + * remarks: See IEC 60050-131 , item 131-11-30. + */ + } + + alias instantaneousPower for electricPower; + + /* IEC-80000-6 item 6-46 resistance */ + attribute def ResistanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-46 resistance + * symbol(s): `R` + * application domain: generic + * name: Resistance + * quantity dimension: L^2*M^1*T^-3*I^-2 + * measurement unit(s): Ω + * tensor order: 0 + * definition: for resistive component `R = u i` where `u` is instantaneous voltage (item 6-11.3) and `i` is instantaneous electric current (item 6-1) + * remarks: For alternating current, see item 6-51.2. See IEC 60050-131, item 131-12-04. + */ + attribute :>> num: Real; + attribute :>> mRef: ResistanceUnit[1]; + } + + attribute resistance: ResistanceValue[*] nonunique :> scalarQuantities; + + attribute def ResistanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-47 conductance */ + attribute def ConductanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-47 conductance + * symbol(s): `G` + * application domain: generic + * name: Conductance + * quantity dimension: L^-2*M^-1*T^3*I^2 + * measurement unit(s): S + * tensor order: 0 + * definition: for resistive component `G = 1/R` where `R` is resistance (item 6-46) + * remarks: For alternating current, see item 6-52.2. See IEC 60050-131, item 131-12-06. + */ + attribute :>> num: Real; + attribute :>> mRef: ConductanceUnit[1]; + } + + attribute conductance: ConductanceValue[*] nonunique :> scalarQuantities; + + attribute def ConductanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-48 phase difference */ + attribute def PhaseDifferenceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-48 phase difference + * symbol(s): `φ` + * application domain: generic + * name: PhaseDifference + * quantity dimension: 1 + * measurement unit(s): rad + * tensor order: 0 + * definition: `φ = φ_u - φ_i` where `φ_u` is the initial phase of the voltage (item 6-11 .3) and `φ_i` is the initial phase of the electric current (item 6-1) + * remarks: When `u = hat(U) cos(ωt - φ_u)`, `i = hat(I) cos(ωt - φ_i)` where `u` is the voltage (item 6-11 . 3) and `i` is the electric current (item 6-1 ), `ω` is angular frequency (ISO 80000-3, item 3-16) and `t` is time (ISO 80000-3, item 3-7), then `φ` is phase difference. For phase angle, see items 6-49 and 6-50. + */ + attribute :>> num: Real; + attribute :>> mRef: PhaseDifferenceUnit[1]; + } + + attribute phaseDifference: PhaseDifferenceValue[*] nonunique :> scalarQuantities; + + attribute def PhaseDifferenceUnit :> DimensionOneUnit { + } + + /* IEC-80000-6 item 6-49 electric current phasor */ + attribute electricCurrentPhasor: ElectricCurrentValue :> scalarQuantities { + doc + /* + * source: item 6-49 electric current phasor + * symbol(s): `underline(I)` + * application domain: generic + * name: ElectricCurrentPhasor (specializes ElectricCurrent) + * quantity dimension: I^1 + * measurement unit(s): A + * tensor order: 0 + * definition: when `i = hat(I) cos(ωt + α)`, where `i` is the electric current (item 6-1 ), `ω` is angular frequency (ISO 80000-3, item 3-16), `t` is time (ISO 80000-3, item 3-7), and `α` is initial phase (ISO 80000-3, item 3-5), then `underline(l) = I e^(jα)` + * remarks: `underline(l)` is the complex representation of the electric current `i = hat(I) cos(ωt + α)`. `j` is the imaginary unit. + */ + } + + /* IEC-80000-6 item 6-50 voltage phasor */ + attribute voltagePhasor: ElectricPotentialDifferenceValue :> scalarQuantities { + doc + /* + * source: item 6-50 voltage phasor + * symbol(s): `underline(U)` + * application domain: generic + * name: VoltagePhasor (specializes ElectricPotentialDifference) + * quantity dimension: L^2*M^1*T^-3*I^-1 + * measurement unit(s): V + * tensor order: 0 + * definition: when `u = hat(U) cos(ωt + α)`, where `u` is the voltage (item 6-11.3 ), `ω` is angular frequency (ISO 80000-3, item 3-16), `t` is time (ISO 80000-3, item 3-7), and `α` is initial phase (ISO 80000-3, item 3-5), then `underline(U) = U e^(jα)` + * remarks: `underline(U)` is the complex representation of the voltage `u = hat(U) cos(ωt + α)`. `j` is the imaginary unit. + */ + } + + /* IEC-80000-6 item 6-51.1 impedance, complex impedance */ + attribute def ImpedanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-51.1 impedance, complex impedance + * symbol(s): `underline(Z)` + * application domain: generic + * name: Impedance + * quantity dimension: L^2*M^1*T^-3*I^-2 + * measurement unit(s): Ω + * tensor order: 0 + * definition: `underline(Z) = underline(U)/underline(I)` where `underline(U)` is the voltage phasor (item 6-50), and `underline(I)` is the electric current phasor (item 6-49) + * remarks: `underline(Z) = R + jX`, where `R` is resistance (item 6-51.2) and `X` is reactance (item 6-51 .3). `j` is the imaginary unit. `underline(Z) = |underline(Z)| e^(jφ)`. See IEC 60050-131 , item 131-12-43. + */ + attribute :>> num: Real; + attribute :>> mRef: ImpedanceUnit[1]; + } + + attribute impedance: ImpedanceValue[*] nonunique :> scalarQuantities; + + attribute def ImpedanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + alias ComplexImpedanceUnit for ImpedanceUnit; + alias ComplexImpedanceValue for ImpedanceValue; + alias complexImpedance for impedance; + + /* IEC-80000-6 item 6-51.2 resistance to alternating current */ + attribute def ResistanceToAlternatingCurrentValue :> ScalarQuantityValue { + doc + /* + * source: item 6-51.2 resistance to alternating current + * symbol(s): `R` + * application domain: generic + * name: ResistanceToAlternatingCurrent + * quantity dimension: L^2*M^1*T^-3*I^-2 + * measurement unit(s): Ω + * tensor order: 0 + * definition: `R = "Re" underline(Z)` where `underline(Z)`, is impedance (item 6-5.1) and `"Re"` denotes the real part + * remarks: See IEC 60050-131, item 131-12-45. + */ + attribute :>> num: Real; + attribute :>> mRef: ResistanceToAlternatingCurrentUnit[1]; + } + + attribute resistanceToAlternatingCurrent: ResistanceToAlternatingCurrentValue[*] nonunique :> scalarQuantities; + + attribute def ResistanceToAlternatingCurrentUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-51.3 reactance */ + attribute def ReactanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-51.3 reactance + * symbol(s): `X` + * application domain: generic + * name: Reactance + * quantity dimension: L^2*M^1*T^-3*I^-2 + * measurement unit(s): Ω + * tensor order: 0 + * definition: `X = "Im" underline(Z)` where `underline(Z)`, is impedance (item 6-5.1) and `"Im"` denotes the imaginary part + * remarks: `X = ωL - 1/(ωC)`. See IEC 60050-131 , item 131-12-46. + */ + attribute :>> num: Real; + attribute :>> mRef: ReactanceUnit[1]; + } + + attribute reactance: ReactanceValue[*] nonunique :> scalarQuantities; + + attribute def ReactanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-51.4 modulus of impedance */ + attribute def ModulusOfImpedanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-51.4 modulus of impedance + * symbol(s): `Z` + * application domain: generic + * name: ModulusOfImpedance + * quantity dimension: L^2*M^1*T^-3*I^-2 + * measurement unit(s): Ω + * tensor order: 0 + * definition: `Z = |underline(Z)|` where `underline(Z)` is impedance (item 6-51.1) + * remarks: See IEC 60050-131 , item 131-12-44. Apparent impedance is defined more generally as the quotient of rms voltage and rms electric current; it is often denoted by `Z`. + */ + attribute :>> num: Real; + attribute :>> mRef: ModulusOfImpedanceUnit[1]; + } + + attribute modulusOfImpedance: ModulusOfImpedanceValue[*] nonunique :> scalarQuantities; + + attribute def ModulusOfImpedanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-52.1 admittance, complex admittance */ + attribute def AdmittanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-52.1 admittance, complex admittance + * symbol(s): `underline(Y)` + * application domain: generic + * name: Admittance + * quantity dimension: L^-2*M^-1*T^3*I^2 + * measurement unit(s): S + * tensor order: 0 + * definition: `underline(Y) = 1/underline(Z)` where `underline(Z)` is impedance (item 6-51.1) + * remarks: `underline(Y) = G + jB`, where `G` is conductance (item 6-52 .2) and `B` is susceptance (item 6-52 .3). `j` is the imaginary unit. `underline(Y) = |underline(Y)| e^-(jφ)`. See IEC 60050-131, item 131 -12-51. + */ + attribute :>> num: Real; + attribute :>> mRef: AdmittanceUnit[1]; + } + + attribute admittance: AdmittanceValue[*] nonunique :> scalarQuantities; + + attribute def AdmittanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + alias ComplexAdmittanceUnit for AdmittanceUnit; + alias ComplexAdmittanceValue for AdmittanceValue; + alias complexAdmittance for admittance; + + /* IEC-80000-6 item 6-52.2 conductance for alternating current */ + attribute conductanceForAlternatingCurrent: ConductanceValue :> scalarQuantities { + doc + /* + * source: item 6-52.2 conductance for alternating current + * symbol(s): `G` + * application domain: generic + * name: ConductanceForAlternatingCurrent (specializes Conductance) + * quantity dimension: L^-2*M^-1*T^3*I^2 + * measurement unit(s): S + * tensor order: 0 + * definition: `G = "Re" underline(Y)` where I is admittance (item 6-52.1) + * remarks: See IEC 60050-131, item 131-12-53. + */ + } + + /* IEC-80000-6 item 6-52.3 susceptance */ + attribute def SusceptanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-52.3 susceptance + * symbol(s): `B` + * application domain: generic + * name: Susceptance + * quantity dimension: L^-2*M^-1*T^3*I^2 + * measurement unit(s): S + * tensor order: 0 + * definition: `B = "Im" underline(Y)` where `underline(Y)` is admittance (item 6-52.1) + * remarks: See IEC 60050-131, item 131-12-54. + */ + attribute :>> num: Real; + attribute :>> mRef: SusceptanceUnit[1]; + } + + attribute susceptance: SusceptanceValue[*] nonunique :> scalarQuantities; + + attribute def SusceptanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-52.4 modulus of admittance */ + attribute def ModulusOfAdmittanceValue :> ScalarQuantityValue { + doc + /* + * source: item 6-52.4 modulus of admittance + * symbol(s): `Y` + * application domain: generic + * name: ModulusOfAdmittance + * quantity dimension: L^-2*M^-1*T^3*I^2 + * measurement unit(s): S + * tensor order: 0 + * definition: `Y = |underline(Y)|` where `underline(Y)` is admittance (item 6-52.1) + * remarks: Apparent admittance is defined more generally as the quotient of rms electric current voltage and rms voltage; it is often denoted by `Y`. + */ + attribute :>> num: Real; + attribute :>> mRef: ModulusOfAdmittanceUnit[1]; + } + + attribute modulusOfAdmittance: ModulusOfAdmittanceValue[*] nonunique :> scalarQuantities; + + attribute def ModulusOfAdmittanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); } + } + + /* IEC-80000-6 item 6-53 quality factor */ + attribute def QualityFactorValue :> DimensionOneValue { + doc + /* + * source: item 6-53 quality factor + * symbol(s): `Q` + * application domain: generic + * name: QualityFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: for non-radiating systems, if `underline(Z) = R + jX`, then `Q = |X|/R` where `underline(Z)` is impedance (item 6-51. 1), `R` is resistance (item 6-51 .2), and `X` is reactance (item 6-51.3) + * remarks: None. + */ + } + attribute qualityFactor: QualityFactorValue :> scalarQuantities; + + /* IEC-80000-6 item 6-54 loss factor */ + attribute def LossFactorValue :> DimensionOneValue { + doc + /* + * source: item 6-54 loss factor + * symbol(s): `d` + * application domain: generic + * name: LossFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `d = 1/Q` where `Q` quality factor (item 6-53) + * remarks: It is also named dissipation factor. + */ + } + attribute lossFactor: LossFactorValue :> scalarQuantities; + + /* IEC-80000-6 item 6-55 loss angle */ + attribute lossAngle: AngularMeasureValue :> scalarQuantities { + doc + /* + * source: item 6-55 loss angle + * symbol(s): `δ` + * application domain: generic + * name: LossAngle (specializes AngularMeasure) + * quantity dimension: 1 + * measurement unit(s): rad + * tensor order: 0 + * definition: `δ = arctan d` where `d` is loss factor (item 6-54) + * remarks: See IEC 60050-131 , item 131-12-49. + */ + } + + /* IEC-80000-6 item 6-56 active power */ + attribute activePower: PowerValue :> scalarQuantities { + doc + /* + * source: item 6-56 active power + * symbol(s): `P` + * application domain: generic + * name: ActivePower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W + * tensor order: 0 + * definition: `P = 1/T int_0^T p dt` where `T` is the period (ISO 80000-3, item 3-12) and `p` is instantaneous power (item 6-45) + * remarks: In complex notation, `P = "Re" underline(S)` where `underline(S)` is complex power (item 6-59). + */ + } + + /* IEC-80000-6 item 6-57 apparent power */ + attribute apparentPower: PowerValue :> scalarQuantities { + doc + /* + * source: item 6-57 apparent power + * symbol(s): ``, `underline(S)`, `` + * application domain: generic + * name: ApparentPower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): V*A + * tensor order: 0 + * definition: `|underline(S)| = U I` where `U` is rms value of voltage (item 6-11.3 and `I` is rms value of electric current (item 6-1) + * remarks: `U = sqrt(1/T int_0^T u^2 dt)` and `I = sqrt(1/T int_0^T i^2 dt)`. When `u = sqrt 2 U cos(ωt)` and `i = sqrt 2 I cos(ωt - φ)`, then `P = U I cos(φ)`, `Q = U I sin(φ)` and `λ = cos(φ)` . See IEC 60050-131, item 131-11-41 . + */ + } + + /* IEC-80000-6 item 6-58 power factor */ + attribute def PowerFactorValue :> DimensionOneValue { + doc + /* + * source: item 6-58 power factor + * symbol(s): `λ` + * application domain: generic + * name: PowerFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `λ = |P|/|S|` where `P` is active power (item 6-56) and `S` is apparent power (item 6-57) + * remarks: See I EC 60050-131, item 131-11-46. + */ + } + attribute powerFactor: PowerFactorValue :> scalarQuantities; + + /* IEC-80000-6 item 6-59 complex power */ + attribute complexPower: PowerValue :> scalarQuantities { + doc + /* + * source: item 6-59 complex power + * symbol(s): `underline(S)` + * application domain: generic + * name: ComplexPower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): V*A + * tensor order: 0 + * definition: `underline(S) = underline(U) * underline(I)^"*"` where `underline(U)` is voltage phasor (item 6-50) and `underline(I)^"*"` is the complex conjugate of the current phasor (item 6-49) + * remarks: `underline(S) = P + jQ` where `P` is active power (item 6-56) and `Q` is reactive power (item 6-60). See IEC 60050-131, item 131-11-39. + */ + } + + /* IEC-80000-6 item 6-60 reactive power */ + attribute reactivePower: PowerValue :> scalarQuantities { + doc + /* + * source: item 6-60 reactive power + * symbol(s): `Q` + * application domain: generic + * name: ReactivePower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): V*A, var + * tensor order: 0 + * definition: `Q = "Im" underline(S)` where `underline(S)` is complex power (item 6-59) + * remarks: See IEC 60050-131, item 131-11-44. + */ + } + + /* IEC-80000-6 item 6-61 non-active power */ + attribute nonActivePower: PowerValue :> scalarQuantities { + doc + /* + * source: item 6-61 non-active power + * symbol(s): `Q'` + * application domain: generic + * name: NonActivePower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): V*A + * tensor order: 0 + * definition: `Q' = sqrt(|underline(S)|^2 - P^2)` where `|underline(S)|` is apparent power (item 6-57) and `P` is active power (item 6-56) + * remarks: See IEC 60050-131, item 131-11-43. + */ + } + + /* IEC-80000-6 item 6-62 active energy */ + attribute activeEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 6-62 active energy + * symbol(s): `W` + * application domain: generic + * name: ActiveEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, W*h + * tensor order: 0 + * definition: `W = int_(t_1)^(t_2) p dt` where `p` is instantaneous power (item 6-45), and the integral interval is the time interval from `t_1` to `t_2` + * remarks: None. + */ + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQInformation.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQInformation.sysml new file mode 100644 index 00000000..ef147f4d --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQInformation.sysml @@ -0,0 +1,958 @@ +standard library package ISQInformation { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard IEC-80000-13:2008 "Information science and technology" + * see also https://www.iso.org/obp/ui/#iso:std:iec:80000:-13:ed-1:v1:en + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQMechanics::PowerValue; + private import ISQSpaceTime::FrequencyValue; + private import ISQThermodynamics::EnergyValue; + + /* IEC-80000-13 item 13-1 traffic intensity */ + attribute def TrafficIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-1 traffic intensity + * symbol(s): `A` + * application domain: generic + * name: TrafficIntensity + * quantity dimension: 1 + * measurement unit(s): E + * tensor order: 0 + * definition: number of simultaneously busy resources in a particular pool of resources + * remarks: See IEC 60050-715, item 715-05-02. The name "erlang" was given to the traffic intensity unit in 1946 by the CCIF, in honour of the Danish mathematician, A. K. Erlang (1878-1929), who was the founder of traffic theory in telephony. + */ + attribute :>> num: Real; + attribute :>> mRef: TrafficIntensityUnit[1]; + } + + attribute trafficIntensity: TrafficIntensityValue[*] nonunique :> scalarQuantities; + + attribute def TrafficIntensityUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-2 traffic offered intensity */ + attribute def TrafficOfferedIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-2 traffic offered intensity + * symbol(s): `A_o` + * application domain: generic + * name: TrafficOfferedIntensity + * quantity dimension: 1 + * measurement unit(s): E + * tensor order: 0 + * definition: traffic intensity (item 13-1) of the traffic that would have been generated by the users of a pool of resources if their use had not been limited by the size of the pool + * remarks: See IEC 60050-715, item 715-05-05. See 13-1 for unit E. + */ + attribute :>> num: Real; + attribute :>> mRef: TrafficOfferedIntensityUnit[1]; + } + + attribute trafficOfferedIntensity: TrafficOfferedIntensityValue[*] nonunique :> scalarQuantities; + + attribute def TrafficOfferedIntensityUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-3 traffic carried intensity, traffic load */ + attribute def TrafficCarriedIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-3 traffic carried intensity, traffic load + * symbol(s): `Y` + * application domain: generic + * name: TrafficCarriedIntensity + * quantity dimension: 1 + * measurement unit(s): E + * tensor order: 0 + * definition: traffic intensity (item 13-1) of the traffic served by a particular pool of resources + * remarks: General practice is to estimate the traffic intensity as an average over a specified time interval, e.g. the busy hour. See IEC 60050-715, item 715-05-04. See 13-1 for unit E. + */ + attribute :>> num: Real; + attribute :>> mRef: TrafficCarriedIntensityUnit[1]; + } + + attribute trafficCarriedIntensity: TrafficCarriedIntensityValue[*] nonunique :> scalarQuantities; + + attribute def TrafficCarriedIntensityUnit :> DimensionOneUnit { + } + + alias TrafficLoadUnit for TrafficCarriedIntensityUnit; + alias TrafficLoadValue for TrafficCarriedIntensityValue; + alias trafficLoad for trafficCarriedIntensity; + + /* IEC-80000-13 item 13-4 mean queue length */ + attribute def MeanQueueLengthValue :> DimensionOneValue { + doc + /* + * source: item 13-4 mean queue length + * symbol(s): `L`, `(Ω)` + * application domain: generic + * name: MeanQueueLength (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: time average of queue length + * remarks: None. + */ + } + attribute meanQueueLength: MeanQueueLengthValue :> scalarQuantities; + + /* IEC-80000-13 item 13-5 loss probability */ + attribute def LossProbabilityValue :> DimensionOneValue { + doc + /* + * source: item 13-5 loss probability + * symbol(s): `B` + * application domain: generic + * name: LossProbability (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: probability for losing a call attempt + * remarks: None. + */ + } + attribute lossProbability: LossProbabilityValue :> scalarQuantities; + + /* IEC-80000-13 item 13-6 waiting probability */ + attribute def WaitingProbabilityValue :> DimensionOneValue { + doc + /* + * source: item 13-6 waiting probability + * symbol(s): `W` + * application domain: generic + * name: WaitingProbability (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: probability for waiting for a resource + * remarks: None. + */ + } + attribute waitingProbability: WaitingProbabilityValue :> scalarQuantities; + + /* IEC-80000-13 item 13-7 call intensity, calling rate */ + attribute def CallIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-7 call intensity, calling rate + * symbol(s): `λ` + * application domain: generic + * name: CallIntensity + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: number of call attempts over a specified time interval divided by the duration (ISO 80000-3, item 3-7) of this interval + * remarks: See IEC 60050-715, item 715-03-13. + */ + attribute :>> num: Real; + attribute :>> mRef: CallIntensityUnit[1]; + } + + attribute callIntensity: CallIntensityValue[*] nonunique :> scalarQuantities; + + attribute def CallIntensityUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + alias CallingRateUnit for CallIntensityUnit; + alias CallingRateValue for CallIntensityValue; + alias callingRate for callIntensity; + + /* IEC-80000-13 item 13-8 completed call intensity */ + attribute def CompletedCallIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-8 completed call intensity + * symbol(s): `μ` + * application domain: generic + * name: CompletedCallIntensity + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: call intensity (item 13-7) for the call attempts that result in the transmission of an answer signal + * remarks: For a definition of the complete call attempt, see IEC 60050-715, item 715-03-11. + */ + attribute :>> num: Real; + attribute :>> mRef: CompletedCallIntensityUnit[1]; + } + + attribute completedCallIntensity: CompletedCallIntensityValue[*] nonunique :> scalarQuantities; + + attribute def CompletedCallIntensityUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* IEC-80000-13 item 13-9 storage capacity, storage size */ + attribute def StorageCapacityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-9 storage capacity, storage size + * symbol(s): `M` + * application domain: generic + * name: StorageCapacity + * quantity dimension: 1 + * measurement unit(s): bit, o, B, 1 + * tensor order: 0 + * definition: amount of data that can be contained in a storage device, expressed as a number of specified data elements + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: StorageCapacityUnit[1]; + } + + attribute storageCapacity: StorageCapacityValue[*] nonunique :> scalarQuantities; + + attribute def StorageCapacityUnit :> DimensionOneUnit { + } + + alias StorageSizeUnit for StorageCapacityUnit; + alias StorageSizeValue for StorageCapacityValue; + alias storageSize for storageCapacity; + + /* IEC-80000-13 item 13-10 equivalent binary storage capacity */ + attribute def EquivalentBinaryStorageCapacityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-10 equivalent binary storage capacity + * symbol(s): `M_e` + * application domain: generic + * name: EquivalentBinaryStorageCapacity + * quantity dimension: 1 + * measurement unit(s): bit, 1 + * tensor order: 0 + * definition: `M_e = log_2 n` where `n` is the number of possible states of the given device + * remarks: The minimum storage capacity of a bit-organized storage device which would contain the amount of data in the given storage device is equal to the smallest integer greater than or equal to the equivalent binary storage capacity. + */ + attribute :>> num: Real; + attribute :>> mRef: EquivalentBinaryStorageCapacityUnit[1]; + } + + attribute equivalentBinaryStorageCapacity: EquivalentBinaryStorageCapacityValue[*] nonunique :> scalarQuantities; + + attribute def EquivalentBinaryStorageCapacityUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-11 transfer rate */ + attribute def TransferRateValue :> ScalarQuantityValue { + doc + /* + * source: item 13-11 transfer rate + * symbol(s): `r`, `(ν)` + * application domain: generic + * name: TransferRate + * quantity dimension: T^-1 + * measurement unit(s): o/s, B/s, s^-1 + * tensor order: 0 + * definition: quotient of the number of specified data elements transferred in a time interval by the duration of this interval + * remarks: The symbol `ν` is the Greek letter nu. A subscript referring to a specified data element can be added to the symbol. EXAMPLES: digit rate, `r_d` or `ν_d` (see IEC 60050-702 and 60050-704, items 702-05-23 and 704-16-06); transfer rate for octets (or bytes), `r_o`, `r_B`, `ν_o`, or `ν_B`; binary digit rate or bit rate (item 13-13). + */ + attribute :>> num: Real; + attribute :>> mRef: TransferRateUnit[1]; + } + + attribute transferRate: TransferRateValue[*] nonunique :> scalarQuantities; + + attribute def TransferRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* IEC-80000-13 item 13-12 period of data elements */ + attribute periodOfDataElements: DurationValue :> scalarQuantities { + doc + /* + * source: item 13-12 period of data elements + * symbol(s): `T` + * application domain: generic + * name: PeriodOfDataElements (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: `T = 1/r`, where `r` is transfer rate (item 13-11) when the data elements are transmitted in series + * remarks: A subscript referring to a specified data element can be added to the symbol. EXAMPLES: period of digits, `T_d`; period of octets (or bytes), `T_o` or `T_B`. + */ + } + + /* IEC-80000-13 item 13-13 binary digit rate, bit rate */ + attribute def BinaryDigitRateValue :> ScalarQuantityValue { + doc + /* + * source: item 13-13 binary digit rate, bit rate + * symbol(s): `r_b`, `r_"bit"`, `(ν_b)`, `(ν_"bit")` + * application domain: generic + * name: BinaryDigitRate + * quantity dimension: T^-1 + * measurement unit(s): bit/s, s^-1 + * tensor order: 0 + * definition: transfer rate (item 13-11) where the data elements are binary digits + * remarks: In English, the systematic name would be "transfer rate for binary digits". See IEC 60050-704, item 704-16-07. The bit per second may be combined with prefixes, for example megabit per second, symbol Mbit/s. + */ + attribute :>> num: Real; + attribute :>> mRef: BinaryDigitRateUnit[1]; + } + + attribute binaryDigitRate: BinaryDigitRateValue[*] nonunique :> scalarQuantities; + + attribute def BinaryDigitRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + alias BitRateUnit for BinaryDigitRateUnit; + alias BitRateValue for BinaryDigitRateValue; + alias bitRate for binaryDigitRate; + + /* IEC-80000-13 item 13-14 period of binary digits, bit period */ + attribute periodOfBinaryDigits: DurationValue :> scalarQuantities { + doc + /* + * source: item 13-14 period of binary digits, bit period + * symbol(s): `T_b`, `T_"bit"` + * application domain: generic + * name: PeriodOfBinaryDigits (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: `T_b = 1/r_b`, where `r_b` is the binary digit rate (item 13-13) when the binary digits are transmitted in series + * remarks: None. + */ + } + + alias bitPeriod for periodOfBinaryDigits; + + /* IEC-80000-13 item 13-15 equivalent binary digit rate, equivalent bit rate */ + attribute def EquivalentBinaryDigitRateValue :> ScalarQuantityValue { + doc + /* + * source: item 13-15 equivalent binary digit rate, equivalent bit rate + * symbol(s): `r_e`, `(ν_e)` + * application domain: generic + * name: EquivalentBinaryDigitRate + * quantity dimension: T^-1 + * measurement unit(s): bit/s, s^-1 + * tensor order: 0 + * definition: binary digit rate (item 13-13) equivalent to a transfer rate (item 13-11) for specified data elements + * remarks: In English, the systematic name would be "equivalent binary transfer rate". See IEC 60050-704, item 704-17-05. + */ + attribute :>> num: Real; + attribute :>> mRef: EquivalentBinaryDigitRateUnit[1]; + } + + attribute equivalentBinaryDigitRate: EquivalentBinaryDigitRateValue[*] nonunique :> scalarQuantities; + + attribute def EquivalentBinaryDigitRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + alias EquivalentBitRateUnit for EquivalentBinaryDigitRateUnit; + alias EquivalentBitRateValue for EquivalentBinaryDigitRateValue; + alias equivalentBitRate for equivalentBinaryDigitRate; + + /* IEC-80000-13 item 13-16 modulation rate, line digit rate */ + attribute def ModulationRateValue :> ScalarQuantityValue { + doc + /* + * source: item 13-16 modulation rate, line digit rate + * symbol(s): `r_m`, `u` + * application domain: generic + * name: ModulationRate + * quantity dimension: T^-1 + * measurement unit(s): Bd, s^-1 + * tensor order: 0 + * definition: inverse of the shortest duration of a signal element + * remarks: The term “modulation rate” is used in conventional telegraphy and data transmission. In isochronous digital transmission, the term "line digit rate" is generally used. See IEC 60050-704, item 704-17-03. Baud is a special name for the second to the power minus one for this quantity. The baud may be combined with prefixes, for example kilobaud, symbol kBd, megabaud, symbol MBd. + */ + attribute :>> num: Real; + attribute :>> mRef: ModulationRateUnit[1]; + } + + attribute modulationRate: ModulationRateValue[*] nonunique :> scalarQuantities; + + attribute def ModulationRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + alias LineDigitRateUnit for ModulationRateUnit; + alias LineDigitRateValue for ModulationRateValue; + alias lineDigitRate for modulationRate; + + /* IEC-80000-13 item 13-17 quantizing distortion rate */ + attribute quantizingDistortionRate: PowerValue :> scalarQuantities { + doc + /* + * source: item 13-17 quantizing distortion rate + * symbol(s): `T_Q` + * application domain: generic + * name: QuantizingDistortionRate (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W + * tensor order: 0 + * definition: distortion of a signal resulting from the process of quantizing an original signal when the values to be quantized are within the working range of the quantizer + * remarks: See IEC 60050-704, item 704-24-13. + */ + } + + /* IEC-80000-13 item 13-18 carrier power */ + attribute carrierPower: PowerValue :> scalarQuantities { + doc + /* + * source: item 13-18 carrier power + * symbol(s): `P_c`, `C` + * application domain: generic + * name: CarrierPower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W + * tensor order: 0 + * definition: power supplied to the antenna feed line by a radio transmitter taken under the condition of no modulation + * remarks: See IEC 60050-713, item 713-09-20. + */ + } + + /* IEC-80000-13 item 13-19 signal energy per binary digit */ + attribute signalEnergyPerBinaryDigit: EnergyValue :> scalarQuantities { + doc + /* + * source: item 13-19 signal energy per binary digit + * symbol(s): `E_b`, `E_"bit"` + * application domain: generic + * name: SignalEnergyPerBinaryDigit (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J + * tensor order: 0 + * definition: `E_b = P_c*T_b`, where `P_c` is carrier power (item 13-18) and `T_b` is period of binary digits (item 13-14) + * remarks: None. + */ + } + + /* IEC-80000-13 item 13-20 error probability */ + attribute def ErrorProbabilityValue :> DimensionOneValue { + doc + /* + * source: item 13-20 error probability + * symbol(s): `P` + * application domain: generic + * name: ErrorProbability (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: probability that a data element be incorrectly received + * remarks: A subscript referring to a specified data element can be added to the symbol. EXAMPLES: error probability for binary digits or bit error probability, `P_b` or `P_bit`; block error probability, `P_bl`. The measured value is designated as "error ratio", whereas "error rate" is deprecated, for example, bit error ratio (BER), block error ratio. See IEC 60050-704 and IEC 60050-721. + */ + } + attribute errorProbability: ErrorProbabilityValue :> scalarQuantities; + + /* IEC-80000-13 item 13-21 Hamming distance */ + attribute hammingDistance: CountValue :> scalarQuantities { + doc + /* + * source: item 13-21 Hamming distance + * symbol(s): `d_n` + * application domain: generic + * name: HammingDistance (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of digit positions in which the corresponding digits of two words of the same length are different + * remarks: See IEC 60050-721, item 721-08-25. + */ + } + + /* IEC-80000-13 item 13-22 clock frequency, clock rate */ + attribute clockFrequency: FrequencyValue :> scalarQuantities { + doc + /* + * source: item 13-22 clock frequency, clock rate + * symbol(s): `f_"cl"` + * application domain: generic + * name: ClockFrequency (specializes Frequency) + * quantity dimension: T^-1 + * measurement unit(s): Hz + * tensor order: 0 + * definition: frequency at which a clock oscillates + * remarks: None. + */ + } + + alias clockRate for clockFrequency; + + /* IEC-80000-13 item 13-23 decision content */ + attribute def DecisionContentValue :> DimensionOneValue { + doc + /* + * source: item 13-23 decision content + * symbol(s): `D_a` + * application domain: generic + * name: DecisionContent (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `D_a` = `log_a n`, where `a` is the number of possibilities at each decision and `n` the number of events + * remarks: See ISO/IEC 2382-16, item 16.03.01. See also IEC 60027-3. When the same base is used for the same number of events then `D_a = H_0` , where `H_0` is maximum entropy (item 13-28). + */ + } + attribute decisionContent: DecisionContentValue :> scalarQuantities; + + /* IEC-80000-13 item 13-24 information content */ + attribute def InformationContentValue :> ScalarQuantityValue { + doc + /* + * source: item 13-24 information content + * symbol(s): `I(x)` + * application domain: generic + * name: InformationContent + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `I(x) = log_2(1/(p(x)))` Sh `= log(1/(p(x)))` Hart `= ln(1/(p(x)))` nat, where `p(x)` is the probability of event `x` + * remarks: See ISO/IEC 2382-16, item 16.03.02. See also IEC 60027-3. + */ + attribute :>> num: Real; + attribute :>> mRef: InformationContentUnit[1]; + } + + attribute informationContent: InformationContentValue[*] nonunique :> scalarQuantities; + + attribute def InformationContentUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-25 entropy */ + attribute def EntropyForInformationScienceValue :> ScalarQuantityValue { + doc + /* + * source: item 13-25 entropy + * symbol(s): `H` + * application domain: information science + * name: Entropy + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `H(X) = sum_(i=1)^n p(x_i) I(x_i)` for the set `X = {x_1, ..., x_n}`, where `p(x_i)` is the probability and `I(x_i)` is the information content of event `x_i` + * remarks: See ISO/IEC 2382-16, item 16.03.02. See also IEC 60027-3. + */ + attribute :>> num: Real; + attribute :>> mRef: EntropyForInformationScienceUnit[1]; + } + + attribute entropyForInformationScience: EntropyForInformationScienceValue[*] nonunique :> scalarQuantities; + + attribute def EntropyForInformationScienceUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-26 maximum entropy */ + attribute def MaximumEntropyValue :> ScalarQuantityValue { + doc + /* + * source: item 13-26 maximum entropy + * symbol(s): `H_0`, `H_"max"` + * application domain: information science + * name: MaximumEntropy + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: maximum entropy occurs when `p(x_i) = 1/n` for `i = 1, ..., n` + * remarks: The maximum entropy is sometimes called "decision content" because the value is the same when the base is an integer, for the same number of events. See item 13-23. + */ + attribute :>> num: Real; + attribute :>> mRef: MaximumEntropyUnit[1]; + } + + attribute maximumEntropy: MaximumEntropyValue[*] nonunique :> scalarQuantities; + + attribute def MaximumEntropyUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-27 relative entropy */ + attribute def RelativeEntropyValue :> DimensionOneValue { + doc + /* + * source: item 13-27 relative entropy + * symbol(s): `H_r` + * application domain: information science + * name: RelativeEntropy (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `H_r = H / H_0`, where `H` is entropy (item 13-25) and `H_0` is maximum entropy (item 13-26) + * remarks: See ISO/IEC 2382-16, item 16.03.04. + */ + } + attribute relativeEntropy: RelativeEntropyValue :> scalarQuantities; + + /* IEC-80000-13 item 13-28 redundancy */ + attribute def RedundancyValue :> ScalarQuantityValue { + doc + /* + * source: item 13-28 redundancy + * symbol(s): `R` + * application domain: information science + * name: Redundancy + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `R = H_0 − H`, where `H` is entropy (item 13-25) and `H_0` is maximum entropy (item 13-26) + * remarks: See ISO/IEC 2382-16, item 16.03.05. + */ + attribute :>> num: Real; + attribute :>> mRef: RedundancyUnit[1]; + } + + attribute redundancy: RedundancyValue[*] nonunique :> scalarQuantities; + + attribute def RedundancyUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-29 relative redundancy */ + attribute def RelativeRedundancyValue :> DimensionOneValue { + doc + /* + * source: item 13-29 relative redundancy + * symbol(s): `r` + * application domain: information science + * name: RelativeRedundancy (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: `r = R / H_0`, where `R` is redundancy (item 13-28) and `H_0` is maximum entropy (item 13-26) + * remarks: See ISO/IEC 2382-16, item 16.04.01. + */ + } + attribute relativeRedundancy: RelativeRedundancyValue :> scalarQuantities; + + /* IEC-80000-13 item 13-30 joint information content */ + attribute def JointInformationContentValue :> ScalarQuantityValue { + doc + /* + * source: item 13-30 joint information content + * symbol(s): `I(x,y)` + * application domain: generic + * name: JointInformationContent + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `I(x,y) = log_2(1/(p(x,y)))` Sh `= log(1/(p(x,y)))` Hart `= ln(1/(p(x,y)))` nat, where `p(x,y)` is the joint probability of events `x` and `y` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: JointInformationContentUnit[1]; + } + + attribute jointInformationContent: JointInformationContentValue[*] nonunique :> scalarQuantities; + + attribute def JointInformationContentUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-31 conditional information content */ + attribute def ConditionalInformationContentValue :> ScalarQuantityValue { + doc + /* + * source: item 13-31 conditional information content + * symbol(s): `I(x|y)` + * application domain: generic + * name: ConditionalInformationContent + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: information content (item 13-2) of event `x` under the condition that `y` has occurred: `I(x|y) = I(x,y) − I( y)` + * remarks: See ISO/IEC 2382-16, item 16.04.02. + */ + attribute :>> num: Real; + attribute :>> mRef: ConditionalInformationContentUnit[1]; + } + + attribute conditionalInformationContent: ConditionalInformationContentValue[*] nonunique :> scalarQuantities; + + attribute def ConditionalInformationContentUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-32 conditional entropy, mean conditional information content, average conditional information content */ + attribute def ConditionalEntropyValue :> ScalarQuantityValue { + doc + /* + * source: item 13-32 conditional entropy, mean conditional information content, average conditional information content + * symbol(s): `H(X|Y)` + * application domain: generic + * name: ConditionalEntropy + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `H(X|Y) = sum_(i=1)^n sum_(j=1)^m p(x_i,y_j) I(x_i,y_j)` where `p(x_i,y_j)` is the joint probability of events `x_i` and `y_j`, and `I(x_i,y_j)` is conditional information content (item 13-31) + * remarks: See ISO/IEC 2382-16, item 16.04.04. + */ + attribute :>> num: Real; + attribute :>> mRef: ConditionalEntropyUnit[1]; + } + + attribute conditionalEntropy: ConditionalEntropyValue[*] nonunique :> scalarQuantities; + + attribute def ConditionalEntropyUnit :> DimensionOneUnit { + } + + alias MeanConditionalInformationContentUnit for ConditionalEntropyUnit; + alias MeanConditionalInformationContentValue for ConditionalEntropyValue; + alias meanConditionalInformationContent for conditionalEntropy; + + alias AverageConditionalInformationContentUnit for ConditionalEntropyUnit; + alias AverageConditionalInformationContentValue for ConditionalEntropyValue; + alias averageConditionalInformationContent for conditionalEntropy; + + /* IEC-80000-13 item 13-33 equivocation */ + attribute def EquivocationValue :> ScalarQuantityValue { + doc + /* + * source: item 13-33 equivocation + * symbol(s): `H(X|Y)` + * application domain: generic + * name: Equivocation + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: conditional entropy (item 13-32) of a set X of emitted characters given the set Y of received characters + * remarks: Equivocation is a quantitative measure of the loss of information due to noise. See ISO/IEC 2382-16, item 16.04.05. + */ + attribute :>> num: Real; + attribute :>> mRef: EquivocationUnit[1]; + } + + attribute equivocation: EquivocationValue[*] nonunique :> scalarQuantities; + + attribute def EquivocationUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-34 irrelevance */ + attribute def IrrelevanceValue :> ScalarQuantityValue { + doc + /* + * source: item 13-34 irrelevance + * symbol(s): `H(Y|X)` + * application domain: generic + * name: Irrelevance + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: conditional entropy (item 13-32) of a set `Y` of received characters given the set `X` of emitted characters: `H(Y|X) = H(X|Y) + H(Y) − H(X)`, where `H(X|Y)` is equivocation (item 13-33) and `H` is entropy (item 13-25) + * remarks: Irrelevance is a quantitative measure of the information added to the emitted information due to distortion. See ISO/IEC 2382 16, item 16.04.06. + */ + attribute :>> num: Real; + attribute :>> mRef: IrrelevanceUnit[1]; + } + + attribute irrelevance: IrrelevanceValue[*] nonunique :> scalarQuantities; + + attribute def IrrelevanceUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-35 transinformation content */ + attribute def TransinformationContentValue :> ScalarQuantityValue { + doc + /* + * source: item 13-35 transinformation content + * symbol(s): `T(x,y)` + * application domain: generic + * name: TransinformationContent + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `T(x,y) = I(x) + I(y) − I(x,y)`, where `I(x)` and `I(y)` are the information contents (13-24) of events `x` and `y`, respectively, and `I(x,y)` is their joint information content (13-30) + * remarks: See ISO/IEC 2382-16, item 16.04.07. + */ + attribute :>> num: Real; + attribute :>> mRef: TransinformationContentUnit[1]; + } + + attribute transinformationContent: TransinformationContentValue[*] nonunique :> scalarQuantities; + + attribute def TransinformationContentUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-36 mean transinformation content */ + attribute def MeanTransinformationContentValue :> ScalarQuantityValue { + doc + /* + * source: item 13-36 mean transinformation content + * symbol(s): `T` + * application domain: generic + * name: MeanTransinformationContent + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `T(X,Y) = sum_(i=1)^n sum_(j=1)^m p(x_i,y_j) T(x_i,y_j)` for the sets `X = {x_1, ..., x_n}`, `Y = {y_1, ..., y_m}`, where `p(x_i,y_j)` is the joint probability of events `x_i` and `y_j`, and `T(x_i,y_j)` is their transinformation content (item 13-35) + * remarks: See ISO/IEC 2382-16, item 16.04.08. In practice, the unit "shannon per character" is generally used, and sometimes the units "hartley per character" and "natural unit per character". + */ + attribute :>> num: Real; + attribute :>> mRef: MeanTransinformationContentUnit[1]; + } + + attribute meanTransinformationContent: MeanTransinformationContentValue[*] nonunique :> scalarQuantities; + + attribute def MeanTransinformationContentUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-37 character mean entropy */ + attribute def CharacterMeanEntropyValue :> ScalarQuantityValue { + doc + /* + * source: item 13-37 character mean entropy + * symbol(s): `H'` + * application domain: generic + * name: CharacterMeanEntropy + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `H' = lim_(m->∞) H_m/m` where `H_m` is the entropy (item 13-3) of the set of all sequences of `m` characters + * remarks: See ISO/IEC 2382-16, item 16.04.09. + */ + attribute :>> num: Real; + attribute :>> mRef: CharacterMeanEntropyUnit[1]; + } + + attribute characterMeanEntropy: CharacterMeanEntropyValue[*] nonunique :> scalarQuantities; + + attribute def CharacterMeanEntropyUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-38 average information rate */ + attribute def AverageInformationRateValue :> ScalarQuantityValue { + doc + /* + * source: item 13-38 average information rate + * symbol(s): `H^"*"` + * application domain: generic + * name: AverageInformationRate + * quantity dimension: T^-1 + * measurement unit(s): Sh/s, Hart/s, nat/s + * tensor order: 0 + * definition: `H^"*" = (H')/(t(X))`, where `H'` is character mean entropy (item 13-37) and `t(X)` is the mean value of the duration of a character in the set `X` + * remarks: See ISO/IEC 2382-16, item 16.04.10. + */ + attribute :>> num: Real; + attribute :>> mRef: AverageInformationRateUnit[1]; + } + + attribute averageInformationRate: AverageInformationRateValue[*] nonunique :> scalarQuantities; + + attribute def AverageInformationRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* IEC-80000-13 item 13-39 character mean transinformation content */ + attribute def CharacterMeanTransinformationContentValue :> ScalarQuantityValue { + doc + /* + * source: item 13-39 character mean transinformation content + * symbol(s): `T'` + * application domain: generic + * name: CharacterMeanTransinformationContent + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `T' = lim_(m->∞) T_m/m` where `T_m` is the mean transinformation content (item 13-36) for all pairs of input and output sequences of `m` characters + * remarks: See ISO/IEC 2382-16, item 16.04.11. In practice, the unit "shannon per character" is generally used, and sometimes the units "hartley per character" and "natural unit per character". + */ + attribute :>> num: Real; + attribute :>> mRef: CharacterMeanTransinformationContentUnit[1]; + } + + attribute characterMeanTransinformationContent: CharacterMeanTransinformationContentValue[*] nonunique :> scalarQuantities; + + attribute def CharacterMeanTransinformationContentUnit :> DimensionOneUnit { + } + + /* IEC-80000-13 item 13-40 average transinformation rate */ + attribute def AverageTransinformationRateValue :> ScalarQuantityValue { + doc + /* + * source: item 13-40 average transinformation rate + * symbol(s): `T^"*"` + * application domain: generic + * name: AverageTransinformationRate + * quantity dimension: T^-1 + * measurement unit(s): Sh/s, Hart/s, nat/s + * tensor order: 0 + * definition: `T^"*" = (T')/(sum_(i=1)^n sum_(j=1)^m p(x_i,y_j) t(x_i,y_j) )`, where `T'` is character mean transinformation content (item 13-39) and `t(x_i,y_j)` is the mean duration of the pair of characters `(x_i,y_j)` with joint probability `p(x_i,y_j)` + * remarks: See ISO/IEC 2382-16, item 16.04.12. + */ + attribute :>> num: Real; + attribute :>> mRef: AverageTransinformationRateUnit[1]; + } + + attribute averageTransinformationRate: AverageTransinformationRateValue[*] nonunique :> scalarQuantities; + + attribute def AverageTransinformationRateUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* IEC-80000-13 item 13-41 channel capacity per character, channel capacity */ + attribute def ChannelCapacityPerCharacterValue :> ScalarQuantityValue { + doc + /* + * source: item 13-41 channel capacity per character, channel capacity + * symbol(s): `C'` + * application domain: generic + * name: ChannelCapacityPerCharacter + * quantity dimension: 1 + * measurement unit(s): Sh, Hart, nat + * tensor order: 0 + * definition: `C' = max T'`, where `T'` is character mean transinformation content (item 13-39) + * remarks: See ISO/IEC 2382-16, item 16.04.13. In practice, the unit "shannon per character" is generally used, and sometimes the units "hartley per character" and "natural unit per character". + */ + attribute :>> num: Real; + attribute :>> mRef: ChannelCapacityPerCharacterUnit[1]; + } + + attribute channelCapacityPerCharacter: ChannelCapacityPerCharacterValue[*] nonunique :> scalarQuantities; + + attribute def ChannelCapacityPerCharacterUnit :> DimensionOneUnit { + } + + alias ChannelCapacityUnit for ChannelCapacityPerCharacterUnit; + alias ChannelCapacityValue for ChannelCapacityPerCharacterValue; + alias channelCapacity for channelCapacityPerCharacter; + + /* IEC-80000-13 item 13-42 channel time capacity */ + attribute def ChannelTimeCapacityValue :> ScalarQuantityValue { + doc + /* + * source: item 13-42 channel time capacity + * symbol(s): `C^"*"` + * application domain: generic + * name: ChannelTimeCapacity + * quantity dimension: T^-1 + * measurement unit(s): Sh/s, Hart/s, nat/s + * tensor order: 0 + * definition: `C^"*" = max T^"*"`, where `T^"*"` is average transinformation rate (item 13-40) + * remarks: See ISO/IEC 2382-16, item 16.04.13. Note for SysML ISQ: Alias "channel capacity", that was present in IEC 80000-12:2008, has been removed as it duplicates the alias of channel capacity per character (item 13-41). + */ + attribute :>> num: Real; + attribute :>> mRef: ChannelTimeCapacityUnit[1]; + } + + attribute channelTimeCapacity: ChannelTimeCapacityValue[*] nonunique :> scalarQuantities; + + attribute def ChannelTimeCapacityUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQLight.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQLight.sysml new file mode 100644 index 00000000..2906b2b1 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQLight.sysml @@ -0,0 +1,1537 @@ +standard library package ISQLight { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-7:2019 "Light and radiation" + * see also https://www.iso.org/standard/64977.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQThermodynamics::EnergyValue; + + /* ISO-80000-7 item 7-1.1 speed of light in a medium */ + attribute def SpeedOfLightInAMediumValue :> ScalarQuantityValue { + doc + /* + * source: item 7-1.1 speed of light in a medium + * symbol(s): `c` + * application domain: generic + * name: SpeedOfLightInAMedium + * quantity dimension: L^1*T^-1 + * measurement unit(s): m*s^-1 + * tensor order: 0 + * definition: phase speed of an electromagnetic wave at a given point in a medium + * remarks: See also ISO 80000-3. The value of the speed of light in a medium can depend on the frequency, polarization, and direction. For the definition of the speed of electromagnetic waves in vacuum, `c_0`, see ISO 80000-1. + */ + attribute :>> num: Real; + attribute :>> mRef: SpeedOfLightInAMediumUnit[1]; + } + + attribute speedOfLightInAMedium: SpeedOfLightInAMediumValue[*] nonunique :> scalarQuantities; + + attribute def SpeedOfLightInAMediumUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-7 item 7-1.2 refractive index */ + attribute def RefractiveIndexValue :> DimensionOneValue { + doc + /* + * source: item 7-1.2 refractive index + * symbol(s): `n` + * application domain: generic + * name: RefractiveIndex (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of speed of light in vacuum (ISO 80000-1) and speed of light in a medium (item 7-1.1) + * remarks: The value of the refractive index can depend on the frequency, polarization, and direction. The refractive index is expressed by n = c_0/c, where c_()_0 is the speed of light in vacuum and c is the speed of light in the medium. For a medium with absorption, the complex refractive index n is defined by n = n + ik where k is spectral absorption index (IEC 60050-845) and i is imaginary unit. The refractivity is expressed by n -1, where n is refractive index. + */ + } + attribute refractiveIndex: RefractiveIndexValue :> scalarQuantities; + + /* ISO-80000-7 item 7-2.1 radiant energy */ + attribute radiantEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 7-2.1 radiant energy + * symbol(s): `Q_e`, `W`, `U`, `(Q)` + * application domain: electromagnetism + * name: RadiantEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: energy (ISO 80000-5) emitted, transferred or received in form of electromagnetic waves + * remarks: Radiant energy can be expressed by the time integral of radiant flux (item 7-4.1), `Φ_e`, over a given duration (ISO 80000-3), `Δt`: `Q_e = int_(Δ t) Φ_e dt`. Radiant energy is expressed either as a function of wavelength (ISO 80000-3), `λ`, as a function of frequency (ISO 80000-3), `ν`, or as a function of wavenumber, `σ`. (See also 0.1.) The corresponding photometric quantity is "luminous energy" (item 7-12). The corresponding quantity for photons is "photon energy" (item 7-19.2). + */ + } + + /* ISO-80000-7 item 7-2.2 spectral radiant energy */ + attribute def SpectralRadiantEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 7-2.2 spectral radiant energy + * symbol(s): `Q_(e,λ)`, `W_λ`, `U_λ`, `(Q_λ)` + * application domain: generic + * name: SpectralRadiantEnergy + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): J/nm, kg*m*s^-2 + * tensor order: 0 + * definition: spectral density of radiant energy, expressed by `Q_(e,λ) = (dQ_e) / (dλ)`, where `Q_e` is radiant energy (item 7-2.1) in terms of wavelength `λ` (ISO 80000-3) + * remarks: The integral of (total) radiant energy is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `Q_e = int_(λ_1)^(λ_2) Q_(e,λ) dλ` + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantEnergyUnit[1]; + } + + attribute spectralRadiantEnergy: SpectralRadiantEnergyValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantEnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-3.1 radiant energy density */ + attribute def RadiantEnergyDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 7-3.1 radiant energy density + * symbol(s): `w`, `(ρ_e)` + * application domain: generic + * name: RadiantEnergyDensity + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): J/m^3, kg*m^-1*s^-2 + * tensor order: 0 + * definition: volumetric density of radiant energy, expressed by `w = (dQ_e)/(dV)`, where `Q_e` is radiant energy (item 7-2.1) in an elementary three-dimensional domain and `V` is the volume (ISO 80000-3) of that domain + * remarks: Radiant energy density within a Planckian radiator is given by `w = (4 σ)/(c_0) T^4` where `σ` is the Stefan-Boltzmann constant (ISO 80000-1), `c_0` is speed of light in vacuum (ISO 80000-1) and `T` is thermodynamic temperature (ISO 80000-5). + */ + attribute :>> num: Real; + attribute :>> mRef: RadiantEnergyDensityUnit[1]; + } + + attribute radiantEnergyDensity: RadiantEnergyDensityValue[*] nonunique :> scalarQuantities; + + attribute def RadiantEnergyDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-3.2 spectral radiant energy density in terms of wavelength */ + attribute def SpectralRadiantEnergyDensityInTermsOfWavelengthValue :> ScalarQuantityValue { + doc + /* + * source: item 7-3.2 spectral radiant energy density in terms of wavelength + * symbol(s): `w_λ` + * application domain: generic + * name: SpectralRadiantEnergyDensityInTermsOfWavelength + * quantity dimension: L^-2*M^1*T^-2 + * measurement unit(s): J/(m^3*nm), kg*m^-2*s^-2 + * tensor order: 0 + * definition: change of radiant energy density with wavelength, expressed by `w_λ = (dw)/(dλ)`, where `w` is radiant energy density (item 7-3.1) as a function of wavelength `λ` (ISO 80000-3) + * remarks: Spectral radiant energy density within a Planckian radiator is given by `w_λ = 8πhc_0*f(λ, T)`, where `h` is the Planck constant (ISO 80000-1), `c_0` is speed of light in vacuum (ISO 80000-1), `T` is thermodynamic temperature (ISO 80000-5) and `f(λ,T) = (λ^-5)/(exp(c_2 λ^-1 T^-1) - 1)`. For the radiation constant `c_2` in `f(λ,T)`, see ISO 80000-1. + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantEnergyDensityInTermsOfWavelengthUnit[1]; + } + + attribute spectralRadiantEnergyDensityInTermsOfWavelength: SpectralRadiantEnergyDensityInTermsOfWavelengthValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantEnergyDensityInTermsOfWavelengthUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-3.3 spectral radiant energy density in terms of wavenumber */ + attribute def SpectralRadiantEnergyDensityInTermsOfWavenumberValue :> ScalarQuantityValue { + doc + /* + * source: item 7-3.3 spectral radiant energy density in terms of wavenumber + * symbol(s): `w_ṽ`, `ρ_ṽ` + * application domain: generic + * name: SpectralRadiantEnergyDensityInTermsOfWavenumber + * quantity dimension: M^1*T^-2 + * measurement unit(s): J/m^2, kg*s^-2 + * tensor order: 0 + * definition: change of radiant energy density with wavenumber, expressed by `w_ṽ = (dw)/(dṽ)`, where `w` is radiant energy density (item 7-3.1) as a function of wavenumber `ṽ` (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantEnergyDensityInTermsOfWavenumberUnit[1]; + } + + attribute spectralRadiantEnergyDensityInTermsOfWavenumber: SpectralRadiantEnergyDensityInTermsOfWavenumberValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantEnergyDensityInTermsOfWavenumberUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-7 item 7-4.1 radiant flux, radiant power */ + attribute def RadiantFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 7-4.1 radiant flux, radiant power + * symbol(s): `Φ_e`, `P_e`, `Φ`, `P` + * application domain: generic + * name: RadiantFlux + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W, kg*m^2*s^-3 + * tensor order: 0 + * definition: change in radiant energy with time, expressed by `Φ_e = (dQ_e)/(dt)`, where `Q_e` is the radiant energy (item 7-2.1) emitted, transferred or received and `t` is time (ISO 80000-3) + * remarks: The corresponding photometric quantity is "luminous flux" (item 7-13). The corresponding quantity for photons is "photon flux" (item 7-20). + */ + attribute :>> num: Real; + attribute :>> mRef: RadiantFluxUnit[1]; + } + + attribute radiantFlux: RadiantFluxValue[*] nonunique :> scalarQuantities; + + attribute def RadiantFluxUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias RadiantPowerUnit for RadiantFluxUnit; + alias RadiantPowerValue for RadiantFluxValue; + alias radiantPower for radiantFlux; + + /* ISO-80000-7 item 7-4.2 spectral radiant flux, spectral radiant power */ + attribute def SpectralRadiantFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 7-4.2 spectral radiant flux, spectral radiant power + * symbol(s): `Φ_(e,λ)`, `P_(e,λ)`, `(Φ_λ)`, `(P_λ)` + * application domain: generic + * name: SpectralRadiantFlux + * quantity dimension: L^1*M^1*T^-3 + * measurement unit(s): W/nm, kg*m*s^-3 + * tensor order: 0 + * definition: spectral density of radiant flux, expressed by `Φ_(e,λ) = (dQ_e)/(dλ)`, where `Φ_e` is radiant flux (item 7-4.1) in terms of wavelength `λ` (ISO 80000-3) + * remarks: The integral of (total) radiant flux is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `Φ_e = int_(λ_1)^(λ_2) Φ_(e,λ) dλ` . + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantFluxUnit[1]; + } + + attribute spectralRadiantFlux: SpectralRadiantFluxValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantFluxUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias SpectralRadiantPowerUnit for SpectralRadiantFluxUnit; + alias SpectralRadiantPowerValue for SpectralRadiantFluxValue; + alias spectralRadiantPower for spectralRadiantFlux; + + /* ISO-80000-7 item 7-5.1 radiant intensity */ + attribute def RadiantIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 7-5.1 radiant intensity + * symbol(s): `I_e`, `(I)` + * application domain: generic + * name: RadiantIntensity + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W/sr, kg*m^2*s^-3*sr^-1 + * tensor order: 0 + * definition: density of radiant flux with respect to solid angle in a specified direction, expressed by `I_e = (dΦ_e)/(dΩ)`, where `Φ_e` is the radiant flux (item 7-4.1) emitted in a specified direction, and `Ω` is the solid angle (ISO 80000-3) containing that direction + * remarks: The definition holds strictly only for a point source. The distribution of the radiant intensities as a function of the direction of emission, e.g. given by the polar angles `(θ,φ)`, is used to determine the radiant flux (item 7-4.1) within a certain solid angle (ISO 80000-3), `Ω`, of a source: `Φ_e = int int_Ω I_e(θ, φ) sin(θ) dφ dθ`. The corresponding photometric quantity is "luminous intensity" (item 7-14). The corresponding quantity for photons is "photon intensity" (item 7-21). + */ + attribute :>> num: Real; + attribute :>> mRef: RadiantIntensityUnit[1]; + } + + attribute radiantIntensity: RadiantIntensityValue[*] nonunique :> scalarQuantities; + + attribute def RadiantIntensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-5.2 spectral radiant intensity */ + attribute def SpectralRadiantIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 7-5.2 spectral radiant intensity + * symbol(s): `I_(e,λ)`, `(I_λ)` + * application domain: generic + * name: SpectralRadiantIntensity + * quantity dimension: L^1*M^1*T^-3 + * measurement unit(s): W/(sr*nm), kg*m*s^-3*sr^-1 + * tensor order: 0 + * definition: spectral density of radiant intensity, expressed by `I_(e, λ) = (d I_e)/(dλ)`, where `I_e` is radiant intensity (item 7-5.1) in terms of wavelength `λ` (ISO 80000-3) + * remarks: The integral of (total) radiant intensity is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `I_e = int_(λ_1)^(λ_2) I_(e,λ) dλ` . + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantIntensityUnit[1]; + } + + attribute spectralRadiantIntensity: SpectralRadiantIntensityValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantIntensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-6.1 radiance */ + attribute def RadianceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-6.1 radiance + * symbol(s): `L_e`, `(L)` + * application domain: generic + * name: Radiance + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/(sr*m^2), kg*s^-3*sr^-1 + * tensor order: 0 + * definition: density of radiant intensity with respect to projected area in a specified direction at a specified point on a real or imaginary surface, expressed by `L_e = (d I_e)/(dA) * 1/cos(α)`, where `I_e` is radiant intensity (item 7-5.1), `A` is area (ISO 80000-3), and `α` is the angle between the normal to the surface at the specified point and the specified direction + * remarks: See also 0.1. For Planckian radiation, `L_e = σ/π T^4` where `T` is thermodynamic temperature (ISO 80000-5) and `σ` is the Stefan-Boltzmann constant (ISO 80000-1). The corresponding photometric quantity is "luminance" (item 7-15). The corresponding quantity for photons is "photon radiance" (item 7-22). + */ + attribute :>> num: Real; + attribute :>> mRef: RadianceUnit[1]; + } + + attribute radiance: RadianceValue[*] nonunique :> scalarQuantities; + + attribute def RadianceUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-7 item 7-6.2 spectral radiance */ + attribute def SpectralRadianceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-6.2 spectral radiance + * symbol(s): `L_(e,λ)`, `(L_λ)` + * application domain: generic + * name: SpectralRadiance + * quantity dimension: L^-1*M^1*T^-3 + * measurement unit(s): W/(sr*m^2*nm), kg*m^-1*s^-3*sr^-1 + * tensor order: 0 + * definition: density of radiance with respect to wavelength, expressed by `L_(e, λ) = (d L_e)/(d λ)` where `L_e` is radiance (item 7-6.1) in terms of wavelength λ(ISO 80000-3) + * remarks: For Planckian radiation, `L_(e, λ)(λ) = (c(λ))/(4 π) ω_λ(λ) = h c_0^2 * f(λ,T)`, where `c(λ)` is phase speed (ISO 80000-3) of electromagnetic radiation of a wavelength (ISO 80000-3) `λ` in a given medium, `ω_λ(λ)` is spectral radiant energy density in terms of wavelength, `c_0` is speed of light in vacuum (ISO 80000-1), `h` is the Planck constant (ISO 80000-1), and `f(λ,T) = λ^-5/(exp(c_2 λ^-1 T^-1) - 1)`, where the radiation constant `c_2 = (hc)/k`. The integral of (total) radiance is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `L_e = int_(λ_1)^(λ_2) L_(e,λ) dλ` . + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadianceUnit[1]; + } + + attribute spectralRadiance: SpectralRadianceValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadianceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-7.1 irradiance */ + attribute def IrradianceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-7.1 irradiance + * symbol(s): `E_e`, `(E)` + * application domain: generic + * name: Irradiance + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2, kg*s^-3 + * tensor order: 0 + * definition: density of incident radiant flux with respect to area at a point on a real or imaginary surface, expressed by `E_e = (d Φ_e)/(d A)`, where `Φ_e` is radiant flux (item 7-4.1) and `A` is the area (ISO 80000-3) on which the radiant flux is incident + * remarks: The corresponding photometric quantity is "illuminance" (item 7-16). The corresponding quantity for photons is "photon irradiance" (item 7-23). The quantity "spherical irradiance" is defined by the mean value of irradiance on the outer curved surface of a very small (real or imaginary) sphere at a point in space. It can be expressed by `E_(e,0) = int_(4 π) L_e d Ω` where `Ω` is solid angle (ISO 80000-3) and `L_e` is radiance (item 7-6.1). (See CIE DIS 017/E:2016, term 17-21-054.) It can be expressed by the quotient of the radiant flux (item 7-4.1) of all the radiation incident on the outer surface of an infinitely small sphere centred at the specified point and the area (ISO 80000-3) of the diametrical cross-section of that sphere. Spherical irradiance is also called "fluence rate" or "radiant fluence rate". The corresponding photometric quantity to spherical irradiance is called "spherical illuminance". + */ + attribute :>> num: Real; + attribute :>> mRef: IrradianceUnit[1]; + } + + attribute irradiance: IrradianceValue[*] nonunique :> scalarQuantities; + + attribute def IrradianceUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-7 item 7-7.2 spectral irradiance */ + attribute def SpectralIrradianceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-7.2 spectral irradiance + * symbol(s): `E_(e,λ)`, `(E_λ)` + * application domain: generic + * name: SpectralIrradiance + * quantity dimension: L^-1*M^1*T^-3 + * measurement unit(s): W/(m^2*nm), kg*m^-1*s^-3 + * tensor order: 0 + * definition: density of irradiance with respect to wavelength, expressed by `E_(e,λ) = (d E_e)/(dλ)`, where `E_e` is irradiance (item 7-7.1) in terms of wavelength `λ` (ISO 80000-3) + * remarks: The integral of (total) irradiance is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `E_e = int_(λ_1)^(λ_2) E_(e,λ) d λ` . + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralIrradianceUnit[1]; + } + + attribute spectralIrradiance: SpectralIrradianceValue[*] nonunique :> scalarQuantities; + + attribute def SpectralIrradianceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-8.1 radiant exitance , radiant emittance */ + attribute def RadiantExitanceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-8.1 radiant exitance , radiant emittance + * symbol(s): `M_e`, `(M)` + * application domain: generic + * name: RadiantExitance + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2, kg*s^-3 + * tensor order: 0 + * definition: density of exiting radiant flux with respect to area at a point on a real or imaginary surface, expressed by `M_e = (d Φ_e)/(dA)`, where `Φ_e` is radiant flux (item 7-4.1) and `A` is the area (ISO 80000-3) from which the radiant flux leaves + * remarks: For Planckian radiation, `M_e = σT^4`, where `T` is thermodynamic temperature (ISO 80000-5) and `σ` is the Stefan-Boltzmann constant (ISO 80000-1). The corresponding photometric quantity is "luminous exitance" (item 7-17). The corresponding quantity for photons is "photon exitance" (item 7-24). + */ + attribute :>> num: Real; + attribute :>> mRef: RadiantExitanceUnit[1]; + } + + attribute radiantExitance: RadiantExitanceValue[*] nonunique :> scalarQuantities; + + attribute def RadiantExitanceUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + alias RadiantEmittanceUnit for RadiantExitanceUnit; + alias RadiantEmittanceValue for RadiantExitanceValue; + alias radiantEmittance for radiantExitance; + + /* ISO-80000-7 item 7-8.2 spectral radiant exitance */ + attribute def SpectralRadiantExitanceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-8.2 spectral radiant exitance + * symbol(s): `M_(e,λ)`, `(M_λ)` + * application domain: generic + * name: SpectralRadiantExitance + * quantity dimension: L^-1*M^1*T^-3 + * measurement unit(s): W/(m^2*nm), kg*m^-1*s^-3 + * tensor order: 0 + * definition: density of radiant exitance with respect to wavelength, expressed by `M_(e,λ) = (d M_e)/(dλ)`, where `M_e` is radiant exitance (item 7-8.1) in terms of wavelength `λ` (ISO 80000-3) + * remarks: The integral of (total) radiant exitance is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `M_e = int_(λ_1)^(λ_2) M_(e,λ) d λ` . + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantExitanceUnit[1]; + } + + attribute spectralRadiantExitance: SpectralRadiantExitanceValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantExitanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-9.1 radiant exposure */ + attribute def RadiantExposureValue :> ScalarQuantityValue { + doc + /* + * source: item 7-9.1 radiant exposure + * symbol(s): `H_e`, `(H)` + * application domain: generic + * name: RadiantExposure + * quantity dimension: M^1*T^-2 + * measurement unit(s): J/m^2, kg*s^-2 + * tensor order: 0 + * definition: density of incident radiant energy with respect to area at a point on a real or imaginary surface, expressed by `H_e = (d Q_e)/(dA)`, where `Q_e` is radiant energy (item 7-2.1) and `A` is the area on which the radiant energy is incident (ISO 80000-3) + * remarks: The corresponding photometric quantity is "luminous exposure" (item 7-18). The corresponding quantity for photons is "photon exposure" (item 7-25). + */ + attribute :>> num: Real; + attribute :>> mRef: RadiantExposureUnit[1]; + } + + attribute radiantExposure: RadiantExposureValue[*] nonunique :> scalarQuantities; + + attribute def RadiantExposureUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-7 item 7-9.2 spectral radiant exposure */ + attribute def SpectralRadiantExposureValue :> ScalarQuantityValue { + doc + /* + * source: item 7-9.2 spectral radiant exposure + * symbol(s): `H_(e,λ)`, `(H_λ)` + * application domain: generic + * name: SpectralRadiantExposure + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): J/(m^2*nm), kg*m^-1*s^-2 + * tensor order: 0 + * definition: density of radiant exposure with respect to wavelength, expressed by `H_(e,λ) = (d H_e)/(dλ)`, where `H_e` is radiant exposure (item 7-9.1) in terms of wavelength `λ` (ISO 80000-3) + * remarks: The integral of (total) radiant exposure is determined by the wavelength interval `(λ_1, λ_2)` under consideration: `H_e = int_(λ_1)^(λ_2) H_(e,λ) d λ` . + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralRadiantExposureUnit[1]; + } + + attribute spectralRadiantExposure: SpectralRadiantExposureValue[*] nonunique :> scalarQuantities; + + attribute def SpectralRadiantExposureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-7 item 7-10.1 luminous efficiency */ + attribute def LuminousEfficiencyValue :> DimensionOneValue { + doc + /* + * source: item 7-10.1 luminous efficiency + * symbol(s): `V` + * application domain: specified photometric condition + * name: LuminousEfficiency (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of radiant flux (item 7-4.1) weighted by the spectral luminous efficiency (item 7-10.2) and the corresponding radiant flux for a specified photometric condition + * remarks: Luminous efficiency for photopic vision is expressed by `V = (int_0^∞ Φ_(e,λ)(λ) V(λ) d λ)/(int_0^∞ Φ_(e,λ)(λ) d λ) = K/K_m`, where `Φ_(e,λ)` is spectral radiant flux (item 7-4.2), `V(λ)` is spectral luminous efficiency, `λ` is wavelength, `K` is luminous efficacy of radiation (item 7-11.1), and `K_m` is maximum luminous efficacy (item 7-11.3). For scotopic and mesopic vision see 0.4 and 0.5. Symbols for different photometric conditions: `V` for photopic vision; `V'` for scotopic vision; `V_(mes;m)` for mesopic vision; `V_10` for the CIE 10° photopic photometric observer; `V_M` for the CIE 1988 modified 2° spectral luminous efficiency function for photopic vision. + */ + } + attribute luminousEfficiency: LuminousEfficiencyValue :> scalarQuantities; + + /* ISO-80000-7 item 7-10.2 spectral luminous efficiency */ + attribute def SpectralLuminousEfficiencyValue :> DimensionOneValue { + doc + /* + * source: item 7-10.2 spectral luminous efficiency + * symbol(s): `V(λ)` + * application domain: specified photometric condition + * name: SpectralLuminousEfficiency (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the radiant flux (item 7-4.1) at wavelength `λ_m` and that at wavelength `λ`, such that both produce equally intense luminous sensations for a specified photometric condition and `λ_m` is chosen so that the maximum value of this quotient is equal to 1 + * remarks: The spectral luminous efficiency of the human eye depends on a number of factors, particularly the state of visual adaptation and the size and position of the source in the visual field. The photometric condition should be specified (e.g. photopic, scotopic, mesopic). If it is not specified, photopic vision is assumed and the symbol `V(λ)` is used. For scotopic and mesopic vision see 0.4 and 0.5. Symbols for different photometric conditions: `V(λ)` for photopic vision; `V'(λ)` for scotopic vision; `V_(mes;m)(λ)` for mesopic vision; `V_10(λ)` for the CIE 10° photopic photometric observer; `V_M(λ)` for the CIE 1988 modified 2° spectral luminous efficiency function for photopic vision. + */ + } + attribute spectralLuminousEfficiency: SpectralLuminousEfficiencyValue :> scalarQuantities; + + /* ISO-80000-7 item 7-11.1 luminous efficacy of radiation */ + attribute def LuminousEfficacyOfRadiationValue :> ScalarQuantityValue { + doc + /* + * source: item 7-11.1 luminous efficacy of radiation + * symbol(s): `K` + * application domain: specified photometric condition + * name: LuminousEfficacyOfRadiation + * quantity dimension: L^-2*M^-1*T^3*J^1 + * measurement unit(s): lm/W, cd*sr*kg^-1*m^-2*s^3 + * tensor order: 0 + * definition: quotient of luminous flux (item 7-13) and the corresponding radiant flux (item 7-4.1) for a specified photometric condition + * remarks: Luminous efficacy of radiation for photopic vision is expressed by `K = Φ_V/Φ_e`, where `Φ_v` is luminous flux (item 7-13) and `Φ_e` is radiant flux (item 7-4.1). For scotopic and mesopic vision see 0.4 and 0.5. Symbols for different photometric conditions: `K` for photopic vision; `K'` for scotopic vision; `K_(mes;m)` for mesopic vision; `K_10` for the CIE 10° photopic photometric observer; `K_M` for the CIE 1988 modified 2° spectral luminous efficiency function for photopic vision. + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousEfficacyOfRadiationUnit[1]; + } + + attribute luminousEfficacyOfRadiation: LuminousEfficacyOfRadiationValue[*] nonunique :> scalarQuantities; + + attribute def LuminousEfficacyOfRadiationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-11.2 spectral luminous efficacy */ + attribute def SpectralLuminousEfficacyValue :> ScalarQuantityValue { + doc + /* + * source: item 7-11.2 spectral luminous efficacy + * symbol(s): `K(λ)` + * application domain: specified photometric condition + * name: SpectralLuminousEfficacy + * quantity dimension: L^-2*M^-1*T^3*J^1 + * measurement unit(s): lm/W, cd*sr*kg^-1*m^-2*s^3 + * tensor order: 0 + * definition: product of spectral luminous efficiency (item 7-10.2) and maximum luminous efficacy (item 7-11.3) for a specified photometric condition + * remarks: Spectral luminous efficacy for photopic vision is expressed by `K(λ) = K_m V(λ)`, where `K_m` is maximum luminous efficacy (item 7-11.3), `V(λ)` is spectral luminous efficiency (item 7-10.2) and `λ` is wavelength. For scotopic and mesopic vision see 0.4 and 0.5. Symbols for different photometric conditions: `K(λ)` for photopic vision>; `K'(λ)` for scotopic vision; `K_(mes;m)(λ)` for mesopic vision; `K_10(λ)` for the CIE 10° photopic photometric observer; `K_M(λ)` for the CIE 1988 modified 2° spectral luminous efficiency function for photopic vision. + */ + attribute :>> num: Real; + attribute :>> mRef: SpectralLuminousEfficacyUnit[1]; + } + + attribute spectralLuminousEfficacy: SpectralLuminousEfficacyValue[*] nonunique :> scalarQuantities; + + attribute def SpectralLuminousEfficacyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-11.3 maximum luminous efficacy */ + attribute def MaximumLuminousEfficacyValue :> ScalarQuantityValue { + doc + /* + * source: item 7-11.3 maximum luminous efficacy + * symbol(s): `K_m` + * application domain: specified photometric condition + * name: MaximumLuminousEfficacy + * quantity dimension: L^-2*M^-1*T^3*J^1 + * measurement unit(s): lm/W, cd*sr*kg^-1*m^-2*s^3 + * tensor order: 0 + * definition: maximum value of spectral luminous efficacy for a specified photometric condition + * remarks: See also 0.4 and 0.5. The value of maximum luminous efficacy for photopic vision is calculated by `K_m = 683 / (V(λ_(cd))) ["cd"*"sr"*"W"^-1] = 683 ["lm"*"W"^-1]` where `V(λ)` is the spectral luminous efficiency for photopic vision and `λ_(cd)` is the wavelength in air corresponding to the frequency `540*10^12 ["Hz"]` specified in the definition of the SI unit candela. Symbols for different photometric conditions: `K_m` for photopic vision; `K'_m` for scotopic vision; `K_(m,mes;m)` for mesopic vision; `K_(m,10)` for the CIE 10° photopic photometric observer; `K_(m,M)` for the CIE 1988 modified 2° spectral luminous efficiency function for photopic vision. + */ + attribute :>> num: Real; + attribute :>> mRef: MaximumLuminousEfficacyUnit[1]; + } + + attribute maximumLuminousEfficacy: MaximumLuminousEfficacyValue[*] nonunique :> scalarQuantities; + + attribute def MaximumLuminousEfficacyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-11.4 luminous efficacy of a source */ + attribute def LuminousEfficacyOfASourceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-11.4 luminous efficacy of a source + * symbol(s): `η_v`, `(η)` + * application domain: generic + * name: LuminousEfficacyOfASource + * quantity dimension: L^-2*M^-1*T^3*J^1 + * measurement unit(s): lm/W, cd*sr*kg^-1*m^-2*s^3 + * tensor order: 0 + * definition: quotient of the luminous flux emitted and the power consumed by the source, expressed by `η_v = Φ_v/P`, where `Φ_v` is luminous flux (item 7-13) and `P` is the power (ISO 80000-4) consumed by the source + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousEfficacyOfASourceUnit[1]; + } + + attribute luminousEfficacyOfASource: LuminousEfficacyOfASourceValue[*] nonunique :> scalarQuantities; + + attribute def LuminousEfficacyOfASourceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-12 luminous energy, quantity of light */ + attribute def LuminousEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 7-12 luminous energy, quantity of light + * symbol(s): `Q_v`, `(Q)` + * application domain: generic + * name: LuminousEnergy + * quantity dimension: T^1*J^1 + * measurement unit(s): lm*s, cd*sr*s + * tensor order: 0 + * definition: energy of electromagnetic waves weighted by the spectral luminous efficiency (item 7-10.2) multiplied by maximum luminous efficacy (item 7-11.3) of a specified photometric condition + * remarks: Luminous energy for photopic vision is expressed by `Q_v = K_m int_0^∞ Q_(e,λ)(λ) V(λ) dλ`, where `Q_(e,λ)(λ)` is the spectral radiant energy (item 7-2.2) at wavelength `λ` (ISO 80000-3), `V(λ)` is spectral luminous efficiency (item 7-10.2), and `K_m` is maximum luminous efficacy (7-11.3). Luminous energy can be emitted, transferred or received. Luminous energy can be expressed by the time integral of the luminous flux (item 7-13), `Φ_v`, over a given duration (ISO 80000-3), `Δt`: `Q_v = int_(Δt) Φ_v dt` . The corresponding radiometric quantity is "radiant energy" (item 7-2.1). The corresponding quantity for photons is "photon energy" (item 7-19.2). + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousEnergyUnit[1]; + } + + attribute luminousEnergy: LuminousEnergyValue[*] nonunique :> scalarQuantities; + + attribute def LuminousEnergyUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (durationPF, luminousIntensityPF); } + } + + alias QuantityOfLightUnit for LuminousEnergyUnit; + alias QuantityOfLightValue for LuminousEnergyValue; + alias quantityOfLight for luminousEnergy; + + /* ISO-80000-7 item 7-13 luminous flux */ + attribute def LuminousFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 7-13 luminous flux + * symbol(s): `Φ_v`, `(Φ)` + * application domain: generic + * name: LuminousFlux + * quantity dimension: J^1 + * measurement unit(s): lm, cd*sr + * tensor order: 0 + * definition: change in luminous energy with time, expressed by `Φ_v = (d Q_v)/(dt)`, where `Q_v` is the luminous energy (item 7-12) emitted, transferred or received and `t` is time (ISO 80000-3) + * remarks: Luminous flux is a quantity derived from the radiant flux (item 7-4.1), `Φ_e`, by evaluating the radiation according to its action upon the CIE standard photometric observer. (See CIE S 017/E:2011, term 17-738.) Luminous flux can be derived from the spectral radiant flux distribution by `Φ_v = K_m int_0^oo Φ_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `Φ_(e,λ)(λ)` is spectral radiant flux (item 7-4.2), `V(λ)` is spectral luminous efficiency (item 7-10.2) and `λ` is wavelength (ISO 80000-3). The corresponding radiometric quantity is "radiant flux" (item 7-4.1). The corresponding quantity for photons is "photon flux" (item 7-20). + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousFluxUnit[1]; + } + + attribute luminousFlux: LuminousFluxValue[*] nonunique :> scalarQuantities; + + attribute def LuminousFluxUnit :> DerivedUnit { + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = luminousIntensityPF; } + } + + /* ISO-80000-7 item 7-14 luminous intensity */ + /* See package ISQBase for the declarations of LuminousIntensityValue and LuminousIntensityUnit */ + + /* ISO-80000-7 item 7-15 luminance */ + attribute def LuminanceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-15 luminance + * symbol(s): `L_v`, `(L)` + * application domain: generic + * name: Luminance + * quantity dimension: L^-2*J^1 + * measurement unit(s): cd*m^-2 + * tensor order: 0 + * definition: density of luminous intensity with respect to projected area in a specified direction at a specified point on a real or imaginary surface, expressed by `L_v = (dI_v)/(dA) 1/cos(α)`, where `I_v` is luminous intensity (item 7-14), `A` is area (ISO 80000-3) and `α` is the angle between the normal to the surface at the specified point and the specified direction + * remarks: Luminance can be derived from the spectral radiance distribution by `L_v = K_m int_0^∞ L_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `L_(e,λ)(λ)` is the spectral radiance (item 7-6.2) at wavelength `λ` (ISO 80000-3), and `V(λ)` is spectral luminous efficiency (item 7-10.2). See also 0.1. Integral limits can be confined depending on the spectral sensitivity of the detectors used as a sensor. The corresponding radiometric quantity is "radiance" (item 7-6.1). The corresponding quantity for photons is "photon radiance" (item 7-22). + */ + attribute :>> num: Real; + attribute :>> mRef: LuminanceUnit[1]; + } + + attribute luminance: LuminanceValue[*] nonunique :> scalarQuantities; + + attribute def LuminanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-16 illuminance */ + attribute def IlluminanceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-16 illuminance + * symbol(s): `E_v`, `(E)` + * application domain: generic + * name: Illuminance + * quantity dimension: L^-2*J^1 + * measurement unit(s): lx, cd*sr*m^-2 + * tensor order: 0 + * definition: density of incident luminous flux with respect to area at a point on a real or imaginary surface, expressed by `E_v = (dΦ_v)/(dA)`, where `Φ_v` is luminous flux (item 7-13) and `A` is the area (ISO 80000-3) on which the luminous flux is incident + * remarks: Illuminance can be derived from the spectral irradiance distribution by `E_v = K_m int_0^∞ E_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `E_(e,λ)(λ)` is the spectral irradiance (item 7-7.2) at wavelength `λ` (ISO 80000-3), and `V(λ)` is spectral luminous efficiency (item 7-10.2). Integral limits can be confined depending on the spectral sensitivity of the detectors used as a sensor. The corresponding radiometric quantity is "irradiance" (item 7-7.1). The corresponding quantity for photons is "photon irradiance" (item 7-23). The quantity "spherical illuminance" is defined by the mean value of illuminance on the outer curved surface of a very small (real or imaginary) sphere at a point in space. It can be expressed by `E_(v,0) = int_(4π) L_v dΩ`, where `Ω` is solid angle (ISO 80000-3) and `L_v` is luminance (item 7-15). It can be expressed by the quotient of the luminous flux (item 7-13) of all the light incident on the outer surface of an infinitely small sphere centred at the given point, and the area (ISO 80000-3) of the diametrical cross-section of that sphere. + */ + attribute :>> num: Real; + attribute :>> mRef: IlluminanceUnit[1]; + } + + attribute illuminance: IlluminanceValue[*] nonunique :> scalarQuantities; + + attribute def IlluminanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-17 luminous exitance */ + attribute def LuminousExitanceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-17 luminous exitance + * symbol(s): `M_v`, `(M)` + * application domain: generic + * name: LuminousExitance + * quantity dimension: L^-2*J^1 + * measurement unit(s): lm/m^2, cd*sr*m^-2 + * tensor order: 0 + * definition: density of exiting luminous flux with respect to area at a point on a real or imaginary surface, expressed by `M_v = (dΦ_v)/(dA)`, where `Φ_v` is luminous flux (item 7-13) and `A` is the area (ISO 80000-3) from which the luminous flux leaves + * remarks: Luminous exitance can be derived from the spectral radiant exitance distribution by `M_v = K_m int_0^∞ M_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `M_(e_λ)(λ)` is the spectral radiant exitance (item 7-8.2) at wavelength λ(ISO 80000-3), and `V(λ)` is spectral luminous efficiency (item 7-10.2). Integral limits can be confined depending on the spectral sensitivity of the detectors used as a sensor. The corresponding radiometric quantity is "radiant exitance" (item 7-8.1). The corresponding quantity for photons is "photon exitance" (item 7-24). + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousExitanceUnit[1]; + } + + attribute luminousExitance: LuminousExitanceValue[*] nonunique :> scalarQuantities; + + attribute def LuminousExitanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-18 luminous exposure, quantity of illumination, light exposure */ + attribute def LuminousExposureValue :> ScalarQuantityValue { + doc + /* + * source: item 7-18 luminous exposure, quantity of illumination, light exposure + * symbol(s): `H_v`, `(H)` + * application domain: generic + * name: LuminousExposure + * quantity dimension: L^-2*T^1*J^1 + * measurement unit(s): lx*s, cd*sr*m^-2*s + * tensor order: 0 + * definition: density of incident luminous energy with respect to area at a point on a real or imaginary surface, expressed by `H_v = (dQ_v)/(dA)`, where `Q_v` is luminous energy (item 7-12) and `A` is the area on which the luminous energy is incident (ISO 80000-3) + * remarks: Luminous exposure can be derived from the spectral radiant exposure distribution by `H_v = K_m int_0^∞ H_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `H_(e_λ)(λ)` is the spectral radiant exposure (item 7-9.2) at wavelength λ(ISO 80000-3), and `V(λ)` is spectral luminous efficiency (item 7-10.2). Integral limits can be confined depending on the spectral sensitivity of the detectors used as a sensor. The corresponding radiometric quantity is "radiant exposure" (item 7-9.1). The corresponding quantity for photons is "photon exposure" (item 7-25). + */ + attribute :>> num: Real; + attribute :>> mRef: LuminousExposureUnit[1]; + } + + attribute luminousExposure: LuminousExposureValue[*] nonunique :> scalarQuantities; + + attribute def LuminousExposureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, luminousIntensityPF); } + } + + alias QuantityOfIlluminationUnit for LuminousExposureUnit; + alias QuantityOfIlluminationValue for LuminousExposureValue; + alias quantityOfIllumination for luminousExposure; + + alias LightExposureUnit for LuminousExposureUnit; + alias LightExposureValue for LuminousExposureValue; + alias lightExposure for luminousExposure; + + /* ISO-80000-7 item 7-19.1 photon number, number of photons */ + attribute def PhotonNumberValue :> DimensionOneValue { + doc + /* + * source: item 7-19.1 photon number, number of photons + * symbol(s): `N_p` + * application domain: generic + * name: PhotonNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of radiant energy and photon energy, expressed by `N_p = Q_e/(h ν)`, where `Q_e` is radiant energy (item 7-2.1), `h` is the Planck constant (ISO 80000-1), and `ν` is the frequency (ISO 80000-3) of the corresponding electromagnetic wave + * remarks: Photon number can also be expressed by the time integral of the photon flux (item 7-20), `Φ_p`, over a given duration, `Δt`, `N_p = int_(Δt) Φ_p dt` + */ + } + attribute photonNumber: PhotonNumberValue :> scalarQuantities; + + alias numberOfPhotons for photonNumber; + + /* ISO-80000-7 item 7-19.2 photon energy */ + attribute photonEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 7-19.2 photon energy + * symbol(s): `Q_p`, `(Q)` + * application domain: generic + * name: PhotonEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: product of the Planck constant and frequency, expressed by `Q_p = h ν` where `h` is the Planck constant (ISO 80000-1) and `ν` is the frequency (ISO 80000-3) of the corresponding electromagnetic wave + * remarks: Photon energy can be emitted, transferred or received. For monochromatic radiation, photon energy may be expressed by photon number (item 7-19.1). The corresponding radiometric quantity is "radiant energy" (item 7-2.1). The corresponding photometric quantity is "luminous energy" (item 7-12). + */ + } + + /* ISO-80000-7 item 7-20 photon flux */ + attribute def PhotonFluxValue :> ScalarQuantityValue { + doc + /* + * source: item 7-20 photon flux + * symbol(s): `Φ_p`, `(Φ)` + * application domain: generic + * name: PhotonFlux + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: rate of photon number per time interval, expressed by `Φ_p = (d N_p)/(dt)`, where `N_p` is photon number (e.g. given by item 7-19.1), transmitted or received, and `t` is time (ISO 80000-3) + * remarks: Photon flux `Φ_p` is related to radiant flux (item 7-4.1), `Φ_e`, of monochromatic radiation, by `Φ_p = Φ_e/(h ν)` where `h` is the Planck constant (ISO 80000-1), and `ν` is the frequency (ISO 80000-3) of the corresponding electromagnetic wave. The corresponding radiometric quantity is "radiant flux" (item 7-4.1). The corresponding photometric quantity is "luminous flux" (item 7-13). + */ + attribute :>> num: Real; + attribute :>> mRef: PhotonFluxUnit[1]; + } + + attribute photonFlux: PhotonFluxValue[*] nonunique :> scalarQuantities; + + attribute def PhotonFluxUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-7 item 7-21 photon intensity */ + attribute def PhotonIntensityValue :> ScalarQuantityValue { + doc + /* + * source: item 7-21 photon intensity + * symbol(s): `I_p`, `(I)` + * application domain: generic + * name: PhotonIntensity + * quantity dimension: T^-1 + * measurement unit(s): s^-1*sr^-1 + * tensor order: 0 + * definition: density of photon flux with respect to solid angle in a specified direction, expressed by `I_p = (dΦ_p)/(dΩ)`, where `Φ_p` is the photon flux (item 7-20) emitted in the given direction, and `Ω` is the solid angle (ISO 80000-3) containing that direction + * remarks: The distribution of the photon intensities as a function of the direction of emission, e.g. given by the polar angles `(θ,ϕ)` , is used to determine the photon flux (item 7-20) within a certain solid angle (ISO 80000-3) `Ω` of a source: `Φ_p = int int_Ω I_v(θ,ϕ) sin(θ) dϕ dθ`. The corresponding radiometric quantity is "radiant intensity" (item 7-5.1). The corresponding photometric quantity is "luminous intensity" (item 7-14). + */ + attribute :>> num: Real; + attribute :>> mRef: PhotonIntensityUnit[1]; + } + + attribute photonIntensity: PhotonIntensityValue[*] nonunique :> scalarQuantities; + + attribute def PhotonIntensityUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-7 item 7-22 photon radiance */ + attribute def PhotonRadianceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-22 photon radiance + * symbol(s): `L_p`, `(L)` + * application domain: generic + * name: PhotonRadiance + * quantity dimension: L^-2*T^-1 + * measurement unit(s): m^-2*s^-1*sr^-1 + * tensor order: 0 + * definition: density of photon intensity with respect to projected area in a specified direction at a specified point on a real or imaginary surface, expressed by `L_p = (dI_p)/(dA) 1/cos(α)`, where `I_p` is photon intensity (item 7-21), `A` is area (ISO 80000-3) and `α` the angle between the normal to the surface at the specified point and the specified direction + * remarks: The corresponding radiometric quantity is "radiance" (item 7-6.1). The corresponding photometric quantity is "luminance" (item 7-15). + */ + attribute :>> num: Real; + attribute :>> mRef: PhotonRadianceUnit[1]; + } + + attribute photonRadiance: PhotonRadianceValue[*] nonunique :> scalarQuantities; + + attribute def PhotonRadianceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-7 item 7-23 photon irradiance */ + attribute def PhotonIrradianceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-23 photon irradiance + * symbol(s): `E_p`, `(E)` + * application domain: generic + * name: PhotonIrradiance + * quantity dimension: L^-2*T^-1 + * measurement unit(s): m^-2*s^-1 + * tensor order: 0 + * definition: density of incident photon flux with respect to area at a point on a real or imaginary surface, expressed by `E_p = (dΦ_p)/(dA)`, where `Φ_p` is photon flux (item 7-20) and `A` is the area (ISO 80000-3) on which the photon flux is incident + * remarks: The corresponding radiometric quantity is "irradiance" (item 7-7.1). The corresponding photometric quantity is "illuminance" (item 7-16). + */ + attribute :>> num: Real; + attribute :>> mRef: PhotonIrradianceUnit[1]; + } + + attribute photonIrradiance: PhotonIrradianceValue[*] nonunique :> scalarQuantities; + + attribute def PhotonIrradianceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-7 item 7-24 photon exitance */ + attribute def PhotonExitanceValue :> ScalarQuantityValue { + doc + /* + * source: item 7-24 photon exitance + * symbol(s): `M_p`, `(M)` + * application domain: generic + * name: PhotonExitance + * quantity dimension: L^-2*T^-1 + * measurement unit(s): m^-2*s^-1 + * tensor order: 0 + * definition: density of exiting photon flux with respect to area at a point on a real or imaginary surface, expressed by `M_p = (dΦ_p)/(dA)`, where `Φ_p` is photon flux (item 7-20) and `A` is the area (ISO 80000-3) from which the photon flux leaves + * remarks: The corresponding radiometric quantity is "radiant exitance" (item 7-8.1). The corresponding photometric quantity is "luminous exitance" (item 7-17). + */ + attribute :>> num: Real; + attribute :>> mRef: PhotonExitanceUnit[1]; + } + + attribute photonExitance: PhotonExitanceValue[*] nonunique :> scalarQuantities; + + attribute def PhotonExitanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-7 item 7-25 photon exposure */ + attribute def PhotonExposureValue :> ScalarQuantityValue { + doc + /* + * source: item 7-25 photon exposure + * symbol(s): `H_p`, `(H)` + * application domain: generic + * name: PhotonExposure + * quantity dimension: L^-2 + * measurement unit(s): m^-2 + * tensor order: 0 + * definition: density of incident photon number with respect to area at a point on a real or imaginary surface, expressed by `H_p = (dN_p)/(dA)`, where `N_p` is photon number (item 7-19.1) and `A` is the area (ISO 80000-3) on which the photons are incident + * remarks: The corresponding radiometric quantity is "radiant exposure" (item 7-9.1). The corresponding photometric quantity is "luminous exposure" (item 7-18). + */ + attribute :>> num: Real; + attribute :>> mRef: PhotonExposureUnit[1]; + } + + attribute photonExposure: PhotonExposureValue[*] nonunique :> scalarQuantities; + + attribute def PhotonExposureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-7 item 7-26.1 tristimulus values for the CIE 1931 standard colorimetric observer */ + attribute def TristimulusValuesForTheCie1931StandardColorimetricObserverValue :> ScalarQuantityValue { + doc + /* + * source: item 7-26.1 tristimulus values for the CIE 1931 standard colorimetric observer + * symbol(s): `X,Y,Z` + * application domain: generic + * name: TristimulusValuesForTheCie1931StandardColorimetricObserver + * quantity dimension: L^-2*J^1 + * measurement unit(s): cd*m^-2 + * tensor order: 0 + * definition: amounts of the three reference colour stimuli in the CIE 1931 standard colorimetric system, required to match the colour of the stimulus considered + * remarks: For a given colour stimulus described by the colour stimulus function `φ_λ(λ)` of a radiometric quantity, `X = k int_0^∞ φ_λ(λ) overline x(λ) dλ`, `Y = k int_0^∞ φ_λ(λ) overline y(λ) dλ`, `Z = k int_0^∞ φ_λ(λ) overline z(λ) dλ`, where `overline x(λ)`, `overline y(λ)`, `overline z(λ)` are the CIE colour-matching functions for the CIE 1931 standard colorimetric observer (2° observer) (item 7-27.1). For sources, `k` may be chosen as `k = K_m` where `K_m` is the maximum luminous efficacy (item 7-11.3) so that `Y = L_v` (item 7-15) and the unit of `X`, `Y`, `Z` is `[cd*m^-2]`. For object colours, `φ_λ(λ)` is given by one of the three products `φ_λ(λ) = S_λ(λ) * {(ρ(λ)), (τ(λ)), (β(λ)):}` where `S_λ(λ)` is the relative spectral distribution of a quantity characterizing the source illuminating the object, `ρ(λ)` is the spectral reflectance, `τ(λ)` is the spectral transmittance, `β(λ)` is the spectral radiance factor, and `k` is chosen to be `k = 100 // int_0^∞ S_λ(λ) overline y(λ) dλ`. Integral limits can be confined depending on the spectral sensitivity of the detectors used as a sensor. In this case, the unit of `X`, `Y`, `Z` is `[1]`. + */ + attribute :>> num: Real; + attribute :>> mRef: TristimulusValuesForTheCie1931StandardColorimetricObserverUnit[1]; + } + + attribute tristimulusValuesForTheCie1931StandardColorimetricObserver: TristimulusValuesForTheCie1931StandardColorimetricObserverValue[*] nonunique :> scalarQuantities; + + attribute def TristimulusValuesForTheCie1931StandardColorimetricObserverUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-26.2 tristimulus values for the CIE 1964 standard colorimetric observer */ + attribute def TristimulusValuesForTheCie1964StandardColorimetricObserverValue :> ScalarQuantityValue { + doc + /* + * source: item 7-26.2 tristimulus values for the CIE 1964 standard colorimetric observer + * symbol(s): `X_10,Y_10,Z_10` + * application domain: generic + * name: TristimulusValuesForTheCie1964StandardColorimetricObserver + * quantity dimension: L^-2*J^1 + * measurement unit(s): cd*m^-2 + * tensor order: 0 + * definition: amounts of the three reference colour stimuli in the CIE 1964 standard colorimetric system, required to match the colour of the stimulus considered + * remarks: For a given colour stimulus described by the colour stimulus function `φ_λ(λ)` of a radiometric quantity, `X = k int_0^∞ φ_λ(λ) overline x(λ) dλ`, `Y = k int_0^∞ φ_λ(λ) overline y(λ) dλ`, `Z = k int_0^∞ φ_λ(λ) overline z(λ) dλ`, where `overline x(λ)`, `overline y(λ)`, `overline z(λ)` are the CIE colour-matching functions for the CIE 1931 standard colorimetric observer (2° observer) (item 7-27.1). For sources, `k` may be chosen as `k = K_m` where `K_m` is the maximum luminous efficacy (item 7-11.3) so that `Y = L_v` (item 7-15) and the unit of `X`, `Y`, `Z` is `["cd"*"m"^-2]`. For object colours, `φ_λ(λ)` is given by one of the three products `φ_λ(λ) = S_λ(λ) * {(ρ(λ)), (τ(λ)), (β(λ)):}` where `S_λ(λ)` is the relative spectral distribution of a quantity characterizing the source illuminating the object, `ρ(λ)` is the spectral reflectance, `τ(λ)` is the spectral transmittance, `β(λ)` is the spectral radiance factor, and `k` is chosen to be `k = 100 /( int_0^∞ S_λ(λ) overline y(λ) dλ)`. Integral limits can be confined depending on the spectral sensitivity of the detectors used as a sensor. In this case, the unit of `X`, `Y`, `Z` is `[1]`. + */ + attribute :>> num: Real; + attribute :>> mRef: TristimulusValuesForTheCie1964StandardColorimetricObserverUnit[1]; + } + + attribute tristimulusValuesForTheCie1964StandardColorimetricObserver: TristimulusValuesForTheCie1964StandardColorimetricObserverValue[*] nonunique :> scalarQuantities; + + attribute def TristimulusValuesForTheCie1964StandardColorimetricObserverUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, luminousIntensityPF); } + } + + /* ISO-80000-7 item 7-27.1 CIE colour-matching functions for the CIE 1931 standard colorimetric observer */ + attribute def CieColourMatchingFunctionsForTheCie1931StandardColorimetricObserverValue :> DimensionOneValue { + doc + /* + * source: item 7-27.1 CIE colour-matching functions for the CIE 1931 standard colorimetric observer + * symbol(s): `overline x(λ)`, `overline y(λ)`, `overline z(λ)` + * application domain: generic + * name: CieColourMatchingFunctionsForTheCie1931StandardColorimetricObserver (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: functions `overline x(λ)` , `overline y(λ)` , `overline z(λ)` in the CIE 1931 standard colorimetric system + * remarks: Values of `overline x(λ)` , `overline y(λ)` and `overline z(λ)` are defined in the CIE 1931 standard colorimetric system (2° observer) — applicable to fields of observation of angular opening from 1° to 4°. + */ + } + attribute cieColourMatchingFunctionsForTheCie1931StandardColorimetricObserver: CieColourMatchingFunctionsForTheCie1931StandardColorimetricObserverValue :> scalarQuantities; + + /* ISO-80000-7 item 7-27.2 CIE colour-matching functions for the CIE 1964 standard colorimetric observer */ + attribute def CieColourMatchingFunctionsForTheCie1964StandardColorimetricObserverValue :> DimensionOneValue { + doc + /* + * source: item 7-27.2 CIE colour-matching functions for the CIE 1964 standard colorimetric observer + * symbol(s): `overline x_10(λ)`, `overline y_10(λ)`, `overline z_10(λ)` + * application domain: generic + * name: CieColourMatchingFunctionsForTheCie1964StandardColorimetricObserver (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: functions `overline x_10(λ)` , `overline y_10(λ)` , `overline z_10(λ)` in the CIE 1964 standard colorimetric system + * remarks: Values of `overline x_10(λ)` , `overline y_10(λ)` and `overline z_10(λ)` are defined in the CIE 1964 standard colorimetric system (10° observer) — applicable to fields of observation with angles greater than 4°. + */ + } + attribute cieColourMatchingFunctionsForTheCie1964StandardColorimetricObserver: CieColourMatchingFunctionsForTheCie1964StandardColorimetricObserverValue :> scalarQuantities; + + /* ISO-80000-7 item 7-28.1 chromaticity coordinates in the CIE 1931 standard colorimetric system */ + attribute def ChromaticityCoordinatesInTheCie1931StandardColorimetricSystemValue :> DimensionOneValue { + doc + /* + * source: item 7-28.1 chromaticity coordinates in the CIE 1931 standard colorimetric system + * symbol(s): `x,y,z` + * application domain: generic + * name: ChromaticityCoordinatesInTheCie1931StandardColorimetricSystem (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: coordinates expressing the quotients of each of a set of three tristimulus values for the CIE 1931 standard colorimetric observer (item 7-26.1) and their sum, expressed by `x = X / (X+Y+Z)` , `y = Y / (X+Y+Z)` , `z = Z / (X+Y+Z)` + * remarks: Since `x + y + z = 1`, two variables are sufficient to express chromaticity. + */ + } + attribute chromaticityCoordinatesInTheCie1931StandardColorimetricSystem: ChromaticityCoordinatesInTheCie1931StandardColorimetricSystemValue :> scalarQuantities; + + /* ISO-80000-7 item 7-28.2 chromaticity coordinates in the CIE 1964 standard colorimetric system */ + attribute def ChromaticityCoordinatesInTheCie1964StandardColorimetricSystemValue :> DimensionOneValue { + doc + /* + * source: item 7-28.2 chromaticity coordinates in the CIE 1964 standard colorimetric system + * symbol(s): `x_10,y_10,z_10` + * application domain: generic + * name: ChromaticityCoordinatesInTheCie1964StandardColorimetricSystem (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: coordinates expressing the quotients of each of a set of three tristimulus values for the CIE 1964 standard colorimetric observer (item 7-26.2) and their sum, expressed by `x_10 = X_10 / (X_10+Y_10+Z_10)`, `y_10 = Y_10 / (X_10+Y_10+Z_10)`, `z_10 = Z_10 / (X_10+Y_10+Z_10)` + * remarks: Since `x_10 + y_10 + z_10 = 1`, two variables are sufficient to express chromaticity. + */ + } + attribute chromaticityCoordinatesInTheCie1964StandardColorimetricSystem: ChromaticityCoordinatesInTheCie1964StandardColorimetricSystemValue :> scalarQuantities; + + /* ISO-80000-7 item 7-29.1 colour temperature */ + attribute colourTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 7-29.1 colour temperature + * symbol(s): `T_c` + * application domain: generic + * name: ColourTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: temperature of a Planckian radiator whose radiation has the same chromaticity as that of a given stimulus + * remarks: None. + */ + } + + /* ISO-80000-7 item 7-29.2 correlated colour temperature */ + attribute correlatedColourTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 7-29.2 correlated colour temperature + * symbol(s): `T_"cp"` + * application domain: generic + * name: CorrelatedColourTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: temperature of a Planckian radiator having the chromaticity nearest the chromaticity associated with the given spectral distribution on a modified 1976 CIE Uniform Chromaticity Scale (UCS) diagram where `u',2/3 v'` are the coordinates of the Planckian locus and the test stimulus + * remarks: None. + */ + } + + /* ISO-80000-7 item 7-30.1 emissivity */ + attribute def EmissivityValue :> DimensionOneValue { + doc + /* + * source: item 7-30.1 emissivity + * symbol(s): `ε`, `ε_T` + * application domain: generic + * name: Emissivity (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the radiant exitance of a radiator and the radiant exitance of a Planckian radiator at the same temperature, expressed by `ε = M/M_b`, where `M` is the radiant exitance (item 7-8.1) of a thermal radiator and `M_b` is the radiant exitance of a Planckian radiator at the same temperature (ISO 80000-5) + * remarks: None. + */ + } + attribute emissivity: EmissivityValue :> scalarQuantities; + + /* ISO-80000-7 item 7-30.2 emissivity at a specified wavelength */ + attribute def EmissivityAtASpecifiedWavelengthValue :> DimensionOneValue { + doc + /* + * source: item 7-30.2 emissivity at a specified wavelength + * symbol(s): `ε(λ)` + * application domain: generic + * name: EmissivityAtASpecifiedWavelength (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the radiant exitance of a radiator at a specified wavelength and the radiant exitance of a Planckian radiator at the same temperature and at the same wavelength, expressed by `ε(λ) = M(λ) / M_b(λ)`, where `M(λ)` is the radiant exitance (item 7-8.1) of a thermal radiator at a specified wavelength and `M_b(λ)` is the radiant exitance of a Planckian radiator at the same temperature at a specified wavelength (ISO 80000-3) + * remarks: None. + */ + } + attribute emissivityAtASpecifiedWavelength: EmissivityAtASpecifiedWavelengthValue :> scalarQuantities; + + /* ISO-80000-7 item 7-31.1 absorptance */ + attribute def AbsorptanceValue :> DimensionOneValue { + doc + /* + * source: item 7-31.1 absorptance + * symbol(s): `α`, `a` + * application domain: generic + * name: Absorptance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of absorbed radiant flux and incident radiant flux, expressed by `α = Φ_a/Φ_m`, where `Φ_a` is absorbed radiant flux (item 7-4.1) and `Φ_m` is incident radiant flux + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case "spectral" is added before the quantity name. Due to energy conservation, `α + ρ + τ = 1` except when polarized radiation is observed, where `ρ` is reflectance (item 7-31.3) and `τ` is transmittance (item 7-31.5). + */ + } + attribute absorptance: AbsorptanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-31.2 luminous absorptance */ + attribute def LuminousAbsorptanceValue :> DimensionOneValue { + doc + /* + * source: item 7-31.2 luminous absorptance + * symbol(s): `α_v` + * application domain: generic + * name: LuminousAbsorptance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of absorbed luminous flux and incident luminous flux, expressed by `α_v = Φ_(v,a)/Φ_(v,m)`, where `Φ_(v,a)` is absorbed luminous flux (item 7-13) and `Φ_(v,m)` is incident luminous flux + * remarks: From spectral absorptance, `α(λ)`, luminous absorptance can be calculated by `α_v = (int_0^∞ α(λ) Φ_(e,λ)(λ) V(λ) dλ)/(int_0^∞ Φ_(e,λ)(λ) V(λ) dλ)`, where `Φ_(e,λ)(λ)` is spectral radiant flux (or relative spectral distribution) of the source, and `V(λ)` is spectral luminous efficiency (item 7-10.2). See also item 7-31.1. + */ + } + attribute luminousAbsorptance: LuminousAbsorptanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-31.3 reflectance */ + attribute def ReflectanceValue :> DimensionOneValue { + doc + /* + * source: item 7-31.3 reflectance + * symbol(s): `ρ` + * application domain: generic + * name: Reflectance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of reflected radiant flux and incident radiant flux, expressed by `ρ = Φ_r/Φ_m`, where `Φ_r` is reflected radiant flux (item 7-4.1) and `Φ_m` is incident radiant flux + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case, "spectral" is added before the quantity name. Due to energy conservation, `α + ρ + τ = 1` except when polarized radiation is observed, where `α` is absorptance (item 7-31.1) and `τ` is transmittance (item 7-31.5). + */ + } + attribute reflectance: ReflectanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-31.4 luminous reflectance */ + attribute def LuminousReflectanceValue :> DimensionOneValue { + doc + /* + * source: item 7-31.4 luminous reflectance + * symbol(s): `ρ_v` + * application domain: generic + * name: LuminousReflectance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of reflected luminous flux and incident luminous flux, is expressed by `ρ_v = Φ_(v,r)/Φ_(v,m)`, where `Φ_(v,r)` is reflected luminous flux (item 7-13) and `Φ_(v,m)` is incident luminous flux + * remarks: From spectral reflectance, `ρ(λ)`, luminous reflectance can be calculated by `ρ_v = (int_0^∞ ρ(λ) Φ_(e,λ)(λ) V(λ) dλ)/(int_0^∞ Φ_(e,λ)(λ) V(λ) dλ)`, where `Φ_(e,λ)(λ)` is spectral radiant flux (or relative spectral distribution) of the source, and `V(λ)` is spectral luminous efficiency (item 7-10.2). See also item 7-31.3. + */ + } + attribute luminousReflectance: LuminousReflectanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-31.5 transmittance */ + attribute def TransmittanceValue :> DimensionOneValue { + doc + /* + * source: item 7-31.5 transmittance + * symbol(s): `τ`, `T` + * application domain: generic + * name: Transmittance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of transmitted radiant flux and incident radiant flux, expressed by `τ = Φ_t/Φ_m`, where `Φ_t` is transmitted radiant flux (item 7-4.1) and `Φ_m` is incident radiant flux + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case, "spectral" is added before the quantity name. Due to energy conservation, `α + ρ + τ = 1` except when polarized radiation is observed, where `α` is absorptance (item 7-31.1) and `ρ` is reflectance (item 7-31.3). + */ + } + attribute transmittance: TransmittanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-31.6 luminous transmittance */ + attribute def LuminousTransmittanceValue :> DimensionOneValue { + doc + /* + * source: item 7-31.6 luminous transmittance + * symbol(s): `τ_v` + * application domain: generic + * name: LuminousTransmittance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of transmitted luminous flux and incident luminous flux, expressed by `τ_v = Φ_(v,t)/Φ_(v,m)`, where `Φ_(v,t)` is transmitted luminous flux (item 7-13) and `Φ_(v,m)` is luminous flux of the incident radiation + * remarks: From the spectral transmittance `τ(λ)`, luminous transmittance can be calculated by `τ_v = (int_0^∞ τ(λ) Φ_(e,λ)(λ) V(λ) dλ)/(int_0^∞ Φ_(e,λ)(λ) V(λ) dλ)`, where `Φ_(e,λ)(λ)` is the spectral radiant flux (or relative spectral distribution) of the source, and `V(λ)` is the spectral luminous efficiency (item 7-10.2). See also item 7-31.5. + */ + } + attribute luminousTransmittance: LuminousTransmittanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-32.1 transmittance optical density, optical density, transmittance density, decadic absorbance */ + attribute def TransmittanceOpticalDensityValue :> DimensionOneValue { + doc + /* + * source: item 7-32.1 transmittance optical density, optical density, transmittance density, decadic absorbance + * symbol(s): `D`, `A_10`, `D_τ` + * application domain: generic + * name: TransmittanceOpticalDensity (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: logarithm to base 10 of the reciprocal of the transmittance, `τ` (item 7-31.5) + * remarks: If defined in terms of wavelength, the optical density can be expressed by `A_10(λ) = -log(τ(λ))`, where `τ(λ)` is the transmittance (item 7-31.5) in terms of wavelength. In spectroscopy, the name "absorbance" `A_10` is generally used. + */ + } + attribute transmittanceOpticalDensity: TransmittanceOpticalDensityValue :> scalarQuantities; + + alias opticalDensity for transmittanceOpticalDensity; + + alias transmittanceDensity for transmittanceOpticalDensity; + + alias decadicAbsorbance for transmittanceOpticalDensity; + + /* ISO-80000-7 item 7-32.2 Napierian absorbance */ + attribute def NapierianAbsorbanceValue :> DimensionOneValue { + doc + /* + * source: item 7-32.2 Napierian absorbance + * symbol(s): `A_n`, `B` + * application domain: generic + * name: NapierianAbsorbance (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: natural (Napierian) logarithm of the reciprocal of the transmittance, `τ` (item 7-31.5) + * remarks: If defined in terms of wavelength, the Napierian absorbance can be expressed by `A_n(λ) = B(λ) = -log(τ(λ))`. It can also be expressed as `A_n(λ) = l*α(λ)`, where `α` is linear absorption coefficient (item 7-35.2) and `l` is length (ISO 80000-3) traversed. + */ + } + attribute napierianAbsorbance: NapierianAbsorbanceValue :> scalarQuantities; + + /* ISO-80000-7 item 7-33.1 radiance factor */ + attribute def RadianceFactorValue :> DimensionOneValue { + doc + /* + * source: item 7-33.1 radiance factor + * symbol(s): `β_e`, `(β)` + * application domain: generic + * name: RadianceFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the radiance of a surface element in a specified direction and the radiance of the perfect reflecting diffuser or perfect transmitting diffuser identically irradiated and viewed, expressed by `β_e = L_(e,n)/L_(e,d)`, where `L_(e,n)` is the radiance (item 7-6.1) of a surface element in a given direction and `L_(e,d)` is the radiance of the perfect reflecting or transmitting diffuser identically irradiated and viewed + * remarks: The definition holds for a surface element of a non-self-radiating medium, in a given direction and under specified conditions of irradiation. Radiance factor is equivalent to reflectance factor (item 7-34) or luminance factor (item 7-33.2) when the cone angle is infinitely small, and is equivalent to reflectance (item 7-31.3) when the cone angle is `2π ["sr"]`. These quantities are also defined spectrally and called spectral radiance factor `β(λ)` and spectral reflectance factor `R(λ)`. The ideal isotropic (Lambertian) diffuser with reflectance (item 7-31.3) or transmittance (item 7-31.5) equal to 1 is called "perfect diffuser". + */ + } + attribute radianceFactor: RadianceFactorValue :> scalarQuantities; + + /* ISO-80000-7 item 7-33.2 luminance factor */ + attribute def LuminanceFactorValue :> DimensionOneValue { + doc + /* + * source: item 7-33.2 luminance factor + * symbol(s): `β_v`, `(β)` + * application domain: generic + * name: LuminanceFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the luminance of a surface element in a specified direction and the luminance of the perfect reflecting diffuser or perfect transmitting diffuser identically illuminated and viewed, expressed by `β_v = L_(v,n)/L_(v,d)`, where `L_(v,n)` is the luminance (item 7-15) of a surface element in a given direction and `L_(v,d)` is the luminance of the perfect reflecting or transmitting diffuser identically illuminated and viewed + * remarks: The definition holds for a surface element of a non-luminous medium, in a given direction and under specified conditions of irradiation. This quantity is also defined spectrally and is called "spectral luminance factor". For the analogous radiant quantity "radiance factor", see item 7-33.1. + */ + } + attribute luminanceFactor: LuminanceFactorValue :> scalarQuantities; + + /* ISO-80000-7 item 7-34 reflectance factor */ + attribute def ReflectanceFactorValue :> DimensionOneValue { + doc + /* + * source: item 7-34 reflectance factor + * symbol(s): `R` + * application domain: generic + * name: ReflectanceFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of the flux reflected in the directions delimited by a given cone with apex at a surface element and the flux reflected in the same directions by a perfect reflecting diffuser identically irradiated or illuminated, expressed by `R = Φ_n/Φ_d`, where `Φ_n` is the flux reflected in the directions delimited by a given cone and `Φ_d` is the flux reflected in the same directions by an identically irradiated diffuser of reflectance (item 7-31.3) equal to 1 + * remarks: The flux can be a radiant flux (item 7‐4.1) or a luminous flux (item 7‐13). The definition holds for a surface element, for the part of the reflected radiation contained in a given cone with apex at the surface element, and for incident radiation of given spectral composition, polarization and geometric distribution. Reflectance factor is equivalent to radiance factor (item 7-33.1) or luminance factor (item 7-33.2) when the cone angle is infinitely small, and is equivalent to reflectance (item 7-31.3) when the cone angle is 2π sr. These quantities are also defined spectrally and called spectral radiance factor `β(λ)` and spectral reflectance factor `R(λ)`. The ideal isotropic (Lambertian) diffuser with reflectance (item 7-31.3) or transmittance (item 7-31.5) equal to 1 is called a perfect diffuser. + */ + } + attribute reflectanceFactor: ReflectanceFactorValue :> scalarQuantities; + + /* ISO-80000-7 item 7-35.1 linear attenuation coefficient, linear extinction coefficient */ + attribute def LinearAttenuationCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 7-35.1 linear attenuation coefficient, linear extinction coefficient + * symbol(s): `μ`, `μ_l` + * application domain: radiometry + * name: LinearAttenuationCoefficient + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: relative decrease in radiant flux caused by absorption and scattering + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case, "spectral" is added before this quantity name. The spectral linear attenuation coefficient can be expressed by the relative decrease in the spectral radiant flux, `Φ_(e,λ)(λ)`, with respect to propagation length, `l`, of a collimated beam at a point in an absorbing and scattering medium `μ(λ) = 1/(Φ_(e,λ)(λ)) (d Φ_(e,λ)(λ))/(dl)`. Similarly, luminous and photon quantities can be defined. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearAttenuationCoefficientUnit[1]; + } + + attribute linearAttenuationCoefficient: LinearAttenuationCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def LinearAttenuationCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias LinearExtinctionCoefficientUnit for LinearAttenuationCoefficientUnit; + alias LinearExtinctionCoefficientValue for LinearAttenuationCoefficientValue; + alias linearExtinctionCoefficient for linearAttenuationCoefficient; + + /* ISO-80000-7 item 7-35.2 linear absorption coefficient */ + attribute def LinearAbsorptionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 7-35.2 linear absorption coefficient + * symbol(s): `α_l`, `a_l`, `α` + * application domain: radiometry + * name: LinearAbsorptionCoefficient + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: relative decrease in radiant flux (item 7-4.1) caused by absorption + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case, "spectral" is added before this quantity name. The spectral linear absorption coefficient can be expressed by the relative decrease in the spectral radiant flux, `Φ_(e,λ)(λ)`, with respect to propagation length, `l`, of a collimated beam at a point in an absorbing medium `α_l(λ) = 1/(Φ_(e,λ)(λ)) (d Φ_(e,λ)(λ))/(dl)`. It can also be expressed as a function of transmittance (item 7-31.5). `α_l = -ln(τ)/l = A_n/l`. The linear absorption coefficient is that part of the linear attenuation coefficient (item 7-35.1) that is due to absorption. Scattering might also contribute. Similarly, luminous and photon quantities can be defined. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearAbsorptionCoefficientUnit[1]; + } + + attribute linearAbsorptionCoefficient: LinearAbsorptionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def LinearAbsorptionCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-7 item 7-36.1 mass attenuation coefficient */ + attribute def MassAttenuationCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 7-36.1 mass attenuation coefficient + * symbol(s): `μ_m` + * application domain: radiometry + * name: MassAttenuationCoefficient + * quantity dimension: L^2*M^-1 + * measurement unit(s): kg^-1*m^2 + * tensor order: 0 + * definition: quotient of the linear attenuation coefficient (item 7-35.1), `μ`, and the mass density (ISO 80000-4), `ρ`, of the medium + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case, "spectral" is added before this quantity name, which can be expressed by `μ_m(λ) = (μ(λ))/ρ_m`. Similarly, luminous and photon quantities can be defined. + */ + attribute :>> num: Real; + attribute :>> mRef: MassAttenuationCoefficientUnit[1]; + } + + attribute massAttenuationCoefficient: MassAttenuationCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def MassAttenuationCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-7 item 7-36.2 mass absorption coefficient */ + attribute def MassAbsorptionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 7-36.2 mass absorption coefficient + * symbol(s): `α_m` + * application domain: radiometry + * name: MassAbsorptionCoefficient + * quantity dimension: L^2*M^-1 + * measurement unit(s): kg^-1*m^2 + * tensor order: 0 + * definition: quotient of the linear absorption coefficient (item 7-35.2), `α`, and the mass density (ISO 80000-4), `ρ`, of the medium + * remarks: This quantity is also defined spectrally in terms of wavelength, in which case, "spectral" is added before this quantity name, which can be expressed by `α_m(λ) = (α(λ))/ρ_m`. Similarly, luminous and photon quantities can be defined. + */ + attribute :>> num: Real; + attribute :>> mRef: MassAbsorptionCoefficientUnit[1]; + } + + attribute massAbsorptionCoefficient: MassAbsorptionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def MassAbsorptionCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-7 item 7-37 molar absorption coefficient */ + attribute def MolarAbsorptionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 7-37 molar absorption coefficient + * symbol(s): `χ` + * application domain: radiometry + * name: MolarAbsorptionCoefficient + * quantity dimension: L^2*N^-1 + * measurement unit(s): m^2*mol^-1 + * tensor order: 0 + * definition: product of linear absorption coefficient and molar volume, expressed by `χ = α V_m`, where `α` is linear absorption coefficient (item 7-35.2) and `V_m` is molar volume (ISO 80000-9) + * remarks: The molar absorption coefficient can also be expressed by `χ = α c` where `c` is amount-of-substance concentration (ISO 80000-9). Similarly, luminous and photon quantities can be defined. + */ + attribute :>> num: Real; + attribute :>> mRef: MolarAbsorptionCoefficientUnit[1]; + } + + attribute molarAbsorptionCoefficient: MolarAbsorptionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def MolarAbsorptionCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); } + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQMechanics.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQMechanics.sysml new file mode 100644 index 00000000..58ecd792 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQMechanics.sysml @@ -0,0 +1,1564 @@ +standard library package ISQMechanics { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-4:2019 "Mechanics" + * see also https://www.iso.org/standard/64975.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + private import ISQThermodynamics::EnergyValue; + + /* ISO-80000-4 item 4-1 mass */ + /* See package ISQBase for the declarations of MassValue and MassUnit */ + + /* ISO-80000-4 item 4-2 mass density, density */ + attribute def MassDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-2 mass density, density + * symbol(s): `ρ`, `ρ_m` + * application domain: generic + * name: MassDensity + * quantity dimension: L^-3*M^1 + * measurement unit(s): kg*m^-3 + * tensor order: 0 + * definition: quantity representing the spatial distribution of mass of a continuous material: `ρ(vec(r)) = (dm)/(dV)` where `m` is mass of the material contained in an infinitesimal domain at point `vec(r)` and `V` is volume of this domain + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MassDensityUnit[1]; + } + + attribute massDensity: MassDensityValue[*] nonunique :> scalarQuantities; + + attribute def MassDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + alias DensityUnit for MassDensityUnit; + alias DensityValue for MassDensityValue; + alias density for massDensity; + + /* ISO-80000-4 item 4-3 specific volume */ + attribute def SpecificVolumeValue :> ScalarQuantityValue { + doc + /* + * source: item 4-3 specific volume + * symbol(s): `v` + * application domain: generic + * name: SpecificVolume + * quantity dimension: L^3*M^-1 + * measurement unit(s): kg^-1*m^3 + * tensor order: 0 + * definition: reciprocal of mass density `ρ` (item 4-2): `v = 1/ρ` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificVolumeUnit[1]; + } + + attribute specificVolume: SpecificVolumeValue[*] nonunique :> scalarQuantities; + + attribute def SpecificVolumeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-4 item 4-4 relative mass density, relative density */ + attribute def RelativeMassDensityValue :> DimensionOneValue { + doc + /* + * source: item 4-4 relative mass density, relative density + * symbol(s): `d` + * application domain: generic + * name: RelativeMassDensity (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass density of a substance `ρ` and mass density of a reference substance `ρ_0` : `d = ρ/ρ_0` + * remarks: Conditions and material should be specified for the reference substance. + */ + } + attribute relativeMassDensity: RelativeMassDensityValue :> scalarQuantities; + + alias relativeDensity for relativeMassDensity; + + /* ISO-80000-4 item 4-5 surface mass density, surface density */ + attribute def SurfaceMassDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-5 surface mass density, surface density + * symbol(s): `ρ_A` + * application domain: generic + * name: SurfaceMassDensity + * quantity dimension: L^-2*M^1 + * measurement unit(s): kg*m^-2 + * tensor order: 0 + * definition: quantity representing the areal distribution of mass of a continuous material: `ρ_A(vec(r)) = (dm)/(dA)` where `m` is the mass of the material at position `vec(r)` and `A` is area + * remarks: The name "grammage" should not be used for this quantity. + */ + attribute :>> num: Real; + attribute :>> mRef: SurfaceMassDensityUnit[1]; + } + + attribute surfaceMassDensity: SurfaceMassDensityValue[*] nonunique :> scalarQuantities; + + attribute def SurfaceMassDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + alias SurfaceDensityUnit for SurfaceMassDensityUnit; + alias SurfaceDensityValue for SurfaceMassDensityValue; + alias surfaceDensity for surfaceMassDensity; + + /* ISO-80000-4 item 4-6 linear mass density, linear density */ + attribute def LinearMassDensityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-6 linear mass density, linear density + * symbol(s): `ρ_I` + * application domain: generic + * name: LinearMassDensity + * quantity dimension: L^-1*M^1 + * measurement unit(s): kg*m^-1 + * tensor order: 0 + * definition: quantity representing the linear distribution of mass of a continuous material: `ρ_I(vec(r)) = (dm)/(dI)` where `m` is the mass of the material at position `vec(r)` and `l` is length + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearMassDensityUnit[1]; + } + + attribute linearMassDensity: LinearMassDensityValue[*] nonunique :> scalarQuantities; + + attribute def LinearMassDensityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + alias LinearDensityUnit for LinearMassDensityUnit; + alias LinearDensityValue for LinearMassDensityValue; + alias linearDensity for linearMassDensity; + + /* ISO-80000-4 item 4-7 moment of inertia */ + attribute def MomentOfInertiaValue :> ScalarQuantityValue { + doc + /* + * source: item 4-7 moment of inertia (magnitude) + * symbol(s): `J` + * application domain: generic + * name: MomentOfInertia + * quantity dimension: L^2*M^1 + * measurement unit(s): kg*m^2 + * tensor order: 0 + * definition: tensor (ISO 80000-2) quantity representing rotational inertia of a rigid body relative to a fixed centre of rotation expressed by the tensor product: `vec(L) = vec(vec(J)) vec(ω)` where `vec(L)` is angular momentum (item 4-11) of the body relative to the reference point and `vec(ω)` is its angular velocity (ISO 80000-3) + * remarks: The calculation of the value requires an integration. + */ + attribute :>> num: Real; + attribute :>> mRef: MomentOfInertiaUnit[1]; + } + + attribute momentOfInertia: MomentOfInertiaValue[*] nonunique :> scalarQuantities; + + attribute def MomentOfInertiaUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + attribute def Cartesian3dMomentOfInertiaTensor :> TensorQuantityValue { + doc + /* + * source: item 4-7 moment of inertia (tensor) + * symbol(s): `vec(vec(J))` + * application domain: generic + * name: MomentOfInertia + * quantity dimension: L^2*M^1 + * measurement unit(s): kg*m^2 + * tensor order: 2 + * definition: tensor (ISO 80000-2) quantity representing rotational inertia of a rigid body relative to a fixed centre of rotation expressed by the tensor product: `vec(L) = vec(vec(J)) vec(ω)` where `vec(L)` is angular momentum (item 4-11) of the body relative to the reference point and `vec(ω)` is its angular velocity (ISO 80000-3) + * remarks: The calculation of the value requires an integration. + */ + attribute :>> isBound = false; + attribute :>> num: Real[9]; + attribute :>> mRef: Cartesian3dMomentOfInertiaMeasurementReference[1]; + } + + attribute momentOfInertiaTensor: Cartesian3dMomentOfInertiaTensor :> tensorQuantities; + + attribute def Cartesian3dMomentOfInertiaMeasurementReference :> TensorMeasurementReference { + attribute :>> dimensions = (3, 3); + attribute :>> isBound = false; + attribute :>> mRefs: MomentOfInertiaUnit[9]; + } + + /* ISO-80000-4 item 4-8 momentum */ + attribute def MomentumValue :> ScalarQuantityValue { + doc + /* + * source: item 4-8 momentum (magnitude) + * symbol(s): `p` + * application domain: generic + * name: Momentum + * quantity dimension: L^1*M^1*T^-1 + * measurement unit(s): kg*m*s^-1 + * tensor order: 0 + * definition: product of mass `m` (item 4-1) of a body and velocity `vec(v)` (ISO 80000-3) of its centre of mass: `vec(p) = m vec(v)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MomentumUnit[1]; + } + + attribute momentum: MomentumValue[*] nonunique :> scalarQuantities; + + attribute def MomentumUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianMomentum3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-8 momentum (vector) + * symbol(s): `vec(p)` + * application domain: generic + * name: Momentum + * quantity dimension: L^1*M^1*T^-1 + * measurement unit(s): kg*m*s^-1 + * tensor order: 1 + * definition: product of mass `m` (item 4-1) of a body and velocity `vec(v)` (ISO 80000-3) of its centre of mass: `vec(p) = m vec(v)` + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMomentum3dCoordinateFrame[1]; + } + + attribute cartesianMomentum3dVector: CartesianMomentum3dVector :> vectorQuantities; + + attribute def CartesianMomentum3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MomentumUnit[3]; + } + + /* ISO-80000-4 item 4-9.1 force */ + attribute def ForceValue :> ScalarQuantityValue { + doc + /* + * source: item 4-9.1 force (magnitude) + * symbol(s): `F` + * application domain: generic + * name: Force + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity describing interaction between bodies or particles + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: ForceUnit[1]; + } + + attribute force: ForceValue[*] nonunique :> scalarQuantities; + + attribute def ForceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianForce3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-9.1 force (vector) + * symbol(s): `vec(F)` + * application domain: generic + * name: Force + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity describing interaction between bodies or particles + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianForce3dCoordinateFrame[1]; + } + + attribute cartesianForce3dVector: CartesianForce3dVector :> vectorQuantities; + + attribute def CartesianForce3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ForceUnit[3]; + } + + /* ISO-80000-4 item 4-9.2 weight */ + attribute def CartesianWeight3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-9.2 weight + * symbol(s): `vec(F_g)` + * application domain: generic + * name: Weight (specializes Force) + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 1 + * definition: force (item 4-9.1) acting on a body in the gravitational field of Earth: `vec(F_g) = m vec(g)` where `m` (item 4-1) is the mass of the body and `vec(g)` is the local acceleration of free fall (ISO 80000-3) + * remarks: In colloquial language, the name "weight" continues to be used where "mass" is meant. This practice should be avoided. Weight is an example of a gravitational force. Weight comprises not only the local gravitational force but also the local centrifugal force due to the rotation of the Earth. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianForce3dCoordinateFrame[1]; + } + + attribute cartesianWeight3dVector: CartesianWeight3dVector :> vectorQuantities; + + /* ISO-80000-4 item 4-9.3 static friction force, static friction */ + attribute def CartesianStaticFrictionForce3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-9.3 static friction force, static friction + * symbol(s): `vec(F_s)` + * application domain: generic + * name: StaticFrictionForce (specializes Force) + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 1 + * definition: force (item 4-9.1) resisting the motion before a body starts to slide on a surface + * remarks: For the static friction coefficient, see item 4-23.1. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianForce3dCoordinateFrame[1]; + } + + attribute cartesianStaticFrictionForce3dVector: CartesianStaticFrictionForce3dVector :> vectorQuantities; + + alias cartesianStaticFriction3dVector for cartesianStaticFrictionForce3dVector; + + /* ISO-80000-4 item 4-9.4 kinetic friction force, dynamic friction force */ + attribute def CartesianKineticFrictionForce3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-9.4 kinetic friction force, dynamic friction force + * symbol(s): `vec(F_μ)` + * application domain: generic + * name: KineticFrictionForce (specializes Force) + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 1 + * definition: force (item 4-9.1) resisting the motion when a body slides on a surface + * remarks: For the kinetic friction factor, see item 4-23.2. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianForce3dCoordinateFrame[1]; + } + + attribute cartesianKineticFrictionForce3dVector: CartesianKineticFrictionForce3dVector :> vectorQuantities; + + alias cartesianDynamicFrictionForce3dVector for cartesianKineticFrictionForce3dVector; + + /* ISO-80000-4 item 4-9.5 rolling resistance, rolling drag, rolling friction force */ + attribute def CartesianRollingResistance3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-9.5 rolling resistance, rolling drag, rolling friction force + * symbol(s): `vec(F_"rr")` + * application domain: generic + * name: RollingResistance (specializes Force) + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 1 + * definition: force (item 4-9.1) resisting the motion when a body rolls on a surface + * remarks: For the rolling resistance factor, see item 4-23.3. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianForce3dCoordinateFrame[1]; + } + + attribute cartesianRollingResistance3dVector: CartesianRollingResistance3dVector :> vectorQuantities; + + alias cartesianRollingDrag3dVector for cartesianRollingResistance3dVector; + + alias cartesianRollingFrictionForce3dVector for cartesianRollingResistance3dVector; + + /* ISO-80000-4 item 4-9.6 drag force */ + attribute def CartesianDragForce3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-9.6 drag force + * symbol(s): `vec(F_D)` + * application domain: generic + * name: DragForce (specializes Force) + * quantity dimension: L^1*M^1*T^-2 + * measurement unit(s): N, kg*m*s^-2 + * tensor order: 1 + * definition: force (item 4-9.1) resisting the motion of a body in a fluid + * remarks: For the drag coefficient, see item 4-23.4. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianForce3dCoordinateFrame[1]; + } + + attribute cartesianDragForce3dVector: CartesianDragForce3dVector :> vectorQuantities; + + /* ISO-80000-4 item 4-10 impulse */ + attribute def ImpulseValue :> ScalarQuantityValue { + doc + /* + * source: item 4-10 impulse (magnitude) + * symbol(s): `I` + * application domain: generic + * name: Impulse + * quantity dimension: L^1*M^1*T^-1 + * measurement unit(s): N*s, kg*m*s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity describing the effect of force acting during a time interval: `vec(I) = int_(t_1)^(t_2) vec(F)*dt` where `vec(F)` is force (item 4-9.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval + * remarks: For a time interval `[t_1, t_2]`, `vec(I)(t_1, t_2) = vec(p)(t_1) - vec(p)(t_2) = vec(Δp)` where `vec(p)` is momentum (item 4-8). + */ + attribute :>> num: Real; + attribute :>> mRef: ImpulseUnit[1]; + } + + attribute impulse: ImpulseValue[*] nonunique :> scalarQuantities; + + attribute def ImpulseUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianImpulse3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-10 impulse (vector) + * symbol(s): `vec(I)` + * application domain: generic + * name: Impulse + * quantity dimension: L^1*M^1*T^-1 + * measurement unit(s): N*s, kg*m*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity describing the effect of force acting during a time interval: `vec(I) = int_(t_1)^(t_2) vec(F)*dt` where `vec(F)` is force (item 4-9.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval + * remarks: For a time interval `[t_1, t_2]`, `vec(I)(t_1, t_2) = vec(p)(t_1) - vec(p)(t_2) = vec(Δp)` where `vec(p)` is momentum (item 4-8). + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianImpulse3dCoordinateFrame[1]; + } + + attribute cartesianImpulse3dVector: CartesianImpulse3dVector :> vectorQuantities; + + attribute def CartesianImpulse3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: ImpulseUnit[3]; + } + + /* ISO-80000-4 item 4-11 angular momentum */ + attribute def AngularMomentumValue :> ScalarQuantityValue { + doc + /* + * source: item 4-11 angular momentum (magnitude) + * symbol(s): `L` + * application domain: generic + * name: AngularMomentum + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): kg*m^2*s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(L) = vec(r) xx vec(p)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(p)` is momentum (item 4-8) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: AngularMomentumUnit[1]; + } + + attribute angularMomentum: AngularMomentumValue[*] nonunique :> scalarQuantities; + + attribute def AngularMomentumUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianAngularMomentum3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-11 angular momentum (vector) + * symbol(s): `vec(L)` + * application domain: generic + * name: AngularMomentum + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): kg*m^2*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(L) = vec(r) xx vec(p)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(p)` is momentum (item 4-8) + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAngularMomentum3dCoordinateFrame[1]; + } + + attribute cartesianAngularMomentum3dVector: CartesianAngularMomentum3dVector :> vectorQuantities; + + attribute def CartesianAngularMomentum3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: AngularMomentumUnit[3]; + } + + /* ISO-80000-4 item 4-12.1 moment of force */ + attribute def MomentOfForceValue :> ScalarQuantityValue { + doc + /* + * source: item 4-12.1 moment of force (magnitude) + * symbol(s): `M` + * application domain: generic + * name: MomentOfForce + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): N*m, kg*m^2*s^-2 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(M) = vec(r) xx vec(F)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(F)` is force (item 4-9.1) + * remarks: The bending moment of force is denoted by `vec(M)_b`. + */ + attribute :>> num: Real; + attribute :>> mRef: MomentOfForceUnit[1]; + } + + attribute momentOfForce: MomentOfForceValue[*] nonunique :> scalarQuantities; + + attribute def MomentOfForceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianMomentOfForce3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-12.1 moment of force (vector) + * symbol(s): `vec(M)` + * application domain: generic + * name: MomentOfForce + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): N*m, kg*m^2*s^-2 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(M) = vec(r) xx vec(F)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(F)` is force (item 4-9.1) + * remarks: The bending moment of force is denoted by `vec(M)_b`. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMomentOfForce3dCoordinateFrame[1]; + } + + attribute cartesianMomentOfForce3dVector: CartesianMomentOfForce3dVector :> vectorQuantities; + + attribute def CartesianMomentOfForce3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MomentOfForceUnit[3]; + } + + /* ISO-80000-4 item 4-12.2 torque */ + attribute def TorqueValue :> ScalarQuantityValue { + doc + /* + * source: item 4-12.2 torque + * symbol(s): `T`, `M_Q` + * application domain: generic + * name: Torque + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): N*m, kg*m^2*s^-2 + * tensor order: 0 + * definition: quantity described by the scalar product: `T = vec(M)*vec(e_Q)` where `vec(M)` is moment of force (item 4-12.1) and `vec(e_Q)` is unit vector of direction with respect to which the torque is considered + * remarks: For example, torque is the twisting moment of force with respect to the longitudinal axis of a beam or shaft. + */ + attribute :>> num: Real; + attribute :>> mRef: TorqueUnit[1]; + } + + attribute torque: TorqueValue[*] nonunique :> scalarQuantities; + + attribute def TorqueUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-4 item 4-13 angular impulse */ + attribute def AngularImpulseValue :> ScalarQuantityValue { + doc + /* + * source: item 4-13 angular impulse (magnitude) + * symbol(s): `H` + * application domain: generic + * name: AngularImpulse + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): N*m*s, kg*m^2*s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity describing the effect of moment of force during a time interval: `vec(H)(t_1; t_2) = int_(t_1)^(t_2) vec(M) dt` where `vec(M)` is moment of force (item 4-12.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval + * remarks: For a time interval `[t_1, t_2]`, `vec(H)(t_1, t_2) = vec(L)(t_1) - vec(L)(t_2) = vec(ΔL)` where `vec(L)` is angular momentum. + */ + attribute :>> num: Real; + attribute :>> mRef: AngularImpulseUnit[1]; + } + + attribute angularImpulse: AngularImpulseValue[*] nonunique :> scalarQuantities; + + attribute def AngularImpulseUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianAngularImpulse3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-13 angular impulse (vector) + * symbol(s): `vec(H)` + * application domain: generic + * name: AngularImpulse + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): N*m*s, kg*m^2*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity describing the effect of moment of force during a time interval: `vec(H)(t_1; t_2) = int_(t_1)^(t_2) vec(M) dt` where `vec(M)` is moment of force (item 4-12.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval + * remarks: For a time interval `[t_1, t_2]`, `vec(H)(t_1, t_2) = vec(L)(t_1) - vec(L)(t_2) = vec(ΔL)` where `vec(L)` is angular momentum. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAngularImpulse3dCoordinateFrame[1]; + } + + attribute cartesianAngularImpulse3dVector: CartesianAngularImpulse3dVector :> vectorQuantities; + + attribute def CartesianAngularImpulse3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: AngularImpulseUnit[3]; + } + + /* ISO-80000-4 item 4-14.1 pressure */ + attribute def PressureValue :> ScalarQuantityValue { + doc + /* + * source: item 4-14.1 pressure + * symbol(s): `p` + * application domain: generic + * name: Pressure + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: quotient of the component of a force normal to a surface and its area: `p = (vec(e_n) * vec(F)) / A` where `vec(e_n)` is unit vector of the surface normal, `vec(F)` is force (item 4-9.1) and `A` is area (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: PressureUnit[1]; + } + + attribute pressure: PressureValue[*] nonunique :> scalarQuantities; + + attribute def PressureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-4 item 4-14.2 gauge pressure */ + attribute gaugePressure: PressureValue :> scalarQuantities { + doc + /* + * source: item 4-14.2 gauge pressure + * symbol(s): `p_e` + * application domain: generic + * name: GaugePressure (specializes Pressure) + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: pressure `p` (item 4-14.1) decremented by ambient pressure `p_amb` : `p_e = p - p_amb` + * remarks: Often, `p_amb` is chosen as a standard pressure. Gauge pressure is positive or negative. + */ + } + + /* ISO-80000-4 item 4-15 stress */ + attribute def StressValue :> ScalarQuantityValue { + doc + /* + * source: item 4-15 stress (magnitude) + * symbol(s): `σ` + * application domain: generic + * name: Stress + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: tensor (ISO 80000-2) quantity representing state of tension of matter + * remarks: Stress tensor is symmetric and has three normal-stress and three shear-stress (Cartesian) components. + */ + attribute :>> num: Real; + attribute :>> mRef: StressUnit[1]; + } + + attribute stress: StressValue[*] nonunique :> scalarQuantities; + + attribute def StressUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def Cartesian3dStressTensor :> TensorQuantityValue { + doc + /* + * source: item 4-15 stress (tensor) + * symbol(s): `vec(vec(σ))` + * application domain: generic + * name: Stress + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 2 + * definition: tensor (ISO 80000-2) quantity representing state of tension of matter + * remarks: Stress tensor is symmetric and has three normal-stress and three shear-stress (Cartesian) components. + */ + attribute :>> isBound = false; + attribute :>> num: Real[9]; + attribute :>> mRef: Cartesian3dStressMeasurementReference[1]; + } + + attribute stressTensor: Cartesian3dStressTensor :> tensorQuantities; + + attribute def Cartesian3dStressMeasurementReference :> TensorMeasurementReference { + attribute :>> dimensions = (3, 3); + attribute :>> isBound = false; + attribute :>> mRefs: StressUnit[9]; + } + + /* ISO-80000-4 item 4-16.1 normal stress */ + attribute def NormalStressValue :> ScalarQuantityValue { + doc + /* + * source: item 4-16.1 normal stress + * symbol(s): `σ_n`, `σ` + * application domain: generic + * name: NormalStress + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: scalar (ISO 80000-2) quantity describing surface action of a force into a body equal to: `σ_n = (d F_n)/(dA)` where `F_n` is the normal component of force (item 4-9.1) and `A` is the area (ISO 80000-3) of the surface element + * remarks: A couple of mutually opposite forces of magnitude `F` acting on the opposite surfaces of a slice (layer) of homogenous solid matter normal to it, and evenly distributed, cause a constant normal stress `σ_n = F A` in the slice (layer). + */ + attribute :>> num: Real; + attribute :>> mRef: NormalStressUnit[1]; + } + + attribute normalStress: NormalStressValue[*] nonunique :> scalarQuantities; + + attribute def NormalStressUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-4 item 4-16.2 shear stress */ + attribute def ShearStressValue :> ScalarQuantityValue { + doc + /* + * source: item 4-16.2 shear stress + * symbol(s): `τ_s`, `τ` + * application domain: generic + * name: ShearStress + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: scalar (ISO 80000-2) quantity describing surface action of a force into a body equal to: `τ_s = (d F_t)/(dA)` where `F_t` is the tangential component of force (item 4-9.1) and `A` is the area (ISO 80000-3) of the surface element + * remarks: A couple of mutually opposite forces of magnitude `F` acting on the opposite surfaces of a slice (layer) of homogenous solid matter parallel to it, and evenly distributed, cause a constant shear stress `τ = F/A` in the slice (layer). + */ + attribute :>> num: Real; + attribute :>> mRef: ShearStressUnit[1]; + } + + attribute shearStress: ShearStressValue[*] nonunique :> scalarQuantities; + + attribute def ShearStressUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-4 item 4-17.1 strain */ + attribute def StrainValue :> ScalarQuantityValue { + doc + /* + * source: item 4-17.1 strain (magnitude) + * symbol(s): `ε` + * application domain: generic + * name: Strain + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: tensor (ISO 80000-2) quantity representing the deformation of matter caused by stress + * remarks: Strain tensor is symmetric and has three linear-strain and three shear strain (Cartesian) components. + */ + attribute :>> num: Real; + attribute :>> mRef: StrainUnit[1]; + } + + attribute strain: StrainValue[*] nonunique :> scalarQuantities; + + attribute def StrainUnit :> DimensionOneUnit { + } + + attribute def Cartesian3dStrainTensor :> TensorQuantityValue { + doc + /* + * source: item 4-17.1 strain (tensor) + * symbol(s): `vec(vec(ε))` + * application domain: generic + * name: Strain + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 2 + * definition: tensor (ISO 80000-2) quantity representing the deformation of matter caused by stress + * remarks: Strain tensor is symmetric and has three linear-strain and three shear strain (Cartesian) components. + */ + attribute :>> isBound = false; + attribute :>> num: Real[9]; + attribute :>> mRef: Cartesian3dStrainMeasurementReference[1]; + } + + attribute strainTensor: Cartesian3dStrainTensor :> tensorQuantities; + + attribute def Cartesian3dStrainMeasurementReference :> TensorMeasurementReference { + attribute :>> dimensions = (3, 3); + attribute :>> isBound = false; + attribute :>> mRefs: StrainUnit[9]; + } + + /* ISO-80000-4 item 4-17.2 relative linear strain */ + attribute def RelativeLinearStrainValue :> DimensionOneValue { + doc + /* + * source: item 4-17.2 relative linear strain + * symbol(s): `ε`, `(e)` + * application domain: generic + * name: RelativeLinearStrain (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of change in length `Δl` (ISO 80000-3) of an object and its length `l` (ISO 80000-3): `ε = (Δl)/l` + * remarks: None. + */ + } + attribute relativeLinearStrain: RelativeLinearStrainValue :> scalarQuantities; + + /* ISO-80000-4 item 4-17.3 shear strain */ + attribute def ShearStrainValue :> DimensionOneValue { + doc + /* + * source: item 4-17.3 shear strain + * symbol(s): `γ` + * application domain: generic + * name: ShearStrain (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of parallel displacement `Δx` (ISO 80000-3) of two surfaces of a layer and the thickness `d` (ISO 80000-3) of the layer: `γ = (Δx)/d` + * remarks: None. + */ + } + attribute shearStrain: ShearStrainValue :> scalarQuantities; + + /* ISO-80000-4 item 4-17.4 relative volume strain */ + attribute def RelativeVolumeStrainValue :> DimensionOneValue { + doc + /* + * source: item 4-17.4 relative volume strain + * symbol(s): `θ` + * application domain: generic + * name: RelativeVolumeStrain (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of change in volume `ΔV` (ISO 80000-3) of an object and its volume `V_0` (ISO 80000-3): `θ = (ΔV)/V_0` + * remarks: None. + */ + } + attribute relativeVolumeStrain: RelativeVolumeStrainValue :> scalarQuantities; + + /* ISO-80000-4 item 4-18 Poisson number */ + attribute def PoissonNumberValue :> DimensionOneValue { + doc + /* + * source: item 4-18 Poisson number + * symbol(s): `μ`, `(v)` + * application domain: generic + * name: PoissonNumber (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of change in width `Δb` (width is defined in ISO 80000-3) and change in length `Δl` (length is defined in ISO 80000-3) of an object: `μ = (Δb)/(Δl)` + * remarks: None. + */ + } + attribute poissonNumber: PoissonNumberValue :> scalarQuantities; + + /* ISO-80000-4 item 4-19.1 modulus of elasticity, Young modulus */ + attribute def ModulusOfElasticityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-19.1 modulus of elasticity, Young modulus + * symbol(s): `E`, `E_m`, `Y` + * application domain: generic + * name: ModulusOfElasticity + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: quotient of normal stress `σ` (item 4-16.1) and relative linear strain `ε` (item 4-17.2): `E = σ/ε` + * remarks: Conditions should be specified (e.g. adiabatic or isothermal process). + */ + attribute :>> num: Real; + attribute :>> mRef: ModulusOfElasticityUnit[1]; + } + + attribute modulusOfElasticity: ModulusOfElasticityValue[*] nonunique :> scalarQuantities; + + attribute def ModulusOfElasticityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias YoungModulusUnit for ModulusOfElasticityUnit; + alias YoungModulusValue for ModulusOfElasticityValue; + alias youngModulus for modulusOfElasticity; + + /* ISO-80000-4 item 4-19.2 modulus of rigidity, shear modulus */ + attribute def ModulusOfRigidityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-19.2 modulus of rigidity, shear modulus + * symbol(s): `G` + * application domain: generic + * name: ModulusOfRigidity + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: quotient of shear stress `τ` (item 4-16.2) and shear strain `γ` (item 4-17.3): `G = τ/γ` + * remarks: Conditions should be specified (e.g. isentropic or isothermal process). + */ + attribute :>> num: Real; + attribute :>> mRef: ModulusOfRigidityUnit[1]; + } + + attribute modulusOfRigidity: ModulusOfRigidityValue[*] nonunique :> scalarQuantities; + + attribute def ModulusOfRigidityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias ShearModulusUnit for ModulusOfRigidityUnit; + alias ShearModulusValue for ModulusOfRigidityValue; + alias shearModulus for modulusOfRigidity; + + /* ISO-80000-4 item 4-19.3 modulus of compression, bulk modulus */ + attribute def ModulusOfCompressionValue :> ScalarQuantityValue { + doc + /* + * source: item 4-19.3 modulus of compression, bulk modulus + * symbol(s): `K`, `K_m`, `B` + * application domain: generic + * name: ModulusOfCompression + * quantity dimension: L^-1*M^1*T^-2 + * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2 + * tensor order: 0 + * definition: negative of the quotient of pressure `p` (item 4-14.1) and relative volume strain `θ` (item 4-17.4): `K = -(p/θ)` + * remarks: Conditions should be specified (e.g. isentropic or isothermal process). + */ + attribute :>> num: Real; + attribute :>> mRef: ModulusOfCompressionUnit[1]; + } + + attribute modulusOfCompression: ModulusOfCompressionValue[*] nonunique :> scalarQuantities; + + attribute def ModulusOfCompressionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias BulkModulusUnit for ModulusOfCompressionUnit; + alias BulkModulusValue for ModulusOfCompressionValue; + alias bulkModulus for modulusOfCompression; + + /* ISO-80000-4 item 4-20 compressibility */ + attribute def CompressibilityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-20 compressibility + * symbol(s): `ϰ` + * application domain: generic + * name: Compressibility + * quantity dimension: L^1*M^-1*T^2 + * measurement unit(s): Pa^-1, kg^-1*m*s^2 + * tensor order: 0 + * definition: negative relative change of volume `V` (ISO 80000-3) of an object under pressure `p` (item 4-14.1) expressed by: `ϰ = -(1/V)(dV)/(dp)` + * remarks: Conditions should be specified (e.g. isentropic or isothermal process). See also ISO 80000-5. + */ + attribute :>> num: Real; + attribute :>> mRef: CompressibilityUnit[1]; + } + + attribute compressibility: CompressibilityValue[*] nonunique :> scalarQuantities; + + attribute def CompressibilityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-4 item 4-21.1 second axial moment of area */ + attribute def SecondAxialMomentOfAreaValue :> ScalarQuantityValue { + doc + /* + * source: item 4-21.1 second axial moment of area + * symbol(s): `I_a` + * application domain: generic + * name: SecondAxialMomentOfArea + * quantity dimension: L^4 + * measurement unit(s): m^4 + * tensor order: 0 + * definition: geometrical characteristic of a shape of a body equal to: `I_a = int int_M r_Q^2 dA` where `M` is the two-dimensional domain of the cross-section of a plane and considered body, `r_Q` is radial distance (ISO 80000-3) from a Q-axis in the plane of the surface considered and `A` is area (ISO 80000-3) + * remarks: This quantity is often referred to wrongly as "moment of inertia" (item 4-7). The subscript, `a`, may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: SecondAxialMomentOfAreaUnit[1]; + } + + attribute secondAxialMomentOfArea: SecondAxialMomentOfAreaValue[*] nonunique :> scalarQuantities; + + attribute def SecondAxialMomentOfAreaUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-4 item 4-21.2 second polar moment of area */ + attribute def SecondPolarMomentOfAreaValue :> ScalarQuantityValue { + doc + /* + * source: item 4-21.2 second polar moment of area + * symbol(s): `I_p` + * application domain: generic + * name: SecondPolarMomentOfArea + * quantity dimension: L^4 + * measurement unit(s): m^4 + * tensor order: 0 + * definition: geometrical characteristic of a shape of a body equal to: `I_p = int int_M r_Q^2 * dA` where `M` is the two-dimensional domain of the cross-section of a plane and considered body, `r_Q` is radial distance (ISO 80000-3) from a Q-axis perpendicular to the plane of the surface considered and `A` is area (ISO 80000-3) + * remarks: This quantity is often referred to wrongly as "moment of inertia" (item 4-7). The subscript, `p`, may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: SecondPolarMomentOfAreaUnit[1]; + } + + attribute secondPolarMomentOfArea: SecondPolarMomentOfAreaValue[*] nonunique :> scalarQuantities; + + attribute def SecondPolarMomentOfAreaUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-4 item 4-22 section modulus */ + attribute def SectionModulusValue :> ScalarQuantityValue { + doc + /* + * source: item 4-22 section modulus + * symbol(s): `Z`, `(W)` + * application domain: generic + * name: SectionModulus + * quantity dimension: L^3 + * measurement unit(s): m^3 + * tensor order: 0 + * definition: geometrical characteristic of a shape of a body equal to: `Z = I_a/r_(Q_max)` where `I_a` is the second axial moment of area (item 4-21.1) and `r_(Q,max)` is the maximum radial distance (ISO 80000-3) of any point in the surface considered from the Q-axis with respect to which `I_a` is defined + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SectionModulusUnit[1]; + } + + attribute sectionModulus: SectionModulusValue[*] nonunique :> scalarQuantities; + + attribute def SectionModulusUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-4 item 4-23.1 static friction coefficient, static friction factor, coefficient of static friction */ + attribute def StaticFrictionCoefficientValue :> DimensionOneValue { + doc + /* + * source: item 4-23.1 static friction coefficient, static friction factor, coefficient of static friction + * symbol(s): `μ_s`, `(f_s)` + * application domain: generic + * name: StaticFrictionCoefficient (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: proportionality factor between the maximum magnitude of the tangential component `F_max` of the static friction force (item 4-9.3) and the magnitude of the normal component `N` of the contact force (item 4-9.1) between two bodies at relative rest with respect to each other: `F_max = μ_s * N` + * remarks: When it is not necessary to distinguish between dynamic friction factor and static friction factor, the name friction factor may be used for both. + */ + } + attribute staticFrictionCoefficient: StaticFrictionCoefficientValue :> scalarQuantities; + + alias staticFrictionFactor for staticFrictionCoefficient; + + alias coefficientOfStaticFriction for staticFrictionCoefficient; + + /* ISO-80000-4 item 4-23.2 kinetic friction factor, dynamic friction factor */ + attribute def KineticFrictionFactorValue :> DimensionOneValue { + doc + /* + * source: item 4-23.2 kinetic friction factor, dynamic friction factor + * symbol(s): `μ`, `(f)` + * application domain: generic + * name: KineticFrictionFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: proportionality factor between the magnitudes of the kinetic friction force, `F_μ` (item 4-9.4) and the normal component `N` of the contact force (item 4-9.1): `F_μ = μ * N` + * remarks: When it is not necessary to distinguish between dynamic friction factor and static friction factor, the name friction factor may be used for both. The dynamic friction factor `µ` is independent in first approximation of the contact surface. + */ + } + attribute kineticFrictionFactor: KineticFrictionFactorValue :> scalarQuantities; + + alias dynamicFrictionFactor for kineticFrictionFactor; + + /* ISO-80000-4 item 4-23.3 rolling resistance factor */ + attribute def RollingResistanceFactorValue :> DimensionOneValue { + doc + /* + * source: item 4-23.3 rolling resistance factor + * symbol(s): `C_"rr"` + * application domain: generic + * name: RollingResistanceFactor (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: proportionality factor between the magnitude of the tangential component `F` and the magnitude of the normal component `N` of the force applied to a body rolling on a surface at constant speed: `F = C_(rr)*N` + * remarks: Also known as rolling resistance coefficient, RRC. + */ + } + attribute rollingResistanceFactor: RollingResistanceFactorValue :> scalarQuantities; + + /* ISO-80000-4 item 4-23.4 drag coefficient, drag factor */ + attribute def DragCoefficientValue :> DimensionOneValue { + doc + /* + * source: item 4-23.4 drag coefficient, drag factor + * symbol(s): `C_D` + * application domain: generic + * name: DragCoefficient (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: factor proportional to magnitude `F_D` of the drag force (item 4-9.6) of a body moving in a fluid, dependent on the shape and speed `v` (ISO 80000-3) of a body: `F_D = 1/2 * C_D * ρ * v^2 * A` where `ρ` is mass density (item 4-2) of the fluid and `A` is cross-section area (ISO 80000-3) of the body + * remarks: None. + */ + } + attribute dragCoefficient: DragCoefficientValue :> scalarQuantities; + + alias dragFactor for dragCoefficient; + + /* ISO-80000-4 item 4-24 dynamic viscosity, viscosity */ + attribute def DynamicViscosityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-24 dynamic viscosity, viscosity + * symbol(s): `η` + * application domain: generic + * name: DynamicViscosity + * quantity dimension: L^-1*M^1*T^-1 + * measurement unit(s): Pa*s, kg*m^-1*s^-1 + * tensor order: 0 + * definition: for laminar flows, proportionality constant between shear stress `τ_(xz)` (item 4-16.2) in a fluid moving with a velocity `v_x` (ISO 80000-3) and gradient `(d v_x)/dz` perpendicular to the plane of shear: `τ_(xz) = η (d v_x)/(dz)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: DynamicViscosityUnit[1]; + } + + attribute dynamicViscosity: DynamicViscosityValue[*] nonunique :> scalarQuantities; + + attribute def DynamicViscosityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + alias ViscosityUnit for DynamicViscosityUnit; + alias ViscosityValue for DynamicViscosityValue; + alias viscosity for dynamicViscosity; + + /* ISO-80000-4 item 4-25 kinematic viscosity */ + attribute def KinematicViscosityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-25 kinematic viscosity + * symbol(s): `v` + * application domain: generic + * name: KinematicViscosity + * quantity dimension: L^2*T^-1 + * measurement unit(s): m^2*s^-1 + * tensor order: 0 + * definition: quotient of dynamic viscosity `η` (item 4-24) and mass density `ρ` (item 4-2) of a fluid: `v = η/ρ` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: KinematicViscosityUnit[1]; + } + + attribute kinematicViscosity: KinematicViscosityValue[*] nonunique :> scalarQuantities; + + attribute def KinematicViscosityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-4 item 4-26 surface tension */ + attribute def SurfaceTensionValue :> ScalarQuantityValue { + doc + /* + * source: item 4-26 surface tension + * symbol(s): `γ`, `σ` + * application domain: generic + * name: SurfaceTension + * quantity dimension: M^1*T^-2 + * measurement unit(s): N*m^-1, kg*s^-2 + * tensor order: 0 + * definition: magnitude of a force acting against the enlargement of area portion of a surface separating a liquid from its surrounding + * remarks: The concept of surface energy is closely related to surface tension and has the same dimension. + */ + attribute :>> num: Real; + attribute :>> mRef: SurfaceTensionUnit[1]; + } + + attribute surfaceTension: SurfaceTensionValue[*] nonunique :> scalarQuantities; + + attribute def SurfaceTensionUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-4 item 4-27.1 power */ + attribute def PowerValue :> ScalarQuantityValue { + doc + /* + * source: item 4-27.1 power + * symbol(s): `P` + * application domain: generic + * name: Power + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W, J*s^-1, kg*m^2*s^-3 + * tensor order: 0 + * definition: quotient of energy (ISO 80000-5) and duration (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: PowerUnit[1]; + } + + attribute power: PowerValue[*] nonunique :> scalarQuantities; + + attribute def PowerUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-4 item 4-27 mechanical power */ + attribute mechanicalPower: PowerValue :> scalarQuantities { + doc + /* + * source: item 4-27 mechanical power + * symbol(s): `P` + * application domain: mechanics + * name: MechanicalPower (specializes Power) + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W, N*m*s^-1, kg*m^2*s^-3 + * tensor order: 0 + * definition: scalar product of force `vec(F)` (item 4-9.1) acting to a body and its velocity `vec(v)` (ISO 80000-3): `P = vec(F) * vec(v)` + * remarks: None. + */ + } + + /* ISO-80000-4 item 4-28.1 potential energy */ + attribute potentialEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 4-28.1 potential energy + * symbol(s): `V`, `E_p` + * application domain: generic + * name: PotentialEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: for conservative force `vec(F)`, scalar additive quantity obeying condition `vec(F) = -nabla F`, if it exists + * remarks: For the definition of energy, see ISO 80000-5. A force is conservative when the force field is irrotational, i.e. `rot(F) = 0` , or `vec(F)` is perpendicular to the speed of the body to ensure `vec(F) * d vec(r) = 0` . + */ + } + + /* ISO-80000-4 item 4-28.2 kinetic energy */ + attribute kineticEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 4-28.2 kinetic energy + * symbol(s): `T`, `E_k` + * application domain: generic + * name: KineticEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: scalar (ISO 80000-2) quantity characterizing a moving body expressed by: `T = 1/2 m v^2` where `m` is mass (item 4-1) of the body and `v` is its speed (ISO 80000-3) + * remarks: For the definition of energy, see ISO 80000-5. + */ + } + + /* ISO-80000-4 item 4-28.3 mechanical energy */ + attribute mechanicalEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 4-28.3 mechanical energy + * symbol(s): `E`, `W` + * application domain: generic + * name: MechanicalEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: sum of kinetic energy `T` (item 4-28.2) and potential energy `V` (item 4-28.1): `E = T+V` + * remarks: The symbols `E` and `W` are also used for other kinds of energy. This definition is understood in a classical way and it does not include thermal motion. + */ + } + + /* ISO-80000-4 item 4-28.4 mechanical work, work */ + attribute mechanicalWork: EnergyValue :> scalarQuantities { + doc + /* + * source: item 4-28.4 mechanical work, work + * symbol(s): `A`, `W` + * application domain: generic + * name: MechanicalWork (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: process quantity describing the total action of a force `vec(F)` (item 4-9.1) along a continuous curve `Γ` in three-dimensional space with infinitesimal displacement (ISO 80000-3) `dvec(r)`, as a line integral of their scalar product: `A = int_Γ vec(F) * d vec(r)` + * remarks: The definition covers the case `A = -int_Γ p*dV` where `Γ` is a curve in the phase space and implies that work generally depends upon `Γ`, and that type of process must be defined (e.g. isentropic or isothermic). + */ + } + + alias work for mechanicalWork; + + /* ISO-80000-4 item 4-29 mechanical efficiency */ + attribute def MechanicalEfficiencyValue :> DimensionOneValue { + doc + /* + * source: item 4-29 mechanical efficiency + * symbol(s): `η` + * application domain: mechanics + * name: MechanicalEfficiency (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of output power `P_"out"` (item 4-27) from a system and input power `P_"in"` (item 4-27) to this system: `η = P_"out"/P_"in"` + * remarks: The system must be specified. This quantity is often expressed by the unit percent, symbol %. + */ + } + attribute mechanicalEfficiency: MechanicalEfficiencyValue :> scalarQuantities; + + /* ISO-80000-4 item 4-30.1 mass flow */ + attribute def MassFlowValue :> ScalarQuantityValue { + doc + /* + * source: item 4-30.1 mass flow (magnitude) + * symbol(s): `j_m` + * application domain: generic + * name: MassFlow + * quantity dimension: L^-2*M^1*T^-1 + * measurement unit(s): kg*m^-2*s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity characterizing a flowing fluid by the product of its local mass density `ρ` (item 4-2) and local velocity `vec(v)` (ISO 80000-3): `vec(j_m) = ρ vec(v)` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MassFlowUnit[1]; + } + + attribute massFlow: MassFlowValue[*] nonunique :> scalarQuantities; + + attribute def MassFlowUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def CartesianMassFlow3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 4-30.1 mass flow (vector) + * symbol(s): `vec(j_m)` + * application domain: generic + * name: MassFlow + * quantity dimension: L^-2*M^1*T^-1 + * measurement unit(s): kg*m^-2*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity characterizing a flowing fluid by the product of its local mass density `ρ` (item 4-2) and local velocity `vec(v)` (ISO 80000-3): `vec(j_m) = ρ vec(v)` + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianMassFlow3dCoordinateFrame[1]; + } + + attribute cartesianMassFlow3dVector: CartesianMassFlow3dVector :> vectorQuantities; + + attribute def CartesianMassFlow3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: MassFlowUnit[3]; + } + + /* ISO-80000-4 item 4-30.2 mass flow rate */ + attribute def MassFlowRateValue :> ScalarQuantityValue { + doc + /* + * source: item 4-30.2 mass flow rate + * symbol(s): `q_m` + * application domain: generic + * name: MassFlowRate + * quantity dimension: M^1*T^-1 + * measurement unit(s): kg*s^-1 + * tensor order: 0 + * definition: scalar (ISO 80000-2) quantity characterizing the total flow through the two-dimensional domain `A` with normal vector `vec(e)_n` of a flowing fluid with mass flow `vec(j)_m` (item 4-30.1) as an integral: `q_m = int int_A vec(j)_m * vec(e)_n dA` where `dA` is the area (ISO 80000-3) of an element of the two-dimensional domain `A` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MassFlowRateUnit[1]; + } + + attribute massFlowRate: MassFlowRateValue[*] nonunique :> scalarQuantities; + + attribute def MassFlowRateUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-4 item 4-30.3 mass change rate */ + attribute def MassChangeRateValue :> ScalarQuantityValue { + doc + /* + * source: item 4-30.3 mass change rate + * symbol(s): `q_m` + * application domain: generic + * name: MassChangeRate + * quantity dimension: M^1*T^-1 + * measurement unit(s): kg*s^-1 + * tensor order: 0 + * definition: rate of increment of mass `m` (item 4-1): `q_m = (dm)/(dt)` where `dm` is the infinitesimal mass (item 4-1) increment and `dt` is the infinitesimal duration (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MassChangeRateUnit[1]; + } + + attribute massChangeRate: MassChangeRateValue[*] nonunique :> scalarQuantities; + + attribute def MassChangeRateUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-4 item 4-31 volume flow rate */ + attribute def VolumeFlowRateValue :> ScalarQuantityValue { + doc + /* + * source: item 4-31 volume flow rate + * symbol(s): `q_v` + * application domain: generic + * name: VolumeFlowRate + * quantity dimension: L^3*T^-1 + * measurement unit(s): m^3*s^-1 + * tensor order: 0 + * definition: scalar (ISO 80000-2) quantity characterizing the total flow through the two-dimensional domain `A` with the normal vector `vec(e)_n` of a flowing fluid with velocity `vec(v)` (ISO 80000-3) as an integral: `q_v = int int_A vec(v) * vec(e)_n dA` where `dA` is the area (ISO 80000-3) of an element of the two-dimensional domain `A` + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: VolumeFlowRateUnit[1]; + } + + attribute volumeFlowRate: VolumeFlowRateValue[*] nonunique :> scalarQuantities; + + attribute def VolumeFlowRateUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-4 item 4-32 action quantity */ + attribute def ActionQuantityValue :> ScalarQuantityValue { + doc + /* + * source: item 4-32 action quantity + * symbol(s): `S` + * application domain: generic + * name: ActionQuantity + * quantity dimension: L^2*M^1*T^-1 + * measurement unit(s): J*s, kg*m^2*s^-1 + * tensor order: 0 + * definition: time integral of energy `E` over a time interval `(t_1, t_2)`: `S = int_(t_1)^(t_2) E dt` + * remarks: The energy may be expressed by a Lagrangian or Hamiltonian function. Note for SysML: the ISQ quantity "action" has been renamed to "action quantity" to avoid the name clash with the SysML action keyword. + */ + attribute :>> num: Real; + attribute :>> mRef: ActionQuantityUnit[1]; + } + + attribute actionQuantity: ActionQuantityValue[*] nonunique :> scalarQuantities; + + attribute def ActionQuantityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml new file mode 100644 index 00000000..f12c1200 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml @@ -0,0 +1,1169 @@ +standard library package ISQSpaceTime { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-3:2019 "Space and Time" + * see also https://www.iso.org/standard/64974.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* ISO-80000-3 item 3-1.1 length */ + /* See package ISQBase for the declarations of LengthValue and LengthUnit */ + + /* ISO-80000-3 item 3-1.2 width, breadth */ + attribute width: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.2 width, breadth + * symbol(s): `b`, `B` + * application domain: generic + * name: Width (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: minimum length of a straight line segment between two parallel straight lines (in two dimensions) or planes (in three dimensions) that enclose a given geometrical shape + * remarks: This quantity is non-negative. + */ + } + + alias breadth for width; + + /* ISO-80000-3 item 3-1.3 height, depth, altitude */ + attribute height: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.3 height, depth, altitude + * symbol(s): `h`, `H` + * application domain: generic + * name: Height (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: minimum length of a straight line segment between a point and a reference line or reference surface + * remarks: This quantity is usually signed. The sign expresses the position of the particular point with respect to the reference line or surface and is chosen by convention. The symbol `H` is often used to denote altitude, i.e. height above sea level. + */ + } + + alias depth for height; + + alias altitude for height; + + /* ISO-80000-3 item 3-1.4 thickness */ + attribute thickness: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.4 thickness + * symbol(s): `d`, `δ` + * application domain: generic + * name: Thickness (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: width (item 3-1.2) + * remarks: This quantity is non-negative. + */ + } + + /* ISO-80000-3 item 3-1.5 diameter */ + attribute diameter: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.5 diameter + * symbol(s): `d`, `D` + * application domain: generic + * name: Diameter (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: width (item 3-1.2) of a circle, cylinder or sphere + * remarks: This quantity is non-negative. + */ + } + + /* ISO-80000-3 item 3-1.6 radius */ + attribute radius: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.6 radius + * symbol(s): `r`, `R` + * application domain: generic + * name: Radius (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: half of a diameter (item 3-1.5) + * remarks: This quantity is non-negative. + */ + } + + /* ISO-80000-3 item 3-1.7 path length, arc length */ + attribute pathLength: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.7 path length, arc length + * symbol(s): `s` + * application domain: generic + * name: PathLength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: length of a rectifiable curve between two of its points + * remarks: The differential path length at a given point of a curve is: `ds = sqrt(dx^2 + dy^2 + dz^2)` where `x`, `y`, and `z` denote the Cartesian coordinates (ISO 80000-2) of the particular point. There are curves which are not rectifiable, for example fractal curves. + */ + } + + alias arcLength for pathLength; + + /* ISO-80000-3 item 3-1.8 distance */ + attribute distance: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.8 distance + * symbol(s): `d`, `r` + * application domain: generic + * name: Distance (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: shortest path length (item 3-1.7) between two points in a metric space + * remarks: A metric space might be curved. An example of a curved metric space is the surface of the Earth. In this case, distances are measured along great circles. A metric is not necessarily Euclidean. + */ + } + + /* ISO-80000-3 item 3-1.9 radial distance */ + attribute radialDistance: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.9 radial distance + * symbol(s): `r_Q`, `ρ` + * application domain: generic + * name: RadialDistance (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: distance (item 3-1.8), where one point is located on an axis or within a closed non self-intersecting curve or surface + * remarks: The subscript Q denotes the point from which the radial distance is measured. Examples of closed non self-intersecting curves are circles or ellipses. Examples of closed non self-intersecting surfaces are surfaces of spheres or egg-shaped objects. + */ + } + + /* Spatial coordinate frames */ + + attribute def Spatial3dCoordinateFrame :> '3dCoordinateFrame' { + doc + /* + * Most general spatial 3D coordinate frame + */ + attribute :>> isBound = true; + } + + attribute def CartesianSpatial3dCoordinateFrame :> Spatial3dCoordinateFrame { + doc + /* + * Cartesian spatial 3D coordinate frame + * + * source: ISO 80000-2 item 2-17.1 Cartesian coordinates + * + * The components of a vector expressed on a Cartesian spatial coordinate frame are all LengthValues, and denoted with symbols `x`, `y`, `z`. + * + * Note 1: The Cartesian basis vectors `vec(e_x)`, `vec(e_y)` and `vec(e_z)` form an orthonormal right-handed coordinate frame. + * Note 2: The measurement units for the 3 dimensions are typically the same, but may be different. + */ + attribute xUnit : LengthUnit = mRefs#(1); + attribute yUnit : LengthUnit = mRefs#(2); + attribute zUnit : LengthUnit = mRefs#(3); + attribute :>> mRefs : LengthUnit[3]; + attribute :>> isOrthogonal = true; + } + + attribute universalCartesianSpatial3dCoordinateFrame : CartesianSpatial3dCoordinateFrame[1] { + doc + /* + * A singleton CartesianSpatial3dCoordinateFrame that can be used as a default universal Cartesian 3D coordinate frame. + */ + + attribute :>> mRefs default (SI::m, SI::m, SI::m) { + doc /* + * By default, the universalCartesianSpatial3dCoordinateFrame uses meters as the units on all three axes. + */ + } + + attribute :>> transformation[0..0] { + doc /* + * The universalCartesianSpatial3dCoordinateFrame is the "top-level" coordinate frame, not nested in any other frame. + */ + } + + } + + attribute def CylindricalSpatial3dCoordinateFrame :> Spatial3dCoordinateFrame { + doc + /* + * Cylindrical spatial 3D coordinate frame + * + * source: ISO 80000-2 item 2-17.2 cylindrical coordinates + * + * The components of a (position) vector to a point P in a cylindrical coordinate frame are: + * - radialDistance (symbol `ρ`) defined by LengthValue, that is the radial distance from the cylinder axis to P + * - azimuth (symbol `φ`) defined by AngularMeasure, that is the angle between the azimuth reference direction and the line segment + * from the cylinder axis, in the plane that is orthogonal to the cylinder axis and intersects P + * - z coordinate (symbol `z`) defined by LengthValue, the coordinate along the clyinder axis. + * + * Note 1: The basis vectors `vec(e_ρ)(φ)`, `vec(e_φ)(φ)` and `vec(e_z)` form an orthonormal right-handed coordinate frame, where + * `vec(e_φ)` is tangent to the circular arc in the `φ` direction. + * Note 2: In order to enable transformation to and from a CartesianSpatial3dCoordinateFrame the `vec(e_x)` Cartesian basis vector is aligned + * with the `φ=0` direction in the cylindrical frame, and the `vec(e_z)` Cartesian basis vector is aligned with + * the `vec(e_z)` cylindrical basis vector. + * Note 3: If `z = 0`, then `ρ` and `φ` are polar coordinates in the XY-plane. + * Note 4: See also https://en.wikipedia.org/wiki/Cylindrical_coordinate_system . + */ + attribute radialDistanceUnit : LengthUnit; + attribute azimuthUnit : AngularMeasureUnit; + attribute zUnit : LengthUnit; + attribute :>> mRefs = (radialDistanceUnit, azimuthUnit, zUnit); + attribute :>> isOrthogonal = true; + } + + attribute def SphericalSpatial3dCoordinateFrame :> Spatial3dCoordinateFrame { + doc + /* + * Spherical spatial 3D coordinate frame + * + * source: ISO 80000-2 item 2-17.3 spherical coordinates + * + * The components of a (position) vector to a point P specified in a spherical coordinate frame are: + * - radialDistance (symbol `r`) defined by LengthValue, that is the distance from the origin to P + * - inclination (symbol `θ`) defined by AngularMeasure, that is the angle between the zenith direction and the line segment from origin to P + * - azimuth (symbol `φ`) defined by AngularMeasure, that is the angle between the azimuth reference direction and the line segment + * from the origin to the orthogonal projection of P on the reference plane, normal to the zenith direction. + * + * Note 1: The basis vectors `vec(e_r)(θ,φ)`, `vec(e_θ)(θ,φ)` and `vec(e_φ)(φ)` form an orthonormal right-handed frame, where + * `vec(e_θ)` and `vec(e_φ)` are tangent to the respective circular arcs in the `θ` and `φ` directions. + * Note 2: In order to transform to and from a CartesianSpatial3dCoordinateFrame the `vec(e_x)` Cartesian basis vector is aligned + * with the `θ=π/4` and `φ=0` direction in the spherical frame, and the `vec(e_z)` Cartesian basis vector is aligned + * with the `θ=0` zenith direction in the spherical frame. + * Note 3: If `θ = π/4`, then `ρ` and `φ` are polar coordinates in the XY-plane. + * Note 4: See also https://en.wikipedia.org/wiki/Spherical_coordinate_system . + */ + attribute radialDistanceUnit : LengthUnit; + attribute inclinationUnit : AngularMeasureUnit; + attribute azimuthUnit : AngularMeasureUnit; + attribute :>> mRefs = (radialDistanceUnit, inclinationUnit, azimuthUnit); + attribute :>> isOrthogonal = true; + } + + attribute def PlanetarySpatial3dCoordinateFrame :> Spatial3dCoordinateFrame { + doc + /* + * Planetary spatial 3D coordinate frame + * + * A planetary spatial 3D coordinate frame is a generalization for any planet of the geographic coordinate frame and geocentric coordinate + * for Earth. In such coordinate frames, typically the origin is located at the planet's centre of gravity, and the surface of the planet + * is approximated by a reference ellipsoid centred on the origin, with its major axes oriented along the south to north pole vector and + * the equatorial plane. + * + * The components of a (position) vector to a point P specified in a planetary coordinate frame are: + * - latitude (symbol `lat` or `φ`) defined by AngularMeasure, that is the angle between the equatorial plane and the vector from + * the origin to P, similar to the inclination in a spherical spatial coordinate frame. Typically, the zero reference latitude is chosen + * for positions in the equatorial plane, with positive latitude for positions in the northern hemisphere and negative latitude for positions + * in the southern hemisphere. + * - longitude (symbol `long` or `λ`) defined by AngularMeasure, that is the angle between a reference meridian and the meridian + * passing through P, similar to the azimuth of a spherical spatial coordinate frame. The convention is to connotate positive longitude + * with eastward direction and negative longitude with westward direction. The reference meridian for `long=0` is chosen to pass + * through a particular feature of the planet, e.g., for Earth typically the position of the British Royal Observatory in Greenwich, UK. + * - altitude (symbol `h`) defined by LengthValue, that is the distance between P and the reference ellipsoid + * in the normal direction to the ellipsoid. Positive altitude specifies a position above the reference ellipsoid surface, + * while a negative value specifies a position below. + * + * Note 1: The reference meridian is also called prime meridian. + * Note 2: The basis vectors `vec(e_φ)(φ)`, `vec(e_λ)(λ)` and `vec(e_h)(φ,λ)` form an orthonormal right-handed frame, where + * `vec(e_φ)` and `vec(e_λ)` are tangent to the reference ellipsoid in the respective latitude and longitude directions, + * and `vec(e_h)` is normal to the reference ellipsoid. + * Note 3: In order to transform to and from a CartesianSpatial3dCoordinateFrame the `vec(e_x)` Cartesian basis vector is aligned + * with the `φ=0` and `λ=0` direction in the planetary frame, and the `vec(e_z)` Cartesian basis vector is aligned + * with the `λ=π/2` (north pole) direction in the planetary frame. + * Note 4: See also https://en.wikipedia.org/wiki/Planetary_coordinate_system . + */ + attribute latitudeUnit : AngularMeasureUnit; + attribute longitudeUnit : AngularMeasureUnit; + attribute altitudeUnit : LengthUnit; + attribute :>> mRefs = (longitudeUnit, latitudeUnit, altitudeUnit); + attribute :>> isOrthogonal = true; + } + + /* ISO-80000-3 item 3-1.10 position vector */ + attribute def Position3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-1.10 position vector + * symbol(s): `vec(r)` + * application domain: generic + * name: PositionVector + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity from the origin of a coordinate system to a point in space + * remarks: Position vectors are so-called bounded vectors, i.e. their magnitude (ISO 80000-2) and direction depend on the particular coordinate system used. + */ + attribute :>> isBound = true; + attribute :>> mRef: Spatial3dCoordinateFrame[1]; + } + + attribute position3dVector: Position3dVector :> vectorQuantities; + + attribute def CartesianPosition3dVector :> Position3dVector { + attribute x : LengthValue = num#(1) [mRef.mRefs#(1)]; + attribute y : LengthValue = num#(2) [mRef.mRefs#(2)]; + attribute z : LengthValue = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : CartesianSpatial3dCoordinateFrame[1]; + } + attribute cartesianPosition3dVector : CartesianPosition3dVector :> position3dVector; + + attribute def CylindricalPosition3dVector :> Position3dVector { + attribute <'ρ'> radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)]; + attribute <'φ'> azimuth : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)]; + attribute height : LengthValue = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : CylindricalSpatial3dCoordinateFrame[1]; + } + attribute cylindricalPosition3dVector : CylindricalPosition3dVector :> position3dVector; + + attribute def SphericalPosition3dVector :> Position3dVector { + attribute radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)]; + attribute <'θ'> inclination : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)]; + attribute <'φ'> azimuth : AngularMeasureUnit = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : SphericalSpatial3dCoordinateFrame[1]; + } + attribute sphericalPosition3dVector : SphericalPosition3dVector :> position3dVector; + + attribute def PlanetaryPosition3dVector :> Position3dVector { + attribute latitude : AngularMeasureUnit = num#(1) [mRef.mRefs#(1)]; + attribute longitude : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)]; + attribute altitude : LengthValue = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : PlanetarySpatial3dCoordinateFrame[1]; + } + attribute planetaryPosition3dVector : PlanetaryPosition3dVector :> position3dVector; + + /* ISO-80000-3 item 3-1.11 displacement */ + attribute def Displacement3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-1.11 displacement + * symbol(s): `vec(Δr)` + * application domain: generic + * name: Displacement + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity between any two points in space + * remarks: Displacement vectors are so-called free vectors, i.e. their magnitude (ISO 80000-2) and direction do not depend on a particular coordinate system. The magnitude of this vector is also called displacement. + */ + attribute :>> isBound = false; + attribute :>> mRef: Spatial3dCoordinateFrame[1]; + } + + attribute displacement3dVector: Displacement3dVector :> vectorQuantities; + + attribute def CartesianDisplacement3dVector :> Displacement3dVector { + attribute x : LengthValue = num#(1) [mRef.mRefs#(1)]; + attribute y : LengthValue = num#(2) [mRef.mRefs#(2)]; + attribute z : LengthValue = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : CartesianSpatial3dCoordinateFrame[1]; + } + attribute cartesianDisplacement3dVector : CartesianDisplacement3dVector :> displacement3dVector; + + attribute def CylindricalDisplacement3dVector :> Displacement3dVector { + attribute <'ρ'> radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)]; + attribute <'φ'> azimuth : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)]; + attribute height : LengthValue = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : CylindricalSpatial3dCoordinateFrame[1]; + } + attribute cylindricalDisplacement3dVector : CylindricalDisplacement3dVector :> displacement3dVector; + + attribute def SphericalDisplacement3dVector :> Displacement3dVector { + attribute radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)]; + attribute <'θ'> inclination : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)]; + attribute <'φ'> azimuth : AngularMeasureUnit = num#(3) [mRef.mRefs#(3)]; + attribute :>> mRef : SphericalSpatial3dCoordinateFrame[1]; + } + attribute sphericalDisplacement3dVector : SphericalDisplacement3dVector :> displacement3dVector; + + /* ISO-80000-3 item 3-1.12 radius of curvature */ + attribute radiusOfCurvature: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-1.12 radius of curvature + * symbol(s): `ρ` + * application domain: generic + * name: RadiusOfCurvature (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: radius (item 3-1.6) of the osculating circle of a planar curve at a particular point of the curve + * remarks: The radius of curvature is only defined for curves which are at least twice continuously differentiable. + */ + } + + /* ISO-80000-3 item 3-2 curvature */ + attribute def CurvatureValue :> ScalarQuantityValue { + doc + /* + * source: item 3-2 curvature + * symbol(s): `κ` + * application domain: generic + * name: Curvature + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: inverse of the radius of curvature (item 3-1.12) + * remarks: The curvature is given by: `κ = 1/ρ` where `ρ` denotes the radius of curvature (item 3-1.12). + */ + attribute :>> num: Real; + attribute :>> mRef: CurvatureUnit[1]; + } + + attribute curvature: CurvatureValue[*] nonunique :> scalarQuantities; + + attribute def CurvatureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-3 item 3-3 area */ + attribute def AreaValue :> ScalarQuantityValue { + doc + /* + * source: item 3-3 area + * symbol(s): `A`, `S` + * application domain: generic + * name: Area + * quantity dimension: L^2 + * measurement unit(s): m^2 + * tensor order: 0 + * definition: extent of a two-dimensional geometrical shape + * remarks: The surface element at a given point of a surface is given by: `dA = g du dv` where `u` and `v` denote the Gaussian surface coordinates and `g` denotes the determinant of the metric tensor (ISO 80000-2) at the particular point. The symbol `dσ` is also used for the surface element. + */ + attribute :>> num: Real; + attribute :>> mRef: AreaUnit[1]; + } + + attribute area: AreaValue[*] nonunique :> scalarQuantities; + + attribute def AreaUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-3 item 3-4 volume */ + attribute def VolumeValue :> ScalarQuantityValue { + doc + /* + * source: item 3-4 volume + * symbol(s): `V`, `(S)` + * application domain: generic + * name: Volume + * quantity dimension: L^3 + * measurement unit(s): m^3 + * tensor order: 0 + * definition: extent of a three-dimensional geometrical shape + * remarks: The volume element in Euclidean space is given by: `dV = dx dy dz` where `dx`, `dy`, and `dz` denote the differentials of the Cartesian coordinates (ISO 80000-2). The symbol `dτ` is also used for the volume element. + */ + attribute :>> num: Real; + attribute :>> mRef: VolumeUnit[1]; + } + + attribute volume: VolumeValue[*] nonunique :> scalarQuantities; + + attribute def VolumeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-3 item 3-5 angular measure, plane angle */ + attribute def AngularMeasureValue :> ScalarQuantityValue { + doc + /* + * source: item 3-5 angular measure, plane angle + * symbol(s): `α`, `β`, `γ` + * application domain: generic + * name: AngularMeasure + * quantity dimension: 1 + * measurement unit(s): rad, 1 + * tensor order: 0 + * definition: measure of a geometric figure, called plane angle, formed by two rays, called the sides of the plane angle, emanating from a common point, called the vertex of the plane angle + * remarks: The angular measure is given by: `α = s/r` where `s` denotes the arc length (item 3-1.7) of the included arc of a circle, centred at the vertex of the plane angle, and `r` the radius (item 3-1.6) of that circle. Other symbols are also used. + */ + attribute :>> num: Real; + attribute :>> mRef: AngularMeasureUnit[1]; + } + + attribute angularMeasure: AngularMeasureValue[*] nonunique :> scalarQuantities; + + attribute def AngularMeasureUnit :> DimensionOneUnit { + } + + alias PlaneAngleUnit for AngularMeasureUnit; + alias PlaneAngleValue for AngularMeasureValue; + alias planeAngle for angularMeasure; + + /* ISO-80000-3 item 3-6 rotational displacement, angular displacement */ + attribute rotationalDisplacement: AngularMeasureValue :> scalarQuantities { + doc + /* + * source: item 3-6 rotational displacement, angular displacement + * symbol(s): `ϑ`, `φ` + * application domain: generic + * name: RotationalDisplacement (specializes AngularMeasure) + * quantity dimension: 1 + * measurement unit(s): rad, 1 + * tensor order: 0 + * definition: quotient of the traversed circular path length (item 3-1.7) of a point in space during a rotation and its distance (item 3-1.8) from the axis or centre of rotation + * remarks: The rotational displacement is given by: `φ = s/r` where `s` denotes the traversed path length (item 3-1.7) along the periphery of a circle, centred at the vertex of the plane angle, and `r` the radius (item 3-1.6) of that circle. The rotational displacement is signed. The sign denotes the direction of rotation and is chosen by convention. Other symbols are also used. + */ + } + + alias angularDisplacement for rotationalDisplacement; + + /* ISO-80000-3 item 3-7 phase angle */ + attribute phaseAngle: AngularMeasureValue :> scalarQuantities { + doc + /* + * source: item 3-7 phase angle + * symbol(s): `φ`, `ϕ` + * application domain: generic + * name: PhaseAngle (specializes AngularMeasure) + * quantity dimension: 1 + * measurement unit(s): rad, 1 + * tensor order: 0 + * definition: angular measure (item 3-5) between the positive real axis and the radius of the polar representation of the complex number in the complex plane + * remarks: The phase angle (often imprecisely referred to as the "phase") is the argument of a complex number. Other symbols are also used. + */ + } + + /* ISO-80000-3 item 3-8 solid angular measure */ + attribute def SolidAngularMeasureValue :> ScalarQuantityValue { + doc + /* + * source: item 3-8 solid angular measure + * symbol(s): `Ω` + * application domain: generic + * name: SolidAngularMeasure + * quantity dimension: 1 + * measurement unit(s): sr, 1 + * tensor order: 0 + * definition: measure of a conical geometric figure, called solid angle, formed by all rays, originating from a common point, called the vertex of the solid angle, and passing through the points of a closed, non-self-intersecting curve in space considered as the border of a surface + * remarks: The differential solid angular measure expressed in spherical coordinates (ISO 80000-2) is given by: `dΩ = A/r^2 * sin(θ * dθ * dφ)` where `A` is area, `r` is radius, `θ` and `φ` are spherical coordinates. + */ + attribute :>> num: Real; + attribute :>> mRef: SolidAngularMeasureUnit[1]; + } + + attribute solidAngularMeasure: SolidAngularMeasureValue[*] nonunique :> scalarQuantities; + + attribute def SolidAngularMeasureUnit :> DimensionOneUnit { + } + + /* ISO-80000-3 item 3-9 duration, time */ + /* See package ISQBase for the declarations of DurationValue and DurationUnit */ + + alias TimeUnit for DurationUnit; + alias TimeValue for DurationValue; + alias time for duration; + + /* ISO-80000-3 item 3-10.1 velocity */ + attribute def CartesianVelocity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-10.1 velocity + * symbol(s): `vec(v)`, `u,v,w` + * application domain: generic + * name: Velocity + * quantity dimension: L^1*T^-1 + * measurement unit(s): m/s, m*s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity giving the rate of change of a position vector (item 3-1.10) + * remarks: The velocity vector is given by: `vec(v) = (d vec(r)) / (dt)` where `vec(r)` denotes the position vector (item 3-1.10) and `t` the duration (item 3-9). When the general symbol `vec(v)` is not used for the velocity, the symbols `u`, `v`, `w` may be used for the components (ISO 80000-2) of the velocity. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianVelocity3dCoordinateFrame[1]; + } + + attribute cartesianVelocity3dVector: CartesianVelocity3dVector :> vectorQuantities; + + attribute def CartesianVelocity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: SpeedUnit[3]; + } + + /* ISO-80000-3 item 3-10.2 speed */ + attribute def SpeedValue :> ScalarQuantityValue { + doc + /* + * source: item 3-10.2 speed + * symbol(s): `v` + * application domain: generic + * name: Speed + * quantity dimension: L^1*T^-1 + * measurement unit(s): m/s, m*s^-1 + * tensor order: 0 + * definition: magnitude (ISO 80000-2) of the velocity (item 3-10.1) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpeedUnit[1]; + } + + attribute speed: SpeedValue[*] nonunique :> scalarQuantities; + + attribute def SpeedUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-3 item 3-11 acceleration */ + attribute def AccelerationValue :> ScalarQuantityValue { + doc + /* + * source: item 3-11 acceleration (magnitude) + * symbol(s): `a` + * application domain: generic + * name: Acceleration + * quantity dimension: L^1*T^-2 + * measurement unit(s): m*s^-2 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity giving the rate of change of velocity (item 3-10) + * remarks: The acceleration vector is given by: `vec(a) = (d vec(v))/(dt)` where `vec(v)` denotes the velocity (item 3-10.1) and `t` the duration (item 3-9). The magnitude (ISO 80000-2) of the acceleration of free fall is usually denoted by `g`. + */ + attribute :>> num: Real; + attribute :>> mRef: AccelerationUnit[1]; + } + + attribute acceleration: AccelerationValue[*] nonunique :> scalarQuantities; + + attribute def AccelerationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + attribute def CartesianAcceleration3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-11 acceleration (vector) + * symbol(s): `vec(a)` + * application domain: generic + * name: Acceleration + * quantity dimension: L^1*T^-2 + * measurement unit(s): m*s^-2 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity giving the rate of change of velocity (item 3-10) + * remarks: The acceleration vector is given by: `vec(a) = (d vec(v))/(dt)` where `vec(v)` denotes the velocity (item 3-10.1) and `t` the duration (item 3-9). The magnitude (ISO 80000-2) of the acceleration of free fall is usually denoted by `g`. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAcceleration3dCoordinateFrame[1]; + } + + attribute cartesianAcceleration3dVector: CartesianAcceleration3dVector :> vectorQuantities; + + attribute def CartesianAcceleration3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: AccelerationUnit[3]; + } + + /* ISO-80000-3 item 3-12 angular velocity */ + attribute def AngularVelocityValue :> ScalarQuantityValue { + doc + /* + * source: item 3-12 angular velocity (magnitude) + * symbol(s): `ω` + * application domain: generic + * name: AngularVelocity + * quantity dimension: T^-1 + * measurement unit(s): rad*s^-1, s^-1 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity giving the rate of change of the rotational displacement (item 3-6) as its magnitude (ISO 80000-2) and with a direction equal to the direction of the axis of rotation + * remarks: The angular velocity vector is given by: `vec(ω) = (d φ) / (dt) vec(u)` where `φ` denotes the angular displacement (item 3-6), `t` the duration (item 3-9), and `vec(u)` the unit vector (ISO 80000-2) along the axis of rotation in the direction for which the rotation corresponds to a right-hand spiral. + */ + attribute :>> num: Real; + attribute :>> mRef: AngularVelocityUnit[1]; + } + + attribute angularVelocity: AngularVelocityValue[*] nonunique :> scalarQuantities; + + attribute def AngularVelocityUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + attribute def CartesianAngularVelocity3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-12 angular velocity (vector) + * symbol(s): `vec(ω)` + * application domain: generic + * name: AngularVelocity + * quantity dimension: T^-1 + * measurement unit(s): rad*s^-1, s^-1 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity giving the rate of change of the rotational displacement (item 3-6) as its magnitude (ISO 80000-2) and with a direction equal to the direction of the axis of rotation + * remarks: The angular velocity vector is given by: `vec(ω) = (d φ) / (dt) vec(u)` where `φ` denotes the angular displacement (item 3-6), `t` the duration (item 3-9), and `vec(u)` the unit vector (ISO 80000-2) along the axis of rotation in the direction for which the rotation corresponds to a right-hand spiral. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAngularVelocity3dCoordinateFrame[1]; + } + + attribute cartesianAngularVelocity3dVector: CartesianAngularVelocity3dVector :> vectorQuantities; + + attribute def CartesianAngularVelocity3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: AngularVelocityUnit[3]; + } + + /* ISO-80000-3 item 3-13 angular acceleration */ + attribute def AngularAccelerationValue :> ScalarQuantityValue { + doc + /* + * source: item 3-13 angular acceleration (magnitude) + * symbol(s): `α` + * application domain: generic + * name: AngularAcceleration + * quantity dimension: T^-2 + * measurement unit(s): rad*s^-2, s^-2 + * tensor order: 0 + * definition: vector (ISO 80000-2) quantity giving the rate of change of angular velocity (item 3-12) + * remarks: The angular acceleration vector is given by: `vec α = (d vec(ω))/(dt)` Where `vec(ω)` denotes the angular velocity (item 3-12) and `t` the duration (item 3-9). + */ + attribute :>> num: Real; + attribute :>> mRef: AngularAccelerationUnit[1]; + } + + attribute angularAcceleration: AngularAccelerationValue[*] nonunique :> scalarQuantities; + + attribute def AngularAccelerationUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + attribute def CartesianAngularAcceleration3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-13 angular acceleration (vector) + * symbol(s): `vec(α)` + * application domain: generic + * name: AngularAcceleration + * quantity dimension: T^-2 + * measurement unit(s): rad*s^-2, s^-2 + * tensor order: 1 + * definition: vector (ISO 80000-2) quantity giving the rate of change of angular velocity (item 3-12) + * remarks: The angular acceleration vector is given by: `vec α = (d vec(ω))/(dt)` Where `vec(ω)` denotes the angular velocity (item 3-12) and `t` the duration (item 3-9). + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianAngularAcceleration3dCoordinateFrame[1]; + } + + attribute cartesianAngularAcceleration3dVector: CartesianAngularAcceleration3dVector :> vectorQuantities; + + attribute def CartesianAngularAcceleration3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: AngularAccelerationUnit[3]; + } + + /* ISO-80000-3 item 3-14 period duration, period */ + attribute periodDuration: DurationValue :> scalarQuantities { + doc + /* + * source: item 3-14 period duration, period + * symbol(s): `T` + * application domain: generic + * name: PeriodDuration (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: duration (item 3-9) of one cycle of a periodic event + * remarks: A periodic event is an event that occurs regularly with a fixed time interval. + */ + } + + alias period for periodDuration; + + /* ISO-80000-3 item 3-15 time constant */ + attribute timeConstant: DurationValue :> scalarQuantities { + doc + /* + * source: item 3-15 time constant + * symbol(s): `τ`, `T` + * application domain: generic + * name: TimeConstant (specializes Duration) + * quantity dimension: T^1 + * measurement unit(s): s + * tensor order: 0 + * definition: parameter characterizing the response to a step input of a first-order, linear time-invariant system + * remarks: If a quantity is a function of the duration (item 3-9) expressed by: `F(t) prop e^(-t/τ)` where `t` denotes the duration (item 3-9), then `τ` denotes the time constant. Here the time constant `τ` applies to an exponentially decaying quantity. + */ + } + + /* ISO-80000-3 item 3-16 rotation */ + attribute rotation: CountValue :> scalarQuantities { + doc + /* + * source: item 3-16 rotation + * symbol(s): `N` + * application domain: generic + * name: Rotation (specializes Count) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: number of revolutions + * remarks: `N` is the number (not necessarily an integer) of revolutions, for example, of a rotating body about a given axis. Its value is given by: `N = φ/(2 π)` where `φ` denotes the measure of rotational displacement (item 3-6). + */ + } + + /* ISO-80000-3 item 3-17.1 frequency */ + attribute def FrequencyValue :> ScalarQuantityValue { + doc + /* + * source: item 3-17.1 frequency + * symbol(s): `f`, `ν` + * application domain: generic + * name: Frequency + * quantity dimension: T^-1 + * measurement unit(s): Hz, s^-1 + * tensor order: 0 + * definition: inverse of period duration (item 3-14) + * remarks: The frequency is given by: `f = 1/T` where `T` denotes the period duration (item 3-14). + */ + attribute :>> num: Real; + attribute :>> mRef: FrequencyUnit[1]; + } + + attribute frequency: FrequencyValue[*] nonunique :> scalarQuantities; + + attribute def FrequencyUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-3 item 3-17.2 rotational frequency */ + attribute rotationalFrequency: FrequencyValue :> scalarQuantities { + doc + /* + * source: item 3-17.2 rotational frequency + * symbol(s): `n` + * application domain: generic + * name: RotationalFrequency (specializes Frequency) + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: duration (item 3-9) of one cycle of a periodic event + * remarks: The rotational frequency is given by: `n = (dN) / (dt)` where `N` denotes the rotation (item 3-16) and `t` is the duration (item 3-9). + */ + } + + /* ISO-80000-3 item 3-18 angular frequency */ + attribute def AngularFrequencyValue :> ScalarQuantityValue { + doc + /* + * source: item 3-18 angular frequency + * symbol(s): `ω` + * application domain: generic + * name: AngularFrequency + * quantity dimension: T^-1 + * measurement unit(s): rad*s^-1, s^-1 + * tensor order: 0 + * definition: rate of change of the phase angle (item 3-7) + * remarks: The angular frequency is given by: `ω = 2 π f` where `f` denotes the frequency (item 3-17.1). + */ + attribute :>> num: Real; + attribute :>> mRef: AngularFrequencyUnit[1]; + } + + attribute angularFrequency: AngularFrequencyValue[*] nonunique :> scalarQuantities; + + attribute def AngularFrequencyUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-3 item 3-19 wavelength */ + attribute wavelength: LengthValue :> scalarQuantities { + doc + /* + * source: item 3-19 wavelength + * symbol(s): `λ` + * application domain: generic + * name: Wavelength (specializes Length) + * quantity dimension: L^1 + * measurement unit(s): m + * tensor order: 0 + * definition: length (item 3-1.1) of the repetition interval of a wave + * remarks: None. + */ + } + + /* ISO-80000-3 item 3-20 repetency, wavenumber */ + attribute def RepetencyValue :> ScalarQuantityValue { + doc + /* + * source: item 3-20 repetency, wavenumber + * symbol(s): `σ`, `ṽ` + * application domain: generic + * name: Repetency + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: inverse of the wavelength (item 3-19) + * remarks: The repetency is given by: `σ = 1 / λ` where `λ` denotes the wavelength (item 3-19). + */ + attribute :>> num: Real; + attribute :>> mRef: RepetencyUnit[1]; + } + + attribute repetency: RepetencyValue[*] nonunique :> scalarQuantities; + + attribute def RepetencyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias WavenumberUnit for RepetencyUnit; + alias WavenumberValue for RepetencyValue; + alias wavenumber for repetency; + + /* ISO-80000-3 item 3-21 wave vector */ + attribute def CartesianWave3dVector :> '3dVectorQuantityValue' { + doc + /* + * source: item 3-21 wave vector + * symbol(s): `vec(k)` + * application domain: generic + * name: WaveVector + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 1 + * definition: vector normal to the surfaces of constant phase angle (item 3-7) of a wave, with the magnitude (ISO 80000-2) of repetency (item 3-20) + * remarks: None. + */ + attribute :>> isBound = false; + attribute :>> mRef: CartesianWaveVector3dCoordinateFrame[1]; + } + + attribute cartesianWave3dVector: CartesianWave3dVector :> vectorQuantities; + + attribute def CartesianWaveVector3dCoordinateFrame :> '3dCoordinateFrame' { + attribute :>> isBound = false; + attribute :>> isOrthogonal = true; + attribute :>> mRefs: RepetencyUnit[3]; + } + + /* ISO-80000-3 item 3-22 angular repetency, angular wavenumber */ + attribute def AngularRepetencyValue :> ScalarQuantityValue { + doc + /* + * source: item 3-22 angular repetency, angular wavenumber + * symbol(s): `k` + * application domain: generic + * name: AngularRepetency + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: magnitude (ISO 80000-2) of the wave vector (item 3-21) + * remarks: The angular repetency is given by: `κ = (2 π)/λ` where `λ` denotes the wavelength (item 3-19). + */ + attribute :>> num: Real; + attribute :>> mRef: AngularRepetencyUnit[1]; + } + + attribute angularRepetency: AngularRepetencyValue[*] nonunique :> scalarQuantities; + + attribute def AngularRepetencyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias AngularWavenumberUnit for AngularRepetencyUnit; + alias AngularWavenumberValue for AngularRepetencyValue; + alias angularWavenumber for angularRepetency; + + /* ISO-80000-3 item 3-23.1 phase velocity, phase speed */ + attribute def PhaseVelocityValue :> ScalarQuantityValue { + doc + /* + * source: item 3-23.1 phase velocity, phase speed + * symbol(s): `c`, `v`, `(ν)`, `c_φ`, `v_φ`, `(ν_φ)` + * application domain: generic + * name: PhaseVelocity + * quantity dimension: L^1*T^-1 + * measurement unit(s): m*s^-1 + * tensor order: 0 + * definition: speed with which the phase angle (item 3-7) of a wave propagates in space + * remarks: The phase velocity is given by: `c = ω/κ` where `ω` denotes the angular frequency (item 3-18) and `k` the angular repetency (item 3-22). If phase velocities of electromagnetic waves and other phase velocities are both involved, then `c` should be used for the former and `υ` for the latter. Phase velocity can also be written as `c = λ f`. + */ + attribute :>> num: Real; + attribute :>> mRef: PhaseVelocityUnit[1]; + } + + attribute phaseVelocity: PhaseVelocityValue[*] nonunique :> scalarQuantities; + + attribute def PhaseVelocityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + alias PhaseSpeedUnit for PhaseVelocityUnit; + alias PhaseSpeedValue for PhaseVelocityValue; + alias phaseSpeed for phaseVelocity; + + /* ISO-80000-3 item 3-23.2 group velocity, group speed */ + attribute groupVelocity: SpeedValue :> scalarQuantities { + doc + /* + * source: item 3-23.2 group velocity, group speed + * symbol(s): `c_g`, `v_g`, `(ν_g)` + * application domain: generic + * name: GroupVelocity (specializes Speed) + * quantity dimension: L^1*T^-1 + * measurement unit(s): m*s^-1 + * tensor order: 0 + * definition: speed with which the envelope of a wave propagates in space + * remarks: The group velocity is given by: `c_g = (d ω)/ (dk)` where `ω` denotes the angular frequency (item 3-18) and `k` the angular repetency (item 3-22). + */ + } + + alias groupSpeed for groupVelocity; + + /* ISO-80000-3 item 3-24 damping coefficient */ + attribute def DampingCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 3-24 damping coefficient + * symbol(s): `δ` + * application domain: generic + * name: DampingCoefficient + * quantity dimension: T^-1 + * measurement unit(s): s^-1 + * tensor order: 0 + * definition: inverse of the time constant (item 3-15) of an exponentially varying quantity + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: DampingCoefficientUnit[1]; + } + + attribute dampingCoefficient: DampingCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def DampingCoefficientUnit :> DerivedUnit { + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; } + } + + /* ISO-80000-3 item 3-25 logarithmic decrement */ + attribute def LogarithmicDecrementValue :> DimensionOneValue { + doc + /* + * source: item 3-25 logarithmic decrement + * symbol(s): `Λ` + * application domain: generic + * name: LogarithmicDecrement (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: product of damping coefficient (item 3-24) and period duration (item 3-14) + * remarks: None. + */ + } + attribute logarithmicDecrement: LogarithmicDecrementValue :> scalarQuantities; + + /* ISO-80000-3 item 3-26.1 attenuation, extinction */ + attribute def AttenuationValue :> ScalarQuantityValue { + doc + /* + * source: item 3-26.1 attenuation, extinction + * symbol(s): `α` + * application domain: generic + * name: Attenuation + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: gradual decrease in magnitude (ISO 80000-2) of any kind of flux through a medium + * remarks: If a quantity is a function of distance (item 3-1.8) expressed by: `f(x) prop e^(-α x)` where `x` denotes distance (item 3-1.8), then `α` denotes attenuation. The inverse of attenuation is called attenuation length. + */ + attribute :>> num: Real; + attribute :>> mRef: AttenuationUnit[1]; + } + + attribute attenuation: AttenuationValue[*] nonunique :> scalarQuantities; + + attribute def AttenuationUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + alias ExtinctionUnit for AttenuationUnit; + alias ExtinctionValue for AttenuationValue; + alias extinction for attenuation; + + /* ISO-80000-3 item 3-26.2 phase coefficient */ + attribute def PhaseCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 3-26.2 phase coefficient + * symbol(s): `β` + * application domain: generic + * name: PhaseCoefficient + * quantity dimension: L^-1 + * measurement unit(s): rad/m, m^-1 + * tensor order: 0 + * definition: change of phase angle (item 3-7) with the length (item 3-1.1) along the path travelled by a plane wave + * remarks: If a quantity is a function of distance expressed by: `f(x) prop cos(β(x-x_0))` where `x` denotes distance (item 3-1.8), then `β` denotes the phase coefficient. + */ + attribute :>> num: Real; + attribute :>> mRef: PhaseCoefficientUnit[1]; + } + + attribute phaseCoefficient: PhaseCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def PhaseCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + + /* ISO-80000-3 item 3-26.3 propagation coefficient */ + attribute def PropagationCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 3-26.3 propagation coefficient + * symbol(s): `γ` + * application domain: generic + * name: PropagationCoefficient + * quantity dimension: L^-1 + * measurement unit(s): m^-1 + * tensor order: 0 + * definition: measure of the change of amplitude and phase angle (item 3-7) of a plane wave propagating in a given direction + * remarks: The propagation coefficient is given by: `γ = α + iβ` where `α` denotes attenuation (item 3-26.1) and `β` the phase coefficient (item 3-26.2) of a plane wave. + */ + attribute :>> num: Real; + attribute :>> mRef: PropagationCoefficientUnit[1]; + } + + attribute propagationCoefficient: PropagationCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def PropagationCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; } + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml new file mode 100644 index 00000000..a52e10d8 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml @@ -0,0 +1,1256 @@ +standard library package ISQThermodynamics { + doc + /* + * International System of Quantities and Units + * Generated on 2025-03-13T15:00:05Z from standard ISO-80000-5:2019 "Thermodynamics" + * see also https://www.iso.org/standard/64976.html + * + * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts, + * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks. + * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is + * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system) + * or TensorMeasurementReference. + */ + + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQBase::*; + + /* Quantity definitions referenced from other ISQ packages */ + + + /* ISO-80000-5 item 5-1 thermodynamic temperature, temperature */ + /* See package ISQBase for the declarations of ThermodynamicTemperatureValue and ThermodynamicTemperatureUnit */ + + alias TemperatureUnit for ThermodynamicTemperatureUnit; + alias TemperatureValue for ThermodynamicTemperatureValue; + alias temperature for thermodynamicTemperature; + + /* ISO-80000-5 item 5-2 Celsius temperature */ + attribute def CelsiusTemperatureValue :> ScalarQuantityValue { + doc + /* + * source: item 5-2 Celsius temperature + * symbol(s): `t`, `θ` + * application domain: generic + * name: CelsiusTemperature + * quantity dimension: Θ^1 + * measurement unit(s): °C + * tensor order: 0 + * definition: temperature difference from the thermodynamic temperature of the ice point is called the Celsius temperature t, which is defined by the quantity equation: `t = T - T_0` where `T` is thermodynamic temperature (item 5-1) and `T_0 = 273,15 K` + * remarks: The unit degree Celsius is a special name for the kelvin for use in stating values of Celsius temperature. The unit degree Celsius is by definition equal in magnitude to the kelvin. A difference or interval of temperature may be expressed in kelvin or in degrees Celsius. The thermodynamic temperature `T_0` is 0,01 K below the thermodynamic temperature of the triple point of water. The symbol °C for the degree Celsius shall be preceded by a space (see ISO 80000-1). Prefixes are not allowed in combination with the unit °C. + */ + attribute :>> num: Real; + attribute :>> mRef: CelsiusTemperatureUnit[1]; + } + + attribute celsiusTemperature: CelsiusTemperatureValue[*] nonunique :> scalarQuantities; + + attribute def CelsiusTemperatureUnit :> DerivedUnit { + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; } + } + + /* ISO-80000-5 item 5-3.1 linear expansion coefficient */ + attribute def LinearExpansionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 5-3.1 linear expansion coefficient + * symbol(s): `α_l` + * application domain: generic + * name: LinearExpansionCoefficient + * quantity dimension: Θ^-1 + * measurement unit(s): K^-1 + * tensor order: 0 + * definition: relative change of length with temperature: `α_l = 1/l * (dl)/(dT)` where l is length (ISO 80000-3) and `T` is thermodynamic temperature (item 5-1) + * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: LinearExpansionCoefficientUnit[1]; + } + + attribute linearExpansionCoefficient: LinearExpansionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def LinearExpansionCoefficientUnit :> DerivedUnit { + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; } + } + + /* ISO-80000-5 item 5-3.2 cubic expansion coefficient */ + attribute def CubicExpansionCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 5-3.2 cubic expansion coefficient + * symbol(s): `α_V`, `γ` + * application domain: generic + * name: CubicExpansionCoefficient + * quantity dimension: Θ^-1 + * measurement unit(s): K^-1 + * tensor order: 0 + * definition: relative change of volume with temperature: `α_V = 1/V * (dV)/(dT)` where `V` is volume (ISO 80000-3) and `T` is thermodynamic temperature (item 5-1) + * remarks: Also called volumetric expansion coefficient. The subscripts in the symbols may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: CubicExpansionCoefficientUnit[1]; + } + + attribute cubicExpansionCoefficient: CubicExpansionCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def CubicExpansionCoefficientUnit :> DerivedUnit { + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; } + } + + /* ISO-80000-5 item 5-3.3 relative pressure coefficient */ + attribute def RelativePressureCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 5-3.3 relative pressure coefficient + * symbol(s): `α_p` + * application domain: generic + * name: RelativePressureCoefficient + * quantity dimension: Θ^-1 + * measurement unit(s): K^-1 + * tensor order: 0 + * definition: relative change of pressure with temperature at constant volume: `α_p = 1/p * ((partial p)/(partial T))_V` where `p` is pressure (ISO 80000-4), `T` is thermodynamic temperature (item 5-1), and `V` is volume (ISO 80000-3) + * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: RelativePressureCoefficientUnit[1]; + } + + attribute relativePressureCoefficient: RelativePressureCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def RelativePressureCoefficientUnit :> DerivedUnit { + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; } + } + + /* ISO-80000-5 item 5-4 pressure coefficient */ + attribute def PressureCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 5-4 pressure coefficient + * symbol(s): `β` + * application domain: generic + * name: PressureCoefficient + * quantity dimension: L^-1*M^1*T^-2*Θ^-1 + * measurement unit(s): Pa/K, kg*m^-1*s^-2*K^-1 + * tensor order: 0 + * definition: change of pressure with temperature at constant volume: `β = ((partial p)/(partial T))_V` where `p` is pressure (ISO 80000-4), `T` is thermodynamic temperature (item 5-1), and `V` is volume (ISO 80000-3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: PressureCoefficientUnit[1]; + } + + attribute pressureCoefficient: PressureCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def PressureCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-5.1 isothermal compressibility */ + attribute def IsothermalCompressibilityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-5.1 isothermal compressibility + * symbol(s): `ϰ_T` + * application domain: generic + * name: IsothermalCompressibility + * quantity dimension: L^1*M^-1*T^2 + * measurement unit(s): Pa^-1, kg^-1*m*s^2 + * tensor order: 0 + * definition: negative relative change of volume with pressure at constant temperature: `ϰ_T = -1/V * ((partial V)/(partial p))_T` where `V` is volume (ISO 80000-3), `p` is pressure (ISO 80000-4), and `T` is thermodynamic temperature (item 5-1) + * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: IsothermalCompressibilityUnit[1]; + } + + attribute isothermalCompressibility: IsothermalCompressibilityValue[*] nonunique :> scalarQuantities; + + attribute def IsothermalCompressibilityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-5 item 5-5.2 isentropic compressibility */ + attribute def IsentropicCompressibilityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-5.2 isentropic compressibility + * symbol(s): `ϰ_S` + * application domain: generic + * name: IsentropicCompressibility + * quantity dimension: L^1*M^-1*T^2 + * measurement unit(s): Pa^-1, kg^-1*m*s^2 + * tensor order: 0 + * definition: negative relative change of volume with pressure at constant entropy: `ϰ_S = -1/V * ((partial V)/(partial p))_S` where `V` is volume (ISO 80000-3), `p` is pressure (ISO 80000-4), and `S` is entropy (item 5-18) + * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion. + */ + attribute :>> num: Real; + attribute :>> mRef: IsentropicCompressibilityUnit[1]; + } + + attribute isentropicCompressibility: IsentropicCompressibilityValue[*] nonunique :> scalarQuantities; + + attribute def IsentropicCompressibilityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-5 item 5-6.1 heat, amount of heat */ + attribute heat: EnergyValue :> scalarQuantities { + doc + /* + * source: item 5-6.1 heat, amount of heat + * symbol(s): `Q` + * application domain: generic + * name: Heat (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: difference between the increase in the internal energy (item 5-20.2) of a system and the work (ISO 80000-4) done on the system, provided that the amounts of substances within the system are not changed + * remarks: The heat transferred in an isothermal phase transformation should be expressed as the change in the appropriate state functions, e.g. `T ΔS`, where `T` is thermodynamic temperature (item 5-1) and `S` is entropy (item 5-18), or `ΔH`, where `H` is enthalpy (item 5-20.3). NOTE A supply of heat can correspond to an increase in thermodynamic temperature or to other effects, such as phase change or chemical processes; see item 5-6.2. + */ + } + + alias amountOfHeat for heat; + + /* ISO-80000-5 item 5-6.2 latent heat */ + attribute latentHeat: EnergyValue :> scalarQuantities { + doc + /* + * source: item 5-6.2 latent heat + * symbol(s): `Q` + * application domain: generic + * name: LatentHeat (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: energy released or absorbed by a system during a constant-temperature process + * remarks: Examples of latent heat are latent heat of fusion (melting) and latent heat of vaporization (boiling). + */ + } + + /* ISO-80000-5 item 5-7 heat flow rate */ + attribute def HeatFlowRateValue :> ScalarQuantityValue { + doc + /* + * source: item 5-7 heat flow rate + * symbol(s): `dot(Q)` + * application domain: generic + * name: HeatFlowRate + * quantity dimension: L^2*M^1*T^-3 + * measurement unit(s): W, J/s, kg*m^2*s^-3 + * tensor order: 0 + * definition: time rate at which heat (item 5-6.1) crosses a given surface + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: HeatFlowRateUnit[1]; + } + + attribute heatFlowRate: HeatFlowRateValue[*] nonunique :> scalarQuantities; + + attribute def HeatFlowRateUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-5 item 5-8 density of heat flow rate */ + attribute def DensityOfHeatFlowRateValue :> ScalarQuantityValue { + doc + /* + * source: item 5-8 density of heat flow rate + * symbol(s): `q`, `φ` + * application domain: generic + * name: DensityOfHeatFlowRate + * quantity dimension: M^1*T^-3 + * measurement unit(s): W/m^2, kg*s^-3 + * tensor order: 0 + * definition: quotient of heat flow rate and area: `q = dot Q / A` where `dot Q` is heat flow rate (item 5-7) and A is area (ISO 80000-3) of a given surface + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: DensityOfHeatFlowRateUnit[1]; + } + + attribute densityOfHeatFlowRate: DensityOfHeatFlowRateValue[*] nonunique :> scalarQuantities; + + attribute def DensityOfHeatFlowRateUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); } + } + + /* ISO-80000-5 item 5-9 thermal conductivity */ + attribute def ThermalConductivityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-9 thermal conductivity + * symbol(s): `λ_l`, `(ϰ)` + * application domain: generic + * name: ThermalConductivity + * quantity dimension: L^1*M^1*T^-3*Θ^-1 + * measurement unit(s): W/(m*K), kg*m*s^-3*K^-1 + * tensor order: 0 + * definition: quotient of density of heat flow rate (item 5-8) and thermodynamic temperature gradient that has the same direction as the heat flow + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalConductivityUnit[1]; + } + + attribute thermalConductivity: ThermalConductivityValue[*] nonunique :> scalarQuantities; + + attribute def ThermalConductivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-10.1 coefficient of heat transfer */ + attribute def CoefficientOfHeatTransferValue :> ScalarQuantityValue { + doc + /* + * source: item 5-10.1 coefficient of heat transfer + * symbol(s): `K`, `(k)` + * application domain: generic + * name: CoefficientOfHeatTransfer + * quantity dimension: M^1*T^-3*Θ^-1 + * measurement unit(s): W/(m^2*K), kg*s^-3*K^-1 + * tensor order: 0 + * definition: quotient of density of heat flow rate (item 5-8) and thermodynamic temperature (item 5-1) difference + * remarks: In building technology, the coefficient of heat transfer is often called thermal transmittance, with the symbol U (no longer recommended). See remark to item 5-13. + */ + attribute :>> num: Real; + attribute :>> mRef: CoefficientOfHeatTransferUnit[1]; + } + + attribute coefficientOfHeatTransfer: CoefficientOfHeatTransferValue[*] nonunique :> scalarQuantities; + + attribute def CoefficientOfHeatTransferUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-10.2 surface coefficient of heat transfer */ + attribute def SurfaceCoefficientOfHeatTransferValue :> ScalarQuantityValue { + doc + /* + * source: item 5-10.2 surface coefficient of heat transfer + * symbol(s): `h`, `(α)` + * application domain: generic + * name: SurfaceCoefficientOfHeatTransfer + * quantity dimension: M^1*T^-3*Θ^-1 + * measurement unit(s): W/(m^2*K), kg*s^-3*K^-1 + * tensor order: 0 + * definition: quotient of density of heat flow rate and the difference of the temperature at the surface and a reference temperature: `h = q / (T_s - T_r)` where q is density of heat flow rate (item 5-8), `T_s` is the thermodynamic temperature (item 5-1) at the surface, and `T_r` is a reference thermodynamic temperature characterizing the adjacent surroundings + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SurfaceCoefficientOfHeatTransferUnit[1]; + } + + attribute surfaceCoefficientOfHeatTransfer: SurfaceCoefficientOfHeatTransferValue[*] nonunique :> scalarQuantities; + + attribute def SurfaceCoefficientOfHeatTransferUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-11 thermal insulance, coefficient of thermal insulance */ + attribute def ThermalInsulanceValue :> ScalarQuantityValue { + doc + /* + * source: item 5-11 thermal insulance, coefficient of thermal insulance + * symbol(s): `M` + * application domain: generic + * name: ThermalInsulance + * quantity dimension: M^-1*T^3*Θ^1 + * measurement unit(s): m^2*K/W, kg^-1*s^3*K + * tensor order: 0 + * definition: inverse of coefficient of heat transfer `K`: `M = 1/K` where `K` is coefficient of heat transfer (item 5-10.1) + * remarks: In building technology, this quantity is often called thermal resistance, with the symbol R. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalInsulanceUnit[1]; + } + + attribute thermalInsulance: ThermalInsulanceValue[*] nonunique :> scalarQuantities; + + attribute def ThermalInsulanceUnit :> DerivedUnit { + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, thermodynamicTemperaturePF); } + } + + alias CoefficientOfThermalInsulanceUnit for ThermalInsulanceUnit; + alias CoefficientOfThermalInsulanceValue for ThermalInsulanceValue; + alias coefficientOfThermalInsulance for thermalInsulance; + + /* ISO-80000-5 item 5-12 thermal resistance */ + attribute def ThermalResistanceValue :> ScalarQuantityValue { + doc + /* + * source: item 5-12 thermal resistance + * symbol(s): `R` + * application domain: generic + * name: ThermalResistance + * quantity dimension: L^-2*M^-1*T^3*Θ^1 + * measurement unit(s): K/W, kg^-1*m^-2*s^3*K + * tensor order: 0 + * definition: quotient of thermodynamic temperature (item 5-1) difference and heat flow rate (item 5-7) + * remarks: See remark to item 5-11. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalResistanceUnit[1]; + } + + attribute thermalResistance: ThermalResistanceValue[*] nonunique :> scalarQuantities; + + attribute def ThermalResistanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-13 thermal conductance */ + attribute def ThermalConductanceValue :> ScalarQuantityValue { + doc + /* + * source: item 5-13 thermal conductance + * symbol(s): `G`, `(H)` + * application domain: generic + * name: ThermalConductance + * quantity dimension: L^2*M^1*T^-3*Θ^-1 + * measurement unit(s): W/K, kg*m^2*s^-3*K^-1 + * tensor order: 0 + * definition: inverse of thermal resistance `R`: `G = 1/R` where `R` is thermal resistance (item 5-12) + * remarks: See remark to item 5-11. This quantity is also called heat transfer coefficient. See item 5-10.1. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalConductanceUnit[1]; + } + + attribute thermalConductance: ThermalConductanceValue[*] nonunique :> scalarQuantities; + + attribute def ThermalConductanceUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-14 thermal diffusivity */ + attribute def ThermalDiffusivityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-14 thermal diffusivity + * symbol(s): `a` + * application domain: generic + * name: ThermalDiffusivity + * quantity dimension: L^2*T^-1 + * measurement unit(s): m^2*s^-1 + * tensor order: 0 + * definition: quotient of thermal conductivity and the product of mass density and specific heat capacity: `a = λ / (ρ C_p)` where `λ` is thermal conductivity (item 5-9), `ρ` is mass density (ISO 80000-4), and `c_p` is specific heat capacity at constant pressure (item 5-16.2) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: ThermalDiffusivityUnit[1]; + } + + attribute thermalDiffusivity: ThermalDiffusivityValue[*] nonunique :> scalarQuantities; + + attribute def ThermalDiffusivityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-5 item 5-15 heat capacity */ + attribute def HeatCapacityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-15 heat capacity + * symbol(s): `C` + * application domain: generic + * name: HeatCapacity + * quantity dimension: L^2*M^1*T^-2*Θ^-1 + * measurement unit(s): J/K, kg*m^2*s^-2*K^-1 + * tensor order: 0 + * definition: derivative of added heat with respect to thermodynamic temperature of a system: `C = (dQ)/(dT)` where `Q` is amount of heat (item 5-6.1) and `T` is thermodynamic temperature (item 5-1) + * remarks: Heat capacity is not completely defined unless specified as seen in items 5-16.2, 5-16.3 and 5-16.4. + */ + attribute :>> num: Real; + attribute :>> mRef: HeatCapacityUnit[1]; + } + + attribute heatCapacity: HeatCapacityValue[*] nonunique :> scalarQuantities; + + attribute def HeatCapacityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-16.1 specific heat capacity */ + attribute def SpecificHeatCapacityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-16.1 specific heat capacity + * symbol(s): `c` + * application domain: generic + * name: SpecificHeatCapacity + * quantity dimension: L^2*T^-2*Θ^-1 + * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1 + * tensor order: 0 + * definition: quotient of heat capacity and mass: `c = C/m` where `C` is heat capacity (item 5-15) and `m` is mass (ISO 80000-4) + * remarks: For the corresponding quantities related to the amount of substance, see ISO 80000-9. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificHeatCapacityUnit[1]; + } + + attribute specificHeatCapacity: SpecificHeatCapacityValue[*] nonunique :> scalarQuantities; + + attribute def SpecificHeatCapacityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-16.2 specific heat capacity at constant pressure */ + attribute def SpecificHeatCapacityAtConstantPressureValue :> ScalarQuantityValue { + doc + /* + * source: item 5-16.2 specific heat capacity at constant pressure + * symbol(s): `c_p` + * application domain: generic + * name: SpecificHeatCapacityAtConstantPressure + * quantity dimension: L^2*T^-2*Θ^-1 + * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1 + * tensor order: 0 + * definition: specific heat capacity (item 5-16.1) at constant pressure (ISO 80000-4) + * remarks: Also called specific isobaric heat capacity. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificHeatCapacityAtConstantPressureUnit[1]; + } + + attribute specificHeatCapacityAtConstantPressure: SpecificHeatCapacityAtConstantPressureValue[*] nonunique :> scalarQuantities; + + attribute def SpecificHeatCapacityAtConstantPressureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-16.3 specific heat capacity at constant volume */ + attribute def SpecificHeatCapacityAtConstantVolumeValue :> ScalarQuantityValue { + doc + /* + * source: item 5-16.3 specific heat capacity at constant volume + * symbol(s): `c_V` + * application domain: generic + * name: SpecificHeatCapacityAtConstantVolume + * quantity dimension: L^2*T^-2*Θ^-1 + * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1 + * tensor order: 0 + * definition: specific heat capacity (item 5-16.1) at constant volume (ISO 80000-3) + * remarks: Also called specific isochoric heat capacity. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificHeatCapacityAtConstantVolumeUnit[1]; + } + + attribute specificHeatCapacityAtConstantVolume: SpecificHeatCapacityAtConstantVolumeValue[*] nonunique :> scalarQuantities; + + attribute def SpecificHeatCapacityAtConstantVolumeUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-16.4 specific heat capacity at saturated vapour pressure */ + attribute def SpecificHeatCapacityAtSaturatedVapourPressureValue :> ScalarQuantityValue { + doc + /* + * source: item 5-16.4 specific heat capacity at saturated vapour pressure + * symbol(s): `c_"sat"` + * application domain: generic + * name: SpecificHeatCapacityAtSaturatedVapourPressure + * quantity dimension: L^2*T^-2*Θ^-1 + * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1 + * tensor order: 0 + * definition: specific heat capacity (item 5-16.1) at saturated vapour pressure (ISO 80000-4) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificHeatCapacityAtSaturatedVapourPressureUnit[1]; + } + + attribute specificHeatCapacityAtSaturatedVapourPressure: SpecificHeatCapacityAtSaturatedVapourPressureValue[*] nonunique :> scalarQuantities; + + attribute def SpecificHeatCapacityAtSaturatedVapourPressureUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-17.1 ratio of specific heat capacities */ + attribute def RatioOfSpecificHeatCapacitiesValue :> DimensionOneValue { + doc + /* + * source: item 5-17.1 ratio of specific heat capacities + * symbol(s): `γ` + * application domain: generic + * name: RatioOfSpecificHeatCapacities (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of specific heat capacity at constant pressure and specific heat capacity at constant volume: `γ = c_p/c_V` where `c_p` is specific heat capacity at constant pressure (item 5-16.2) and `c_V` is specific heat capacity at constant volume (item 5-16.3) + * remarks: This quantity can also be expressed by `γ = C_p/C_V` where `C_p` is heat capacity at constant pressure and `C_V` is heat capacity at constant volume. + */ + } + attribute ratioOfSpecificHeatCapacities: RatioOfSpecificHeatCapacitiesValue :> scalarQuantities; + + /* ISO-80000-5 item 5-17.2 isentropic exponent, isentropic expansion factor */ + attribute def IsentropicExponentValue :> DimensionOneValue { + doc + /* + * source: item 5-17.2 isentropic exponent, isentropic expansion factor + * symbol(s): `ϰ` + * application domain: generic + * name: IsentropicExponent (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: the negative of relative pressure change, divided by relative volume change, at constant entropy: `ϰ = -V/p * ((partial p)/(partial V))_S` where `V` is volume (ISO 80000-3), `p` is pressure (ISO 80000-4), and `S` is entropy (item 5-18) + * remarks: For an ideal gas, `ϰ` is equal to `γ` (item 5-17.1). + */ + } + attribute isentropicExponent: IsentropicExponentValue :> scalarQuantities; + + alias isentropicExpansionFactor for isentropicExponent; + + /* ISO-80000-5 item 5-18 entropy */ + attribute def EntropyValue :> ScalarQuantityValue { + doc + /* + * source: item 5-18 entropy + * symbol(s): `S` + * application domain: generic + * name: Entropy + * quantity dimension: L^2*M^1*T^-2*Θ^-1 + * measurement unit(s): J/K, kg*m^2*s^-2*K^-1 + * tensor order: 0 + * definition: natural logarithm of number of equally probable microscopic configurations in a macroscopic system, multiplied by the Boltzmann constant: `S = k lnW` where `W` is number of configurations and `k` is the Boltzmann constant (ISO 80000-1) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: EntropyUnit[1]; + } + + attribute entropy: EntropyValue[*] nonunique :> scalarQuantities; + + attribute def EntropyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-19 specific entropy */ + attribute def SpecificEntropyValue :> ScalarQuantityValue { + doc + /* + * source: item 5-19 specific entropy + * symbol(s): `s` + * application domain: generic + * name: SpecificEntropy + * quantity dimension: L^2*T^-2*Θ^-1 + * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1 + * tensor order: 0 + * definition: quotient of entropy and mass: `s = S/m` where `S` is entropy (item 5-18) and `m` is mass (ISO 80000-4) + * remarks: For the corresponding quantity related to amount of substance, see ISO 80000-9. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificEntropyUnit[1]; + } + + attribute specificEntropy: SpecificEntropyValue[*] nonunique :> scalarQuantities; + + attribute def SpecificEntropyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-20.1 energy */ + attribute def EnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 5-20.1 energy + * symbol(s): `E` + * application domain: thermodynamics + * name: Energy + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: ability of a system to do work (ISO 80000-4) + * remarks: Energy exists in different forms that are mutually transformable into each other, either totally or partially. In contrast to internal energy (item 5-20.2), energy is not a state function. + */ + attribute :>> num: Real; + attribute :>> mRef: EnergyUnit[1]; + } + + attribute energy: EnergyValue[*] nonunique :> scalarQuantities; + + attribute def EnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + /* ISO-80000-5 item 5-20.2 internal energy, thermodynamic energy */ + attribute internalEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 5-20.2 internal energy, thermodynamic energy + * symbol(s): `U` + * application domain: generic + * name: InternalEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: energy of a system whose change is given by the amount of the heat (item 5-6.1) transferred to the system and the work (ISO 80000-4) done on the system, provided that the system is closed and no chemical reactions occur + * remarks: In thermodynamic text books, usually the formula `ΔU = Q + W` is used. Note that the zero of the energy is undefined. + */ + } + + alias thermodynamicEnergy for internalEnergy; + + /* ISO-80000-5 item 5-20.3 enthalpy */ + attribute enthalpy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 5-20.3 enthalpy + * symbol(s): `H` + * application domain: generic + * name: Enthalpy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: sum of internal energy of the system and the product of pressure and volume of the system: `H = U + p*V` where U is internal energy (item 5-20.2), `p` is pressure (ISO 80000-4), and `V` is volume (ISO 80000-3) + * remarks: None. + */ + } + + /* ISO-80000-5 item 5-20.4 Helmholtz energy, Helmholtz function */ + attribute helmholtzEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 5-20.4 Helmholtz energy, Helmholtz function + * symbol(s): `A`, `F` + * application domain: generic + * name: HelmholtzEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: difference of internal energy of the system and the product of thermodynamic temperature and entropy of the system: `A = U - TS` where `U` is internal energy (item 5-20.2), `T` is thermodynamic temperature (item 5-1), and `S` is entropy (item 5-18) + * remarks: The name Helmholtz free energy is also used. However, this term is not recommended. + */ + } + + alias helmholtzFunction for helmholtzEnergy; + + /* ISO-80000-5 item 5-20.5 Gibbs energy, Gibbs function */ + attribute gibbsEnergy: EnergyValue :> scalarQuantities { + doc + /* + * source: item 5-20.5 Gibbs energy, Gibbs function + * symbol(s): `G` + * application domain: generic + * name: GibbsEnergy (specializes Energy) + * quantity dimension: L^2*M^1*T^-2 + * measurement unit(s): J, kg*m^2*s^-2 + * tensor order: 0 + * definition: difference of the enthalpy and the product of thermodynamic temperature and entropy of the system: `G = H - T*S` where H is enthalpy (item 5-20.3), `T` is thermodynamic temperature (item 5-1), and `S` is entropy (item 5-18) + * remarks: The name Gibbs free energy is also used. However, this term is not recommended. + */ + } + + alias gibbsFunction for gibbsEnergy; + + /* ISO-80000-5 item 5-21.1 specific energy */ + attribute def SpecificEnergyValue :> ScalarQuantityValue { + doc + /* + * source: item 5-21.1 specific energy + * symbol(s): `e` + * application domain: generic + * name: SpecificEnergy + * quantity dimension: L^2*T^-2 + * measurement unit(s): J/kg, m^2*s^-2 + * tensor order: 0 + * definition: quotient of energy and mass: `e = E/m` where `E` is energy (item 5-20.1) and `m` is mass (ISO 80000-4) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificEnergyUnit[1]; + } + + attribute specificEnergy: SpecificEnergyValue[*] nonunique :> scalarQuantities; + + attribute def SpecificEnergyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-5 item 5-21.2 specific internal energy, specific thermodynamic energy */ + attribute specificInternalEnergy: SpecificEnergyValue :> scalarQuantities { + doc + /* + * source: item 5-21.2 specific internal energy, specific thermodynamic energy + * symbol(s): `u` + * application domain: generic + * name: SpecificInternalEnergy (specializes SpecificEnergy) + * quantity dimension: L^2*T^-2 + * measurement unit(s): J/kg, m^2*s^-2 + * tensor order: 0 + * definition: quotient of internal energy and mass: `u = U/m` where `U` is internal energy (item 5-20.2) and `m` is mass (ISO 80000-4) + * remarks: None. + */ + } + + alias specificThermodynamicEnergy for specificInternalEnergy; + + /* ISO-80000-5 item 5-21.3 specific enthalpy */ + attribute def SpecificEnthalpyValue :> ScalarQuantityValue { + doc + /* + * source: item 5-21.3 specific enthalpy + * symbol(s): `h` + * application domain: generic + * name: SpecificEnthalpy + * quantity dimension: L^2*T^-2 + * measurement unit(s): J/kg, m^2*s^-2 + * tensor order: 0 + * definition: quotient of enthalpy and mass: `h = H/m` where `H` is enthalpy (item 5-20.3) and `m` is mass (ISO 80000-4) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificEnthalpyUnit[1]; + } + + attribute specificEnthalpy: SpecificEnthalpyValue[*] nonunique :> scalarQuantities; + + attribute def SpecificEnthalpyUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); } + } + + /* ISO-80000-5 item 5-21.4 specific Helmholtz energy, specific Helmholtz function */ + attribute specificHelmholtzEnergy: SpecificEnergyValue :> scalarQuantities { + doc + /* + * source: item 5-21.4 specific Helmholtz energy, specific Helmholtz function + * symbol(s): `a`, `f` + * application domain: generic + * name: SpecificHelmholtzEnergy (specializes SpecificEnergy) + * quantity dimension: L^2*T^-2 + * measurement unit(s): J/kg, m^2*s^-2 + * tensor order: 0 + * definition: quotient of Helmholtz energy and mass: `a = A/m` where A is Helmholtz energy (item 5-20.4) and m is mass (ISO 80000-4) + * remarks: The name specific Helmholtz free energy is also used. However, this term is not recommended. + */ + } + + alias specificHelmholtzFunction for specificHelmholtzEnergy; + + /* ISO-80000-5 item 5-21.5 specific Gibbs energy, specific Gibbs function */ + attribute specificGibbsEnergy: SpecificEnergyValue :> scalarQuantities { + doc + /* + * source: item 5-21.5 specific Gibbs energy, specific Gibbs function + * symbol(s): `g` + * application domain: generic + * name: SpecificGibbsEnergy (specializes SpecificEnergy) + * quantity dimension: L^2*T^-2 + * measurement unit(s): J/kg, m^2*s^-2 + * tensor order: 0 + * definition: quotient of Gibbs energy and mass: `g = G/m` where `G` is Gibbs energy (item 5-20.5) and `m` is mass (ISO 80000-4) + * remarks: The name specific Gibbs free energy is also used. However, this term is not recommended. + */ + } + + alias specificGibbsFunction for specificGibbsEnergy; + + /* ISO-80000-5 item 5-22 Massieu function */ + attribute def MassieuFunctionValue :> ScalarQuantityValue { + doc + /* + * source: item 5-22 Massieu function + * symbol(s): `J` + * application domain: generic + * name: MassieuFunction + * quantity dimension: L^2*M^1*T^-2*Θ^-1 + * measurement unit(s): J/K, kg*m^2*s^-2*K^-1 + * tensor order: 0 + * definition: quotient of the negative of Helmholtz energy and temperature: `J = -A/T` where `A` is Helmholtz energy (item 5-20.4) and `T` is thermodynamic temperature (item 5-1) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: MassieuFunctionUnit[1]; + } + + attribute massieuFunction: MassieuFunctionValue[*] nonunique :> scalarQuantities; + + attribute def MassieuFunctionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-23 Planck function */ + attribute def PlanckFunctionValue :> ScalarQuantityValue { + doc + /* + * source: item 5-23 Planck function + * symbol(s): `Y` + * application domain: generic + * name: PlanckFunction + * quantity dimension: L^2*M^1*T^-2*Θ^-1 + * measurement unit(s): J/K, kg*m^2*s^-2*K^-1 + * tensor order: 0 + * definition: quotient of the negative of Gibbs energy and temperature: `Y = -G/T` where G is Gibbs energy (item 5-20.5) and `T` is thermodynamic temperature (item 5-1) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: PlanckFunctionUnit[1]; + } + + attribute planckFunction: PlanckFunctionValue[*] nonunique :> scalarQuantities; + + attribute def PlanckFunctionUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-24 Joule-Thomson coefficient */ + attribute def JouleThomsonCoefficientValue :> ScalarQuantityValue { + doc + /* + * source: item 5-24 Joule-Thomson coefficient + * symbol(s): `μ_"JT"` + * application domain: generic + * name: JouleThomsonCoefficient + * quantity dimension: L^1*M^-1*T^2*Θ^1 + * measurement unit(s): K/Pa, kg^-1*m*s^2*K + * tensor order: 0 + * definition: change of thermodynamic temperature with respect to pressure in a Joule-Thomson process at constant enthalpy: `μ_(JT) = ((partial T)/(partial p))_H` where `T` is thermodynamic temperature (item 5-1), `p` is pressure (ISO 80000-4) and H is enthalpy (item 5-20.3) + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: JouleThomsonCoefficientUnit[1]; + } + + attribute jouleThomsonCoefficient: JouleThomsonCoefficientValue[*] nonunique :> scalarQuantities; + + attribute def JouleThomsonCoefficientUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-25.1 thermal efficiency */ + attribute def ThermalEfficiencyValue :> DimensionOneValue { + doc + /* + * source: item 5-25.1 thermal efficiency + * symbol(s): `η` + * application domain: thermodynamics + * name: ThermalEfficiency (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of work (ISO 80000-4) delivered by a heat engine and supplied heat: `η = W/Q` where `W` is work (ISO 80000-4) and `Q` is heat (item 5-6.1) + * remarks: None. + */ + } + attribute thermalEfficiency: ThermalEfficiencyValue :> scalarQuantities; + + /* ISO-80000-5 item 5-25.2 maximum thermal efficiency */ + attribute def MaximumThermalEfficiencyValue :> DimensionOneValue { + doc + /* + * source: item 5-25.2 maximum thermal efficiency + * symbol(s): `η_"max"` + * application domain: generic + * name: MaximumThermalEfficiency (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: efficiency determined by the quotient of the temperatures of the hot source and the cold sink: `η_max = 1 - T_c/T_h` where `T_c` is the thermodynamic temperature (item 5-1) of the cold sink and `T_h` is the thermodynamic temperature (item 5-1) of the hot source + * remarks: An ideal heat engine operating according to the Carnot process is delivering the maximum efficiency. + */ + } + attribute maximumThermalEfficiency: MaximumThermalEfficiencyValue :> scalarQuantities; + + /* ISO-80000-5 item 5-26 specific gas constant */ + attribute def SpecificGasConstantValue :> ScalarQuantityValue { + doc + /* + * source: item 5-26 specific gas constant + * symbol(s): `R_s` + * application domain: generic + * name: SpecificGasConstant + * quantity dimension: L^2*T^-2*Θ^-1 + * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1 + * tensor order: 0 + * definition: quotient of the Boltzmann constant `k` (ISO 80000-1) and the mass `m` (ISO 80000-4) of the gas particle + * remarks: None. + */ + attribute :>> num: Real; + attribute :>> mRef: SpecificGasConstantUnit[1]; + } + + attribute specificGasConstant: SpecificGasConstantValue[*] nonunique :> scalarQuantities; + + attribute def SpecificGasConstantUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); } + } + + /* ISO-80000-5 item 5-27 mass concentration of water */ + attribute def MassConcentrationOfWaterValue :> ScalarQuantityValue { + doc + /* + * source: item 5-27 mass concentration of water + * symbol(s): `w` + * application domain: generic + * name: MassConcentrationOfWater + * quantity dimension: L^-3*M^1 + * measurement unit(s): kg*m^-3 + * tensor order: 0 + * definition: quotient of mass of water and a specified volume: `w = m/V` where `m` is mass (ISO 80000-4) of water, irrespective of the form of aggregation state, and `V` is volume (ISO 80000-3) + * remarks: Mass concentration of water at saturation is denoted `w_"sat"`. + */ + attribute :>> num: Real; + attribute :>> mRef: MassConcentrationOfWaterUnit[1]; + } + + attribute massConcentrationOfWater: MassConcentrationOfWaterValue[*] nonunique :> scalarQuantities; + + attribute def MassConcentrationOfWaterUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-5 item 5-28 mass concentration of water vapour absolute humidity */ + attribute def MassConcentrationOfWaterVapourAbsoluteHumidityValue :> ScalarQuantityValue { + doc + /* + * source: item 5-28 mass concentration of water vapour absolute humidity + * symbol(s): `v` + * application domain: generic + * name: MassConcentrationOfWaterVapourAbsoluteHumidity + * quantity dimension: L^-3*M^1 + * measurement unit(s): kg*m^-3 + * tensor order: 0 + * definition: quotient of mass of water vapour and a specified volume: `v = m/V` where m is mass (ISO 80000-4) of water vapour and `V` is volume (ISO 80000-3) + * remarks: Mass concentration of water vapour at saturation is denoted `v_"sat"`. + */ + attribute :>> num: Real; + attribute :>> mRef: MassConcentrationOfWaterVapourAbsoluteHumidityUnit[1]; + } + + attribute massConcentrationOfWaterVapourAbsoluteHumidity: MassConcentrationOfWaterVapourAbsoluteHumidityValue[*] nonunique :> scalarQuantities; + + attribute def MassConcentrationOfWaterVapourAbsoluteHumidityUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); } + } + + /* ISO-80000-5 item 5-29 mass ratio of water to dry matter */ + attribute def MassRatioOfWaterToDryMatterValue :> DimensionOneValue { + doc + /* + * source: item 5-29 mass ratio of water to dry matter + * symbol(s): `u` + * application domain: generic + * name: MassRatioOfWaterToDryMatter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass of water and mass of dry matter: `u = m/m_d` where `m` is mass (ISO 80000-4) of water and `m_d` is mass of dry matter + * remarks: Mass ratio of water to dry matter at saturation is denoted `u_"sat"`. + */ + } + attribute massRatioOfWaterToDryMatter: MassRatioOfWaterToDryMatterValue :> scalarQuantities; + + /* ISO-80000-5 item 5-30 mass ratio of water vapour to dry gas */ + attribute def MassRatioOfWaterVapourToDryGasValue :> DimensionOneValue { + doc + /* + * source: item 5-30 mass ratio of water vapour to dry gas + * symbol(s): `r`, `(x)` + * application domain: generic + * name: MassRatioOfWaterVapourToDryGas (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass of water vapour and mass of dry gas: `r = m/m_d` where `m` is mass (ISO 80000-4) of water vapour and `m_d` is mass of dry gas + * remarks: Mass ratio of water vapour to dry gas at saturation is denoted `r_"sat"`. Mass ratio of water vapour to dry gas is also called mixing ratio. + */ + } + attribute massRatioOfWaterVapourToDryGas: MassRatioOfWaterVapourToDryGasValue :> scalarQuantities; + + /* ISO-80000-5 item 5-31 mass fraction of water */ + attribute def MassFractionOfWaterValue :> DimensionOneValue { + doc + /* + * source: item 5-31 mass fraction of water + * symbol(s): `w_(H_(2)O)` + * application domain: generic + * name: MassFractionOfWater (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by: `w_(H_(2)O) = u/(1+u)` where `u` is mass ratio of water to dry matter (item 5-29) + * remarks: None. + */ + } + attribute massFractionOfWater: MassFractionOfWaterValue :> scalarQuantities; + + /* ISO-80000-5 item 5-32 mass fraction of dry matter */ + attribute def MassFractionOfDryMatterValue :> DimensionOneValue { + doc + /* + * source: item 5-32 mass fraction of dry matter + * symbol(s): `w_d` + * application domain: generic + * name: MassFractionOfDryMatter (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quantity given by: `w_d = 1 - w_(H_(2)O)` where `w_(H_(2)O)` is mass fraction of water (item 5-31) + * remarks: None. + */ + } + attribute massFractionOfDryMatter: MassFractionOfDryMatterValue :> scalarQuantities; + + /* ISO-80000-5 item 5-33 relative humidity */ + attribute def RelativeHumidityValue :> DimensionOneValue { + doc + /* + * source: item 5-33 relative humidity + * symbol(s): `φ` + * application domain: generic + * name: RelativeHumidity (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of partial pressure of water vapour and partial pressure at its saturation: `φ = p/p_"sat"` where `p` is partial pressure (ISO 80000-4) of vapour and `p_"sat"` is its partial pressure at saturation at the same temperature + * remarks: Relative humidity is often referred to as RH and expressed in percent. See also remark in item 5-35. + */ + } + attribute relativeHumidity: RelativeHumidityValue :> scalarQuantities; + + /* ISO-80000-5 item 5-34 relative mass concentration of vapour */ + attribute def RelativeMassConcentrationOfVapourValue :> DimensionOneValue { + doc + /* + * source: item 5-34 relative mass concentration of vapour + * symbol(s): `φ` + * application domain: generic + * name: RelativeMassConcentrationOfVapour (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass concentration of water vapour and mass concentration at its saturation: `φ = v/v_"sat"` where `v` is mass concentration of water vapour (item 5-28) and `v_"sat"` is its mass concentration of water vapour at saturation of the same temperature + * remarks: For water vapour concentrations up to 1 kg/m^3, the relative humidity (item 5-33) is assumed to be equal to relative mass concentration of vapour. For details see Reference [8]. + */ + } + attribute relativeMassConcentrationOfVapour: RelativeMassConcentrationOfVapourValue :> scalarQuantities; + + /* ISO-80000-5 item 5-35 relative mass ratio of vapour */ + attribute def RelativeMassRatioOfVapourValue :> DimensionOneValue { + doc + /* + * source: item 5-35 relative mass ratio of vapour + * symbol(s): `ψ` + * application domain: generic + * name: RelativeMassRatioOfVapour (specializes DimensionOneQuantity) + * quantity dimension: 1 + * measurement unit(s): 1 + * tensor order: 0 + * definition: quotient of mass ratio of water vapour to dry gas and mass ratio of water vapour to dry gas at saturation: `ψ = r/r_"sat"` where `r` is mass ratio of water vapour to dry gas (item 5-30) and `r_"sat"` is its mass ratio of water vapour to dry gas at saturation of the same temperature + * remarks: This quantity is also used as an approximation of relative humidity (item 5-33). + */ + } + attribute relativeMassRatioOfVapour: RelativeMassRatioOfVapourValue :> scalarQuantities; + + /* ISO-80000-5 item 5-36 dew-point temperature */ + attribute dewPointTemperature: ThermodynamicTemperatureValue :> scalarQuantities { + doc + /* + * source: item 5-36 dew-point temperature + * symbol(s): `T_d` + * application domain: generic + * name: DewPointTemperature (specializes ThermodynamicTemperature) + * quantity dimension: Θ^1 + * measurement unit(s): K + * tensor order: 0 + * definition: temperature at which water vapour in the air reaches saturation under isobaric conditions + * remarks: The corresponding Celsius temperature, denoted `t_d`, is still called dew-point temperature. The unit for the corresponding Celsius temperature is degree Celsius, symbol °C. + */ + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml new file mode 100644 index 00000000..49b5d3a2 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml @@ -0,0 +1,30 @@ +standard library package MeasurementRefCalculations { + doc + /* + * This package package defines calculations on MeasurementUnits and CoordinateFrames. + */ + + private import ScalarValues::String; + private import ScalarValues::Real; + private import MeasurementReferences::MeasurementUnit; + private import MeasurementReferences::ScalarMeasurementReference; + private import MeasurementReferences::CoordinateFrame; + + /* MeasurementUnit operations */ + calc def '*' specializes DataFunctions::'*' { in x: MeasurementUnit[1]; in y: MeasurementUnit[1]; return : MeasurementUnit[1]; } + calc def '/' specializes DataFunctions::'/' { in x: MeasurementUnit[1]; in y: MeasurementUnit[1]; return : MeasurementUnit[1]; } + calc def '**' specializes DataFunctions::'**' { in x: MeasurementUnit[1]; in y: Real[1]; return : MeasurementUnit[1]; } + calc def '^' specializes DataFunctions::'^' { in x: MeasurementUnit[1]; in y: Real[1]; return : MeasurementUnit[1]; } + + /* CoordinateFrame and MeasurementUnit operations */ + calc def 'CoordinateFrame*' specializes DataFunctions::'*' { in x: CoordinateFrame[1]; in y: MeasurementUnit[1]; return : CoordinateFrame[1]; } + calc def 'CoordinateFrame/' specializes DataFunctions::'/' { in x: CoordinateFrame[1]; in y: MeasurementUnit[1]; return : CoordinateFrame[1]; } + + calc def ToString specializes BaseFunctions::ToString { + doc + /* + * Returns the Unicode string symbol representing a scalar measurement reference. + */ + in x: ScalarMeasurementReference[1]; return : String[1]; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementReferences.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementReferences.sysml new file mode 100644 index 00000000..b7b7ac20 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementReferences.sysml @@ -0,0 +1,526 @@ +standard library package MeasurementReferences { + doc + /* + * This package defines the representations for measurement references. + */ + + private import Collections::Array; + private import Collections::List; + private import ScalarValues::*; + private import VectorValues::ThreeVectorValue; + + private import SequenceFunctions::size; + private import SequenceFunctions::equals; + private import ControlFunctions::forAll; + private import Quantities::QuantityDimension; + private import Quantities::VectorQuantityValue; + private import Quantities::scalarQuantities; + private import Quantities::ScalarQuantityValue; + private import Quantities::SystemOfQuantities; + private import ISQSpaceTime::angularMeasure; + + attribute def TensorMeasurementReference :> Array { + doc + /* + * TensorMeasurementReference is the most general AttributeDefinition to represent measurement references. + * + * The concept "measurement reference" is defined in [VIM] "quantity" NOTE 2 as "A reference can be a measurement unit, + * a measurement procedure, a reference material, or a combination of such.", see https://jcgm.bipm.org/vim/en/1.1.html . + * In addition [VIM] "quantity" NOTE 5 states that "A quantity as defined here is a scalar. However, a vector or a tensor, + * the components of which are quantities, is also considered to be a quantity". However, the rest of [VIM] does not explicitly + * define how tensor and vector quantities can be or should be supported. + * + * In this package, in line with TensorQuantityValue in package Quantities, the most general kind of measurement reference + * is TensorMeasurementReference that represents a measurement reference for any order of tensor quantity. Since the order can + * also be one or zero, this includes vector and scalar quantities. The specializations VectorMeasurementReference and + * ScalarMeasurementReference are defined to specifically represent measurement references for vector and scalar quantities. + * + * TensorMeasurementReference specializes Array, which provides its multi-dimensional structure. The order of a tensor is equivalent + * to the rank of an Array. + * + * Attribute isBound specifies whether the vector space product is bound (isBound is true) or free (isBound is false). + * + * Attribute mRefs specifies the scalar measurement references for all dimensions of a tensor quantity. + * + * The short name of a TensorMeasurementReference is the unique symbol by which the measurement reference is known. + * The name of a TensorMeasurementReference is spelled-out human readable name of the measurement reference. + * + * For example, typical measurement references for (scalar) quantity speed are declared with the following humanId and name: + * <'m/s'> and 'metre per second', + * <'km/h'> and 'kilometre per hour', + * <'mi/h'> and 'mile per hour'. + * + * A measurement reference can have zero or more definitionalQuantityValues that allow to specify + * quantity values that carry a particular meaning or relevance for the measurement reference. + */ + + attribute isBound: Boolean[1] default false; + attribute order :>> rank; + attribute mRefs: ScalarMeasurementReference[1..*] nonunique :>> elements; + attribute definitionalQuantityValues: DefinitionalQuantityValue[0..*]; + } + + attribute def VectorMeasurementReference :> TensorMeasurementReference { + doc + /* + * A VectorMeasurementReference is a specialization of TensorMeasurementReference for vector quantities that are + * typed by a VectorQuantityValue. Its order is one. Implicitly, it defines a vector space of dimension `n` = dimensions[1]. + * The magnitudes of the `n` basis unit vectors that span the vector space are defined by the mRefs which each are + * a ScalarMeasurementReference, typically a MeasurementUnit or an IntervalScale. + * + * Attribute isOrthogonal declares whether the basis vectors of the vector space are orthogonal, i.e., whether all + * inner products of any pair of basis vectors are equal to zero. + * + * A pair of a specialization of VectorQuantityValue and a specialization of VectorMeasurementReference can also be used to + * define a vector space for state vectors as used in state-space representation models. + */ + + attribute :>> dimensions: Positive[0..1]; + attribute isOrthogonal: Boolean[1] default true; + } + + abstract attribute def ScalarMeasurementReference :> VectorMeasurementReference { + doc + /* + * A ScalarMeasurementReference is a specialization of VectorMeasurementReference for scalar quantities + * that are typed by a ScalarQuantityValue and for components of tensor or vector quantities. + * Its order is zero. A ScalarMeasurementReference is also a generalization of MeasurementUnit and MeasurementScale. + * It establishes how to interpret the numerical value (num) of a ScalarQuantityValue or a component of + * a tensor or vector quantity value, and establishes its actual quantity dimension. + * + * Attribute mRefs is bound to self for a ScalarMeasurementReference, for consistency with tensor and vector measurement references, + * as the dimension or component of a scalar quantity is itself. + */ + + attribute :>> dimensions = (); + attribute :>> isOrthogonal = true; + attribute :>> mRefs = self; + attribute quantityDimension: QuantityDimension[1]; + } + + attribute def CoordinateFrame :> VectorMeasurementReference { + doc + /* + * CoordinateFrame is a VectorMeasurementReference with the specific purpose to quantify (i.e., coordinatize) a vector space, + * and locate and orient it with respect to another CoordinateFrame. + * + * Optional attribute transformation enables specification of the location and orientation of this CoordinateFrame as dependent + * and nested with respect to another (reference) coordinate frame. Typically the other CoordinateFrame is the frame of + * the next higher element (Object, Item or Part) in a composite structure. + */ + + attribute transformation: CoordinateTransformation[0..1] { + attribute :>> target = that; + } + } + + attribute def '3dCoordinateFrame' :> CoordinateFrame { + doc + /* + * Most general 3-dimensional coordinate frame + */ + attribute :>> dimensions = 3; + } + alias ThreeDCoordinateFrame for '3dCoordinateFrame'; + + abstract attribute def CoordinateTransformation { + doc + /* + * CoordinateTransformation is the most general representation of the transformation of a target VectorMeasurementReference + * with respect to a source VectorMeasurementReference. + */ + attribute source: VectorMeasurementReference[1]; + attribute target: VectorMeasurementReference[1]; + assert constraint validSourceTargetDimensions { source.dimensions == target.dimensions } + } + + attribute def CoordinateFramePlacement :> CoordinateTransformation { + doc + /* + * CoordinateFramePlacement is a CoordinateTransformation by placement of the target frame in the source frame. + * + * Attribute origin specifies the location of the origin of the target frame as a vector in the source frame. + * + * Attribute basisDirections specifies the orientation of the target frame by specifying the directions of + * the respective basis vectors of the target frame via direction vectors in the source frame. An empty sequence of + * basisDirections signifies no change of orientation of the target coordinate frame. + */ + + attribute origin : VectorQuantityValue[1]; + attribute basisDirections : VectorQuantityValue[0..*] ordered nonunique; + assert constraint validOriginDimensions { origin.dimensions == source.dimensions } + assert constraint { size(basisDirections) == 0 or size(basisDirections) == source.dimensions#(1)} + assert constraint validateBasisDirections { basisDirections->forAll { in basisDirection : VectorQuantityValue; + basisDirection.dimensions->equals(source.dimensions) } + } + } + + abstract attribute def TranslationOrRotation { + doc + /* + * TranslationOrRotation is an abstract union of Translation and Rotation + */ + } + + attribute def Translation :> TranslationOrRotation { + doc + /* + * Representation of a translation with respect to a coordinate frame + * + * Attribute translationVector specifies the displacement vector that constitutes the translation. + */ + + attribute translationVector : VectorQuantityValue[1]; + } + + attribute def Rotation :> TranslationOrRotation { + doc + /* + * Representation of a rotation about an axis over an angle + * + * Attribute axisDirection specifies the direction of the rotation axis. + * Attribute angle specifies the angle of rotation, where a positive value implies right-handed rotation. + * Attribute isIntrinsic asserts whether the intermediate coordinate frame moves with the rotation or not, + * i.e. whether an instrinsic or extrinsic rotation is specified. + * + * See https://en.wikipedia.org/wiki/Davenport_chained_rotations for details. + */ + + attribute axisDirection : VectorQuantityValue[1]; + attribute angle :>> angularMeasure; + attribute isIntrinsic : Boolean[1] default true; + } + + attribute def TranslationRotationSequence :> CoordinateTransformation, List { + doc + /* + * Coordinate frame transformation specified by a sequence of translations and/or rotations + * + * Note: This is a coordinate transformation that is convenient for interpretation by humans. + * In particular a sequence of rotations about the principal axes of a coordinate frame is much more easy understandable + * than a rotation about an arbitrary axis. + * Any sequence can be reduced to a single combination of a translation and a rotation about a particular axis, but in general + * the original sequence cannot be retrieved as there are infinitely many sequences representing the reduced transformation. + */ + + attribute :>> elements : TranslationOrRotation[1..*] ordered nonunique; + } + + attribute def AffineTransformationMatrix3d :> CoordinateTransformation, Array { + doc + /* + * AffineTransformationMatrix3d is a three dimensional CoordinateTransformation specified via an affine transformation matrix + * + * The interpretation of the matrix is as follows: + * - the upper left 3x3 matrix represents the rotation matrix + * - the uper right 3x1 column vector represents the translation vector + * - the bottom row must be the row vector (0, 0, 0, 1). + * + * I.e. the matrix has the following form: + * ( R, R, R, T, + * R, R, R, T, + * R, R, R, T, + * 0, 0, 0, 1 ) + * where the cells marked R form the rotation matrix and the cells marked T form the translation vector. + * + * Note: See https://en.wikipedia.org/wiki/Transformation_matrix, under affine transformations for a general explanation. + */ + + attribute rotationMatrix : Array { + attribute :>> elements : Real[9] ordered nonunique; + attribute :>> dimensions = (3, 3); + } + attribute translationVector : ThreeVectorValue[1] { :>> elements : Real[3]; } + attribute :>> dimensions = (4, 4); + attribute :>> elements : Real[16] ordered nonunique = ( + rotationMatrix.elements#(1), rotationMatrix.elements#(2), rotationMatrix.elements#(3), translationVector#(1), + rotationMatrix.elements#(4), rotationMatrix.elements#(5), rotationMatrix.elements#(6), translationVector#(2), + rotationMatrix.elements#(7), rotationMatrix.elements#(8), rotationMatrix.elements#(9), translationVector#(3), + 0, 0, 0, 1); + assert constraint validSourceDimensions { source.dimensions == 3 } + } + + attribute def NullTransformation :> AffineTransformationMatrix3d { + doc + /* + * NullTransformation is a three dimensional CoordinateTransformation that places the target CoordinateFrame at the + * same position and orientation as the source CoordinateFrame. + */ + attribute :>> rotationMatrix { + attribute :>> elements = (1, 0, 0, 0, 1, 0, 0, 0, 1); + } + attribute :>> translationVector { + attribute :>> elements = (0, 0, 0); + } + } + + attribute nullTransformation : NullTransformation [1]; + + abstract attribute def MeasurementUnit :> ScalarMeasurementReference { + doc + /* + * Representation of a measurement unit. + * + * Note: MeasurementUnit directly specializes ScalarMeasurementReference in order to allow for efficient and intuitive definition of a ratio scale. + * + * A MeasurementUnit can be used in two ways: + * 1. Directly as the mRef in a ScalarQuantityValue, which implies that the effective measurement reference is a ratio scale defined by the unit. + * 2. As the unit of a MeasurementScale. + * + * A MeasurementUnit specifies one or more UnitPowerFactors. + */ + + attribute :>> isBound = false; + attribute unitPowerFactors: UnitPowerFactor[0..*] ordered; + attribute unitConversion: UnitConversion[0..1]; + assert constraint hasValidUnitPowerFactors : VerifyUnitPowerFactors { + in unitPowerFactors = MeasurementUnit::unitPowerFactors; + in quantityDimension = MeasurementUnit::quantityDimension; + } + } + + + abstract attribute def SimpleUnit :> MeasurementUnit { + doc + /* + * Representation of a measurement unit that does not depend on any other measurement unit. + */ + + private attribute simpleUnitSelf: SimpleUnit = self; + attribute :>> unitPowerFactors: UnitPowerFactor[1] { + attribute unit :>> UnitPowerFactor::unit = simpleUnitSelf; + attribute exponent :>> UnitPowerFactor::exponent = 1; + } + } + + + abstract attribute def DerivedUnit :> MeasurementUnit { + doc + /* + * Representation of a derived measurement unit that depends on one or more powers of other measurement units. + * + * VIM defines "derived unit" as "measurement unit for a derived quantity", see https://jcgm.bipm.org/vim/en/1.11.html . + */ + } + + + attribute def UnitPowerFactor { + doc + /* + * Representation of a measurement unit power factor, which is a tuple + * of a referenced measurement unit and an exponent. + */ + + attribute unit: MeasurementUnit; + attribute exponent: Real; + } + + abstract attribute def UnitConversion { + doc + /* + * Representation of the linear conversion relationship between one measurement unit and another measurement unit, that acts as a reference. + * + * Attribute isExact asserts whether the conversionFactor is exact or not. By default it is set true. + */ + + attribute referenceUnit: MeasurementUnit; + attribute conversionFactor: Real; + attribute isExact: Boolean default true; + } + + attribute def ConversionByConvention :> UnitConversion { + doc + /* + * Representation of a UnitConversion that is defined according to some convention. + */ + } + + attribute def ConversionByPrefix :> UnitConversion { + doc + /* + * Representation of a UnitConversion that is defined through reference to a named unit prefix, + * that in turn represents a decimal or binary multiple or sub-multiple, as defined in ISO/IEC 80000-1. + * + * Note: The actual value of the conversion factor is derived from the definition of the unit prefix. + * + * Examples: kilometre for conversion factor 1000 with reference unit metre, nanofarad for 1E-9 farad. + */ + + attribute prefix: UnitPrefix[1]; + attribute conversionFactor redefines UnitConversion::conversionFactor = prefix.conversionFactor; + } + + attribute def UnitPrefix { + doc + /* + * Representation of a multiple or sub-multiple measurement unit prefix as defined in ISO/IEC 80000-1. + */ + + attribute longName: String; + attribute symbol: String; + attribute conversionFactor: Real; + } + + + abstract attribute def MeasurementScale :> ScalarMeasurementReference { + doc + /* + * Representation of a non-ratio measurement scale as opposed to a ratio measurement scale defined by a MeasurementUnit. + * + * Note: A ratio scale is implied by direct use of a MeasurementUnit as the mRef in a ScalarQuantityValue. + */ + + attribute unit: MeasurementUnit; + attribute quantityValueMapping: QuantityValueMapping[0..1]; + } + + attribute def OrdinalScale :> MeasurementScale { + doc + /* + * Representation of an ordinal measurement scale. + */ + } + + attribute def IntervalScale :> MeasurementScale, CoordinateFrame { + doc + /* + * Representation of an interval measurement scale. + * + * An IntervalScale is also a CoordinateFrame + * The offset of one interval measurement scale w.r.t. another interval or ratio scale is defined through a quantityValueMapping, see MeasurementReference. + */ + + attribute :>> isBound = true; + } + + attribute def CyclicRatioScale :> MeasurementScale { + doc + /* + * Representation of a ratio measurement scale with a periodic cycle. + * + * Note: The magnitude of the periodic cycle is defined by the modulus of the scale. + * Example: Planar angle with modulus 360 degrees, therefore on such a cyclic ratio scale, + * an angle of 450 degrees is equivalent to an angle of 90 degrees, and -60 degrees is equivalent to 300 degrees. + */ + + attribute modulus: Number; + } + + attribute def LogarithmicScale :> MeasurementScale { + doc + /* + * Representation of a logarithmic measurement scale + * + * The magnitude v of a ratio quantity value expressed on a logarithmic scale + * for a magnitude x of a quantity value expressed on a ratio scale is computed as follows: + * v = f * log_base( (x / x_ref )^a ) + * where: + * f is a multiplication factor, + * log_base is the log function for the given logarithm base, + * x is the actual quantity, + * x_ref is a reference quantity, + * a is an exponent. + */ + + attribute logarithmBase: Number; + attribute factor: Number; + attribute exponent: Number; + attribute referenceQuantity: ScalarQuantityValue[0..1]; + } + + attribute def QuantityValueMapping { + doc + /* + * Representation of the mapping of equivalent quantity values expressed on two different MeasurementReferences + * + * A QuantityValueMapping specifies a mapping from a given mappedQuantityValue owned by the MeasurementReference + * that owns the QuantityValueMapping to a referenceQuantityValue owned by another MeasurementReference. + * + * Example: The mapping between the temperature value of 0.01 degree Celsius on the celsius temperature scale + * to the equivalent temperature value of 273.16 K on the kelvin temperature scale, + * would specify a mappedQuantityValue referencing the + * the DefinitionalQuantityValue (0.01, "absolute thermodynamic temperature of the triple point of water") + * of the celsius interval scale, and a referenceQuantityValue referencing the + * DefinitionalQuantityValue (273.16, "absolute thermodynamic temperature of the triple point of water") + * of the kelvin ratio scale. + */ + + attribute mappedQuantityValue: DefinitionalQuantityValue; + attribute referenceQuantityValue: DefinitionalQuantityValue; + } + + attribute def DefinitionalQuantityValue { + doc + /* + * Representation of a particular quantity value that is used in the definition of a TensorMeasurementReference + * + * Typically such a particular value is defined by convention. It can be used to define a selected reference value, + * such as the meaning of zero on a measurement scale or the origin of a top-level coordinate frame. + * + * Example: The 'kelvin' MeasurementReference for thermodynamic temperature could have a + * DefinitionalQuantityValue { + * :>> num = 273.16; + * :>> definition = "thermodynamic temperature of the triple point of Vienna Standard Mean Ocean Water in kelvin"; + * } + * that is value of the definition of the scale. + */ + + attribute num: Number[1..*]; + attribute definition: String; + } + + attribute def DimensionOneUnit :> DerivedUnit { + doc + /* + * Explicit definition of "unit of dimension one", also known as "dimensionless unit". + */ + + attribute :>> unitPowerFactors = (); + } + attribute def DimensionOneValue :> ScalarQuantityValue { + doc + /* + * A ScalarQuantityValue with a DimensionOneUnit. + */ + attribute :>> num: Real; + attribute :>> mRef: DimensionOneUnit; + } + attribute dimensionOneQuantities : DimensionOneValue[*] nonunique :> scalarQuantities; + + attribute one : DimensionOneUnit[1] = new DimensionOneUnit(); + + attribute def CountValue :> DimensionOneValue { + doc + /* + * Explicit definition of a generic "count" quantity as a DimensionOneValue. + */ + } + attribute countQuantities : CountValue[*] nonunique :> dimensionOneQuantities; + + attribute def SystemOfUnits { + doc + /* + * A SystemOfUnits represents the essentials of [VIM] concept "system of units" (https://jcgm.bipm.org/vim/en/1.13.html), defined as a + * "set of base units and derived units, together with their multiples and submultiples, defined in accordance with given rules, + * for a given system of quantities". + * The base units are a particular selection of measurement units for each of the base quantities of a system of quantities, + * that form the basis on top of which all other (derived) units are defined. + * + * Attribute systemOfQuantities speficies the associated SystemOfQuantities. + */ + + attribute longName: String[1]; + attribute systemOfQuantities : SystemOfQuantities[1]; + attribute baseUnits: SimpleUnit[1..*] ordered; + } + + constraint def VerifyUnitPowerFactors { + doc + /* + * Constraint definition to verify that the given unit power factors comply with the required quantity dimension + */ + + in unitPowerFactors: UnitPowerFactor[*] ordered; + in quantityDimension: QuantityDimension[1]; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Quantities.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Quantities.sysml new file mode 100644 index 00000000..263e9ff9 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Quantities.sysml @@ -0,0 +1,107 @@ +standard library package Quantities { + doc + /* + * This package defines the root representations for quantities and their values. + */ + + private import Collections::*; + private import ScalarValues::NumericalValue; + private import ScalarValues::Number; + private import ScalarValues::Real; + private import ScalarValues::Natural; + private import ScalarValues::Boolean; + private import ScalarValues::String; + private import VectorValues::NumericalVectorValue; + private import VectorValues::ThreeVectorValue; + + abstract attribute def TensorQuantityValue :> Array { + doc + /* + * The value of a quantity is a tuple of one or more numbers (i.e. mathematical number values) and a reference to a measurement reference. + * The most general case is a multi-dimensional, tensor quantity of any order. In engineering, the majority of quantities used are + * scalar and vector quantities, that are tensor quantities of order 0 and 1 respectively. + * The measurement reference used to express a quantity value must have a type, dimensions and order that match the quantity, i.e., + * a TensorQuantityValue must use a TensorMeasurementReference, a VectorQuantityValue a VectorMeasurementReference, + * and a ScalarQuantityValue a ScalarMeasurementReference. See package MeasurementReferences for details. + */ + + attribute isBound: Boolean; + attribute num: Number[1..*] ordered nonunique :>> elements; + attribute mRef: MeasurementReferences::TensorMeasurementReference; + attribute :>> dimensions = mRef.dimensions; + attribute order :>> rank; + attribute contravariantOrder: Natural; + attribute covariantOrder: Natural; + + assert constraint orderSum { contravariantOrder + covariantOrder == order } + assert constraint boundMatch { (isBound == mRef.isBound) or (not isBound and mRef.isBound) } + } + + abstract attribute def VectorQuantityValue :> TensorQuantityValue, NumericalVectorValue { + attribute :>> mRef: MeasurementReferences::VectorMeasurementReference; + } + + abstract attribute def ScalarQuantityValue :> VectorQuantityValue, NumericalValue { + attribute :>> mRef: MeasurementReferences::ScalarMeasurementReference; + } + + abstract attribute tensorQuantities: TensorQuantityValue[*] nonunique { + doc + /* + * Quantities are defined as self-standing features that can be used to consistently specify quantities as + * features of occurrences. Each single quantity feature is subsetting the root feature tensorQuantities. + * In other words, the codomain of a quantity feature is a suitable specialization of TensorQuantityValue. + */ + } + abstract attribute vectorQuantities: VectorQuantityValue[*] nonunique :> tensorQuantities; + abstract attribute scalarQuantities: ScalarQuantityValue[*] nonunique :> vectorQuantities; + + abstract attribute def '3dVectorQuantityValue' :> VectorQuantityValue, ThreeVectorValue { + doc + /* + * Most general representation of real 3-vector quantities + */ + + attribute :>> num: Real[3]; + } + alias ThreeDVectorQuantityValue for '3dVectorQuantityValue'; + + /* + * Define generic aliases QuantityValue and quantities for the top level quantity attribute def and attribute. + */ + alias QuantityValue for TensorQuantityValue; + alias quantities for tensorQuantities; + + attribute def SystemOfQuantities { + doc + /* + * A SystemOfQuantities represents the essentials of [VIM] concept "system of quantities" (https://jcgm.bipm.org/vim/en/1.3.html), defined as a + * "set of quantities together with a set of noncontradictory equations relating those quantities". + * In order to establish such a set of noncontradictory equations a set of base quantities is selected. Subsequently the system of quantities is + * completed by adding derived quantities which are products of powers of the base quantities. + */ + + attribute baseQuantities: ScalarQuantityValue[*] ordered :> scalarQuantities; + } + + attribute def QuantityPowerFactor { + doc + /* + * Representation of a quantity power factor, being the combination of a quantity and an exponent. + * + * A sequence of QuantityPowerFactors for the baseQuantities of a SystemOfQuantities define the QuantityDimension of a scalar quantity. + */ + + attribute quantity: ScalarQuantityValue[1]; + attribute exponent: Real[1]; + } + + attribute def QuantityDimension { + doc + /* + * Representation of quantity dimension, which is the product of powers of the set of base quantities defined for a particular system of quantities, units and scales. + */ + + attribute quantityPowerFactors: QuantityPowerFactor[*] ordered; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/QuantityCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/QuantityCalculations.sysml new file mode 100644 index 00000000..34f0566e --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/QuantityCalculations.sysml @@ -0,0 +1,70 @@ +standard library package QuantityCalculations { + doc + /* + * This package package defines calculations for the construction of and computations on ScalarQuantityValues. + */ + + private import ScalarValues::*; + private import Quantities::ScalarQuantityValue; + private import MeasurementReferences::ScalarMeasurementReference; + private import MeasurementReferences::DimensionOneValue; + + calc def '[' specializes BaseFunctions::'[' { + in num: Number[1]; + in mRef: ScalarMeasurementReference[1]; + return quantity : ScalarQuantityValue[1]; + } + + calc def isZero specializes NumericalFunctions::isZero { + in x: ScalarQuantityValue[1]; + return : Boolean[1] = NumericalFunctions::isZero(x.num); + } + calc def isUnit specializes NumericalFunctions::isUnit { + in x: ScalarQuantityValue[1]; + return : Boolean[1] = NumericalFunctions::isUnit(x.num); + } + + calc def abs specializes NumericalFunctions::abs { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + + calc def '+' specializes NumericalFunctions::'+' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue; } + calc def '-' specializes NumericalFunctions::'-' { in x: ScalarQuantityValue; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue[1]; } + calc def '*' specializes NumericalFunctions::'*' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + calc def '/' specializes NumericalFunctions::'/' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + calc def '**' specializes NumericalFunctions::'**' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; } + calc def '^' specializes NumericalFunctions::'^' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; } + + calc def '<' specializes NumericalFunctions::'<' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; } + calc def '>' specializes NumericalFunctions::'>' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; } + calc def '<=' specializes NumericalFunctions::'<=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; } + calc def '>=' specializes NumericalFunctions::'>=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; } + + calc def max specializes NumericalFunctions::max { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + calc def min specializes NumericalFunctions::min { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + + calc def '==' specializes DataFunctions::'==' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; } + + calc def sqrt{ in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + + calc def floor { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + calc def round { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; } + + calc def ToString specializes BaseFunctions::ToString { in x: ScalarQuantityValue[1]; return : String; } + calc def ToInteger { in x: ScalarQuantityValue[1]; return : Integer[1]; } + calc def ToRational { in x: ScalarQuantityValue[1]; return : Rational[1]; } + calc def ToReal { in x: ScalarQuantityValue[1]; return : Real[1]; } + calc def ToDimensionOneValue { in x: Real[1]; return : DimensionOneValue[1]; } + + calc def sum specializes NumericalFunctions::sum { in collection: ScalarQuantityValue[0..*]; + private attribute zero : ScalarQuantityValue[1]; + assert constraint { isZero(zero) } + return : ScalarQuantityValue = NumericalFunctions::sum0(collection, zero); + } + + calc def product specializes NumericalFunctions::product { in collection: ScalarQuantityValue[0..*]; + private attribute one : ScalarQuantityValue[1]; + assert constraint { isUnit(one) } + return : ScalarQuantityValue = NumericalFunctions::product1(collection, one); + } + + calc def ConvertQuantity{ in x: ScalarQuantityValue[1]; in targetMRef: ScalarMeasurementReference[1]; return : ScalarQuantityValue[1]; } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SI.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SI.sysml new file mode 100644 index 00000000..a071f13f --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SI.sysml @@ -0,0 +1,378 @@ +standard library package SI { + doc + /* + * International System of (Measurement) Units -- Système International d'Unités (SI), as defined in ISO/IEC 80000 + * + * Note 1: In accordance with ISO/IEC 80000 en-GB spelling is used for the names and definitions of the units. + * Note 2: This is a representative but not yet complete list of measurement units. + */ + + private import MeasurementReferences::*; + public import ISQ::*; + public import SIPrefixes::*; + + /* + * SI simple unit needed in support of creation of the base units + */ + attribute gram : MassUnit; + + /* + * SI base units + */ + attribute metre : LengthUnit; + attribute kilogram : MassUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = g; } } + attribute second : DurationUnit; + attribute ampere : ElectricCurrentUnit; + attribute kelvin : ThermodynamicTemperatureUnit, TemperatureDifferenceUnit { + attribute temperatureOfWaterAtTriplePointInK: DefinitionalQuantityValue { + :>> num = 27316/100; + :>> definition = "temperature in kelvin of pure water at the triple point"; + } + attribute :>> definitionalQuantityValues = temperatureOfWaterAtTriplePointInK; + attribute :>> ThermodynamicTemperatureUnit::quantityDimension, TemperatureDifferenceUnit::quantityDimension { + :>> ThermodynamicTemperatureUnit::quantityDimension::quantityPowerFactors, TemperatureDifferenceUnit::quantityDimension::quantityPowerFactors; + } + } + attribute mole : AmountOfSubstanceUnit; + attribute candela : LuminousIntensityUnit; + + /* + * Declare the SI system of units with its explicit base units + * and its associated system of quantities, the ISQ. + */ + attribute 'ISO/IEC 80000 International System of Units' : SystemOfUnits { + :>> systemOfQuantities = isq; + :>> baseUnits = (m, kg, s, A, K, mol, cd); + } + + /* + * Units with special names + */ + attribute byte : StorageCapacityUnit = one; + attribute baud : ModulationRateUnit = s^-1; + attribute bit : StorageCapacityUnit = one; + attribute becquerel : NuclearActivityUnit = s^-1; + attribute coulomb : ElectricChargeUnit = A*s; + attribute decibel : SoundPressureLevelUnit = one; + attribute decade : LogarithmicFrequencyRangeUnit = one; + attribute erlang : TrafficIntensityUnit = one; + attribute farad : CapacitanceUnit = C/V; + attribute gray : AbsorbedDoseUnit = J/kg; + attribute henry : PermeanceUnit, InductanceUnit = Wb/A { + attribute :>> PermeanceUnit::quantityDimension, InductanceUnit::quantityDimension { + :>> PermeanceUnit::quantityDimension::quantityPowerFactors, InductanceUnit::quantityDimension::quantityPowerFactors; + } + } + attribute hartley : InformationContentUnit = one; + attribute hertz : FrequencyUnit = s^-1; + attribute joule : EnergyUnit = N*m; + //attribute katal : CatalyticActivityUnit = mol/s; + attribute lumen : LuminousFluxUnit = cd*sr; + attribute lux : IlluminanceUnit = lm/m^2; + attribute newton : ForceUnit = kg*m/s^2; + attribute 'natural unit of information' : InformationContentUnit = one; + attribute octet : StorageCapacityUnit = one; + attribute octave : LogarithmicFrequencyRangeUnit = one; + attribute pascal : PressureUnit = N/m^2; + attribute radian : AngularMeasureUnit = m/m; + attribute siemens : ConductanceUnit = 'Ω'^-1; + attribute shannon : InformationContentUnit = one; + attribute steradian : SolidAngularMeasureUnit = m^2/m^2; + attribute sievert : DoseEquivalentUnit = J/kg; + attribute tesla : MagneticFluxDensityUnit = Wb/m^2; + attribute volt : ElectricPotentialUnit = W/A; + attribute watt : PowerUnit = J/s; + attribute weber : MagneticFluxUnit = V*s; + attribute <'Ω'> ohm : ResistanceUnit = V/A; + + /* + * Units recognized in SI as specified in ISO 80000-1:2009 + */ + attribute <'Å'> 'ångström' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.0e-10; } } + attribute barn : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = 'm²'; :>> conversionFactor = 1.0e-28; } } + attribute day: DurationUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = hour; :>> conversionFactor = 24; } } + attribute dalton : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.66053906660e-27; :>> isExact = false; } } + attribute electronvolt : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.602176487e-19; :>> isExact = false; } } + attribute hour: DurationUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = min; :>> conversionFactor = 60; } } + attribute minute : DurationUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = s; :>> conversionFactor = 60; } } + attribute litre : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = 'm³'; :>> conversionFactor = 1.0e-3; } } + attribute tonne : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.0e-3; } } + alias 'metric ton' for tonne; + attribute 'atomic mass unit' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Da; :>> conversionFactor = 1.0; } } + attribute 'astronomical unit' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 149597870691e11; :>> isExact = false; } } + attribute 'volt ampere reactive' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = V*A; :>> conversionFactor = 1.0; } } + attribute <'°'> degree : AngularMeasureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = rad; :>> conversionFactor = 1.745329E-02; :>> isExact = false; } } // conversionFactor should become pi/180 + attribute <'′'> 'minute (angle)' : AngularMeasureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = rad; :>> conversionFactor = 2.908882E-04; :>> isExact = false; } } + alias arcmin for '′'; + attribute <'″'> 'second (angle)' : AngularMeasureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = rad; :>> conversionFactor = 4.848137E-06; :>> isExact = false; } } + alias arcsec for '″'; + + /* + * Derived units used in parts 3 to 12 of ISO/IEC 80000 + */ + attribute <'A⋅m⁻²⋅K⁻²'> 'ampere metre to the power minus 2 kelvin to the power minus 2' : RichardsonConstantUnit = A*m^-2*K^-2; + attribute <'A⋅m²'> 'ampere metre squared' : MagneticMomentUnit = A*m^2; + attribute <'A⋅m²⋅J⁻¹⋅s⁻¹'> 'ampere metre squared joule to the power minus 1 second to the power minus 1' : GyromagneticRatioUnit = A*m^2*J^-1*s^-1; + attribute <'A⋅s/kg'> 'ampere second per kilogram' : GyromagneticRatioUnit = A*s/kg; + attribute <'A/m'> 'ampere per metre' : LinearElectricCurrentDensityUnit = A/m; + attribute <'A/m²'> 'ampere per square metre' : ElectricCurrentDensityUnit = A/m^2; + attribute <'B/s'> 'byte per second' : TransferRateUnit = B/s; + attribute <'bit/s'> 'bit per second' : BinaryDigitRateUnit = bit/s; + attribute <'Bq/kg'> 'becquerel per kilogram' : SpecificActivityUnit = Bq/kg; + attribute <'Bq/m²'> 'becquerel per square metre' : SurfaceActivityDensityUnit = Bq/m^2; + attribute <'Bq/m³'> 'becquerel per cubic metre' : ActivityDensityUnit = Bq/m^3; + attribute <'C⋅m'> 'coulomb metre' : ElectricDipoleMomentUnit = C*m; + attribute <'C/(kg⋅s)'> 'coulomb per kilogram second' : ExposureRateUnit = C/(kg*s); + attribute <'C/kg'> 'coulomb per kilogram' : ExposureUnit = C/kg; + attribute <'C/m'> 'coulomb per metre' : LinearDensityOfElectricChargeUnit = C/m; + attribute <'C/m²'> 'coulomb per square metre' : SurfaceDensityOfElectricChargeUnit = C/m^2; + attribute <'C/m³'> 'coulomb per cubic metre' : ElectricChargeDensityUnit = C/m^3; + attribute <'cd⋅m⁻²'> 'candela metre to the power minus 2' : LuminanceUnit = cd*m^-2; + attribute <'cd⋅sr'> 'candela steradian' : LuminousFluxUnit = cd*sr; + attribute <'cd⋅sr⋅kg⁻¹⋅m⁻²⋅s³'> 'candela steradian kilogram to the power minus 1 metre to the power minus 2 second to the power 3' : LuminousEfficacyOfRadiationUnit = cd*sr*kg^-1*m^-2*s^3; + attribute <'cd⋅sr⋅m⁻²'> 'candela steradian metre to the power minus 2' : IlluminanceUnit = cd*sr*m^-2; + attribute <'cd⋅sr⋅m⁻²⋅s'> 'candela steradian metre to the power minus 2 second' : LuminousExposureUnit = cd*sr*m^-2*s; + attribute <'cd⋅sr⋅s'> 'candela steradian second' : LuminousEnergyUnit = cd*sr*s; + attribute <'eV⋅J⋅kg⋅m²⋅s⁻²'> 'electronvolt joule kilogram metre squared second to the power minus 2' : HartreeEnergyUnit = eV*J*kg*m^2*s^-2; + attribute <'eV⋅m⁻²/kg'> 'electronvolt metre to the power minus 2 per kilogram' : TotalMassStoppingPowerUnit = eV*m^-2/kg; + attribute <'eV/m'> 'electronvolt per metre' : TotalLinearStoppingPowerUnit = eV/m; + attribute <'eV/m²'> 'electronvolt per square metre' : EnergyFluenceUnit = eV/m^2; + attribute <'F/m'> 'farad per metre' : ElectricConstantUnit = F/m; + attribute <'g/L'> 'g per l' : MassConcentrationUnit = g/L; + attribute <'g/mol'> 'g per mole' : MolarMassUnit = g/mol; + attribute <'Gy/s'> 'gray per second' : AbsorbedDoseRateUnit = Gy/s; + attribute <'H/m'> 'henry per metre' : MagneticConstantUnit = H/m; + attribute <'H⁻¹'> 'henry to the power minus 1' : ReluctanceUnit = H^-1; + attribute <'Hart/s'> 'hartley per second' : AverageInformationRateUnit = Hart/s; + attribute <'J⋅m²/kg'> 'joule metre squared per kilogram' : TotalMassStoppingPowerUnit = J*m^2/kg; + attribute <'J⋅s'> 'joule second' : ActionQuantityUnit = J*s; + attribute <'J⋅s⋅eV⋅s'> 'joule second electronvolt second' : TotalAngularMomentumUnit = J*s*eV*s; + attribute <'J⋅s⁻¹'> 'joule second to the power minus 1' : PowerUnit = J*s^-1; + attribute <'J/(kg⋅K)'> 'joule per kilogram kelvin' : SpecificHeatCapacityUnit = J/(kg*K); + attribute <'J/(m²⋅nm)'> 'joule per square metre nm' : SpectralRadiantExposureUnit = J/(m^2*nm); + attribute <'J/(m³⋅nm)'> 'joule per cubic metre nm' : SpectralRadiantEnergyDensityInTermsOfWavelengthUnit = J/(m^3*nm); + attribute <'J/(mol⋅K)'> 'joule per mole kelvin' : MolarHeatCapacityUnit = J/(mol*K); + attribute <'J/K'> 'joule per kelvin' : HeatCapacityUnit = J/K; + attribute <'J/kg'> 'joule per kilogram' : SpecificEnergyUnit = J/kg; + attribute <'J/m'> 'joule per metre' : TotalLinearStoppingPowerUnit = J/m; + attribute <'J/m²'> 'joule per square metre' : SpectralRadiantEnergyDensityInTermsOfWavenumberUnit = J/m^2; + attribute <'J/m³'> 'joule per cubic metre' : ElectromagneticEnergyDensityUnit = J/m^3; + attribute <'J/mol'> 'joule per mole' : MolarInternalEnergyUnit = J/mol; + attribute <'J/nm'> 'joule per nm' : SpectralRadiantEnergyUnit = J/nm; + attribute <'J/s'> 'joule per second' : HeatFlowRateUnit = J/s; + attribute <'J⁻¹⋅m⁻³⋅eV⁻¹⋅m⁻³'> 'joule to the power minus 1 metre to the power minus 3 electronvolt to the power minus 1 metre to the power minus 3' : EnergyDensityOfStatesUnit = J^-1*m^-3*eV^-1*m^-3; + attribute <'K/Pa'> 'kelvin per pascal' : JouleThomsonCoefficientUnit = K/Pa; + attribute <'K/W'> 'kelvin per watt' : ThermalResistanceUnit = K/W; + attribute <'K⁻¹'> 'kelvin to the power minus 1' : LinearExpansionCoefficientUnit = K^-1; + attribute <'kg⋅m⋅s⁻¹'> 'kilogram metre second to the power minus 1' : MomentumUnit = kg*m*s^-1; + attribute <'kg⋅m⋅s⁻²'> 'kilogram metre second to the power minus 2' : ForceUnit = kg*m*s^-2; + attribute <'kg⋅m⋅s⁻³'> 'kilogram metre second to the power minus 3' : SpectralRadiantFluxUnit = kg*m*s^-3; + attribute <'kg⋅m⋅s⁻³⋅K⁻¹'> 'kilogram metre second to the power minus 3 kelvin to the power minus 1' : ThermalConductivityUnit = kg*m*s^-3*K^-1; + attribute <'kg⋅m⋅s⁻³⋅sr⁻¹'> 'kilogram metre second to the power minus 3 steradian to the power minus 1' : SpectralRadiantIntensityUnit = kg*m*s^-3*sr^-1; + attribute <'kg⋅m⁻¹'> 'kilogram metre to the power minus 1' : LinearMassDensityUnit = kg*m^-1; + attribute <'kg⋅m⁻¹⋅s⁻¹'> 'kilogram metre to the power minus 1 second to the power minus 1' : DynamicViscosityUnit = kg*m^-1*s^-1; + attribute <'kg⋅m⁻¹⋅s⁻²'> 'kilogram metre to the power minus 1 second to the power minus 2' : PressureUnit = kg*m^-1*s^-2; + attribute <'kg⋅m⁻¹⋅s⁻²⋅K⁻¹'> 'kilogram metre to the power minus 1 second to the power minus 2 kelvin to the power minus 1' : PressureCoefficientUnit = kg*m^-1*s^-2*K^-1; + attribute <'kg⋅m⁻¹⋅s⁻³'> 'kilogram metre to the power minus 1 second to the power minus 3' : SpectralIrradianceUnit = kg*m^-1*s^-3; + attribute <'kg⋅m⁻¹⋅s⁻³⋅sr⁻¹'> 'kilogram metre to the power minus 1 second to the power minus 3 steradian to the power minus 1' : SpectralRadianceUnit = kg*m^-1*s^-3*sr^-1; + attribute <'kg⋅m⁻²'> 'kilogram metre to the power minus 2' : SurfaceMassDensityUnit = kg*m^-2; + attribute <'kg⋅m⁻²⋅s⁻¹'> 'kilogram metre to the power minus 2 second to the power minus 1' : MassFlowUnit = kg*m^-2*s^-1; + attribute <'kg⋅m⁻²⋅s⁻²'> 'kilogram metre to the power minus 2 second to the power minus 2' : SpectralRadiantEnergyDensityInTermsOfWavelengthUnit = kg*m^-2*s^-2; + attribute <'kg⋅m⁻³'> 'kilogram metre to the power minus 3' : MassDensityUnit = kg*m^-3; + attribute <'kg⋅m⁻⁴⋅s⁻¹'> 'kilogram metre to the power minus 4 second to the power minus 1' : AcousticImpedanceUnit = kg*m^-4*s^-1; + attribute <'kg⋅m²'> 'kilogram metre squared' : MomentOfInertiaUnit = kg*m^2; + attribute <'kg⋅m²⋅s⁻¹'> 'kilogram metre squared second to the power minus 1' : AngularMomentumUnit = kg*m^2*s^-1; + attribute <'kg⋅m²⋅s⁻²'> 'kilogram metre squared second to the power minus 2' : MomentOfForceUnit = kg*m^2*s^-2; + attribute <'kg⋅m²⋅s⁻²⋅K⁻¹'> 'kilogram metre squared second to the power minus 2 kelvin to the power minus 1' : HeatCapacityUnit = kg*m^2*s^-2*K^-1; + attribute <'kg⋅m²⋅s⁻²⋅K⁻¹⋅mol⁻¹'> 'kilogram metre squared second to the power minus 2 kelvin to the power minus 1 mole to the power minus 1' : MolarHeatCapacityUnit = kg*m^2*s^-2*K^-1*mol^-1; + attribute <'kg⋅m²⋅s⁻²⋅mol⁻¹'> 'kilogram metre squared second to the power minus 2 mole to the power minus 1' : MolarInternalEnergyUnit = kg*m^2*s^-2*mol^-1; + attribute <'kg⋅m²⋅s⁻³'> 'kilogram metre squared second to the power minus 3' : PowerUnit = kg*m^2*s^-3; + attribute <'kg⋅m²⋅s⁻³⋅A⁻¹'> 'kilogram metre squared second to the power minus 3 ampere to the power minus 1' : ElectricPotentialDifferenceUnit = kg*m^2*s^-3*A^-1; + attribute <'kg⋅m²⋅s⁻³⋅A⁻¹⋅K⁻¹'> 'kilogram metre squared second to the power minus 3 ampere to the power minus 1 kelvin to the power minus 1' : SeebeckCoefficientForSubstancesAAndBUnit = kg*m^2*s^-3*A^-1*K^-1; + attribute <'kg⋅m²⋅s⁻³⋅K⁻¹'> 'kilogram metre squared second to the power minus 3 kelvin to the power minus 1' : ThermalConductanceUnit = kg*m^2*s^-3*K^-1; + attribute <'kg⋅m²⋅s⁻³⋅sr⁻¹'> 'kilogram metre squared second to the power minus 3 steradian to the power minus 1' : RadiantIntensityUnit = kg*m^2*s^-3*sr^-1; + attribute <'kg⋅m³⋅s⁻³⋅A⁻²'> 'kilogram metre cubed second to the power minus 3 ampere to the power minus 2' : ResistivityUnit = kg*m^3*s^-3*A^-2; + attribute <'kg⋅mol⁻¹'> 'kilogram mole to the power minus 1' : MolarMassUnit = kg*mol^-1; + attribute <'kg⋅s⁻¹'> 'kilogram second to the power minus 1' : MassFlowRateUnit = kg*s^-1; + attribute <'kg⋅s⁻²'> 'kilogram second to the power minus 2' : SurfaceTensionUnit = kg*s^-2; + attribute <'kg⋅s⁻²⋅A⁻¹'> 'kilogram second to the power minus 2 ampere to the power minus 1' : MagneticFluxDensityUnit = kg*s^-2*A^-1; + attribute <'kg⋅s⁻³'> 'kilogram second to the power minus 3' : DensityOfHeatFlowRateUnit = kg*s^-3; + attribute <'kg⋅s⁻³⋅K⁻¹'> 'kilogram second to the power minus 3 kelvin to the power minus 1' : CoefficientOfHeatTransferUnit = kg*s^-3*K^-1; + attribute <'kg⋅s⁻³⋅sr⁻¹'> 'kilogram second to the power minus 3 steradian to the power minus 1' : RadianceUnit = kg*s^-3*sr^-1; + attribute <'kg⁻¹⋅A'> 'kilogram to the power minus 1 ampere' : ExposureRateUnit = kg^-1*A; + attribute <'kg⁻¹⋅m⋅s²'> 'kilogram to the power minus 1 metre second to the power 2' : CompressibilityUnit = kg^-1*m*s^2; + attribute <'kg⁻¹⋅m⋅s²⋅K'> 'kilogram to the power minus 1 metre second to the power 2 kelvin' : JouleThomsonCoefficientUnit = kg^-1*m*s^2*K; + attribute <'kg⁻¹⋅m⁻²⋅s³⋅K'> 'kilogram to the power minus 1 metre to the power minus 2 second to the power 3 kelvin' : ThermalResistanceUnit = kg^-1*m^-2*s^3*K; + attribute <'kg⁻¹⋅m⁻³⋅s³⋅A²'> 'kilogram to the power minus 1 metre to the power minus 3 second to the power 3 ampere to the power 2' : ElectrolyticConductivityUnit = kg^-1*m^-3*s^3*A^2; + attribute <'kg⁻¹⋅m⁻⁵⋅s²'> 'kilogram to the power minus 1 metre to the power minus 5 second to the power 2' : EnergyDensityOfStatesUnit = kg^-1*m^-5*s^2; + attribute <'kg⁻¹⋅m²'> 'kilogram to the power minus 1 metre squared' : MassAttenuationCoefficientUnit = kg^-1*m^2; + attribute <'kg⁻¹⋅m³'> 'kilogram to the power minus 1 metre cubed' : SpecificVolumeUnit = kg^-1*m^3; + attribute <'kg⁻¹⋅s⋅A'> 'kilogram to the power minus 1 second ampere' : GyromagneticRatioUnit = kg^-1*s*A; + attribute <'kg⁻¹⋅s⁻¹'> 'kilogram to the power minus 1 second to the power minus 1' : SpecificActivityUnit = kg^-1*s^-1; + attribute <'kg⁻¹⋅s²'> 'kilogram to the power minus 1 second to the power 2' : EnergyDistributionOfCrossSectionUnit = kg^-1*s^2; + attribute <'kg⁻¹⋅s²⋅A'> 'kilogram to the power minus 1 second to the power 2 ampere' : MobilityUnit = kg^-1*s^2*A; + attribute <'kg⁻¹⋅s³⋅A²⋅mol⁻¹'> 'kilogram to the power minus 1 second to the power 3 ampere to the power 2 mole to the power minus 1' : MolarConductivityUnit = kg^-1*s^3*A^2*mol^-1; + attribute <'kg⁻¹⋅s³⋅K'> 'kilogram to the power minus 1 second to the power 3 kelvin' : ThermalInsulanceUnit = kg^-1*s^3*K; + attribute <'kg²⋅m⁻²⋅s⁻³'> 'kilogram to the power 2 metre to the power minus 2 second to the power minus 3' : SoundExposureUnit = kg^2*m^-2*s^-3; + attribute <'kg²⋅m⁴⋅s⁻⁶⋅A⁻²⋅K⁻²'> 'kilogram to the power 2 metre to the power 4 second to the power minus 6 ampere to the power minus 2 kelvin to the power minus 2' : LorenzCoefficientUnit = kg^2*m^4*s^-6*A^-2*K^-2; + attribute <'lm⋅s'> 'lumen second' : LuminousEnergyUnit = lm*s; + attribute <'lm/m²'> 'lumen per square metre' : LuminousExitanceUnit = lm/m^2; + attribute <'lm/W'> 'lumen per watt' : LuminousEfficacyOfRadiationUnit = lm/W; + attribute <'lx⋅s'> 'lux second' : LuminousExposureUnit = lx*s; + attribute <'m⋅s⁻¹'> 'metre second to the power minus 1' : SpeedUnit = m*s^-1; + attribute <'m⋅s⁻²'> 'metre second to the power minus 2' : AccelerationUnit = m*s^-2; + attribute <'m/s'> 'metre per second' : SpeedUnit = m/s; + attribute <'m⁻¹'> 'metre to the power minus 1' : CurvatureUnit = m^-1; + attribute <'m⁻²'> 'metre to the power minus 2' : PhotonExposureUnit = m^-2; + attribute <'m⁻²⋅s⁻¹'> 'metre to the power minus 2 second to the power minus 1' : PhotonIrradianceUnit = m^-2*s^-1; + attribute <'m⁻²⋅s⁻¹⋅sr⁻¹'> 'metre to the power minus 2 second to the power minus 1 steradian to the power minus 1' : PhotonRadianceUnit = m^-2*s^-1*sr^-1; + attribute <'m⁻³'> 'metre to the power minus 3' : ParticleConcentrationUnit = m^-3; + attribute <'m⁻³⋅s'> 'metre to the power minus 3 second' : DensityOfVibrationalStatesUnit = m^-3*s; + attribute <'m⁻³⋅s⁻¹'> 'metre to the power minus 3 second to the power minus 1' : ActivityDensityUnit = m^-3*s^-1; + attribute <'m²'> 'metre squared' : AreaUnit = m^2; + attribute <'m²⋅A'> 'metre squared ampere' : MagneticDipoleMomentUnit = m^2*A; + attribute <'m²⋅K/W'> 'metre squared kelvin per watt' : ThermalInsulanceUnit = m^2*K/W; + attribute <'m²⋅mol⁻¹'> 'metre squared mole to the power minus 1' : MolarAbsorptionCoefficientUnit = m^2*mol^-1; + attribute <'m²⋅s⁻¹'> 'metre squared second to the power minus 1' : KinematicViscosityUnit = m^2*s^-1; + attribute <'m²⋅s⁻²'> 'metre squared second to the power minus 2' : SpecificEnergyUnit = m^2*s^-2; + attribute <'m²⋅s⁻²⋅K⁻¹'> 'metre squared second to the power minus 2 kelvin to the power minus 1' : SpecificHeatCapacityUnit = m^2*s^-2*K^-1; + attribute <'m²⋅s⁻³'> 'metre squared second to the power minus 3' : DoseEquivalentUnit = m^2*s^-3; + attribute <'m²⋅sr⁻¹'> 'metre squared steradian to the power minus 1' : DirectionDistributionOfCrossSectionUnit = m^2*sr^-1; + attribute <'m²/(J⋅sr)'> 'metre squared per joule steradian' : DirectionAndEnergyDistributionOfCrossSectionUnit = m^2/(J*sr); + attribute <'m²/(V⋅s)'> 'metre squared per volt second' : MobilityUnit = m^2/(V*s); + attribute <'m²/J'> 'metre squared per joule' : EnergyDistributionOfCrossSectionUnit = m^2/J; + attribute <'m³'> 'metre cubed' : VolumeUnit = m^3; + attribute <'m³⋅mol⁻¹'> 'metre cubed mole to the power minus 1' : MolarVolumeUnit = m^3*mol^-1; + attribute <'m³⋅s⁻¹'> 'metre cubed second to the power minus 1' : VolumeFlowRateUnit = m^3*s^-1; + attribute <'m³/C⋅m³⋅s⁻¹⋅A⁻¹'> 'metre cubed per coulomb cubic metre second to the power minus 1 ampere to the power minus 1' : HallCoefficientUnit = m^3/C*m^3*s^-1*A^-1; + attribute <'m⁴'> 'metre to the power 4' : SecondAxialMomentOfAreaUnit = m^4; + attribute <'m⁴⋅s⁻²'> 'metre to the power 4 second to the power minus 2' : TotalMassStoppingPowerUnit = m^4*s^-2; + attribute <'mL/L '> 'ml per l' : VolumeFractionUnit = mL/L; + attribute <'mol⋅kg⁻¹'> 'mole kilogram to the power minus 1' : IonicStrengthUnit = mol*kg^-1; + attribute <'mol⋅m⁻³'> 'mole metre to the power minus 3' : AmountOfSubstanceConcentrationUnit = mol*m^-3; + attribute <'mol/kg'> 'mole per kilogram' : MolalityUnit = mol/kg; + attribute <'mol/L'> 'mole per l' : AmountOfSubstanceConcentrationUnit = mol/L; + attribute <'mol/m³'> 'mole per cubic metre' : EquilibriumConstantOnConcentrationBasisUnit = mol/m^3; + attribute <'N⋅m'> 'newton metre' : MomentOfForceUnit, TorqueUnit = N*m { + attribute :>> MomentOfForceUnit::quantityDimension, TorqueUnit::quantityDimension { + :>> MomentOfForceUnit::quantityDimension::quantityPowerFactors, TorqueUnit::quantityDimension::quantityPowerFactors; + } + } + attribute <'N⋅m⋅s'> 'newton metre second' : AngularImpulseUnit = N*m*s; + attribute <'N⋅m⋅s⁻¹'> 'newton metre second to the power minus 1' : PowerUnit = N*m*s^-1; + attribute <'N⋅m⁻¹'> 'newton metre to the power minus 1' : SurfaceTensionUnit = N*m^-1; + attribute <'N⋅m⁻²'> 'newton metre to the power minus 2' : PressureUnit = N*m^-2; + attribute <'N⋅s'> 'newton second' : ImpulseUnit = N*s; + attribute <'nat/s'> 'natural unit of information per second' : AverageInformationRateUnit = nat/s; + attribute <'o/s'> 'octet per second' : TransferRateUnit = o/s; + attribute <'Pa⋅s'> 'pascal second' : DynamicViscosityUnit = Pa*s; + attribute <'Pa⋅s/m'> 'pascal second per metre' : CharacteristicImpedanceOfAMediumForLongitudinalWavesUnit = Pa*s/m; + attribute <'Pa⋅s/m³'> 'pascal second per cubic metre' : AcousticImpedanceUnit = Pa*s/m^3; + attribute <'Pa/K'> 'pascal per kelvin' : PressureCoefficientUnit = Pa/K; + attribute <'Pa⁻¹'> 'pascal to the power minus 1' : CompressibilityUnit = Pa^-1; + attribute <'Pa²⋅s'> 'pascal to the power 2 second' : SoundExposureUnit = Pa^2*s; + attribute <'rad⋅m²/kg¹'> 'radian metre squared per kilogram to the power 1' : SpecificOpticalRotatoryPowerUnit = rad*m^2/kg^1; + attribute <'rad⋅m²/mol'> 'radian metre squared per mole' : MolarOpticalRotatoryPowerUnit = rad*m^2/mol; + attribute <'rad⋅s⁻¹'> 'radian second to the power minus 1' : AngularVelocityUnit = rad*s^-1; + attribute <'rad⋅s⁻²'> 'radian second to the power minus 2' : AngularAccelerationUnit = rad*s^-2; + attribute <'rad/m'> 'radian per metre' : PhaseCoefficientUnit = rad/m; + attribute <'s⋅A'> 'second ampere' : ElectricChargeUnit = s*A; + attribute <'S⋅m²/mol'> 'siemens metre squared per mole' : MolarConductivityUnit = S*m^2/mol; + attribute <'S/m'> 'siemens per metre' : ConductivityUnit = S/m; + attribute <'s⁻¹'> 'second to the power minus 1' : AngularVelocityUnit = s^-1; + attribute <'s⁻¹⋅sr⁻¹'> 'second to the power minus 1 steradian to the power minus 1' : PhotonIntensityUnit = s^-1*sr^-1; + attribute <'s⁻²'> 'second to the power minus 2' : AngularAccelerationUnit = s^-2; + attribute <'Sh/s'> 'shannon per second' : AverageInformationRateUnit = Sh/s; + attribute <'Sv/s'> 'sievert per second' : DoseEquivalentUnit = Sv/s; + attribute <'V⋅A'> 'volt ampere' : PowerUnit = V*A; + attribute <'V/K'> 'volt per kelvin' : SeebeckCoefficientForSubstancesAAndBUnit = V/K; + attribute <'V/m'> 'volt per metre' : ElectricFieldStrengthUnit = V/m; + attribute <'V²/K²'> 'volt to the power 2 per kelvin to the power 2' : LorenzCoefficientUnit = V^2/K^2; + attribute <'W⋅h'> 'watt hour' : EnergyUnit = W*h; + attribute <'W/(m⋅K)'> 'watt per metre kelvin' : ThermalConductivityUnit = W/(m*K); + attribute <'W/(m²⋅K)'> 'watt per square metre kelvin' : CoefficientOfHeatTransferUnit = W/(m^2*K); + attribute <'W/(m²⋅nm)'> 'watt per square metre nm' : SpectralIrradianceUnit = W/(m^2*nm); + attribute <'W/(sr⋅m²)'> 'watt per steradian square metre' : RadianceUnit = W/(sr*m^2); + attribute <'W/(sr⋅m²⋅nm)'> 'watt per steradian square metre nm' : SpectralRadianceUnit = W/(sr*m^2*nm); + attribute <'W/(sr⋅nm)'> 'watt per steradian nm' : SpectralRadiantIntensityUnit = W/(sr*nm); + attribute <'W/K'> 'watt per kelvin' : ThermalConductanceUnit = W/K; + attribute <'W/kg'> 'watt per kilogram' : DoseEquivalentUnit = W/kg; + attribute <'W/m²'> 'watt per square metre' : DensityOfHeatFlowRateUnit = W/m^2; + attribute <'W/nm'> 'watt per nm' : SpectralRadiantFluxUnit = W/nm; + attribute <'W/sr'> 'watt per steradian' : RadiantIntensityUnit = W/sr; + attribute <'Wb⋅m'> 'weber metre' : MagneticDipoleMomentUnit = Wb*m; + attribute <'Wb/m'> 'weber per metre' : MagneticVectorPotentialUnit = Wb/m; + attribute <'Ω⋅m'> 'ohm metre' : ResistivityUnit = 'Ω'*m; + + alias 'm/s²' for 'm⋅s⁻²'; + + /* + * Prefixed units + */ + + /* Length */ + attribute nanometre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = nano; :>> referenceUnit = m; } } + attribute millimetre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = milli; :>> referenceUnit = m; } } + attribute centimetre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = centi; :>> referenceUnit = m; } } + attribute kilometre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = m; } } + + /* Volume */ + attribute millilitre : VolumeUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = milli; :>> referenceUnit = L; } } + + /* Force */ + attribute millinewton : ForceUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = milli; :>> referenceUnit = N; } } + + /* Energy */ + attribute kilojoule : EnergyUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = J; } } + attribute megajoule : EnergyUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = mega; :>> referenceUnit = J; } } + attribute gigajoule : EnergyUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = giga; :>> referenceUnit = J; } } + + /* Power */ + attribute kilowatt : PowerUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = W; } } + + /* Speed */ + attribute <'km/h'> 'kilometre per hour': SpeedUnit = km/h; + + /* + * Celsius units + */ + + attribute <'°C'> 'degree celsius (temperature difference)' : TemperatureDifferenceUnit { + doc + /* + * degree Celsius unit for temperature interval (i.e. temperature difference) quantities + */ + + attribute :>> unitConversion: ConversionByConvention { :>> referenceUnit = K; :>> conversionFactor = 1; } + } + + attribute <'°C_abs'> 'degree celsius (absolute temperature scale)' : IntervalScale { + doc + /* + * degree Celsius interval scale for absolute (thermodynamic) temperature quantities + * + * The interval scale is defined with an explicit transformation with respect to + * the kelvin thermodynamic temperature scale that specifies the zero shift. + */ + + attribute :>> unit = '°C'; + attribute temperatureWaterAtFreezingPointInC: DefinitionalQuantityValue { + :>> num = 0; :>> definition = "temperature in degree Celsius of pure water at freezing point"; + } + private attribute temperatureWaterAtTriplePointInC: DefinitionalQuantityValue { + :>> num = 1/100; :>> definition = "temperature in degree Celsius of pure water at the triple point"; + } + private attribute celsiusToKelvinScaleMapping: QuantityValueMapping { + :>> mappedQuantityValue = temperatureWaterAtTriplePointInC; + :>> referenceQuantityValue = K.temperatureOfWaterAtTriplePointInK; + } + attribute :>> definitionalQuantityValues = (temperatureWaterAtTriplePointInC, temperatureWaterAtFreezingPointInC); + attribute :>> quantityValueMapping = celsiusToKelvinScaleMapping; + + /* CoordinateFramePlacement (zero shift) w.r.t. the kelvin thermodynamic temperature scale */ + private attribute zeroDegreeCelsiusInKelvin: ThermodynamicTemperatureValue = 273.15 [K]; + attribute zeroDegreeCelsiusToKelvinShift : CoordinateFramePlacement :>> transformation { + :>> source = K; :>> origin = zeroDegreeCelsiusInKelvin; + } + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SIPrefixes.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SIPrefixes.sysml new file mode 100644 index 00000000..37348e25 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SIPrefixes.sysml @@ -0,0 +1,48 @@ +standard library package SIPrefixes { + doc + /* + * Definition of SI unit prefixes as specified in ISO/IEC 80000-1 + */ + + private import MeasurementReferences::*; + + /* + * ISO/IEC 80000-1 prefixes for decimal multiples and sub-multiples + * + * See also https://en.wikipedia.org/wiki/Unit_prefix + */ + attribute yocto: UnitPrefix { :>> longName = "yocto"; :>> symbol = "y"; :>> conversionFactor = 1E-24; } + attribute zepto: UnitPrefix { :>> longName = "zepto"; :>> symbol = "z"; :>> conversionFactor = 1E-21; } + attribute atto: UnitPrefix { :>> longName = "atto"; :>> symbol = "a"; :>> conversionFactor = 1E-18; } + attribute femto: UnitPrefix { :>> longName = "femto"; :>> symbol = "f"; :>> conversionFactor = 1E-15; } + attribute pico: UnitPrefix { :>> longName = "pico"; :>> symbol = "p"; :>> conversionFactor = 1E-12; } + attribute nano: UnitPrefix { :>> longName = "nano"; :>> symbol = "n"; :>> conversionFactor = 1E-9; } + attribute micro: UnitPrefix { :>> longName = "micro"; :>> symbol = "μ"; :>> conversionFactor = 1E-6; } + attribute milli: UnitPrefix { :>> longName = "milli"; :>> symbol = "m"; :>> conversionFactor = 1E-3; } + attribute centi: UnitPrefix { :>> longName = "centi"; :>> symbol = "c"; :>> conversionFactor = 1E-2; } + attribute deci: UnitPrefix { :>> longName = "deci"; :>> symbol = "d"; :>> conversionFactor = 1E-1; } + attribute deca: UnitPrefix { :>> longName = "deca"; :>> symbol = "da"; :>> conversionFactor = 1E1; } + attribute hecto: UnitPrefix { :>> longName = "hecto"; :>> symbol = "h"; :>> conversionFactor = 1E2; } + attribute kilo: UnitPrefix { :>> longName = "kilo"; :>> symbol = "k"; :>> conversionFactor = 1E3; } + attribute mega: UnitPrefix { :>> longName = "mega"; :>> symbol = "M"; :>> conversionFactor = 1E6; } + attribute giga: UnitPrefix { :>> longName = "giga"; :>> symbol = "G"; :>> conversionFactor = 1E9; } + attribute tera: UnitPrefix { :>> longName = "tera"; :>> symbol = "T"; :>> conversionFactor = 1E12; } + attribute peta: UnitPrefix { :>> longName = "peta"; :>> symbol = "P"; :>> conversionFactor = 1E15; } + attribute exa: UnitPrefix { :>> longName = "exa"; :>> symbol = "E"; :>> conversionFactor = 1E18; } + attribute zetta: UnitPrefix { :>> longName = "zetta"; :>> symbol = "Z"; :>> conversionFactor = 1E21; } + attribute yotta: UnitPrefix { :>> longName = "yotta"; :>> symbol = "Y"; :>> conversionFactor = 1E24; } + + /* + * ISO/IEC 80000-1 prefixes for binary multiples, i.e. multiples of 1024 (= 2^10) + * + * See also https://en.wikipedia.org/wiki/Binary_prefix + */ + attribute kibi: UnitPrefix { :>> longName = "kibi"; :>> symbol = "Ki"; :>> conversionFactor = 1024; } + attribute mebi: UnitPrefix { :>> longName = "mebi"; :>> symbol = "Mi"; :>> conversionFactor = 1024^2; } + attribute gibi: UnitPrefix { :>> longName = "gibi"; :>> symbol = "Gi"; :>> conversionFactor = 1024^3; } + attribute tebi: UnitPrefix { :>> longName = "tebi"; :>> symbol = "Ti"; :>> conversionFactor = 1024^4; } + attribute pebi: UnitPrefix { :>> longName = "pebi"; :>> symbol = "Pi"; :>> conversionFactor = 1024^5; } + attribute exbi: UnitPrefix { :>> longName = "exbi"; :>> symbol = "Ei"; :>> conversionFactor = 1024^6; } + attribute zebi: UnitPrefix { :>> longName = "zebi"; :>> symbol = "Zi"; :>> conversionFactor = 1024^7; } + attribute yobi: UnitPrefix { :>> longName = "yobi"; :>> symbol = "Yi"; :>> conversionFactor = 1024^8; } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/TensorCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/TensorCalculations.sysml new file mode 100644 index 00000000..4187ac31 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/TensorCalculations.sysml @@ -0,0 +1,50 @@ +standard library package TensorCalculations { + doc + /* + * This package package defines calculations for the construction of and computations on TensorQuantityValues. + */ + + private import ScalarValues::Boolean; + private import ScalarValues::Number; + private import Quantities::ScalarQuantityValue; + private import Quantities::VectorQuantityValue; + private import Quantities::TensorQuantityValue; + private import MeasurementReferences::TensorMeasurementReference; + private import MeasurementReferences::CoordinateTransformation; + + calc def '[' specializes BaseFunctions::'[' { + in elements: Number[1..n] ordered; + in mRef: TensorMeasurementReference[1]; + return quantity: TensorQuantityValue[1]; + private attribute n = mRef.flattenedSize; + } + + calc def isZeroTensorQuantity { + in x : TensorQuantityValue[1]; + return : Boolean[1]; + } + calc def isUnitTensorQuantity { + in x : TensorQuantityValue[1]; + return : Boolean[1]; + } + + /* Addition and subtraction */ + calc def '+' :> DataFunctions::'+' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; } + calc def '-' :> DataFunctions::'-' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; } + + /* Multiplication and division */ + calc def scalarTensorMult { in : Number[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; } + calc def TensorScalarMult { in : TensorQuantityValue[1]; in : Number[1]; return : TensorQuantityValue[1]; } + calc def scalarQuantityTensorMult { in : ScalarQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; } + calc def TensorScalarQuantityMult { in : TensorQuantityValue[1]; in : ScalarQuantityValue[1]; return : TensorQuantityValue[1]; } + calc def tensorVectorMult { in : TensorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def vectorTensorMult { in : VectorQuantityValue[1]; in : TensorQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def tensorTensorMult { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; } + + /* Tensor transformation */ + calc def transform { + in transformation : CoordinateTransformation; + in sourceTensor : TensorQuantityValue; + return targetTensor : TensorQuantityValue; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Time.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Time.sysml new file mode 100644 index 00000000..f48f0bbb --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Time.sysml @@ -0,0 +1,274 @@ +standard library package Time { + doc + /* + * This package specifies concepts to support time-related quantities and metrology, beyond + * the quantities duration and time as defined in [ISO 80000-3]. Representations of the + * Gregorian calendar date and time of day as specified by the [ISO 8601-1] standard are used. + */ + + private import Occurrences::Occurrence; + private import ScalarValues::Real; + private import ScalarValues::Integer; + private import ScalarValues::Natural; + private import ScalarValues::String; + private import Quantities::ScalarQuantityValue; + private import Quantities::scalarQuantities; + private import MeasurementReferences::*; + public import ISQBase::DurationValue; + public import ISQBase::DurationUnit; + public import ISQBase::duration; + public import ISQSpaceTime::TimeValue; + public import ISQSpaceTime::TimeUnit; + public import ISQSpaceTime::time; + + part universalClock : Clock[1] :> Clocks::universalClock { + doc + /* + * universalClock is a single Clock that can be used as a default universal time reference. + */ + } + + part def Clock :> Clocks::Clock { + doc + /* + * A Clock provides a currentTime as a TimeInstantValue that advances montonically over its lifetime. + */ + + attribute :>> currentTime : TimeInstantValue; + } + + calc def TimeOf :> Clocks::TimeOf { + doc + /* + * TimeOf returns a TimeInstantValue for a given Occurrence relative to a given Clock. This TimeInstantValue is the + * time of the start of the Occurrence, which is considered to be synchronized with the snapshot of the Clock with a + * currentTime equal to the returned timeInstant. + */ + + in o : Occurrence[1]; + in clock : Clock[1] default localClock; + return timeInstant : TimeInstantValue[1]; + } + + calc def DurationOf :> Clocks::DurationOf { + doc + /* + * DurationOf returns the duration of a given Occurrence relative to a given Clock, which is equal to the TimeOf + * the end snapshot of the Occurrence minus the TimeOf its start snapshot. + */ + + in o : Occurrence[1]; + in clock : Clock[1] default localClock; + return duration : DurationValue; + } + + attribute def TimeScale :> IntervalScale { + doc + /* + * Generic time scale to express a time instant, including a textual definition of the meaning of zero time instant value + * + * Attribute definitionalEpoch captures the specification of the time instant with value zero, also known as the (reference) epoch. + */ + + attribute :>> unit: DurationUnit[1]; + attribute definitionalEpoch: DefinitionalQuantityValue[1]; + attribute :>> definitionalQuantityValues = definitionalEpoch; + } + + attribute def TimeInstantValue :> ScalarQuantityValue { + doc + /* + * Representation of a time instant quantity + * + * Also known as instant (of time), or, point in time. + */ + + attribute :>> num: Real[1]; + attribute :>> mRef: TimeScale[1]; + } + attribute timeInstant: TimeInstantValue :> scalarQuantities; + + abstract attribute def DateTime :> TimeInstantValue { + doc + /* + * Generic representation of a time instant as a calendar date and time of day + */ + } + + abstract attribute def Date :> TimeInstantValue { + doc + /* + * Generic representation of a time instant as a calendar date + */ + } + + abstract attribute def TimeOfDay :> TimeInstantValue { + doc + /* + * Generic representation of a time instant as a time of day + */ + } + + attribute 'Coordinated Universal Time' : TimeScale { + doc + /* + * Representation of the Coordinated Universal Time (UTC) time scale + * + * UTC is the primary time standard by which the world regulates clocks and time. It is within about 1 second of mean solar time + * at 0° longitude and is not adjusted for daylight saving time. + * UTC is obtained from International Atomic Time (TAI) by the insertion of leap seconds according to the advice of + * the International Earth Rotation and Reference Systems Service (IERS) to ensure approximate agreement + * with the time derived from the rotation of the Earth. + * + * References: + * ITU-R TF.460-6 (see https://www.itu.int/rec/R-REC-TF.460/en) + * BIPM technical services: Time Metrology (see https://www.bipm.org/en/time-metrology) + * + * Introductions: + * For UTC see https://en.wikipedia.org/wiki/Coordinated_Universal_Time + * For TAI see https://en.wikipedia.org/wiki/International_Atomic_Time + */ + + attribute :>> unit = SI::s; + attribute :>> definitionalEpoch: DefinitionalQuantityValue { :>> num = 0; :>> definition = "UTC epoch at 1 January 1958 at 0 hour 0 minute 0 second"; } + } + + attribute def UtcTimeInstantValue :> DateTime { + :>> mRef = UTC { + doc + /* + * Representation of a time instant expressed on the Coordinated Universal Time (UTC) time scale + */ + } + } + attribute utcTimeInstant: UtcTimeInstantValue :> timeInstant; + + /* + * Representations of a Gregorian calendar date and time of day as specified by the ISO 8601-1 standard. + * + * As explained in ISO 8601-1 clause 4.2.1: + * ISO 8601-1 uses the Gregorian calendar for the identification of calendar days. + * + * The Gregorian calendar provides a time scale consisting of a series of contiguous calendar years, + * each identified by a year number represented by an integer, greater than that of the + * immediately preceding calendar year by 1. ISO 8601-1 allows the identification of calendar years + * by their year number for years both before and after the introduction of the Gregorian calendar. + * + * The Gregorian calendar distinguishes common years of 365 consecutive calendar days and leap years + * of 366 consecutive calendar days. + * + * In the Gregorian calendar each calendar year is divided into 12 sequential calendar months, + * each consisting of a specific number of calendar days in the range 28 to 31. Usage of the Gregorian calendar + * for identifying dates preceding its introduction (15 October 1582) should only be by mutual agreement + * of the communicating partners. + * + * Reference: ISO 8601-1:2019 (First edition) + * "Date and time — Representations for information interchange — Part 1: Basic rules" + * (see https://www.iso.org/standard/70907.html) + */ + + attribute def Iso8601DateTimeEncoding :> String { + doc + /* + * Extended string encoding of an ISO 8601-1 date and time + * + * The format of the string must comply with the following EBNF production: + * ['+' | '-'] YYYY '-' MM '-' DD 'T' hh ':' mm ':' ss ['.' fff [fff]] ('Z' | timezoneOffset ) + * where: + * YYYY is 4-or-more-digit year number, which can be negative for years before 0000; + * MM is 2-digit month in year number, in which 01 is January, 02 is February, ..., 12 is December; + * DD is 2-digit day in month number in range 01 to 28, 29, 30, 31 depending on month and leap year; + * hh is 2-digit hour in day number in range 00 to 23; + * mm is 2-digit minute in hour in range 00 to 59; + * ss is 2-digit second in minute in range 00 to 60, in in case of leap second; + * ['.' fff [fff]] is an optional 3-digit millisecond or 6-digit microsecond fraction; + * timezoneOffset is ('+' | '-') hhOffset ':' mmOffset, denoting the local timezone hour and minute offset w.r.t. UTC, + * in which '+' specifies an offset ahead of UTC and '-' specifies an offset behind UTC; + * + * Note 1: All components are expressed with leading zeros. + * Note 2: 'Z' instead of timezoneOffset denotes a UTC time, i.e. zero time offset. + * Note 3: The ss value may only be 60 when a leap second is inserted. + * + * Examples of such a date and time value are: + * 2021-08-30T12:30:24Z (UTC date and time with second precision) + * 2018-01-23T23:14:44.304827Z (UTC date and time with microsecond precision) + * 1969-07-20T20:17:00Z (UTC date and time with second precision) + * 1969-07-20T15:17:00-05:00 (local date and time with second precision for a timezone 5 hour behind UTC) + * 1969-07-20T22:17:00+02:00 (local date and time with second precision for a timezone 2 hour ahead of UTC) + */ + } + + attribute def Iso8601DateTime :> UtcTimeInstantValue { + doc + /* + * Representation of an ISO 8601-1 date and time in extended string format + */ + + attribute val: Iso8601DateTimeEncoding; + attribute :>> num = getElapsedUtcTime(val); + private calc getElapsedUtcTime { + in iso8601DateTime: Iso8601DateTimeEncoding; + /* Return the number of seconds elapsed since the UTC epoch. + * Can be negative when the date and time is earlier than the epoch. + */ + return : Real; + } + } + + attribute def Iso8601DateTimeStructure :> UtcTimeInstantValue { + doc + /* + * Representation of an ISO 8601 date and time with explicit date and time component attributes + * + * The total time offset is equal to the summation of hourOffset and minuteOffset. + */ + + attribute year: Integer; + attribute month: Natural; + attribute day: Natural; + attribute hour: Natural; + attribute minute: Natural; + attribute second: Natural; + attribute microsecond: Natural; + attribute hourOffset: Integer; + attribute minuteOffset: Integer; + attribute :>> num = getElapsedUtcTime(year, month, day, hour, minute, second, microsecond, hourOffset, minuteOffset); + private calc getElapsedUtcTime { + in year: Integer; + in month: Natural; + in day: Natural; + in hour: Natural; + in minute: Natural; + in second: Natural; + in microsecond: Natural; + in hourOffset: Integer; + in minuteOffest: Integer; + return : Real; + } + } + + calc convertIso8601DateTimeToStructure { + doc + /* + * Calculation to convert an ISO 8601 date and time instant from string to component structure representation + */ + + in iso8601DateTime: Iso8601DateTime; + /* Parse ISO 8601 string encoding to date and time components */ + return : Iso8601DateTimeStructure; + } + + calc convertIso8601StructureToDateTime { + doc + /* + * Calculation to convert an ISO 8601 date and time instant from component structure to string representation + */ + + in iso8601DateTimeStructure: Iso8601DateTimeStructure; + attribute x: Iso8601DateTime; + /* Concatenate ISO 8601 date and time components to string + * year-month-dayThour:minute:second±hourOffset:minuteOffset + */ + return : Iso8601DateTime; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml new file mode 100644 index 00000000..d7b15509 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml @@ -0,0 +1,260 @@ +standard library package USCustomaryUnits { + doc + /* + * Measurement unit declarations generated from NIST SP811 Appendix B + * + * See https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors/nist-guide-si-appendix-b8 + */ + + private import MeasurementReferences::*; + public import ISQ::*; + private import SI::*; + + attribute 'acre (based on US survey foot)' : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2; :>> conversionFactor = 4.046873E+03; :>> isExact = false; } } + attribute 'acre foot (based on US survey foot)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.233489E+03; :>> isExact = false; } } + attribute 'barrel (for petroleum, 42 gallons (US))' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.589873E-01; :>> isExact = false; } } + attribute 'British thermal unit (IT)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.055056E+03; :>> isExact = false; } } + alias Btu for Btu_IT; + attribute 'British thermal unit (th)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.054350E+03; :>> isExact = false; } } + attribute 'British thermal unit (mean)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05587E+03; :>> isExact = false; } } + attribute <'Btu_39°F'> 'British thermal unit (39 °F)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05967E+03; :>> isExact = false; } } + attribute <'Btu_59°F'> 'British thermal unit (59 °F)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05480E+03; :>> isExact = false; } } + attribute <'Btu_60°F'> 'British thermal unit (60 °F)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05468E+03; :>> isExact = false; } } + attribute <'Btu_IT⋅ft/(h⋅ft²⋅°F)'> 'British thermal unit (IT) foot per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_IT*ft/(h*ft^2*'°F'); + attribute <'Btu_th⋅ft/(h⋅ft²⋅°F)'> 'British thermal unit (th) foot per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_th*ft/(h*ft^2*'°F'); + attribute <'Btu_IT⋅in/(h⋅ft²⋅°F)'> 'British thermal unit (IT) inch per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_IT*'in'/(h*ft^2*'°F'); + attribute <'Btu_th⋅in/(h⋅ft²⋅°F)'> 'British thermal unit (th) inch per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_th*'in'/(h*ft^2*'°F'); + attribute <'Btu_IT⋅in/(s⋅ft²⋅°F)'> 'British thermal unit (IT) inch per second square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_IT*'in'/(s*ft^2*'°F'); + attribute <'Btu_th⋅in/(s⋅ft²⋅°F)'> 'British thermal unit (th) inch per second square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_th*'in'/(s*ft^2*'°F'); + //attribute <'Btu_IT/ft³'> 'British thermal unit (IT) per cubic foot' : EnergyDensityUnit = Btu_IT/ft^3; + //attribute <'Btu_th/ft³'> 'British thermal unit (th) per cubic foot' : EnergyDensityUnit = Btu_th/ft^3; + attribute <'Btu_IT/°F'> 'British thermal unit (IT) per degree Fahrenheit' : HeatCapacityUnit = Btu_IT/'°F'; + attribute <'Btu_th/°F'> 'British thermal unit (th) per degree Fahrenheit' : HeatCapacityUnit = Btu_th/'°F'; + attribute <'Btu_IT/°R'> 'British thermal unit (IT) per degree Rankine' : HeatCapacityUnit = Btu_IT/'°R'; + attribute <'Btu_th/°R'> 'British thermal unit (th) per degree Rankine' : HeatCapacityUnit = Btu_th/'°R'; + attribute <'Btu_IT/h'> 'British thermal unit (IT) per hour' : PowerUnit = Btu_IT/h; + attribute <'Btu_th/h'> 'British thermal unit (th) per hour' : PowerUnit = Btu_th/h; + attribute <'Btu_IT/(h⋅ft²⋅°F)'> 'British thermal unit (IT) per hour square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_IT/(h*ft^2*'°F'); + attribute <'Btu_th/(h⋅ft²⋅°F)'> 'British thermal unit (th) per hour square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_th/(h*ft^2*'°F'); + attribute <'Btu_th/min'> 'British thermal unit (th) per minute' : PowerUnit = Btu_th/min; + attribute <'Btu_IT/lb'> 'British thermal unit (IT) per pound' : SpecificEnergyUnit = Btu_IT/lb; + attribute <'Btu_th/lb'> 'British thermal unit (th) per pound' : SpecificEnergyUnit = Btu_th/lb; + attribute <'Btu_IT/(lb⋅°F)'> 'British thermal unit (IT) per pound degree Fahrenheit' : SpecificHeatCapacityUnit = Btu_IT/(lb*'°F'); + attribute <'Btu_th/(lb⋅°F)'> 'British thermal unit (th) per pound degree Fahrenheit' : SpecificHeatCapacityUnit = Btu_th/(lb*'°F'); + attribute <'Btu_IT/(lb⋅°R)'> 'British thermal unit (IT) per pound degree Rankine' : SpecificHeatCapacityUnit = Btu_IT/(lb*'°R'); + attribute <'Btu_th/(lb⋅°R)'> 'British thermal unit (th) per pound degree Rankine' : SpecificHeatCapacityUnit = Btu_th/(lb*'°R'); + attribute <'Btu_IT/s'> 'British thermal unit (IT) per second' : PowerUnit = Btu_IT/s; + attribute <'Btu_th/s'> 'British thermal unit (th) per second' : PowerUnit = Btu_th/s; + attribute <'Btu_IT/(s⋅ft²⋅°F)'> 'British thermal unit (IT) per second square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_IT/(s*ft^2*'°F'); + attribute <'Btu_th/(s⋅ft²⋅°F)'> 'British thermal unit (th) per second square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_th/(s*ft^2*'°F'); + //attribute <'Btu_IT/ft²'> 'British thermal unit (IT) per square foot' : SurfaceHeatDensityUnit = Btu_IT/ft^2; + //attribute <'Btu_th/ft²'> 'British thermal unit (th) per square foot' : SurfaceHeatDensityUnit = Btu_th/ft^2; + attribute <'Btu_IT/(ft²⋅h)'> 'British thermal unit (IT) per square foot hour' : DensityOfHeatFlowRateUnit = Btu_IT/(ft^2*h); + attribute <'Btu_th/(ft²⋅h)'> 'British thermal unit (th) per square foot hour' : DensityOfHeatFlowRateUnit = Btu_th/(ft^2*h); + attribute <'Btu_th/(ft²⋅min)'> 'British thermal unit (th) per square foot minute' : DensityOfHeatFlowRateUnit = Btu_th/(ft^2*min); + attribute <'Btu_IT/(ft²⋅s)'> 'British thermal unit (IT) per square foot second' : DensityOfHeatFlowRateUnit = Btu_IT/(ft^2*s); + attribute <'Btu_th/(ft²⋅s)'> 'British thermal unit (th) per square foot second' : DensityOfHeatFlowRateUnit = Btu_th/(ft^2*s); + attribute <'Btu_th/(in²⋅s)'> 'British thermal unit (th) per square inch second' : DensityOfHeatFlowRateUnit = Btu_th/('in'^2*s); + attribute 'bushel (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 3.523907E-02; :>> isExact = false; } } + attribute <'cd/in²'> 'candela per square inch' : LuminanceUnit = cd/'in'^2; + attribute 'chain (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.011684E+01; :>> isExact = false; } } + attribute 'circular mil' : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2; :>> conversionFactor = 5.067075E-10; :>> isExact = false; } } + attribute 'clo' : ThermalInsulanceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2*K/W; :>> conversionFactor = 1.55E-01; :>> isExact = false; } } + attribute 'cord (128 ft^3)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 3.624556E+00; :>> isExact = false; } } + attribute <'ft³'> 'cubic foot' : VolumeUnit = ft^3; + attribute <'ft³/min'> 'cubic foot per minute' : VolumeFlowRateUnit = ft^3/min; + attribute <'ft³/s'> 'cubic foot per second' : VolumeFlowRateUnit = ft^3/s; + attribute <'in³'> 'cubic inch' : VolumeUnit = 'in'^3; + attribute <'in³/min'> 'cubic inch per minute' : VolumeFlowRateUnit = 'in'^3/min; + attribute <'mi³'> 'cubic mile' : VolumeUnit = mi^3; + attribute <'yd³'> 'cubic yard' : VolumeUnit = yd^3; + attribute <'yd³/min'> 'cubic yard per minute' : VolumeFlowRateUnit = yd^3/min; + attribute 'cup (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.365882E-04; :>> isExact = false; } } + attribute <'°F'> 'degree Fahrenheit (temperature difference)' : TemperatureDifferenceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = K; :>> conversionFactor = 5/9; :>> isExact = true; } } + attribute <'°F⋅h/Btu_IT'> 'degree Fahrenheit hour per British thermal unit (IT)' : ThermalResistanceUnit = '°F'*h/Btu_IT; + attribute <'°F⋅h/Btu_th'> 'degree Fahrenheit hour per British thermal unit (th)' : ThermalResistanceUnit = '°F'*h/Btu_th; + attribute <'°F⋅h⋅ft²/Btu_IT'> 'degree Fahrenheit hour square foot per British thermal unit (IT)' : ThermalInsulanceUnit = '°F'*h*ft^2/Btu_IT; + attribute <'°F⋅h⋅ft²/Btu_th'> 'degree Fahrenheit hour square foot per British thermal unit (th)' : ThermalInsulanceUnit = '°F'*h*ft^2/Btu_th; + //attribute <'°F⋅h⋅ft²/(Btu_IT⋅in)'> 'degree Fahrenheit hour square foot per British thermal unit (IT) inch' : ThermalResistivityUnit = '°F'*h*ft^2/(Btu_IT*'in'); + //attribute <'°F⋅h⋅ft²/(Btu_th⋅in)'> 'degree Fahrenheit hour square foot per British thermal unit (th) inch' : ThermalResistivityUnit = '°F'*h*ft^2/(Btu_th*'in'); + attribute <'°F⋅s/Btu_IT'> 'degree Fahrenheit second per British thermal unit (IT)' : ThermalResistanceUnit = '°F'*s/Btu_IT; + attribute <'°F⋅s/Btu_th'> 'degree Fahrenheit second per British thermal unit (th)' : ThermalResistanceUnit = '°F'*s/Btu_th; + attribute <'°R'> 'degree Rankine' : ThermodynamicTemperatureUnit, TemperatureDifferenceUnit { + :>> unitConversion: ConversionByConvention { :>> referenceUnit = K; :>> conversionFactor = 5/9; :>> isExact = true; } + :>> ThermodynamicTemperatureUnit::quantityDimension, TemperatureDifferenceUnit::quantityDimension { + :>> ThermodynamicTemperatureUnit::quantityDimension::quantityPowerFactors, TemperatureDifferenceUnit::quantityDimension::quantityPowerFactors; + } + } + attribute 'fathom (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.828804E+00; :>> isExact = false; } } + attribute 'fluid ounce (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.957353E-05; :>> isExact = false; } } + attribute 'foot' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.048E-01; } } + attribute 'foot (US survey)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.048006E-01; :>> isExact = false; } } + attribute 'footcandle' : IlluminanceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = lx; :>> conversionFactor = 1.076391E+01; :>> isExact = false; } } + attribute 'footlambert' : LuminanceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = cd/m^2; :>> conversionFactor = 3.426259E+00; :>> isExact = false; } } + attribute 'foot of mercury, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 4.063666E+04; :>> isExact = false; } } + attribute 'foot of water (39.2 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.98898E+03; :>> isExact = false; } } + attribute 'foot of water, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.989067E+03; :>> isExact = false; } } + attribute <'ft/h'> 'foot per hour' : SpeedUnit = ft/h; + attribute <'ft/min'> 'foot per minute' : SpeedUnit = ft/min; + attribute <'ft/s'> 'foot per second' : SpeedUnit = ft/s; + attribute <'ft/s²'> 'foot per second squared' : AccelerationUnit = ft/s^2; + attribute 'foot poundal' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 4.214011E-02; :>> isExact = false; } } + attribute <'ft⋅lbf'> 'foot pound-force' : EnergyUnit = ft*lbf; + attribute <'ft⋅lbf/h'> 'foot pound-force per hour' : PowerUnit = ft*lbf/h; + attribute <'ft⋅lbf/min'> 'foot pound-force per minute' : PowerUnit = ft*lbf/min; + attribute <'ft⋅lbf/s'> 'foot pound-force per second' : PowerUnit = ft*lbf/s; + attribute <'ft⁴'> 'foot to the fourth power' : SecondAxialMomentOfAreaUnit = ft^4; + attribute 'gallon (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 3.785412E-03; :>> isExact = false; } } + attribute <'gal/d'> 'gallon (US) per day' : VolumeFlowRateUnit = gal/d; + //attribute <'gal/(hp⋅h)'> 'gallon (US) per horsepower hour' : EnergySpecificVolumeUnit = gal/(hp*h); + attribute <'gal/min'> 'gallon (US) per minute (gpm)' : VolumeFlowRateUnit = gal/min; + attribute 'gill (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.182941E-04; :>> isExact = false; } } + attribute 'grain' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 6.479891E-05; } } + attribute <'gr/gal'> 'grain per gallon (US)' : MassDensityUnit = gr/gal; + attribute 'horsepower (550 ft*lbf/s)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 7.456999E+02; :>> isExact = false; } } + attribute 'horsepower (boiler)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 9.80950E+03; :>> isExact = false; } } + attribute 'horsepower (electric)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 7.46E+02; } } + attribute 'horsepower (water)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 7.46043E+02; :>> isExact = false; } } + attribute 'hundredweight (long, 112 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 5.080235E+01; :>> isExact = false; } } + attribute 'hundredweight (short, 100 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 4.535924E+01; :>> isExact = false; } } + attribute <'in'> 'inch' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.54E-02; } } + attribute 'inch of mercury (32 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 3.38638E+03; :>> isExact = false; } } + attribute 'inch of mercury (60 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 3.37685E+03; :>> isExact = false; } } + attribute 'inch of mercury, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 3.386389E+03; :>> isExact = false; } } + attribute 'inch of water (39.2 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.49082E+02; :>> isExact = false; } } + attribute 'inch of water (60 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.4884E+02; :>> isExact = false; } } + attribute 'inch of water, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.490889E+02; :>> isExact = false; } } + attribute <'in/s'> 'inch per second' : SpeedUnit = 'in'/s; + attribute <'in/s²'> 'inch per second squared' : AccelerationUnit = 'in'/s^2; + attribute <'in⁴'> 'inch to the fourth power' : SecondAxialMomentOfAreaUnit = 'in'^4; + attribute 'kip (1 kip = 1000 lbf)' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 4.448222E+03; :>> isExact = false; } } + attribute <'kip/in²'> 'kip per square inch (ksi)' : PressureUnit = kip/'in'^2; + attribute 'knot (nautical mile per hour)' : SpeedUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m/s; :>> conversionFactor = 5.144444E-01; :>> isExact = false; } } + //attribute <'cal_th/cm²'> 'langley' : SurfaceHeatDensityUnit = cal_th/cm^2; + attribute <'lm/ft²'> 'lumen per square foot' : IlluminanceUnit = lm/ft^2; + attribute 'microinch' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.54E-08; } } + attribute 'mil (0.001 in)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.54E-05; } } + attribute 'mile' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.609344E+03; } } + attribute 'mile (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.609347E+03; :>> isExact = false; } } + attribute 'mile, nautical' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.852E+03; } } + alias NM for nmi; + //attribute <'mi/gal'> 'mile per gallon (US)' : FuelEconomyUnit = mi/gal; + //alias mpg for 'mi/gal'; + attribute <'mi/h'> 'mile per hour' : SpeedUnit = mi/h; + alias mph for 'mi/h'; + attribute <'mi/min'> 'mile per minute' : SpeedUnit = mi/min; + attribute <'mi/s'> 'mile per second' : SpeedUnit = mi/s; + attribute 'ohm circular-mil per foot' : ResistivityUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = 'Ω'*m; :>> conversionFactor = 1.662426E-09; :>> isExact = false; } } + attribute 'ounce (avoirdupois)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 2.834952E-02; :>> isExact = false; } } + attribute 'ounce (US fluid)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.957353E-05; :>> isExact = false; } } + attribute 'ounce (avoirdupois)-force' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 2.780139E-01; :>> isExact = false; } } + attribute <'ozf⋅in'> 'ounce (avoirdupois)-force inch' : MomentOfForceUnit = ozf*'in'; + attribute <'oz/in³'> 'ounce (avoirdupois) per cubic inch' : MassDensityUnit = oz/'in'^3; + attribute <'oz/gal'> 'ounce (avoirdupois) per gallon (US)' : MassDensityUnit = oz/gal; + attribute <'oz/ft²'> 'ounce (avoirdupois) per square foot' : SurfaceMassDensityUnit = oz/ft^2; + attribute <'oz/in²'> 'ounce (avoirdupois) per square inch' : SurfaceMassDensityUnit = oz/'in'^2; + attribute <'oz/yd²'> 'ounce (avoirdupois) per square yard' : SurfaceMassDensityUnit = oz/yd^2; + attribute 'peck (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 8.809768E-03; :>> isExact = false; } } + //attribute 'perm (0 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/(Pa*s*m^2); :>> conversionFactor = 5.72135E-11; :>> isExact = false; } } + //attribute 'perm (23 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/(Pa*s*m^2); :>> conversionFactor = 5.74525E-11; :>> isExact = false; } } + //attribute 'perm inch (0 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/('Pa·s·m'); :>> conversionFactor = 1.45322E-12; :>> isExact = false; } } + //attribute 'perm inch (23 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/('Pa·s·m'); :>> conversionFactor = 1.45929E-12; :>> isExact = false; } } + attribute 'pica (computer) (1/6 in)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 4.233333E-03; :>> isExact = false; } } + attribute 'pica (printer′s)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 4.217518E-03; :>> isExact = false; } } + attribute 'pint (US dry)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 5.506105E-04; :>> isExact = false; } } + attribute 'pint (US liquid)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 4.731765E-04; :>> isExact = false; } } + attribute 'point (computer) (1/72 in)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.527778E-04; :>> isExact = false; } } + attribute 'point (printer′s)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.514598E-04; :>> isExact = false; } } + attribute 'pound (avoirdupois)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 4.535924E-01; :>> isExact = false; } } + attribute <'lb⋅ft²'> 'pound foot squared' : MomentOfInertiaUnit = lb*ft^2; + attribute 'pound-force' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 4.448222E+00; :>> isExact = false; } } + attribute <'lbf⋅ft'> 'pound-force foot' : MomentOfForceUnit = lbf*ft; + attribute <'lbf⋅ft/in'> 'pound-force foot per inch' : ForceUnit = lbf*ft/'in'; + attribute <'lbf⋅in'> 'pound-force inch' : MomentOfForceUnit = lbf*'in'; + attribute <'lbf⋅in/in'> 'pound-force inch per inch' : ForceUnit = lbf*'in'/'in'; + attribute <'lbf/ft'> 'pound-force per foot' : SurfaceTensionUnit = lbf/ft; + attribute <'lbf/in'> 'pound-force per inch' : SurfaceTensionUnit = lbf/'in'; + //attribute 'pound-force per pound (lbf/lb) (thrust to mass ratio)' : ThrustToMassRatioUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N/kg; :>> conversionFactor = 9.80665E+00; } } + attribute <'lbf/ft²'> 'pound-force per square foot' : PressureUnit = lbf/ft^2; + attribute <'lbf/in²'> 'pound-force per square inch' : PressureUnit = lbf/'in'^2; + alias psi for 'lbf/in²'; + attribute <'lbf⋅s/ft²'> 'pound-force second per square foot' : DynamicViscosityUnit = lbf*s/ft^2; + attribute <'lbf⋅s/in²'> 'pound-force second per square inch' : DynamicViscosityUnit = lbf*s/'in'^2; + attribute <'lb⋅in²'> 'pound inch squared' : MomentOfInertiaUnit = lb*'in'^2; + attribute <'lb/ft³'> 'pound per cubic foot' : MassDensityUnit = lb/ft^3; + attribute <'lb/in³'> 'pound per cubic inch' : MassDensityUnit = lb/'in'^3; + attribute <'lb/yd³'> 'pound per cubic yard' : MassDensityUnit = lb/yd^3; + attribute <'lb/ft'> 'pound per foot' : LinearMassDensityUnit = lb/ft; + attribute <'lb/(ft⋅h)'> 'pound per foot hour' : DynamicViscosityUnit = lb/(ft*h); + attribute <'lb/(ft⋅s)'> 'pound per foot second' : DynamicViscosityUnit = lb/(ft*s); + attribute <'lb/gal'> 'pound per gallon (US)' : MassDensityUnit = lb/gal; + //attribute <'lb/(hp⋅h)'> 'pound per horsepower hour' : FuelConsumptionUnit = lb/(hp*h); + attribute <'lb/h'> 'pound per hour' : MassFlowRateUnit = lb/h; + attribute <'lb/in'> 'pound per inch' : LinearMassDensityUnit = lb/'in'; + attribute <'lb/min'> 'pound per minute' : MassFlowRateUnit = lb/min; + attribute <'lb/s'> 'pound per second' : MassFlowRateUnit = lb/s; + attribute <'lb/ft²'> 'pound per square foot' : SurfaceMassDensityUnit = lb/ft^2; + attribute <'lb/in²'> 'pound per square inch (not pound-force)' : SurfaceMassDensityUnit = lb/'in'^2; + attribute <'lb/yd'> 'pound per yard' : LinearMassDensityUnit = lb/yd; + attribute 'pound-force per square inch (psi)' : PressureUnit = lbf/'in'^2; + attribute 'quad (10^15 Btu_IT)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.055056E+18; :>> isExact = false; } } + attribute 'quart (US dry)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.101221E-03; :>> isExact = false; } } + attribute 'quart (US liquid)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 9.463529E-04; :>> isExact = false; } } + attribute 'rod (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 5.029210E+00; :>> isExact = false; } } + attribute 'slug' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.459390E+01; :>> isExact = false; } } + attribute <'slug/ft³'> 'slug per cubic foot' : MassDensityUnit = slug/ft^3; + attribute <'slug/(ft⋅s)'> 'slug per foot second' : DynamicViscosityUnit = slug/(ft*s); + attribute <'ft²'> 'square foot' : AreaUnit = ft^2; + attribute <'ft²/h'> 'square foot per hour' : KinematicViscosityUnit = ft^2/h; + attribute <'ft²/s'> 'square foot per second' : KinematicViscosityUnit = ft^2/s; + attribute <'in²'> 'square inch' : AreaUnit = 'in'^2; + attribute <'mi²'> 'square mile' : AreaUnit = mi^2; + attribute 'square mile (based on US survey foot)' : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2; :>> conversionFactor = 2.589998E+06; :>> isExact = false; } } + attribute <'yd²'> 'square yard' : AreaUnit = yd^2; + attribute 'tablespoon' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.478676E-05; :>> isExact = false; } } + attribute 'teaspoon' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 4.928922E-06; :>> isExact = false; } } + attribute 'therm (EC)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05506E+08; } } + attribute 'therm (US)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.054804E+08; } } + attribute 'ton, assay' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 2.916667E-02; :>> isExact = false; } } + attribute 'ton-force (2000 lbf)' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 8.896443E+03; :>> isExact = false; } } + attribute 'ton, long (2240 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.016047E+03; :>> isExact = false; } } + attribute 'ton, long, per cubic yard' : MassDensityUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/m^3; :>> conversionFactor = 1.328939E+03; :>> isExact = false; } } + attribute 'ton of refrigeration (12 000 Btu_IT/h)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 3.516853E+03; :>> isExact = false; } } + attribute 'ton, register' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.831685E+00; :>> isExact = false; } } + attribute 'ton, short (2000 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 9.071847E+02; :>> isExact = false; } } + attribute 'ton, short, per cubic yard' : MassDensityUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/m^3; :>> conversionFactor = 1.186553E+03; :>> isExact = false; } } + attribute 'ton, short, per hour' : MassFlowRateUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/s; :>> conversionFactor = 2.519958E-01; :>> isExact = false; } } + attribute 'unit pole' : MagneticFluxUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Wb; :>> conversionFactor = 1.256637E-07; :>> isExact = false; } } + attribute <'W/in²'> 'watt per square inch' : DensityOfHeatFlowRateUnit = W/'in'^2; + attribute 'yard' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 9.144E-01; } } + + + attribute <'°F_abs'> 'degree fahrenheit (absolute temperature scale)' : IntervalScale { + doc + /* + * degree Fahrenheit interval scale for absolute (thermodynamic) temperature quantities + * + * The interval scale is defined with an explicit transformation with respect to + * the kelvin thermodynamic temperature scale that specifies the zero shift. + */ + + :>> unit = '°F'; + private attribute temperatureWaterAtFreezingPointInF: DefinitionalQuantityValue { + :>> num = 32.0; + :>> definition = "temperature in degree Fahrenheit of pure water at freezing point"; + } + private attribute fahrenheitToCelsiusScaleMapping: QuantityValueMapping { + :>> mappedQuantityValue = temperatureWaterAtFreezingPointInF; + :>> referenceQuantityValue = '°C_abs'.temperatureWaterAtFreezingPointInC; + + } + attribute :>> definitionalQuantityValues = temperatureWaterAtFreezingPointInF; + attribute :>> quantityValueMapping = fahrenheitToCelsiusScaleMapping; + + /* CoordinateFramePlacement (zero shift) w.r.t. the kelvin thermodynamic temperature scale */ + private attribute zeroDegreeFahrenheitInKelvin: ThermodynamicTemperatureValue = 229835/900 [K]; + attribute zeroDegreeFahrenheitToKelvinShift : CoordinateFramePlacement :>> transformation { + :>> source = K; :>> origin = zeroDegreeFahrenheitInKelvin; + } + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/VectorCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/VectorCalculations.sysml new file mode 100644 index 00000000..16ed8b0c --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/VectorCalculations.sysml @@ -0,0 +1,62 @@ +standard library package VectorCalculations { + doc + /* + * This package package defines calculations for the construction of and computations on VectorQuantityValues. + */ + + private import ScalarValues::Boolean; + private import ScalarValues::Number; + private import Quantities::ScalarQuantityValue; + private import Quantities::VectorQuantityValue; + private import MeasurementReferences::VectorMeasurementReference; + private import MeasurementReferences::CoordinateTransformation; + + calc def '[' :> BaseFunctions::'[' { + in elements: Number[1..n] ordered; + in mRef: VectorMeasurementReference[1]; + return quantity : VectorQuantityValue[1]; + private attribute n = mRef.flattenedSize; + } + + calc def isZeroVectorQuantity :> VectorFunctions::isZeroVector { + in : VectorQuantityValue[1]; + return : Boolean[1]; + } + calc def isUnitVectorQuantity { + in : VectorQuantityValue[1]; + return : Boolean[1]; + } + + /* Addition and subtraction */ + calc def '+' :> VectorFunctions::'+' { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def '-' :> VectorFunctions::'-' { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; } + + /* Multiplication and division */ + calc def scalarVectorMult :> VectorFunctions::scalarVectorMult { in : Number[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def vectorScalarMult :> VectorFunctions::vectorScalarMult { in : VectorQuantityValue[1]; in : Number[1]; return : VectorQuantityValue[1]; } + calc def scalarQuantityVectorMult { in : ScalarQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def vectorScalarQuantityMult { in : VectorQuantityValue[1]; in : ScalarQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def vectorScalarDiv :> VectorFunctions::vectorScalarDiv { in : VectorQuantityValue[1]; in : Number[1]; return : VectorQuantityValue[1]; } + calc def vectorScalarQuantityDiv { in : VectorQuantityValue[1]; in : ScalarQuantityValue[1]; return : VectorQuantityValue[1]; } + calc def inner :> VectorFunctions::inner { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : Number[1]; } + calc def outer { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; } + + alias '*' for scalarVectorMult; + + /* Norm and angle */ + calc def norm :> VectorFunctions::norm { in : VectorQuantityValue[1]; return : Number[1]; } + calc def angle :> VectorFunctions::angle { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : Number[1]; } + + /* Coordinate transformation */ + calc def transform { + in transformation : CoordinateTransformation; + in sourceVector : VectorQuantityValue { + :>> mRef = transformation.source; + } + return targetVector : VectorQuantityValue { + :>> mRef = transformation.target { + :>> dimensions = sourceVector.mRef.dimensions; + } + } + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/DerivationConnections.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/DerivationConnections.sysml new file mode 100644 index 00000000..a2ce5318 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/DerivationConnections.sysml @@ -0,0 +1,63 @@ +standard library package DerivationConnections { + doc + /* + * This package provides a library model for derivation connections between requirements. + */ + + private import SequenceFunctions::excludes; + private import ControlFunctions::allTrue; + + requirement originalRequirements[*] { + doc /* originalRequirements are the original requirements in Derivation connections. */ + } + requirement derivedRequirements[*] { + doc /* derivedRequirements are the derived requirments in Derivation connections. */ + } + + abstract connection def Derivation { + doc + /* + * A Derivation connection asserts that one or more derivedRequirements are derived from + * a single originalRequirement. This means that any subject that satisfies the + * originalRequirement should, in itself or though other things related to it, satisfy + * each of the derivedRequirements. + * + * A connection usage typed by Derivation must have requirement usages for all its ends. + * The single end for the originalRequirement should subset originalRequirement, while + * the rest of the ends should subset derivedRequirements. + */ + + // Note: This redefinition causes a distinguishibility problem for binary connections, becuse + // participant is already redefined for them to limit the multiplicity to 2. + // ref requirement :>> participant { + // doc /* All the participants in a Derivation must be requirements. */ + // } + + ref requirement originalRequirement[1] :>> originalRequirements :> participant { + doc /* The single original requirement. */ + } + ref requirement :>> derivedRequirements[1..*] :> participant { + doc /* The one or more requirements that are derived from the original requirement. */ + } + + private assert constraint originalNotDerived { + doc /* The original requirement must not be a derived requirement. */ + + derivedRequirements->excludes(originalRequirement) + } + + private assert constraint originalImpliesDerived { + doc + /* + * Whenever the originalRequirement is satisfied, all of the derivedRequirements must also + * be satisfied. + */ + + originalRequirement.result implies allTrue(derivedRequirements.result) + } + } + + abstract connection derivations : Derivation[*] { + doc /* derivations is the base feature for Derivation connection usages. */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml new file mode 100644 index 00000000..51c76dc1 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml @@ -0,0 +1,39 @@ +standard library package RequirementDerivation { + doc /* This package provides language-extension metadata for modeling requirement derivation. */ + + public import DerivationConnections::*; + private import Metaobjects::SemanticMetadata; + + metadata def OriginalRequirementMetadata :> SemanticMetadata { + doc + /* + * OriginalRequirementMetadata identifies a usage as an original requirement. + * It is intended to be used to tag the original requirement end of a Derivation. + */ + + :> annotatedElement : SysML::Usage; + :>> baseType = originalRequirements meta SysML::Usage; + } + + metadata def DerivedRequirementMetadata :> SemanticMetadata { + doc + /* + * DerivedRequirementMetadata identifies a usage as a derived requirement. + * It is intended to be used to tag the derived requirement ends of a Derivation. + */ + + :> annotatedElement : SysML::Usage; + :>> baseType = derivedRequirements meta SysML::Usage; + } + + metadata def DerivationMetadata :> SemanticMetadata { + doc + /* + * DerivationMetadata is SemanticMetadata for a Derivation connection. + */ + + :> annotatedElement : SysML::ConnectionDefinition; + :> annotatedElement : SysML::ConnectionUsage; + :>> baseType = derivations meta SysML::Usage; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/Collections.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/Collections.kerml new file mode 100644 index 00000000..169b6c6c --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/Collections.kerml @@ -0,0 +1,147 @@ +standard library package Collections { + doc + /* + * This package defines a standard set of Collection data types. Unlike sequences of values + * defined directly using multiplicity, these data types allow for the possibility of collections + * as elements of collections. + */ + + private import Base::*; + private import ScalarValues::*; + private import SequenceFunctions::size; + private import IntegerFunctions::*; + private import ControlFunctions::*; + + abstract datatype Collection { + doc + /* + * Collection is the top level abstract supertype of all collection types. + * The name elements is used to denote the members or contents of the collection. + */ + + feature elements[0..*] nonunique; + } + + abstract datatype OrderedCollection :> Collection { + doc + /* + * OrderedCollection is the abstract supertype for all ordered collection types. + */ + + feature elements[0..*] ordered nonunique :>> Collection::elements; + } + + abstract datatype UniqueCollection :> Collection { + doc + /* + * UniqueCollection is the abstract supertype for all collection types with unique elements. + */ + + feature elements[0..*] :>> Collection::elements { + /* Note: Redefinition of 'elements' is unique by default. */ + } + } + + datatype Array :> OrderedCollection { + doc + /* + * An Array is a fixed size, multi-dimensional Collection of which the elements are nonunique and ordered. + * Its dimensions specify how many dimensions the array has, and how many elements there are in each dimension. + * The rank is equal to the number of dimensions. The flattenedSize is equal to the total number of elements + * in the array. + * + * Feature elements is a flattened sequence of all elements of an Array and can be accessed by a tuple of indices. + * The number of indices is equal to rank. The elements are packed according to row-major convention, as in the C programming language. + * + * The elements of an Array can be assessed by a tuple of indices. The number of indices in such tuple is equal to rank. + * The packing of the elements, i.e. the flattened representation, follows the row-major convention, + * as in the C programming language. + * + * Note 1. Feature dimensions may be empty, which denotes a zero dimensional array, allowing an Array to collapse to a single element. + * This is useful to allow for specialization of an Array into a type restricted to represent a scalar. + * The flattenedSize of a zero dimensional array is 1. + * + * Note 2: An Array can represent the generalized mathematical concept of an infinite matrix of any rank, i.e. not limited to rank two. + */ + + feature dimensions: Positive[0..*] ordered nonunique { + doc + /* Feature `dimensions` defines the N-dimensional shape of the Array + * The alternative name `shape` (as used in many programming languages) is not used as it would interfere with a geometric shape feature. + */ + } + feature rank: Natural[1] = size(dimensions); + feature flattenedSize: Positive[1] = dimensions->reduce '*' ?? 1; + inv { flattenedSize == size(elements) } + } + + datatype Bag :> Collection { + doc + /* + * Bag is a variable-size, unordered collection of nonunique elements. + */ + } + + datatype Set :> UniqueCollection { + doc + /* + * Set is a variable-size, unordered collection of unique elements. + */ + } + + datatype OrderedSet :> OrderedCollection, UniqueCollection + intersects OrderedCollection, UniqueCollection { + doc + /* + * OrderedSet is a variable-size, ordered collection of unique elements. + */ + + feature elements[0..*] ordered :>> OrderedCollection::elements, UniqueCollection::elements { + /* Note: Redefinition of `elements` is unique by default. */ + } + } + + datatype List :> OrderedCollection { + doc + /* + * List is a variable-size, ordered collection of nonunique elements. + */ + } + + datatype KeyValuePair { + doc + /* + * KeyValuePair is a tuple of a key and a value for use in Map collections. + * The key must be immutable. + */ + + feature key: Anything[0..*] ordered nonunique; + feature val: Anything[0..*] ordered nonunique; + } + + datatype Map :> Collection { + doc + /* + * Map is a variable-size, unordered collection of elements that are key-value pairs. + */ + + feature elements: KeyValuePair[0..*] :>> Collection::elements { + /* Note: Redefinition of `elements` is unique by default. + * The `key` of any `KeyValuePair` must be unique over the collection of `KeyValuePair`. + * The `val` does not need to be unique. + */ + } + } + + datatype OrderedMap :> Map { + doc + /* + * OrderedMap is a variable-size, ordered collection of elements that are key-value pairs. + */ + + feature elements: KeyValuePair[0..*] ordered :>> Map::elements { + /* Note: Redefinition of `elements` is unique by default. */ + } + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml new file mode 100644 index 00000000..d0d9b595 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml @@ -0,0 +1,23 @@ +standard library package ScalarValues { + doc + /* + * This package contains a basic set of primitive scalar (non-collection) data types. + * These include Boolean and String types and a hierarchy of concrete Number types, from + * the most general type of Complex numbers to the most specific type of Positive integers.

+ */ + + private import Base::DataValue; + + abstract datatype ScalarValue specializes DataValue; + datatype Boolean specializes ScalarValue; + datatype String specializes ScalarValue; + abstract datatype NumericalValue specializes ScalarValue; + + abstract datatype Number specializes NumericalValue; + datatype Complex specializes Number; + datatype Real specializes Complex; + datatype Rational specializes Real; + datatype Integer specializes Rational; + datatype Natural specializes Integer; + datatype Positive specializes Natural; +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml new file mode 100644 index 00000000..29fdd633 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml @@ -0,0 +1,64 @@ +standard library package VectorValues { + doc + /* + * This package provides a basic model of abstract vectors as well as concrete vectors + * whose components are numerical values. The package VectorFunctions defines the + * corresponding vector-space functions. + */ + + private import ScalarValues::NumericalValue; + private import ScalarValues::Real; + private import Collections::Array; + + abstract datatype VectorValue { + doc + /* + * A VectorValue is an abstract data type whose values may be operated on using + * VectorFunctions. + */ + } + + datatype NumericalVectorValue :> VectorValue, Array intersects VectorValue, Array { + doc + /* + * A NumericalVectorValue is a kind of VectorValue that is specifically represented + * as a one-dimensional array of NumericalValues. The dimension is allowed to be empty, + * permitting a NumericalVectorValue of rank 0, which is essentially isomorphic to a + * scalar NumericalValue. + */ + + feature dimension[0..1] :>> dimensions; + feature :>> elements : NumericalValue; + } + + datatype CartesianVectorValue :> NumericalVectorValue { + doc + /* + * CartesianVectorValue is a specialization Numerical VectorValue for which there are + * specific implementations in VectorFunctions of the abstract vector-space functions. + * + * Note: The restriction of the element type to Real is to facilitate + * the complete definition of these functions. + */ + + feature :>> elements : Real; + } + + datatype ThreeVectorValue :> NumericalVectorValue { + doc + /* + * A ThreeVectorValue is a NumericalVectorValue that has dimension 3. + */ + + feature :>> dimension = 3; + } + + datatype CartesianThreeVectorValue :> CartesianVectorValue, ThreeVectorValue + intersects CartesianVectorValue, ThreeVectorValue { + doc + /* + * A CartesianThreeVectorValue is a NumericalVectorValue that is both Cartesian and + * has dimension 3. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml new file mode 100644 index 00000000..90e941ae --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml @@ -0,0 +1,80 @@ +standard library package BaseFunctions { + doc + /* + * This package defines a basic set of functions defined on all kinds of values. + * Most correspond to similarly named operators in the KerML expression syntax. + */ + + private import Base::Anything; + private import Objects::Object; + private import Metaobjects::Metaobject; + private import KerML::Metaclass; + private import ScalarValues::*; + + abstract function '=='{ in x: Anything[0..1]; in y: Anything[0..1]; + return : Boolean[1]; + } + function '!='{ in x: Anything[0..1]; in y: Anything[0..1]; + return : Boolean[1] = not (x == y); + } + + abstract function '==='{ in x: Anything[0..1]; in y: Anything[0..1]; + return : Boolean[1]; + } + function '!=='{ in x: Anything[0..1]; in y: Anything[0..1]; + return : Boolean[1] = not (x === y); + } + + abstract function ToString{ in x: Anything[0..1]; + return : String; + } + + abstract function '['{ in x: Anything[0..*] nonunique; in y: Anything[0..*] nonunique; + return : Anything[0..*] nonunique; + } + abstract function '#'{ in seq: Anything[0..*] ordered nonunique; in index: Positive[1..*] ordered nonunique; + return : Anything[0..1]; + } + abstract function ','{ in seq1: Anything[0..*] ordered nonunique; in seq2: Anything[0..*] ordered nonunique; + return : Anything[0..*] ordered nonunique; + } + + abstract function 'all'{ + return : Object[0..*]; + } + + abstract function 'istype'{ + in seq: Anything[0..*]; + in 'type': Anything; + return : Boolean[1]; + } + + abstract function 'hastype'{ + in seq: Anything[0..*]; + in 'type': Anything; + return : Boolean; + } + + abstract function '@'{ + in seq: Anything[0..*]; + in 'type': Anything; + return : Boolean[1]; + } + + abstract function '@@'{ + in seq: Metaobject[0..*]; + in 'type': Metaobject; + return : Boolean[1]; + } + + abstract function 'as'{ + in seq: Anything[0..*] ordered nonunique; + return : Anything[0..*] ordered nonunique; + } + + abstract function 'meta'{ + in seq: Metaobject[0..*] ordered nonunique; + return : Metaobject[0..*] ordered nonunique; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml new file mode 100644 index 00000000..cf3e0510 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml @@ -0,0 +1,22 @@ +standard library package BooleanFunctions { + doc + /* + * This package defines functions on Boolean values, including those corresponding to + * (non-conditional) logical operators in the KerML expression notation. + */ + + public import ScalarValues::*; + + function 'not' specializes ScalarFunctions::'not' { in x: Boolean[1]; return : Boolean[1]; } + function 'xor' specializes ScalarFunctions::'xor' { in x: Boolean[1]; in y: Boolean[1]; return : Boolean[1]; } + + function '|' specializes ScalarFunctions::'|' { in x: Boolean[1]; in y: Boolean[1]; return : Boolean[1]; } + function '&' specializes ScalarFunctions::'&' { in x: Boolean[1]; in y: Boolean[1]; return : Boolean[1]; } + + function '==' specializes DataFunctions::'==' { in x: Boolean[0..1]; in y: Boolean[0..1]; return : Boolean[1]; } + + function ToString specializes BaseFunctions::ToString { in x: Boolean[1]; return : String[1]; } + function ToBoolean { in x: String[1]; return : Boolean[1]; } + +} + diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml new file mode 100644 index 00000000..e44e49d4 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml @@ -0,0 +1,68 @@ +standard library package CollectionFunctions { + doc + /* + * This package defines functions on Collections (as defined in the Collections package). + * For functions on general sequences of values, see the SequenceFunctions package. + */ + + private import Base::Anything; + private import ScalarValues::*; + private import SequenceFunctions::equals; + private import SequenceFunctions::includes; + private import ControlFunctions::exists; + public import Collections::*; + + function '==' specializes BaseFunctions::'==' { in col1: Collection[0..1]; in col2: Collection[0..1]; + return : Boolean[1] = col1.elements->equals(col2.elements); + } + + function size { in col: Collection[1]; + return : Natural[1] = SequenceFunctions::size(col.elements); + } + + function isEmpty { in col: Collection[1]; + return : Boolean[1] = SequenceFunctions::isEmpty(col.elements); + } + + function notEmpty { in col: Collection[1]; + return : Boolean[1] = SequenceFunctions::notEmpty(col.elements); + } + + function contains { in col: Collection[1]; in values: Anything[*]; + return : Boolean[1] = col.elements->includes(values); + } + + function containsAll { in col1: Collection[1]; in col2: Collection[2]; + return : Boolean[1] = contains(col1, col2.elements); + } + + function head { in col: OrderedCollection[1]; + return : Anything[0..1] = SequenceFunctions::head(col.elements); + } + + function tail { in col: OrderedCollection[1]; + return : Anything[0..*] ordered nonunique = SequenceFunctions::tail(col.elements); + } + + function last { in col: OrderedCollection[1]; + return : Anything[0..1] = SequenceFunctions::last(col.elements); + } + + function '#' specializes BaseFunctions::'#' { in col: OrderedCollection[1]; in index: Positive[1]; + // Cast ensures this function is not called recursively if the elements of col are OrderedCollections. + return : Anything[0..1] = (col.elements as Anything)#(index); + } + + function 'array#' specializes BaseFunctions::'#' { in arr: Array[1]; in indexes: Positive[n] ordered nonunique; + private feature n : Natural[1] = arr.rank; + + // Assumes row-major ordering for elements. + private function index { in arr: Array[1]; in i : Natural; in indexes : Positive[1..*]; + if i <= 1? indexes#(1) else arr.dimensions#(i) * (index(arr, i-1, indexes) - 1) + indexes#(i) + } + + return : Anything[0..1] = + if n == 0 or (1..n)->exists {in i; indexes#(i) > arr.dimensions#(i)}? null + else arr.elements#(index(arr, n, indexes)); + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml new file mode 100644 index 00000000..03f61602 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml @@ -0,0 +1,47 @@ +standard library package ComplexFunctions { + doc + /* + * This package defines functions on Complex values, including concrete specializations of the + * general arithmetic and comparison operations. + */ + + public import ScalarValues::*; + + feature i: Complex[1] = rect(0.0, 1.0); + + function rect { in re: Real[1]; in im: Real[1]; return : Complex[1]; } + function polar { in abs: Real[1]; in arg: Real[1]; return : Complex[1]; } + + function re { in x: Complex[1]; return : Real[1]; } + function im { in x: Complex[1]; return : Real[1]; } + + function isZero specializes NumericalFunctions::isZero { in x : Complex[1]; + return : Boolean[1] = re(x) == 0.0 and im(x) == 0.0; + } + function isUnit specializes NumericalFunctions::isUnit { in x : Complex[1]; + return : Boolean[1] = re(x) == 1.0 and im(x) == 0.0; + } + + function abs specializes NumericalFunctions::abs { in x: Complex[1]; return : Real[1]; } + function arg { in x: Complex[1]; return : Real[1]; } + + function '+' specializes NumericalFunctions::'+' { in x: Complex[1]; in y: Complex[0..1]; return : Complex[1]; } + function '-' specializes NumericalFunctions::'-' { in x: Complex[1]; in y: Complex[0..1]; return : Complex[1]; } + function '*' specializes NumericalFunctions::'*' { in x: Complex[1]; in y: Complex[1]; return : Complex[1]; } + function '/' specializes NumericalFunctions::'/' { in x: Complex[1]; in y: Complex[1]; return : Complex[1]; } + function '**' specializes NumericalFunctions::'**' { in x: Complex[1]; in y: Complex[1]; return : Complex[1]; } + function '^' specializes NumericalFunctions::'^' { in x: Complex[1]; in y: Complex[1]; return : Complex[1]; } + + function '==' specializes DataFunctions::'==' { in x: Complex[0..1]; in y: Complex[0..1]; return : Boolean[1]; } + + function ToString specializes BaseFunctions::ToString { in x: Complex[1]; return : String[1]; } + function ToComplex { in x: String[1]; return : Complex[1]; } + + function sum specializes NumericalFunctions::sum { in collection: Complex[0..*]; + return : Complex[1] default NumericalFunctions::sum0(collection, rect(0.0, 0.0)); + } + + function product specializes NumericalFunctions::product { in collection: Complex[0..*]; + return : Complex[1] default NumericalFunctions::product1(collection, rect(1.0, 0.0)); + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml new file mode 100644 index 00000000..d8d7d8a6 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml @@ -0,0 +1,117 @@ +standard library package ControlFunctions { + doc + /* + * This package defines functions that correspond to operators in the KerML expression notation + * for which one or more operands are expressions whose evaluation is determined by another operand. + */ + + private import Base::Anything; + private import ScalarValues::ScalarValue; + private import ScalarValues::Boolean; + private import ScalarFunctions::min; + private import ScalarFunctions::max; + + abstract function '.' { + in feature source : Anything[0..*] nonunique { + abstract feature target : Anything[0..*] nonunique; + } + private feature chain chains source.target; + chain + } + + abstract function 'if' { + in test: Boolean[1]; + in expr thenValue[0..1] { return : Anything[0..*] ordered nonunique; } + in expr elseValue[0..1] { return : Anything[0..*] ordered nonunique; } + return : Anything[0..*] ordered nonunique; + } + + abstract function '??' { + in firstValue: Anything[0..*] ordered nonunique; + in expr secondValue[0..1] { return : Anything[0..*] ordered nonunique; } + return : Anything[0..*] ordered nonunique; + } + + function 'and' { + in firstValue: Boolean[1]; + in expr secondValue[0..1] { return : Boolean[1]; } + return : Boolean[1]; + } + + function 'or'{ + in firstValue: Boolean[1]; + in expr secondValue[0..1] { return : Boolean[1]; } + return : Boolean[1]; + } + + function 'implies'{ + in firstValue: Boolean[1]; + in expr secondValue[0..1] { return : Boolean[1]; } + return : Boolean[1]; + } + + abstract function collect { + in collection: Anything[0..*] ordered nonunique; + in expr mapper[0..*] { in argument: Anything[1]; return : Anything[0..*] ordered nonunique; } + return : Anything[0..*] ordered nonunique; + } + + abstract function select { + in collection: Anything[0..*] ordered nonunique; + in expr selector[0..*] { in argument: Anything[1]; return : Boolean[1]; } + return : Anything[0..*] ordered nonunique; + } + + function selectOne { + in collection: Anything[0..*] ordered nonunique; + in expr selector1[0..*] { in argument: Anything[1]; return : Boolean[1]; } + return : Anything[0..1] = collection->select {in x; selector1(x)}#(1); + } + + abstract function reject{ + in collection: Anything[0..*] ordered nonunique; + in expr rejector[0..*] { in argument: Anything[1]; return : Boolean[1]; } + return : Anything[0..*] ordered nonunique; + } + + abstract function reduce { + in collection: Anything[0..*] ordered nonunique; + in expr reducer[0..*] { in firstArg: Anything[1]; in secondArg: Anything[1]; return : Anything[1]; } + return : Anything[0..*] ordered nonunique; + } + + abstract function forAll { + in collection: Anything[0..*] ordered nonunique; + in expr test[0..*] { in argument: Anything[1]; return : Boolean[1]; } + return : Boolean[1]; + } + + abstract function exists { + in collection: Anything[0..*] ordered nonunique; + in expr test[0..*] { in argument: Anything[1]; return : Boolean[1]; } + return : Boolean[1]; + } + + function allTrue { + in collection: Boolean[0..*]; + return : Boolean[1] = collection->forAll {in x; x}; + } + + function anyTrue { + in collection: Boolean[0..*]; + return : Boolean[1] = collection->exists {in x; x}; + } + + function minimize { + in collection: ScalarValue[1..*]; + in expr fn[0..*] { in argument: ScalarValue[1]; return : ScalarValue[1]; } + return : ScalarValue[1] = collection->collect {in x; fn(x)}->reduce min; + } + + function maximize { + in collection: ScalarValue[1..*]; + in expr fn[0..*] { in argument: ScalarValue[1]; return : ScalarValue[1]; } + return : ScalarValue = collection->collect {in x; fn(x)}->reduce max; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/DataFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/DataFunctions.kerml new file mode 100644 index 00000000..de766341 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/DataFunctions.kerml @@ -0,0 +1,43 @@ +standard library package DataFunctions { + doc + /* + * This package defines the abstract base functions corresponding to all the unary and binary operators + * in the KerML expression notation that might be defined on various kinds of DataValues. + */ + + private import Base::DataValue; + private import ScalarValues::Boolean; + private import ControlFunctions::reduce; + + abstract function '==' specializes BaseFunctions::'==' { in x: DataValue[0..1]; in y: DataValue[0..1]; + return : Boolean[1]; + } + function '===' specializes BaseFunctions::'==='{ in x: DataValue[0..1]; in y: DataValue[0..1]; + return : Boolean[1] = x == y; + } + + abstract function '+' { in x: DataValue[1]; in y: DataValue[0..1]; return : DataValue[1]; } + abstract function '-' { in x: DataValue[1]; in y: DataValue[0..1]; return : DataValue[1]; } + abstract function '*' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + abstract function '/' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + abstract function '**' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + abstract function '^' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + abstract function '%' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + + abstract function 'not' { in x: DataValue[1]; return : DataValue[1]; } + abstract function 'xor' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + + abstract function '~' { in x: DataValue[1]; return : DataValue[1]; } + abstract function '|' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + abstract function '&' { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + + abstract function '<' { in x: DataValue[1]; in y: DataValue[1]; return : Boolean[1]; } + abstract function '>' { in x: DataValue[1]; in y: DataValue[1]; return : Boolean[1]; } + abstract function '<=' { in x: DataValue[1]; in y: DataValue[1]; return : Boolean[1]; } + abstract function '>=' { in x: DataValue[1]; in y: DataValue[1]; return : Boolean[1]; } + + abstract function max { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + abstract function min { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; } + + abstract function '..' { in lower: DataValue[1]; in upper: DataValue[1]; return : DataValue[0..*] ordered; } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml new file mode 100644 index 00000000..e53501c8 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml @@ -0,0 +1,43 @@ +standard library package IntegerFunctions { + doc + /* + * This package defines functions on Integer values, including concrete specializations of the + * general arithmetic and comparison operations. + */ + + public import ScalarValues::*; + + function abs specializes RationalFunctions::abs { in x: Integer[1]; return : Natural[1]; } + + function '+' specializes RationalFunctions::'+' { in x: Integer[1]; in y: Integer[0..1]; return : Integer[1]; } + function '-' specializes RationalFunctions::'-' { in x: Integer[1]; in y: Integer[0..1]; return : Integer[1]; } + function '*' specializes RationalFunctions::'*' { in x: Integer[1]; in y: Integer[1]; return : Integer[1]; } + function '/' specializes RationalFunctions::'/' { in x: Integer[1]; in y: Integer[1]; return : Rational[1]; } + function '**' specializes RationalFunctions::'**' { in x: Integer[1]; in y: Natural[1]; return : Integer[1]; } + function '^' specializes RationalFunctions::'^' { in x: Integer[1]; in y: Natural[1]; return : Integer[1]; } + function '%' specializes NumericalFunctions::'%' { in x: Integer[1]; in y: Integer[1]; return : Integer[1]; } + + function '<' specializes RationalFunctions::'<' { in x: Integer[1]; in y: Integer[1]; return : Boolean[1]; } + function '>' specializes RationalFunctions::'>' { in x: Integer[1]; in y: Integer[1]; return : Boolean[1]; } + function '<=' specializes RationalFunctions::'<=' { in x: Integer[1]; in y: Integer[1]; return : Boolean[1]; } + function '>=' specializes RationalFunctions::'>=' { in x: Integer[1]; in y: Integer[1]; return : Boolean[1]; } + + function max specializes RationalFunctions::max { in x: Integer[1]; in y: Integer[1]; return : Integer[1]; } + function min specializes RationalFunctions::min { in x: Integer[1]; in y: Integer[1]; return : Integer[1]; } + + function '==' specializes DataFunctions::'==' { in x: Integer[0..1]; in y: Integer[0..1]; return : Boolean[1]; } + + function '..' specializes ScalarFunctions::'..' { in lower: Integer[1]; in upper: Integer[1]; return : Integer[0..*]; } + + function ToString specializes RationalFunctions::ToString { in x: Integer[1]; return : String[1]; } + function ToNatural { in x: Integer[1]; return : Natural[1]; } + function ToInteger { in x: String[1]; return : Integer[1]; } + + function sum specializes RationalFunctions::sum { in collection: Integer[0..*]; + return : Integer[1] default NumericalFunctions::sum0(collection, 0); + } + + function product specializes RationalFunctions::product { in collection: Integer[0..*]; + return : Integer[1] default NumericalFunctions::product1(collection, 1); + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml new file mode 100644 index 00000000..76319079 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml @@ -0,0 +1,27 @@ +standard library package NaturalFunctions { + doc + /* + * This package defines functions on Natural values, including concrete specialization of the + * general arithmetic and comparison operations. + */ + + public import ScalarValues::*; + + function '+' specializes IntegerFunctions::'+' { in x: Natural[1]; in y: Natural[0..1]; return : Natural[1]; } + function '*' specializes IntegerFunctions::'*' { in x: Natural[1]; in y: Natural[1]; return : Natural[1]; } + function '/' specializes IntegerFunctions::'/' { in x: Natural[1]; in y: Natural[1]; return : Natural[1]; } + function '%' specializes IntegerFunctions::'%' { in x: Natural[1]; in y: Natural[1]; return : Natural[1]; } + + function '<' specializes IntegerFunctions::'<' { in x: Natural[1]; in y: Natural[1]; return : Boolean[1]; } + function '>' specializes IntegerFunctions::'>' { in x: Natural[1]; in y: Natural[1]; return : Boolean[1]; } + function '<=' specializes IntegerFunctions::'<=' { in x: Natural[1]; in y: Natural[1]; return : Boolean[1]; } + function '>=' specializes IntegerFunctions::'>=' { in x: Natural[1]; in y: Natural[1]; return : Boolean[1]; } + + function max specializes IntegerFunctions::max { in x: Natural[1]; in y: Natural[1]; return : Natural[1]; } + function min specializes IntegerFunctions::min { in x: Natural[1]; in y: Natural[1]; return : Natural[1]; } + + function '==' specializes IntegerFunctions::'==' { in x: Natural[0..1]; in y: Natural[0..1]; return : Boolean[1]; } + + function ToString specializes IntegerFunctions::ToString { in x: Natural[1]; return : String[1]; } + function ToNatural{ in x: String[1]; return : Natural[1]; } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml new file mode 100644 index 00000000..877c2e92 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml @@ -0,0 +1,43 @@ +standard library package NumericalFunctions { + doc + /* + * This package defines abstract functions on Numerical values for general arithmetic and comparison operations. + */ + + public import ScalarValues::*; + private import ControlFunctions::reduce; + + abstract function isZero{ in x: NumericalValue[1]; return : Boolean; } + abstract function isUnit{ in x : NumericalValue[1]; return : Boolean; } + + abstract function abs{ in x: NumericalValue[1]; return : NumericalValue[1]; } + + abstract function '+' specializes ScalarFunctions::'+' { in x: NumericalValue[1]; in y: NumericalValue[0..1]; return : NumericalValue[1]; } + abstract function '-' specializes ScalarFunctions::'-' { in x: NumericalValue[1]; in y: NumericalValue[0..1]; return : NumericalValue[1]; } + abstract function '*' specializes ScalarFunctions::'*' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + abstract function '/' specializes ScalarFunctions::'/' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + abstract function '**' specializes ScalarFunctions::'**' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + abstract function '^' specializes ScalarFunctions::'^' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + abstract function '%' specializes ScalarFunctions::'%' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + + abstract function '<' specializes ScalarFunctions::'<' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : Boolean[1]; } + abstract function '>' specializes ScalarFunctions::'>' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : Boolean[1]; } + abstract function '<=' specializes ScalarFunctions::'<=' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : Boolean[1]; } + abstract function '>=' specializes ScalarFunctions::'>=' { in x: NumericalValue[1]; in y: NumericalValue[1]; return : Boolean[1]; } + + abstract function max specializes ScalarFunctions::max { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + abstract function min specializes ScalarFunctions::min { in x: NumericalValue[1]; in y: NumericalValue[1]; return : NumericalValue[1]; } + + abstract function sum { in collection: ScalarValue[0..*]; return : ScalarValue[1]; } + abstract function product { in collection: ScalarValue[0..*]; return : ScalarValue[1]; } + + function sum0 { in collection: NumericalValue[0..*]; in zero: ScalarValue[1]; + inv { isZero(zero) } + return : ScalarValue = collection->reduce '+' ?? zero; + } + + function product1 { in collection: ScalarValue[0..*]; in one: ScalarValue[1]; + inv { isUnit(one) } + return : ScalarValue = collection->reduce '*' ?? one; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml new file mode 100644 index 00000000..8d090105 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml @@ -0,0 +1,154 @@ +standard library package OccurrenceFunctions { + doc + /* + * This package defines utility functions that operate on occurrences, primarily related to + * time during which those occurrences exist. + */ + + private import Occurrences::Occurrence; + private import Occurrences::HappensDuring; + private import ScalarValues::Boolean; + private import ScalarValues::Positive; + private import SequenceFunctions::notEmpty; + private import SequenceFunctions::size; + private import SequenceFunctions::add; + private import SequenceFunctions::addAt; + private import SequenceFunctions::remove; + private import SequenceFunctions::removeAt; + private import ControlFunctions::forAll; + + function '===' specializes BaseFunctions::'===' { + doc + /* + * Test whether two occurrences are portions of the same life. That is, whether they + * represent different portions of the same entity (colloquially, whether they have + * the same "identity"). + */ + + in x: Occurrence[0..1]; + in y: Occurrence[0..1]; + + return : Boolean[1] = x.portionOfLife == y.portionOfLife; + } + + function isDuring { + doc + /* + * Test whether a performance of this function happens during the input occurrence. + */ + + in occ: Occurrence[1]; + + private connector all during: HappensDuring[0..1] from self to occ; + + return : Boolean[1] = notEmpty(during); + } + + function create { + doc + /* + * Ensure that the start of a given occurrence happens during a performance of this + * function. The occurrence is also returned from the function. + */ + + inout occ: Occurrence[1]; + + private connector : HappensDuring from occ.startShot to self; + + return : Occurrence[1] = occ; + } + + function destroy { + doc + /* + * Ensure that the end of a given occurrence happens during a performance of this + * function. The occurrence is also returned from the function. + */ + + inout occ: Occurrence[0..1]; + + private connector : HappensDuring from [0..1] occ.endShot to self; + + return : Occurrence[0..1] = occ; + } + + function addNew { + doc + /* + * Add a newly created occurrence to the given group of occurrences and return the + * new occurrence. + */ + + inout group: Occurrence[0..*] nonunique; + inout occ: Occurrence[1]; + + private composite step : add { + inout seq1 = group; + in seq2 = create(occ); + } + + return : Occurrence[1] = occ; + } + + function addNewAt { + doc + /* + * Add a newly created occurrence to the given ordered group of occurrences at the given + * index and return the new occurrence. + */ + + inout group: Occurrence[0..*] ordered nonunique; + inout occ: Occurrence[1]; + in index: Positive[1]; + + private composite step : addAt { + inout seq = group; + in values = create(occ); + in startIndex = index; + } + + return : Occurrence[1] = occ; + } + + behavior removeOld { + doc + /* + * Remove a given occurrence from a group of occurrences and destroy it. + */ + + inout group: Occurrence[0..*] nonunique; + inout occ: Occurrence[0..1]; + + private composite step removeStep : remove { + inout seq = group; + in values = occ; + } + private succession removeStep then destroyStep; + private composite step destroyStep : destroy { + inout occ = removeOld::occ; + } + + } + + behavior removeOldAt { + doc + /* + * Removes the occurrence at a given index in an ordered group of occurrences + * and destroy it. + */ + inout group: Occurrence[0..*] ordered nonunique; + in index: Positive[1]; + + private feature oldOcc = group#(index); + + private composite step removeStep : remove { + inout seq = group; + in index = removeOldAt::index; + } + private succession removeStep then destroyStep; + private composite step destroyStep : destroy { + inout occ = oldOcc; + } + + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml new file mode 100644 index 00000000..b458431d --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml @@ -0,0 +1,49 @@ +standard library package RationalFunctions { + doc + /* + * This package defines Functions on Rational values, including concrete specializations of the + * general arithmetic and comparison operations. + */ + + public import ScalarValues::*; + + function rat { in numer: Integer[1]; in denum: Integer[1]; return : Rational[1]; } + function numer { in rat: Rational[1]; return : Integer[1]; } + function denom { in rat: Rational[1]; return : Integer[1]; } + + function abs specializes RealFunctions::abs { in x: Rational[1]; return : Rational[1]; } + + function '+' specializes RealFunctions::'+' { in x: Rational[1]; in y: Rational[0..1]; return : Rational[1]; } + function '-' specializes RealFunctions::'-' { in x: Rational[1]; in y: Rational[0..1]; return : Rational[1]; } + function '*' specializes RealFunctions::'*' { in x: Rational[1]; in y: Rational[1]; return : Rational[1]; } + function '/' specializes RealFunctions::'/' { in x: Rational[1]; in y: Rational[1]; return : Rational[1]; } + function '**' specializes RealFunctions::'**' { in x: Rational[1]; in y: Rational[1]; return : Rational[1]; } + function '^' specializes RealFunctions::'^' { in x: Rational[1]; in y: Rational[1]; return : Rational[1]; } + + function '<' specializes RealFunctions::'<' { in x: Rational[1]; in y: Rational[1]; return : Boolean[1]; } + function '>' specializes RealFunctions::'>' { in x: Rational[1]; in y: Rational[1]; return : Boolean[1]; } + function '<=' specializes RealFunctions::'<=' { in x: Rational[1]; in y: Rational[1]; return : Boolean[1]; } + function '>=' specializes RealFunctions::'>=' { in x: Rational[1]; in y: Rational[1]; return : Boolean[1]; } + + function max specializes RealFunctions::max { in x: Rational[1]; in y: Rational[1]; return : Rational[1]; } + function min specializes RealFunctions::min { in x: Rational[1]; in y: Rational[1]; return : Rational[1]; } + + function '==' specializes RealFunctions::'==' { in x: Rational[0..1]; in y: Rational[0..1]; return : Boolean[1]; } + + function gcd{ in x: Rational[1]; in y: Rational[1]; return : Integer[1]; } + + function floor specializes RealFunctions::floor { in x: Rational[1]; return : Integer[1]; } + function round specializes RealFunctions::round { in x: Rational[1]; return : Integer[1]; } + + function ToString specializes RealFunctions::ToString { in x: Rational[1]; return : String[1]; } + function ToInteger{ in x: Rational[1]; return : Integer[1]; } + function ToRational{ in x: String[1]; return : Rational[1]; } + + function sum specializes RealFunctions::sum { in collection: Rational[0..*]; + return : Rational[1] default NumericalFunctions::sum0(collection, rat(0, 1)); + } + + function product specializes RealFunctions::product { in collection: Rational[0..*]; + return : Rational[1] default NumericalFunctions::product1(collection, rat(1, 1)); + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RealFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RealFunctions.kerml new file mode 100644 index 00000000..7abb295b --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RealFunctions.kerml @@ -0,0 +1,56 @@ +standard library package RealFunctions { + doc + /* + * This package defines Functions on Real values, including concrete specializations of the + * general arithmetic and comparison operations. + */ + + public import ScalarValues::*; + + function re :> ComplexFunctions::re{ in x: Real[1]; + return : Real[1] = x; + } + function im :> ComplexFunctions::im{ in x: Real[1]; + return : Real[1] = 0.0; + } + + function abs specializes ComplexFunctions::abs { in x: Real[1]; return : Real[1]; } + function arg specializes ComplexFunctions::arg { in x: Real[1]; + return : Real[1] = 0.0; + } + + function '+' specializes ComplexFunctions::'+' { in x: Real[1]; in y: Real[0..1]; return : Real[1]; } + function '-' specializes ComplexFunctions::'-' { in x: Real[1]; in y: Real[0..1]; return : Real[1]; } + function '*' specializes ComplexFunctions::'*' { in x: Real[1]; in y: Real[1]; return : Real[1]; } + function '/' specializes ComplexFunctions::'/' { in x: Real[1]; in y: Real[1]; return : Real[1]; } + function '**' specializes ComplexFunctions::'**' { in x: Real[1]; in y: Real[1]; return : Real[1]; } + function '^' specializes ComplexFunctions::'^' { in x: Real[1]; in y: Real[1]; return : Real[1]; } + + function '<' specializes NumericalFunctions::'<' { in x: Real[1]; in y: Real[1]; return : Boolean[1]; } + function '>' specializes NumericalFunctions::'>' { in x: Real[1]; in y: Real[1]; return : Boolean[1]; } + function '<=' specializes NumericalFunctions::'<=' { in x: Real[1]; in y: Real[1]; return : Boolean[1]; } + function '>=' specializes NumericalFunctions::'>=' { in x: Real[1]; in y: Real[1]; return : Boolean[1]; } + + function max specializes NumericalFunctions::max { in x: Real[1]; in y: Real[1]; return : Real[1]; } + function min specializes NumericalFunctions::min { in x: Real[1]; in y: Real[1]; return : Real[1]; } + + function '==' specializes ComplexFunctions::'==' { in x: Real[0..1]; in y: Real[0..1]; return : Boolean[1]; } + + function sqrt{ in x: Real[1]; return : Real[1]; } + + function floor{ in x: Real[1]; return : Integer[1]; } + function round{ in x: Real[1]; return : Integer[1]; } + + function ToString specializes ComplexFunctions::ToString { in x: Real[1]; return : String[1]; } + function ToInteger{ in x: Real[1]; return : Integer[1]; } + function ToRational{ in x: Real[1]; return : Rational[1]; } + function ToReal{ in x: String[1]; return : Real[1]; } + + function sum specializes ComplexFunctions::sum { in collection: Real[0..*]; + return : Real default NumericalFunctions::sum0(collection, 0.0); + } + + function product specializes ComplexFunctions::product { in collection: Real[0..*]; + return : Real default NumericalFunctions::product1(collection, 1.0); + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml new file mode 100644 index 00000000..70e1010d --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml @@ -0,0 +1,33 @@ +standard library package ScalarFunctions { + doc + /* + * This package defines abstract functions that specialize the DataFunctions for use with ScalarValues. + */ + + public import ScalarValues::*; + + abstract function '+' specializes DataFunctions::'+' { in x: ScalarValue[1]; in y: ScalarValue[0..1]; return : ScalarValue[1]; } + abstract function '-' specializes DataFunctions::'-' { in x: ScalarValue[1]; in y: ScalarValue[0..1]; return : ScalarValue[1]; } + abstract function '*' specializes DataFunctions::'*' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + abstract function '/' specializes DataFunctions::'/' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + abstract function '**' specializes DataFunctions::'**' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + abstract function '^' specializes DataFunctions::'^' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + abstract function '%' specializes DataFunctions::'%' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + + abstract function 'not' specializes DataFunctions::'not' { in x: ScalarValue[1]; return : ScalarValue[1]; } + abstract function 'xor' specializes DataFunctions::'xor' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + + abstract function '~' specializes DataFunctions::'~' { in x: ScalarValue[1]; return : ScalarValue[1]; } + abstract function '|' specializes DataFunctions::'|' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + abstract function '&' specializes DataFunctions::'&' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + + abstract function '<' specializes DataFunctions::'<' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : Boolean[1]; } + abstract function '>' specializes DataFunctions::'>' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : Boolean[1]; } + abstract function '<=' specializes DataFunctions::'<=' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : Boolean[1]; } + abstract function '>=' specializes DataFunctions::'>=' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : Boolean[1]; } + + abstract function max specializes DataFunctions::max { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + abstract function min specializes DataFunctions::min { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; } + + abstract function '..' specializes DataFunctions::'..' { in lower: ScalarValue[1]; in upper: ScalarValue[1]; return : ScalarValue[0..*]; } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml new file mode 100644 index 00000000..f0782134 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml @@ -0,0 +1,111 @@ +standard library package SequenceFunctions { + doc + /* + * This package defines functions that operate on general sequences of values. (For functions that + * operate on Collection values, see CollectionFunctions.) + */ + + private import Base::Anything; + private import Occurrences::SelfSameLifeLink; + private import ScalarValues::*; + private import ControlFunctions::*; + + function '#' specializes BaseFunctions::'#' { in seq: Anything[0..*] ordered nonunique; in index: Positive[1]; + return : Anything[0..1]; + } + + function equals{ in x: Anything[0..*] ordered nonunique; in y: Anything[0..*] ordered nonunique; + return : Boolean[1] = + size(x) == size(y) and + (1..size(x))->forAll {in i; x#(i) == y#(i)}; + } + + function same{ in x: Anything[0..*] ordered nonunique; in y: Anything[0..*] ordered nonunique; + return : Boolean[1] = + size(x) == size(y) and + (1..size(x))->forAll {in i; x#(i) === y#(i)}; + } + + function size{ in seq: Anything[0..*] nonunique; + return : Natural[1] = if isEmpty(seq)? 0 else size(tail(seq)) + 1; + } + function isEmpty{ in seq: Anything[0..*] nonunique; + return : Boolean[1] = seq == null; + } + function notEmpty{ in seq: Anything[0..*] nonunique; + return : Boolean[1] = not isEmpty(seq); + } + function includes{ in seq1: Anything[0..*] nonunique; in seq2: Anything[0..*] nonunique; + return : Boolean[1] = seq2->forAll {in x; seq1->exists{in y; x == y}}; + } + function includesOnly{ in seq1: Anything[0..*] nonunique; in seq2: Anything[0..*] nonunique; + return : Boolean[1] = seq1->includes(seq2) and seq2->includes(seq1); + } + function excludes{ in seq1: Anything[0..*] nonunique; in seq2: Anything[0..*] nonunique; + return : Boolean[1] = seq2->forAll {in x; seq1->excludes(x)}; + } + + function union{ in seq1: Anything[0..*] ordered nonunique; in seq2: Anything[0..*] ordered nonunique; + return : Anything[0..*] ordered nonunique = (seq1, seq2); + } + function intersection{ in seq1: Anything[0..*] ordered nonunique; in seq2: Anything[0..*] ordered nonunique; + return : Anything[0..*] ordered nonunique = seq1->select {in x; seq2->includes(x)}; + } + function including{ in seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique; + return : Anything[0..*] ordered nonunique = union(seq, values); + } + function includingAt{ in seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique; + in index: Positive[1]; + return : Anything[0..*] ordered nonunique = + (seq->subsequence(1, index - 1), values, seq->subsequence(index + 1)); + } + function excluding{ in seq: Anything[0..*] ordered nonunique; in values: Anything[0..*]; + return : Anything[0..*] ordered nonunique = seq->reject {in x; values->includes(x)}; + } + function excludingAt{ in seq: Anything[0..*] ordered nonunique; + in startIndex: Positive[1]; in endIndex: Positive[1] default startIndex; + return : Anything[0..*] ordered nonunique = + (seq->subsequence(1, startIndex - 1), seq->subsequence(endIndex + 1)); + } + + function subsequence{ in seq: Anything[0..*] ordered nonunique; + in startIndex: Positive[1]; in endIndex: Positive[1] default size(seq); + return : Anything[0..*] = (startIndex..endIndex)->collect {in i; seq#(i)}; + } + function head{ in seq: Anything[0..*] ordered nonunique; + return : Anything[0..1] = seq#(1); + } + function tail{ in seq: Anything[0..*] ordered nonunique; + return : Anything[0..*] ordered nonunique = subsequence(seq, 2); + } + function last{ in seq: Anything[0..*] ordered nonunique; + return : Anything[0..1] = seq#(size(seq)); + } + + behavior add { inout seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique; + private feature newSeq = seq->including(values); + feature redefines endShot: add { + binding seq = newSeq; + } + } + behavior addAt { inout seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique; + in index: Positive[1]; + private feature newSeq = seq->includingAt(values, index); + feature redefines endShot: addAt { + binding seq = newSeq; + } + } + behavior remove{ inout seq: Anything[0..*] ordered nonunique; in values: Anything[0..*]; + private feature newSeq = seq->excluding(values); + feature redefines endShot: remove { + binding seq = newSeq; + } + } + behavior removeAt{ inout seq: Anything[0..*] ordered nonunique; + in startIndex: Positive[1]; in endIndex: Positive[1] default startIndex; + private feature newSeq = seq->excludingAt(startIndex, endIndex); + feature redefines endShot: removeAt { + binding seq = newSeq; + } + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/StringFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/StringFunctions.kerml new file mode 100644 index 00000000..203d9b2c --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/StringFunctions.kerml @@ -0,0 +1,25 @@ +standard library package StringFunctions { + doc + /* + * This package defines functions on String values, including those corresponding to string concatenation + * and comparison operators in the KerML expression notation. + */ + + public import ScalarValues::*; + + function '+' specializes ScalarFunctions::'+' { in x: String[1]; in y:String[1]; return : String[1]; } + + function Length{ in x: String[1]; return : Natural[1]; } + function Substring{ in x: String[1]; in lower: Integer[1]; in upper: Integer[1]; return : String[1]; } + + function '<' specializes ScalarFunctions::'<' { in x: String[1]; in y: String[1]; return : Boolean[1]; } + function '>' specializes ScalarFunctions::'>' { in x: String[1]; in y: String[1]; return : Boolean[1]; } + function '<=' specializes ScalarFunctions::'<=' { in x: String[1]; in y: String[1]; return : Boolean[1]; } + function '>=' specializes ScalarFunctions::'>=' { in x: String[1]; in y: String[1]; return : Boolean[1]; } + + function '==' specializes DataFunctions::'==' { in x: String[0..1]; in y: String[0..1]; return : Boolean[1]; } + + function ToString specializes BaseFunctions::ToString { in x: String[1]; + return : String[1] = x; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml new file mode 100644 index 00000000..97ae437d --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml @@ -0,0 +1,35 @@ +standard library package TrigFunctions { + doc + /* + * This package defines basic trigonometric functions on real numbers. + */ + + public import ScalarValues::Real; + + feature pi : Real; + inv piPrecision { RealFunctions::round(pi * 1E20) == 314159265358979323846.0 } + + function deg { in theta_rad : Real[1]; + return : Real[1] = theta_rad * 180 / pi; + } + function rad { in theta_deg : Real; + return : Real[1] = theta_deg * pi / 180; + } + + datatype UnitBoundedReal :> Real { + inv unitBound { -1.0 <= that & that <= 1.0 } + } + + function sin { in theta : Real[1]; return : UnitBoundedReal[1]; } + function cos { in theta : Real[1]; return : UnitBoundedReal[1]; } + function tan { in theta : Real[1]; + return : Real = sin(theta) / cos(theta); + } + function cot { in theta : Real; + return : Real = cos(theta) / sin(theta); + } + + function arcsin { in x : UnitBoundedReal[1]; return : Real[1]; } + function arccos { in x : UnitBoundedReal[1]; return : Real[1]; } + function arctan { in x : Real[1]; return : Real[1]; } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml new file mode 100644 index 00000000..83c32381 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml @@ -0,0 +1,273 @@ +standard library package VectorFunctions { + doc + /* + * This package defines abstract functions on VectorValues corresponding to the algebraic operations + * provided by a vector space with inner product. It also includes concrete implementations of these + * functions specifically for CartesianVectorValues. + */ + + private import ScalarValues::NumericalValue; + private import ScalarValues::Positive; + private import ScalarValues::Real; + private import ScalarValues::Boolean; + private import NumericalFunctions::*; + private import RealFunctions::sqrt; + private import TrigFunctions::arccos; + private import SequenceFunctions::size; + private import ControlFunctions::*; + + public import VectorValues::*; + + /* Generic arithmetic functions for all VectorValues. */ + + abstract function isZeroVector { + doc + /* + * Return whether a VectorValue is a zero vector. + */ + + in v: VectorValue[1]; + return : Boolean[1]; + } + + abstract function '+' specializes DataFunctions::'+' { + doc + /* + * With two arguments, returns the sum of two VectorValues. With one argument, returns that VectorValue. + */ + + in v: VectorValue[1]; + in w: VectorValue[0..1]; + return u: VectorValue[1]; + inv zeroAddition { w == null or isZeroVector(w) implies u == w } + inv commutivity { w != null implies u == w + v } + } + + abstract function '-' specializes DataFunctions::'-' { + doc + /* + * With two arguments, returns the difference of two VectorValues. With one arguments, returns the inverse + * of the given VectorValue, that is, the VectorValue that, when added to the original VectorValue, results in + * the zeroVector. + */ + + in v: VectorValue[1]; + in w: VectorValue[0..1]; + return u: VectorValue[1]; + inv negation { w == null implies isZeroVector(v + u) } + inv difference { w != null implies v + u == w } + } + + abstract function sum0 { + doc + /* + * Return the sum of a collection of VectorValues. If the collection is empty, return a given zero vector. + */ + + in coll: VectorValue[*] nonunique; + in zero: VectorValue[1]; + inv precondition { isZeroVector(zero) } + return s: VectorValue[1] = coll->reduce '+' ?? zero; + } + + /* Functions specific to NumericalVectorValues. */ + + function VectorOf { + doc + /* + * Construct a NumericalVectorValue whose elements are a non-empty list of component NumericalValues. + * The dimension of the NumericalVectorValue is equal to the number of components. + */ + + in components: NumericalValue[1..*] ordered nonunique; + return : NumericalVectorValue[1] { + :>> dimension = size(components); + :>> elements = components; + } + } + + abstract function scalarVectorMult specializes DataFunctions::'*' { + doc + /* + * Scalar product of a NumericalValue and a NumericalVectorValue. + */ + + in x: NumericalValue[1]; + in v: NumericalVectorValue[1]; + return w: NumericalVectorValue[1]; + inv scaling { norm(w) == x * norm(v) } + inv zeroLength { isZeroVector(w) implies isZero(norm(w))} + } + alias '*' for scalarVectorMult; + + abstract function vectorScalarMult specializes DataFunctions::'*' { + doc + /* + * Scalar product of a NumericalVectorValue and a NumericalValue, which has the same value as the scalar product of the + * NumericalValue and the NumericalVectorValue. + */ + + in v: NumericalVectorValue[1]; + in x: NumericalValue[1]; + return w: NumericalVectorValue[1] default scalarVectorMult(x, v); + } + + abstract function vectorScalarDiv specializes DataFunctions::'/' { + doc + /* + * Scalar quotient of a NumericalVectorValue and a NumericalValue, defined as the scalar product of the inverse of the + * NumericalValue and the NumericalVectorValue. + */ + + in v: NumericalVectorValue[1]; + in x: NumericalValue[1]; + return w: NumericalVectorValue[1] = scalarVectorMult(1.0 / x, v); + } + + abstract function inner specializes DataFunctions::'*' { + doc + /* + * Inner product of two NumericalVectorValues. + */ + + in v: NumericalVectorValue[1]; + in w: NumericalVectorValue[1]; + return x: NumericalValue[1]; + inv commmutivity { x == inner(w, v) } + inv zeroInner { isZeroVector(v) or isZeroVector(w) implies isZero(x)} + } + + abstract function norm { + doc + /* + * The norm (magnitude) of a NumericalVectorValue, as a NumericalValue. + */ + + in v: NumericalVectorValue[1]; + return l : NumericalValue[1]; + inv squareNorm { l * l == inner(v,v) } + inv lengthZero { isZero(l) == isZeroVector(v) } + } + + abstract function angle { + doc + /* + * The angle between two NumericalVectorValues, as a NumericalValue. + */ + + in v: NumericalVectorValue[1]; + in w: NumericalVectorValue[1]; + return theta: NumericalValue[1]; + inv commutivity { theta == angle(w, v) } + inv lengthInsensitive { theta == angle(w / norm(w), v / norm(v)) } + } + + /* Specialized functions with concrete definitions for CartesianVectorValues. */ + + function CartesianVectorOf { + doc + /* + * Construct a CartesianVectorValue whose elements are a non-empty list of Real components. + * The dimension of the NumericalVectorValue is equal to the number of components. + */ + + in components: Real[*] ordered nonunique; + return : CartesianVectorValue[1] { + :>> dimension = size(components); + :>> elements = components; + } + } + function CartesianThreeVectorOf specializes CartesianVectorOf { + in components: Real[3] ordered nonunique; + return : CartesianThreeVectorValue[1] { + feature :>> CartesianVectorOf::result::dimension, CartesianThreeVectorValue::dimension; + } + } + + feature cartesianZeroVector: CartesianVectorValue[3] = + ( + CartesianVectorOf(0.0), + CartesianVectorOf((0.0, 0.0)), + CartesianThreeVectorOf((0.0, 0.0, 0.0)) + ) { + doc + /* + * Cartesian zero vectors of 1, 2 and 3 dimensions. + */ + } + feature cartesian3DZeroVector: CartesianThreeVectorValue[1] = + cartesianZeroVector#(3); + + function isCartesianZeroVector specializes isZeroVector { + doc + /* + * A CartesianVectorValue is a zero vector if all its elements are zero. + */ + + in v: CartesianVectorValue[1]; + return : Boolean[1] = v.elements->forAll{in x; x == 0.0}; + } + + function 'cartesian+' specializes '+' { + in v: CartesianVectorValue[1]; + in w: CartesianVectorValue[0..1]; + inv precondition { w != null implies v.dimension == w.dimension } + return u: CartesianVectorValue[1] = + if w == null? v + else CartesianVectorOf( + (1..w.dimension)->collect{in i : Positive; v#(i) + w#(i)} + ); + } + + function 'cartesian-' specializes '-' { + in v: CartesianVectorValue[1]; + in w: CartesianVectorValue[0..1]; + inv precondition { w != null implies v.dimension == w.dimension } + return u: CartesianVectorValue[1] = + CartesianVectorOf( + if w == null? CartesianVectorOf(v.elements->collect{in x : Real; -x}) + else CartesianVectorOf( + (1..v.dimension)->collect{in i : Positive; v#(i) - w#(i)} + ) + ); + } + + function cartesianScalarVectorMult specializes scalarVectorMult { + in x: Real[1]; + in v: CartesianVectorValue[1]; + return w: CartesianVectorValue[1] = + CartesianVectorOf( + v.elements->collect{in y : Real; x * y} + ); + } + function cartesianVectorScalarMult specializes vectorScalarMult { + in v: CartesianVectorValue[1]; + in x: Real[1]; + return w: CartesianVectorValue[1] = cartesianScalarVectorMult(x, v); + } + + function cartesianInner specializes inner { + in v: CartesianVectorValue[1]; + in w : CartesianVectorValue[1]; + inv precondition { v.dimension == w.dimension } + return x: Real[1] = + (1..v.dimension)->collect{in i : Positive; v#(i) * w#(i)}->reduce RealFunctions::'+'; + } + + function cartesianNorm specializes norm { + in v: CartesianVectorValue[1]; + return l : NumericalValue[1] = sqrt(cartesianInner(v, v)); + } + + function cartesianAngle specializes angle { + in v: CartesianVectorValue[1]; in w: CartesianVectorValue[1]; + inv precondition { v.dimension == w.dimension } + return theta: Real[1] = arccos(cartesianInner(v, w) / (norm(v) * norm(w))); + } + + function sum { + in coll: CartesianThreeVectorValue[*]; + return : CartesianThreeVectorValue[1] = sum0(coll, cartesian3DZeroVector); + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Base.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Base.kerml new file mode 100644 index 00000000..88d6c9d2 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Base.kerml @@ -0,0 +1,95 @@ +standard library package Base { + doc + /* + * This package defines the classifiers and features that provide the bases for the typing + * of all elements in the language. + */ + + abstract classifier Anything { + doc + /* + * Anything is the top level generalized type in the language. + */ + + feature self: Anything[1] subsets things chains things.that { + doc + /* + * The source of a SelfLink of this thing to itself. self is thus a feature that + * relates everything to itself. It is also the value of the nested "that" feature + * of all other things featured by this thing. + */ + } + } + + abstract datatype DataValue specializes Anything { + doc + /* + * Value is the most general classifier of entities that are values that do not change + * over time. + */ + + feature self: DataValue redefines Anything::self; + } + + abstract feature things: Anything [1..*] nonunique { + doc + /* + * things is the top-level feature in the language. + */ + + feature that : Anything[1] { + doc + /* + * For each value of things, the "featuring instance" of that value. + * This is enforced by declaring Anything::self to be the chaining of things.that, + * restricting it the single value of self. + */ + } + } + + abstract feature dataValues: DataValue[0..*] nonunique subsets things { + doc + /* + * dataValues is a specialization of things restricted to type DataValue. + */ + } + + abstract feature naturals: ScalarValues::Natural[0..*] subsets dataValues { + doc + /* + * naturals is a specialization of dataValues restricted to type Natural. + * It is the root feature of all multiplicities, which map from a feature to + * the set of Natural numbers representing allowable cardinalities of the feature. + */ + } + + multiplicity exactlyOne [1..1] { + doc + /* + * exactlyOne is a multiplicity range requiring a cardinality of exactly one. + */ + } + + multiplicity zeroOrOne [0..1] { + doc + /* + * zeroOrOne is a multiplicity range requiring a cardinality of zero or one. + */ + } + + multiplicity oneToMany [1..*] { + doc + /* + * oneToMany is a multiplicity range allowing any cardinality of one or more. + */ + } + + multiplicity zeroToMany [0..*] { + doc + /* + * zeroToMany is a multiplicity range allowing any cardinality of zero or more + * (that is, no restriction). + */ + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Clocks.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Clocks.kerml new file mode 100644 index 00000000..5d5a12d8 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Clocks.kerml @@ -0,0 +1,156 @@ +standard library package Clocks { + doc + /* + * This package models Clocks that provide an advancing numerical reference + * usable for quantifying the time of an Occurrence. + */ + + private import ScalarValues::NumericalValue; + private import ScalarValues::Real; + private import Occurrences::Occurrence; + private import Occurrences::Life; + private import ControlFunctions::forAll; + + private struct UniversalClockLife[1] :> Clock, Life { + doc + /* + * UniversalClockLife is the classifier of the singleton Life of the universalClock. + */ + } + + feature universalClock : UniversalClockLife[1] { + doc + /* + * universalClock is a single Clock that can be used as a default universal + * time reference. + */ + } + + abstract struct Clock { + doc + /* + * A Clock provides a numerical currentTime that advances montonically + * over its lifetime. Clock is an abstract base Structure that can be + * specialized for different kinds of time quantification (e.g., discrete + * time, continuous time, time with units, etc.). + */ + + private thisClock : Clock :>> self; + + var feature currentTime : NumericalValue[1] { + doc + /* + * A scalar time reference that advances over the lifetime of the Clock. + */ + } + + inv timeFlowConstraint { + doc + /* + * The currentTime of a snapshot of a Clock is equal to + * the TimeOf the snapshot relative to that Clock. + */ + + snapshots->forAll{in s : Clock; + TimeOf(s, thisClock) == s.currentTime + } + } + } + + abstract function TimeOf { + doc + /* + * TimeOf returns a numerical timeInstant for a given Occurrence relative to + * a given Clock. The timeInstant is the time of the start of the Occurrence, + * which is considered to be synchronized with the snapshot of the Clock + * with a currentTime equal to the returned timeInstant. + */ + + in o : Occurrence[1]; + in clock : Clock[1] default localClock; + return timeInstant : NumericalValue[1]; + + inv startTimeConstraint { + doc + /* + * The TimeOf an Occurrence is equal to the time of its start snapshot. + */ + + timeInstant == TimeOf(o.startShot, clock) + } + + inv timeOrderingConstraint { + doc + /* + * If one Occurrence happens before another, then the TimeOf the end + * snapshot of the first Occurrence is no greater than the TimeOf the + * second Occurrence. + */ + + o.predecessors->forAll{in p : Occurrence; + TimeOf(p.endShot, clock) <= timeInstant + } + } + + inv timeContinuityConstraint { + doc + /* + * If one Occurrence happens immediately before another, then the TimeOf + * the end snapshot of the first Occurrence equals the TimeOf the second + * Occurrence. + */ + + o.immediatePredecessors->forAll{in p : Occurrence; + TimeOf(p.endShot, clock) == timeInstant + } + } + } + + function DurationOf { + doc + /* + * DurationOf returns the duration of a given Occurrence relative to a + * given Clock, which is equal to the TimeOf the end snapshot of the + * Occurrence minus the TimeOf its start snapshot. + */ + + in o : Occurrence[1]; + in clock : Clock[1] default localClock; + return duration : NumericalValue = + TimeOf(o.endShot, clock) - TimeOf(o.startShot, clock); + } + + struct BasicClock :> Clock { + doc + /* + * A BasicClock is a Clock whose currentTime is a Real number. + */ + + var feature :>> currentTime : Real; + } + + function BasicTimeOf :> TimeOf { + doc + /* + * BasicTimeOf returns the TimeOf an Occurrence as a Real number relative + * to a BasicClock. + */ + + in o : Occurrence[1]; + in clock : BasicClock[1]; + return : Real[1]; + } + + function BasicDurationOf :> DurationOf { + doc + /* + * BasicDurationOf returns the DurationOf an Occurrence as a Real number relative + * to a BasicClock. + */ + + in o : Occurrence[1]; + in clock : BasicClock[1]; + return : Real[1]; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml new file mode 100644 index 00000000..3932e7de --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml @@ -0,0 +1,135 @@ +standard library package ControlPerformances { + doc + /* + * This package defines Behaviors to be used to type Steps that control the sequencing of performance + * of other Steps. + */ + + private import ScalarValues::Boolean; + private import SequenceFunctions::size; + private import SequenceFunctions::notEmpty; + private import Occurrences::Occurrence; + private import Occurrences::HappensBefore; + private import Occurrences::SelfSameLifeLink; + private import Performances::Performance; + private import Performances::BooleanEvaluation; + + behavior DecisionPerformance specializes Performance { + doc + /* + * A DecisionPerformance is a Performance that represents the selection of one of the Successions + * that have the DecisionPerforance behavior as their source. All such Successions must subset the + * outgoingHBLink feature of the source DecisionPerformance. For each instance of DecisionPerformance, + * the outgoingHBLink is an instance of exactly one of the Successions, ordering the DecisionPerformance + * as happening before an instance of the target of that Succcession. + */ + + feature outgoingHBLink: HappensBefore[1] { + doc + /* + * Specializations subset this by all + * successions going out of a decision step. + */ + + end feature redefines earlierOccurrence subsets that; + } + } + + behavior MergePerformance specializes Performance { + doc + /* + * A MergePerformance is a Performance that represents the merging of all Successions that + * target the MergePerforance behavior. All such Successions must subset the incomingHBLink + * feature of the target MergePerformance. For each instance of MergePerformance, the + * incomingHBLink is an instance of exactly one of the Successions, ordering the + * MergePerformance as happening after an instance of the source of that Succession. + */ + + feature incomingHBLink: HappensBefore[1] { + doc + /* + * Specializations subset this by all + * successions coming into a merge step. + */ + + end feature redefines laterOccurrence subsets that; + } + } + + abstract behavior IfPerformance specializes Performance { + doc + /* + * An IfPerformance is a Performance that determines whether the ifTest evaluation result is true + * (by whether ifTrue has a value). + */ + + in ifTest : BooleanEvaluation[1]; + } + + behavior IfThenPerformance specializes IfPerformance { + doc + /* + * An IfThenPerformance is an IfPerformance where the thenClause occurs after and only after the + * ifTest evaluation result is true. + */ + + in redefines ifTest; + in thenClause : Occurrence[0..1]; + succession [1] ifTest then [0..1] thenClause; + inv { ifTest() == thenClause->notEmpty() } + } + + behavior IfElsePerformance specializes IfPerformance { + doc + /* + * An IfElsePerformance is an IfPerformance where the elseClause occurs after and only + * after the ifTest evaluation result is not true. + */ + + in redefines ifTest; + in elseClause : Occurrence[0..1]; + succession [1] ifTest then [0..1] elseClause; + inv { not ifTest() == elseClause->notEmpty() } + } + + behavior IfThenElsePerformance specializes IfThenPerformance { + doc + /* + * An IfThenElsePerformance is an IfThenPerformance with an additional elseClause that + * occurs after and only after the ifTest evaluation is false. + */ + + in redefines ifTest; + in redefines thenClause; + in elseClause : Occurrence[0..1]; + succession [1] ifTest then [0..1] elseClause; + inv { not ifTest() == elseClause->notEmpty() } + } + + behavior LoopPerformance specializes Performance { + doc + /* + * A LoopPerformance is a Performance where the body occurs repeatedly in sequence (iterates) + * as long as the whileTest evaluation result is true before each iteration (and after the + * previous one, except the first time) and the untilTest evaluation result is not true after + * each iteration and before the next one (except the last one). + */ + + in whileTest : BooleanEvaluation[1..*]; + in body : Occurrence[0..*]; + in untilTest : BooleanEvaluation[0..*]; + + step whileDecision : IfThenPerformance[1..*]; + step untilDecision : IfElsePerformance[0..*]; + + binding [1] whileDecision.ifTest = [1] whileTest; + binding [1] whileDecision.thenClause = [1] body; + + succession body then untilDecision; + + binding [1] untilDecision.ifTest = [1] untilTest; + binding loopBack of [0..1] untilDecision.elseClause = [1] whileDecision; + + inv { loopBack->size() == whileDecision->size() - 1 } + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml new file mode 100644 index 00000000..d7f1ec35 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml @@ -0,0 +1,190 @@ +standard library package FeatureReferencingPerformances { + doc + /* + * This package defines Behaviors used to read, write and monitor values of a referenced Feature of an + * Occurrence. + */ + + private import Base::Anything; + private import Base::things; + private import Occurrences::Occurrence; + private import Occurrences::HappensWhile; + private import Occurrences::HappensBefore; + private import Occurrences::HappensJustBefore; + private import Occurrences::SelfSameLifeLink; + private import Performances::Performance; + private import Performances::Evaluation; + private import ScalarValues::Boolean; + private import SequenceFunctions::isEmpty; + private import SequenceFunctions::equals; + + abstract behavior FeatureReferencingPerformance specializes Performance { + doc + /* + * A FeatureReferencingPerformance is the base Performance for specialized behaviors related + * to values of a referenced Feature of a given Occurrence, as identified in specializations + * of this Behavior. + */ + + in abstract feature onOccurrence : Occurrence [1] { + doc + /* + * Occurrence with values for the referenced feature in specializations of this behavior. + */ + } + + inout feature values : Anything [*] nonunique { + doc + /* + * Values of the referenced feature, as specified in specializations of this behavior. + */ + } + } + + abstract behavior FeatureAccessPerformance specializes FeatureReferencingPerformance { + doc + /* + * A FeatureAccessPerformance is a FeatureReferencingPerformance where the result values + * are all the values of a feature of onOccurrence at the time the Performance ends. The + * feature is specified by restricting accessedFeature in specializations or usages. + */ + + in abstract feature onOccurrence : Occurrence { + abstract feature startingAt : Occurrence [1] subsets timeSlices { + abstract feature accessedFeature : Anything [*] nonunique; + } + } + + connector :HappensWhile from onOccurrence.startingAt.startShot to endShot { + doc + /* + * Requires some time slice of onOccurrence to start when this performance + * ends (this connector), with particular feature values (following connector). + * The feature is specified by restricting the onOccurrence::accessedFeature + * on usages of this behavior. + */ + } + connector :SelfSameLifeLink from onOccurrence.startingAt.accessedFeature to values; + } + + abstract function FeatureReadEvaluation specializes FeatureAccessPerformance, Evaluation { + doc + /* + * A FeatureReadEvaluation is a FeatureAccessPerformance that is a function providing as + * its result the values of a feature on an occurrence at the time its evaluation ends. + */ + + in onOccurrence: Occurrence [1]; + return resultValues : Anything [*] nonunique redefines result redefines values; + } + + abstract behavior FeatureWritePerformance specializes FeatureAccessPerformance { + doc + /* + * A FeatureWritePerformance is a FeatureAccessPerformance that assigns the values of a + * feature on an occurrence to the given replacementValues at time its performance ends. + */ + + in feature onOccurrence : Occurrence[1] redefines onOccurrence; + inout feature replacementValues : Anything redefines values [*] nonunique; + } + + abstract behavior FeatureMonitorPerformance specializes FeatureReferencingPerformance { + doc + /* + * A FeatureMonitorPerformance is a FeatureReferencingPerformance that waits for values + * of monitoredFeature to change on onOccurrence from what they were when the performance + * started. The values before and after the change are given by beforeValues and afterValues. + */ + + in feature redefines onOccurrence { + feature monitoredOccurrence : Occurrence [1] subsets timeSlices { + abstract feature monitoredFeature : Anything[*] nonunique; + feature beforeTimeSlice : Occurrence [1] subsets timeSlices { + feature redefines monitoredFeature; + } + feature afterSnapshot : Occurrence [1] subsets snapshots { + feature redefines monitoredFeature; + } + connector :HappensJustBefore from beforeTimeSlice to afterSnapshot; + } + } + out feature afterValues redefines values; + out feature beforeValues : Anything[*] nonunique; + inv { not beforeValues->equals(afterValues) } + + private connector : HappensWhile + from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.startShot to [1] startShot; + private connector : SelfSameLifeLink + from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.monitoredFeature to [1] beforeValues; + private connector : SelfSameLifeLink + from [1] onOccurrence.monitoredOccurrence.afterSnapshot.monitoredFeature to [1] afterValues; + protected connector endWhen : HappensBefore + from [1] onOccurrence.monitoredOccurrence.afterSnapshot to [1] endShot; + } + + behavior EvaluationResultMonitorPerformance specializes FeatureMonitorPerformance { + doc + /* + * An EvaluationResultMonitorPerformance is a FeatureMonitorPerformance that waits for changes + * in the result of an Evaluation identified by onOccurrence. The Predicate being evaluated must + * be able to produce multiple results over time, for example by only using BindingConnectors + * between Steps, rather than Successions or Flows, including in its Step behaviors. + */ + + in feature onOccurrence : Evaluation redefines onOccurrence { + protected expr monitoredOccurrence : Evaluation [1] redefines monitoredOccurrence { + return result : Anything[*] redefines result, monitoredFeature; + } + } + } + + behavior BooleanEvaluationResultMonitorPerformance specializes EvaluationResultMonitorPerformance { + doc + /* + * A BooleanEvaluationResultMonitorPerformance is a EvaluationResultMonitorPerformance + * that waits for changes in the result of a BooleanEvaluation identified by onOccurrence. + */ + + in bool redefines onOccurrence { + protected bool redefines monitoredOccurrence[1] { + return result : Boolean [1]; + } + } + out redefines afterValues : Boolean [1]; + out redefines beforeValues : Boolean [1]; + } + + behavior BooleanEvaluationResultToMonitorPerformance specializes FeatureReferencingPerformance { + doc + /* + * A BooleanEvaluationResultToMonitorPerformance is a FeatureReferencingPerformance that waits + * for the result of a BooleanEvaluation (identified by onOccurrence) to change to either true + * or false, as indicated by isToTrue (defaulting to true). If the result is already true (or false), + * the performance waits for the result to become false (or true) before waiting again for it to + * change back. + */ + + in bool redefines onOccurrence; + feature isToTrue : Boolean [1] default true; + out afterValues: Boolean[1] redefines values = isToTrue; + private feature monitor1 : BooleanEvaluationResultMonitorPerformance [1] { + feature redefines endWhen : HappensJustBefore { + end feature earlierOccurrence; + end feature laterOccurrence; + } + } + private feature monitor2 : BooleanEvaluationResultMonitorPerformance [1] { + feature redefines endWhen : HappensJustBefore { + end feature earlierOccurrence; + end feature laterOccurrence; + } + } + + private connector : HappensJustBefore from [1] monitor1 to [0..1] monitor2; + inv { isEmpty(monitor2) == (monitor1.afterValues == isToTrue) } + + private binding [1] monitor1.onOccurrence = [1] onOccurrence; + private binding [1] monitor2.onOccurrence = [1] onOccurrence; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/KerML.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/KerML.kerml new file mode 100644 index 00000000..62fbef5f --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/KerML.kerml @@ -0,0 +1,483 @@ +standard library package KerML { + doc + /* + * This package contains a reflective KerML model of the KerML abstract syntax. + */ + + private import ScalarValues::*; + public import Kernel::*; + + package Root { + metaclass AnnotatingElement specializes Element { + derived var feature annotatedElement : Element[1..*] ordered redefines annotatedElement; + derived composite var feature ownedAnnotatingRelationship : Annotation[0..*] ordered subsets annotation, ownedRelationship; + derived var feature owningAnnotatingRelationship : Annotation[0..1] subsets owningRelationship, annotation; + derived var feature annotation : Annotation[0..*] ordered; + } + + metaclass Annotation specializes Relationship { + var feature annotatedElement : Element[1..1] redefines target, annotatedElement; + derived var feature annotatingElement : AnnotatingElement[1..1] redefines source; + derived var feature owningAnnotatedElement : Element[0..1] subsets annotatedElement, owningRelatedElement; + derived var feature owningAnnotatingElement : AnnotatingElement[0..1] subsets annotatingElement, owningRelatedElement; + derived composite var feature ownedAnnotatingElement : AnnotatingElement[0..1] subsets annotatingElement, ownedRelatedElement; + } + + metaclass Comment specializes AnnotatingElement { + var feature 'locale' : String[0..1]; + var feature body : String[1..1]; + } + + metaclass Dependency specializes Relationship { + var feature client : Element[1..*] ordered redefines source; + var feature supplier : Element[1..*] ordered redefines target; + } + + metaclass Documentation specializes Comment { + derived var feature documentedElement : Element[1..1] subsets owner redefines annotatedElement; + } + + abstract metaclass Element { + var feature elementId : String[1..1]; + var feature aliasIds : String[0..*] ordered; + var feature declaredShortName : String[0..1]; + var feature declaredName : String[0..1]; + var feature isImpliedIncluded : Boolean[1..1]; + derived var feature shortName : String[0..1]; + derived var feature name : String[0..1]; + derived var feature qualifiedName : String[0..1]; + derived var feature isLibraryElement : Boolean[1..1]; + + var feature owningRelationship : Relationship[0..1]; + composite var feature ownedRelationship : Relationship[0..*] ordered; + derived var feature owningMembership : OwningMembership[0..1] subsets owningRelationship; + derived var feature owningNamespace : Namespace[0..1]; + derived var feature owner : Element[0..1]; + derived var feature ownedElement : Element[0..*] ordered; + derived var feature documentation : Documentation[0..*] ordered subsets ownedElement; + derived composite var feature ownedAnnotation : Annotation[0..*] ordered subsets ownedRelationship; + derived var feature textualRepresentation : TextualRepresentation[0..*] ordered subsets ownedElement; + } + + abstract metaclass Import specializes Relationship { + var feature visibility : VisibilityKind[1..1]; + var feature isRecursive : Boolean[1..1]; + var feature isImportAll : Boolean[1..1]; + + derived var feature importOwningNamespace : Namespace[1..1] subsets owningRelatedElement redefines source; + derived var feature importedElement : Element[1..1]; + } + + metaclass Membership specializes Relationship { + var feature memberShortName : String[0..1]; + var feature memberName : String[0..1]; + var feature visibility : VisibilityKind[1..1]; + derived var feature memberElementId : String[1..1]; + + var feature memberElement : Element[1..1] redefines target; + derived var feature membershipOwningNamespace : Namespace[1..1] subsets owningRelatedElement redefines source; + } + + metaclass MembershipImport specializes Import { + var feature importedMembership : Membership[1..1] redefines target; + } + + metaclass Namespace specializes Element { + derived abstract var feature membership : Membership[0..*] ordered; + derived composite var feature ownedImport : Import[0..*] ordered subsets ownedRelationship; + derived var feature 'member' : Element[0..*] ordered; + derived var feature ownedMember : Element[0..*] ordered subsets 'member'; + derived composite var feature ownedMembership : Membership[0..*] ordered subsets membership, ownedRelationship; + derived var feature importedMembership : Membership[0..*] ordered subsets membership; + } + + metaclass NamespaceImport specializes Import { + var feature importedNamespace : Namespace[1..1] redefines target; + } + + metaclass OwningMembership specializes Membership { + derived var feature ownedMemberElementId : String[1..1] redefines memberElementId; + derived var feature ownedMemberShortName : String[0..1] redefines memberShortName; + derived var feature ownedMemberName : String[0..1] redefines memberName; + + derived composite var feature ownedMemberElement : Element[1..1] subsets ownedRelatedElement redefines memberElement; + } + + abstract metaclass Relationship specializes Element { + var feature isImplied : Boolean[1..1]; + + var feature target : Element[0..*] ordered subsets relatedElement; + var feature source : Element[0..*] ordered subsets relatedElement; + var feature owningRelatedElement : Element[0..1] subsets relatedElement; + composite var feature ownedRelatedElement : Element[0..*] ordered subsets relatedElement; + derived var feature relatedElement : Element[0..*] ordered nonunique; + } + + metaclass TextualRepresentation specializes AnnotatingElement { + var feature 'language' : String[1..1]; + var feature body : String[1..1]; + + derived var feature representedElement : Element[1..1] subsets owner redefines annotatedElement; + } + + datatype VisibilityKind { + member feature 'private' : VisibilityKind[1]; + member feature 'protected' : VisibilityKind[1]; + member feature 'public' : VisibilityKind[1]; + } + + } + + package Core { + public import Root::*; + + metaclass Classifier specializes Type { + derived composite var feature ownedSubclassification : Subclassification[0..*] subsets ownedSpecialization; + } + + metaclass Conjugation specializes Relationship { + var feature originalType : Type[1..1] redefines target; + var feature conjugatedType : Type[1..1] redefines source; + derived var feature owningType : Type[0..1] subsets conjugatedType, owningRelatedElement; + } + + metaclass CrossSubsetting specializes Subsetting { + var feature crossedFeature : Feature[1..1] redefines subsettedFeature; + derived var feature crossingFeature : Feature[1..1] redefines owningFeature, subsettingFeature; + } + + metaclass Differencing specializes Relationship { + var feature differencingType : Type[1..1] redefines target; + derived var feature typeDifferenced : Type[1..1] subsets owningRelatedElement redefines source; + } + + metaclass Disjoining specializes Relationship { + var feature typeDisjoined : Type[1..1] redefines source; + var feature disjoiningType : Type[1..1] redefines target; + derived var feature owningType : Type[0..1] subsets owningRelatedElement, typeDisjoined; + } + + metaclass EndFeatureMembership specializes FeatureMembership { + derived composite var feature ownedMemberFeature : Feature[1..1] redefines ownedMemberFeature; + } + + metaclass Feature specializes Type { + var feature isUnique : Boolean[1..1]; + var feature isOrdered : Boolean[1..1]; + var feature isComposite : Boolean[1..1]; + var feature isEnd : Boolean[1..1]; + var feature isDerived : Boolean[1..1]; + var feature isPortion : Boolean[1..1]; + var feature isVariable : Boolean[1..1]; + var feature isConstant : Boolean[1..1]; + var feature direction : FeatureDirectionKind[0..1]; + + derived var feature owningType : Type[0..1] subsets owningNamespace, featuringType; + derived var feature 'type' : Type[0..*] ordered; + derived composite var feature ownedRedefinition : Redefinition[0..*] subsets ownedSubsetting; + derived composite var feature ownedSubsetting : Subsetting[0..*] subsets ownedSpecialization; + derived var feature owningFeatureMembership : FeatureMembership[0..1] subsets owningMembership; + derived var feature endOwningType : Type[0..1] subsets owningType; + derived composite var feature ownedTyping : FeatureTyping[0..*] ordered subsets ownedSpecialization; + derived var feature featuringType : Type[0..*] ordered; + derived composite var feature ownedTypeFeaturing : TypeFeaturing[0..*] ordered subsets ownedRelationship; + derived var feature chainingFeature : Feature[0..*] ordered nonunique; + derived composite var feature ownedFeatureInverting : FeatureInverting[0..*] subsets ownedRelationship; + derived composite var feature ownedFeatureChaining : FeatureChaining[0..*] ordered subsets ownedRelationship; + derived composite var feature ownedReferenceSubsetting : ReferenceSubsetting[0..1] subsets ownedSubsetting; + derived var feature featureTarget : Feature[1..1]; + derived var feature crossFeature : Feature[0..1]; + derived composite var feature ownedCrossSubsetting : CrossSubsetting[0..1] subsets ownedSubsetting; + } + + metaclass FeatureChaining specializes Relationship { + var feature chainingFeature : Feature[1..1] redefines target; + derived var feature featureChained : Feature[1..1] subsets owningRelatedElement redefines source; + } + + datatype FeatureDirectionKind { + member feature 'in' : FeatureDirectionKind[1]; + member feature 'inout' : FeatureDirectionKind[1]; + member feature 'out' : FeatureDirectionKind[1]; + } + + metaclass FeatureInverting specializes Relationship { + var feature featureInverted : Feature[1..1] redefines source; + var feature invertingFeature : Feature[1..1] redefines target; + derived var feature owningFeature : Feature[0..1] subsets featureInverted, owningRelatedElement; + } + + metaclass FeatureMembership specializes OwningMembership { + derived var feature owningType : Type[1..1] redefines membershipOwningNamespace; + derived composite var feature ownedMemberFeature : Feature[1..1] redefines ownedMemberElement; + } + + metaclass FeatureTyping specializes Specialization { + var feature typedFeature : Feature[1..1] redefines specific; + var feature 'type' : Type[1..1] redefines general; + derived var feature owningFeature : Feature[0..1] subsets typedFeature redefines owningType; + } + + metaclass Intersecting specializes Relationship { + var feature intersectingType : Type[1..1] redefines target; + derived var feature typeIntersected : Type[1..1] subsets owningRelatedElement redefines source; + } + + metaclass Multiplicity specializes Feature; + + metaclass Redefinition specializes Subsetting { + var feature redefiningFeature : Feature[1..1] redefines subsettingFeature; + var feature redefinedFeature : Feature[1..1] redefines subsettedFeature; + } + + metaclass ReferenceSubsetting specializes Subsetting { + var feature referencedFeature : Feature[1..1] redefines subsettedFeature; + derived var feature referencingFeature : Feature[1..1] redefines owningFeature, subsettingFeature; + } + + metaclass Specialization specializes Relationship { + var feature general : Type[1..1] redefines target; + var feature specific : Type[1..1] redefines source; + derived var feature owningType : Type[0..1] subsets owningRelatedElement, specific; + } + + metaclass Subclassification specializes Specialization { + var feature superclassifier : Classifier[1..1] redefines general; + var feature 'subclassifier' : Classifier[1..1] redefines specific; + derived var feature owningClassifier : Classifier[0..1] redefines owningType; + } + + metaclass Subsetting specializes Specialization { + var feature subsettedFeature : Feature[1..1] redefines general; + var feature subsettingFeature : Feature[1..1] redefines specific; + derived var feature owningFeature : Feature[0..1] subsets subsettingFeature redefines owningType; + } + + metaclass Type specializes Namespace { + var feature isAbstract : Boolean[1..1]; + var feature isSufficient : Boolean[1..1]; + derived var feature isConjugated : Boolean[1..1]; + + derived composite var feature ownedSpecialization : Specialization[0..*] ordered subsets ownedRelationship; + derived composite var feature ownedFeatureMembership : FeatureMembership[0..*] ordered subsets ownedMembership, featureMembership; + derived var feature 'feature' : Feature[0..*] ordered subsets 'member'; + derived var feature ownedFeature : Feature[0..*] ordered subsets ownedMember; + derived var feature input : Feature[0..*] ordered subsets directedFeature; + derived var feature output : Feature[0..*] ordered subsets directedFeature; + derived var feature inheritedMembership : Membership[0..*] ordered subsets membership; + derived var feature endFeature : Feature[0..*] ordered subsets 'feature'; + derived var feature ownedEndFeature : Feature[0..*] ordered subsets endFeature, ownedFeature; + derived composite var feature ownedConjugator : Conjugation[0..1] subsets ownedRelationship; + derived var feature inheritedFeature : Feature[0..*] ordered subsets 'feature'; + derived var feature 'multiplicity' : Multiplicity[0..1] subsets ownedMember; + derived var feature unioningType : Type[0..*] ordered; + derived composite var feature ownedIntersecting : Intersecting[0..*] ordered subsets ownedRelationship; + derived var feature intersectingType : Type[0..*] ordered; + derived composite var feature ownedUnioning : Unioning[0..*] ordered subsets ownedRelationship; + derived composite var feature ownedDisjoining : Disjoining[0..*] subsets ownedRelationship; + derived var feature featureMembership : FeatureMembership[0..*] ordered; + derived var feature differencingType : Type[0..*] ordered; + derived composite var feature ownedDifferencing : Differencing[0..*] ordered subsets ownedRelationship; + derived var feature directedFeature : Feature[0..*] ordered subsets 'feature'; + } + + metaclass TypeFeaturing specializes Relationship { + var feature featureOfType : Feature[1..1] redefines source; + var feature featuringType : Type[1..1] redefines target; + derived var feature owningFeatureOfType : Feature[0..1] subsets owningRelatedElement, featureOfType; + } + + metaclass Unioning specializes Relationship { + var feature unioningType : Type[1..1] redefines target; + derived var feature typeUnioned : Type[1..1] subsets owningRelatedElement redefines source; + } + + } + + package Kernel { + public import Core::*; + + metaclass Association specializes Classifier, Relationship { + derived var feature relatedType : Type[0..*] ordered nonunique redefines relatedElement; + derived var feature sourceType : Type[0..1] subsets relatedType redefines source; + derived var feature targetType : Type[0..*] subsets relatedType redefines target; + derived var feature associationEnd : Feature[0..*] redefines endFeature; + } + + metaclass AssociationStructure specializes Association, Structure; + + metaclass Behavior specializes Class { + derived var feature 'step' : Step[0..*] subsets 'feature'; + derived var feature parameter : Feature[0..*] ordered redefines directedFeature; + } + + metaclass BindingConnector specializes Connector; + + metaclass BooleanExpression specializes Expression { + derived var feature 'predicate' : Predicate[0..1] redefines 'function'; + } + + metaclass Class specializes Classifier; + + metaclass CollectExpression specializes OperatorExpression { + var feature operator : String[1..1] redefines operator; + } + + metaclass Connector specializes Feature, Relationship { + derived var feature relatedFeature : Feature[0..*] ordered nonunique redefines relatedElement; + derived var feature association : Association[0..*] ordered redefines 'type'; + derived var feature connectorEnd : Feature[0..*] ordered redefines endFeature; + derived var feature sourceFeature : Feature[0..1] ordered subsets relatedFeature redefines source; + derived var feature targetFeature : Feature[0..*] ordered subsets relatedFeature redefines target; + derived var feature defaultFeaturingType : Type[0..1]; + } + + metaclass ConstructorExpression specializes InstantiationExpression; + + metaclass DataType specializes Classifier; + + metaclass ElementFilterMembership specializes OwningMembership { + derived composite var feature condition : Expression[1..1] redefines ownedMemberElement; + } + + metaclass Expression specializes Step { + derived var feature isModelLevelEvaluable : Boolean[1..1]; + + derived var feature 'function' : Function[0..1] redefines 'behavior'; + derived var feature result : Feature[1..1] subsets output, parameter; + } + + metaclass FeatureChainExpression specializes OperatorExpression { + var feature operator : String[1..1] redefines operator; + + derived var feature targetFeature : Feature[1..1] subsets 'member'; + } + + metaclass FeatureReferenceExpression specializes Expression { + derived var feature referent : Feature[1..1] subsets 'member'; + } + + metaclass FeatureValue specializes OwningMembership { + var feature isInitial : Boolean[1..1]; + var feature isDefault : Boolean[1..1]; + + derived var feature featureWithValue : Feature[1..1] subsets membershipOwningNamespace; + derived composite var feature value : Expression[1..1] redefines ownedMemberElement; + } + + metaclass Flow specializes Connector, Step { + derived var feature payloadType : Classifier[0..*] ordered nonunique; + derived var feature targetInputFeature : Feature[0..1] ordered nonunique; + derived var feature sourceOutputFeature : Feature[0..1] ordered nonunique; + derived var feature flowEnd : FlowEnd[0..2] ordered subsets connectorEnd; + derived var feature payloadFeature : PayloadFeature[0..1] subsets ownedFeature; + derived var feature 'interaction' : Interaction[0..*] ordered redefines association, 'behavior'; + } + + metaclass FlowEnd specializes Feature; + + metaclass Function specializes Behavior { + derived var feature isModelLevelEvaluable : Boolean[1..1]; + + derived var feature expression : Expression[0..*] subsets 'step'; + derived var feature result : Feature[1..1] subsets output, parameter; + } + + metaclass IndexExpression specializes OperatorExpression { + var feature operator : String[1..1] redefines operator; + } + + abstract metaclass InstantiationExpression specializes Expression { + derived var feature argument : Expression[0..*] ordered; + derived var feature instantiatedType : Type[1..1] subsets 'member'; + } + + metaclass Interaction specializes Association, Behavior; + + metaclass Invariant specializes BooleanExpression { + var feature isNegated : Boolean[1..1]; + } + + metaclass InvocationExpression specializes InstantiationExpression; + + metaclass LibraryPackage specializes Package { + var feature isStandard : Boolean[1..1]; + } + + metaclass LiteralBoolean specializes LiteralExpression { + var feature value : Boolean[1..1]; + } + + metaclass LiteralExpression specializes Expression; + + metaclass LiteralInfinity specializes LiteralExpression; + + metaclass LiteralInteger specializes LiteralExpression { + var feature value : Integer[1..1]; + } + + metaclass LiteralRational specializes LiteralExpression { + var feature value : Rational[1..1]; + } + + metaclass LiteralString specializes LiteralExpression { + var feature value : String[1..1]; + } + + metaclass Metaclass specializes Structure; + + metaclass MetadataAccessExpression specializes Expression { + derived var feature referencedElement : Element[1..1] subsets 'member'; + } + + metaclass MetadataFeature specializes AnnotatingElement, Feature { + derived var feature 'metaclass' : Metaclass[0..1] subsets 'type'; + } + + metaclass MultiplicityRange specializes Multiplicity { + derived var feature lowerBound : Expression[0..1] subsets bound; + derived var feature upperBound : Expression[1..1] subsets bound; + derived var feature bound : Expression[1..2] ordered subsets ownedMember; + } + + metaclass NullExpression specializes Expression; + + metaclass OperatorExpression specializes InvocationExpression { + var feature operator : String[1..1]; + } + + metaclass Package specializes Namespace { + derived var feature filterCondition : Expression[0..*] ordered subsets ownedMember; + } + + metaclass ParameterMembership specializes FeatureMembership { + derived composite var feature ownedMemberParameter : Feature[1..1] redefines ownedMemberFeature; + } + + metaclass PayloadFeature specializes Feature; + + metaclass Predicate specializes Function; + + metaclass ResultExpressionMembership specializes FeatureMembership { + derived composite var feature ownedResultExpression : Expression[1..1] redefines ownedMemberFeature; + } + + metaclass ReturnParameterMembership specializes ParameterMembership; + + metaclass SelectExpression specializes OperatorExpression { + var feature operator : String[1..1] redefines operator; + } + + metaclass Step specializes Feature { + derived var feature 'behavior' : Behavior[0..*] ordered subsets 'type'; + derived var feature parameter : Feature[0..*] ordered redefines directedFeature; + } + + metaclass Structure specializes Class; + + metaclass Succession specializes Connector; + + metaclass SuccessionFlow specializes Succession, Flow; + + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Links.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Links.kerml new file mode 100644 index 00000000..cf693c61 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Links.kerml @@ -0,0 +1,67 @@ +standard library package Links { + doc + /* + * This package defines associations and features that are related to the typing of links. + */ + + private import Base::Anything; + private import Base::things; + + abstract assoc Link specializes Anything { + doc + /* + * Link is the most general association between two or more things. + */ + + feature participant: Anything[2..*] nonunique ordered; + } + + assoc all BinaryLink specializes Link { + doc + /* + * BinaryLink is the most general binary association between exactly two things, + * nominally directed from source to target. + */ + + feature participant: Anything[2] nonunique ordered redefines Link::participant; + + end feature source: Anything[1] subsets participant; + end feature target: Anything[1] subsets participant; + } + + assoc all SelfLink specializes BinaryLink { + doc + /* + * SelfLink is a binary association in which the things at the two ends are asserted + * to be the same. + */ + + end feature thisThing: Anything redefines source subsets sameThing crosses sameThing.self; + end self2 [1] feature sameThing: Anything redefines target subsets thisThing; + } + + abstract feature links: Link[0..*] nonunique subsets things { + doc + /* + * links is the most general feature of links between individuals. + */ + } + + abstract feature binaryLinks: BinaryLink[0..*] nonunique subsets links { + doc + /* + * binaryLinks is a specialization of links restricted to type BinaryLink. + */ + } + + abstract feature selfLinks: SelfLink[0..*] nonunique subsets binaryLinks { + doc + /* + * selfLinks is a specialization of binaryLinks restricted to type SelfLink. + */ + + end feature thisThing: Anything redefines SelfLink::thisThing, binaryLinks::source; + end feature sameThing: Anything redefines SelfLink::sameThing, binaryLinks::target; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml new file mode 100644 index 00000000..952b1403 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml @@ -0,0 +1,58 @@ +standard library package Metaobjects { + doc + /* + * This package defines Metaclasses and Features that are related to the typing of syntactic and semantic metadata. + */ + + private import Objects::Object; + private import Objects::objects; + private import KerML::Element; + private import KerML::Type; + + abstract metaclass Metaobject specializes Object { + doc + /* + * A Metaobject contains syntactic or semantic information about one or more annotatedElements. + * It is the most general Metaclass. All other Metaclasses must subclassify it directly or indirectly. + */ + + feature redefines self : Metaobject; + + abstract feature annotatedElement : Element[1..*] { + doc + /* + * The Elements annotated by this Metaobject. This is set automatically when a Metaobject is + * instantiated as the value of a MetadataFeature. + */ + } + } + + abstract metaclass SemanticMetadata specializes Metaobject { + doc + /* + * SemanticMetadata is a Metaobject that requires its single annotatedType to directly or indirectly specialize + * a baseType that models the semantics for the annotatedType. + */ + + abstract feature redefines annotatedElement : Type[1] { + doc + /* + * The single annotatedElement of this SemanticMetadata, which must be a Type. + */ + } + + feature baseType : Type[1] { + doc + /* + * The required base Type for the annotatedType. + */ + } + } + + feature metaobjects : Metaobject[0..*] :> objects { + /* + * metaobjects is a specialization of objects restricted to type Metadata. It is the most general + * MetadataFeature. All other MetadataFeatures must subset it directly or indirectly. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Objects.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Objects.kerml new file mode 100644 index 00000000..389ff883 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Objects.kerml @@ -0,0 +1,212 @@ +standard library package Objects { + doc + /* + * This package defines classifiers and features that are related to the typing of objects, including link objects. + */ + + private import Base::Anything; + private import Base::things; + private import Links::*; + private import Occurrences::Occurrence; + private import Occurrences::occurrences; + private import Occurrences::HappensLink; + private import Occurrences::SelfSameLifeLink; + private import Occurrences::WithinBoth; + private import Performances::Performance; + private import Performances::performances; + private import SequenceFunctions::isEmpty; + private import SequenceFunctions::notEmpty; + private import SequenceFunctions::union; + private import CollectionFunctions::contains; + private import ScalarValues::Integer; + private import ScalarValues::Natural; + + abstract struct Object specializes Occurrence { + doc + /* + * Object is the most general class of structural occurrences that may change over time. + */ + + feature self: Object redefines Occurrence::self; + + composite feature subobjects: Object[0..*] subsets objects, suboccurrences + intersects objects, suboccurrences { + doc + /* + * The suboccurrences of this Object that are also Objects. + */ + } + + feature involvingPerformances: Performance[0..*] subsets performances { + doc + /* + * Performances in which this object is involved. + */ + } + + abstract step enactedPerformances: Performance[0..*] subsets involvingPerformances, timeEnclosedOccurrences + intersects involvingPerformances, timeEnclosedOccurrences { + doc + /* + * Performances that are enacted by this object. + */ + } + + composite step ownedPerformances: Performance[0..*] subsets involvingPerformances, timeEnclosedOccurrences, suboccurrences + intersects involvingPerformances, timeEnclosedOccurrences, suboccurrences { + doc + /* + * Performances that are owned by this object. + */ + + feature redefines this default that { + doc + /* + * The owning object is the default "this" reference for all ownedPerformances. + */ + } + } + + portion structuredSpaceBoundary : StructuredSpaceObject[0..1] subsets spaceBoundary { + doc + /* + * A space boundary that is a structured space object. + */ + } + } + + abstract assoc struct LinkObject specializes Link, Object intersects Link, Object { + doc + /* + * LinkObject is the most general association structure, being both a Link and an Object. + */ + } + + assoc struct BinaryLinkObject specializes BinaryLink, LinkObject intersects BinaryLink, LinkObject { + doc + /* + * BinaryLinkObject is the most general binary association structure, being both a + * BinaryLink and a LinkObject. + */ + } + + abstract feature objects: Object[0..*] nonunique subsets occurrences { + doc + /* + * objects is a specialization of occurrences restricted to type Object. + */ + } + + abstract feature linkObjects: LinkObject[0..*] nonunique subsets links, objects intersects links, objects { + doc + /* + * linkObjects is a specializations of links and objects restricted to type LinkObjects. + */ + } + + abstract feature binaryLinkObjects: BinaryLinkObject[0..*] nonunique subsets binaryLinks, linkObjects + intersects binaryLinks, linkObjects { + doc + /* + * binaryLinkObjects is a specialization of binaryLinks and linkObjects restricted to + * type BinaryLinkObjects. + */ + } + + + struct all Body specializes Object { + doc + /* + * A Body is an Object of inner space dimension 3. + */ + + feature redefines innerSpaceDimension = 3; + } + + struct all Surface specializes Object { + doc + /* + * A Surface is an Object of inner space dimension 2. + */ + + feature redefines innerSpaceDimension = 2; + /* The number of "holes" in this Surface, assuming it isClosed. */ + feature genus : Natural[0..1] default 0; + + inv { notEmpty(genus) implies isClosed } + } + + struct all Curve specializes Object { + doc + /* + * A Curve is an Object of inner space dimension 1. + */ + + feature redefines innerSpaceDimension = 1; + } + + struct all Point specializes Object { + doc + /* + * A Point is an Object of inner space dimension 0. + */ + + feature redefines innerSpaceDimension = 0; + } + + abstract struct StructuredSpaceObject specializes Object { + doc + /* + * A StructuredSpaceObject is an Object that is broken up into smaller structured space objects (cells) of + * the same or lower inner space dimension: faces that are surfaces, edges that are curves, and vertices + * that are points, with edges and vertices on the boundary of faces, and vertices on the boundary of + * edges. Cells meet when a structured space object is closed, as required to be a space boundary of + * an object (faces meet at their edges and/or vertices, while edges meet at their vertices). The + * inner space dimension of structured space object is the highest of their cells. + */ + + abstract portion feature structuredSpaceObjectCells : StructuredSpaceObject[1..*] subsets Occurrence::spaceSlices { + feature cellOrientation : Integer [0..1]; + inv { notEmpty(cellOrientation) implies (cellOrientation >= -1 & cellOrientation <= 1) } + } + + comment about StructuredSurface, StructuredCurve, StructuredPoint + /* + * The structures StructuredSurface, StructuredCurve and StructuredPoint provide common, necessary redefinitions of + * innerSpaceDimension. They also provide single types for the StructuredSpaceObject features faces, edges and + * vertices, which avoids problems when these features are related by connectors with ends that have owned + * cross features. + */ + struct StructuredSurface specializes StructuredSpaceObject, Surface { + feature redefines StructuredSpaceObject::innerSpaceDimension, Surface::innerSpaceDimension; + } + struct StructuredCurve specializes StructuredSpaceObject, Curve { + feature redefines StructuredSpaceObject::innerSpaceDimension, Curve::innerSpaceDimension; + } + struct StructuredPoint specializes StructuredSpaceObject, Point { + feature redefines StructuredSpaceObject::innerSpaceDimension, Point::innerSpaceDimension; + } + + portion feature faces : StructuredSurface[0..*] ordered subsets structuredSpaceObjectCells { + feature redefines that : StructuredSpaceObject; + feature redefines edges subsets that.edges; + feature redefines vertices subsets that.vertices; + derived feature redefines spaceBoundary; + inv { isEmpty(spaceBoundary) == isEmpty(union(edges, vertices)) } + inv { notEmpty(spaceBoundary) implies contains(spaceBoundary.unionsOf, union(edges, vertices)) } + } + + portion feature edges : StructuredCurve[0..*] ordered subsets structuredSpaceObjectCells { + feature redefines that : StructuredSpaceObject; + feature redefines vertices subsets that.vertices; + derived feature redefines spaceBoundary; + inv { isEmpty(spaceBoundary) == isEmpty(vertices) } + inv { notEmpty(spaceBoundary) implies contains(spaceBoundary.unionsOf, vertices) } + } + + portion feature vertices : StructuredPoint[0..*] ordered subsets structuredSpaceObjectCells; + + derived feature redefines innerSpaceDimension = + if notEmpty(faces) ? 2 else if notEmpty(edges) ? 1 else 0; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Observation.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Observation.kerml new file mode 100644 index 00000000..85c78ff0 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Observation.kerml @@ -0,0 +1,161 @@ +standard library package Observation { + doc + /* + * This package models a framework for monitoring Boolean conditions and notifying + * registered observers when they change from false to true. + */ + + private import ScalarValues::Boolean; + private import Occurrences::Occurrence; + private import Occurrences::Life; + private import SequenceFunctions::including; + private import SequenceFunctions::excluding; + private import ControlFunctions::select; + private import ControlPerformances::DecisionPerformance; + private import ControlPerformances::IfThenPerformance; + private import FeatureReferencingPerformances::FeatureWritePerformance; + private import FeatureReferencingPerformances::BooleanEvaluationResultToMonitorPerformance; + private import Transfers::TransferBefore; + + private struct DefaultMonitorLife[1] :> ChangeMonitor, Life { + doc + /* + * DefaultMonitorLife is the classifier of the singleton Life of the defaultMonitor. + */ + } + + feature defaultMonitor[1] : DefaultMonitorLife { + doc + /* + * defaultMonitor is a single ChangeMonitor that can be used as a default. + */ + } + + struct ChangeSignal { + doc + /* + * A ChangeSignal is a signal to be sent when the Boolean result of its + * changeCondition Expression changes from false to true. + */ + + bool signalCondition { + doc + /* + * A BooleanExpression whose result is being monitored. + */ + } + + feature signalMonitor : ChangeMonitor { + doc + /* + * The ChangeMonitor responsible for monitoring the signalCondition. + */ + } + } + + private behavior ObserveChange { + doc + /* + * Each Performance of ObserveChange waits for the result of the Boolean + * condition of a given ChangeSignal to change from false to true, and, when + * it does, sends the ChangeSignal to a given observer Occurrence. + */ + + in feature changeObserver : Occurrence[1]; + in feature changeSignal : ChangeSignal[1]; + + composite step wait : IfThenPerformance { + doc + /* + * If the result of the changeSignal.signalCondition is false, then wait for + * it to become true. + */ + + in bool redefines ifTest { + not changeSignal.signalCondition() + } + in step redefines thenClause : BooleanEvaluationResultToMonitorPerformance { + in bool onOccurrence = changeSignal.signalCondition; + } + } + + succession wait then transfer; + + step transfer : TransferBefore[1] + redefines outgoingTransfersFromSelf + subsets changeObserver.incomingTransfers { + doc + /* + * Then send changeSignal to changeObserver. + */ + + end feature source { + feature redefines sourceOutput = changeSignal; + } + end feature target; + } + } + + struct ChangeMonitor { + doc + /* + * A ChangeMonitor is a collection of ongoing ChangeSignal observations + * for various observer Occurrences. It provides convenient operations for + * starting and canceling the observations it manages. + */ + + private thisMonitor : ChangeMonitor redefines self; + private composite feature observations[0..*] : ObserveChange; + + private behavior AssignObservations specializes FeatureWritePerformance { + doc + /* + * Assign a replacement set of observations as those being managed by a + * given ChangeMonitor. + */ + + in feature monitor : ChangeMonitor redefines onOccurrence { + feature redefines startingAt { + feature redefines accessedFeature, observations; + } + } + inout feature redefines replacementValues[0..*] : ObserveChange; + } + + step startObservation { + doc + /* + * Start an observation of a given ChangeSignal for a given Occurrence. + */ + + in observer : Occurrence[1]; + in signal : ChangeSignal[1]; + private composite step observation : ObserveChange { + in changeObserver = observer; + in changeSignal = signal; + } + private composite step addObservation : AssignObservations[1] { + in monitor = thisMonitor; + inout replacementValues = observations->including(observation); + } + } + + step cancelObservation { + doc + /* + * Cancel all observations of a given ChangeSignal for a given Occurrence. + */ + + in observer : Occurrence[1]; + in signal : ChangeSignal[1]; + private feature observations[0..*] : ObserveChange = + observations->select{in observation : ObserveChange; + observation.changeObserver == observer and observation.changeSignal == signal + }; + private composite step removeObservation : AssignObservations[1] { + in monitor = thisMonitor; + inout replacementValues = observations->excluding(observations); + } + } + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml new file mode 100644 index 00000000..0627090c --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml @@ -0,0 +1,992 @@ +standard library package Occurrences { + doc + /* + * This package defines modeling constructs for anything existing or occurring in time and space, with + * associations between them that assert temporal and spatial relationships. + */ + + private import Base::Anything; + private import Base::things; + private import Base::DataValue; + private import ScalarValues::Natural; + private import ScalarValues::Boolean; + private import Links::*; + private import Clocks::*; + private import Collections::Set; + private import Collections::OrderedSet; + private import CollectionFunctions::contains; + private import SequenceFunctions::isEmpty; + private import SequenceFunctions::notEmpty; + private import SequenceFunctions::includes; + private import SequenceFunctions::union; + + abstract class Occurrence specializes Anything disjoint from DataValue { + doc + /* + * Occurrence is the most general classifier of entities that have identity and + * occur over time and space. + * + * The features of Occurrence specify the semantics of associations between occurrences that + * assert complete inclusion and exclusion in time or space, or both, which includes + * portions of an occurrence (having the same identity). Portions include slices and shots + * over time and space. + */ + + private import SequenceFunctions::*; + + feature portionOfLife: Life[1] subsets portionOf default self; + + feature self: Occurrence[1] redefines Anything::self subsets timeSlices, spaceSlices, spaceTimeCoincidentOccurrences, sameLifeOccurrences; + feature sameLifeOccurrences: Occurrence[1..*] subsets things; + + feature this : Occurrence[1] default self { + doc + /* + * The "context" Occurrence within which this Occurrence takes place. By default, it is this + * Occurrence itself. However, this is overridden for ownedPerformances of Objects and + * subperformances of Performances. + */ + } + connector :HappensDuring from [1] self to [1] this; + + feature localClock : Clock[1] default universalClock { + doc + /* + * A local Clock to be used as the corresponding time reference for this Occurrence + * and, by default, all ownedOccurrences. By default this is the singleton universalClock. + */ + } + + composite feature suboccurrences: Occurrence[0..*] subsets occurrences { + doc + /* + * Composite suboccurrences of this Occurrence. + */ + + feature redefines localClock default (that as Occurrence).localClock { + doc + /* + * The localClock of a suboccurrence defaults to the localClock of its containing + * Occurrence. + */ + } + + feature redefines incomingTransferSort default (that as Occurrence).incomingTransferSort; + } + + /* Occurrences may be suboccurrences of no more than one other occurrence. */ + feature superoccurrence: Occurrence[0..1] subsets occurrences inverse of suboccurrences; + + feature withoutOccurrences: Occurrence[0..*] unions successors, predecessors, outsideOfOccurrences + inverse of withoutOccurrences { + doc + /* + * Occurrences that are completely separate either in time or space or both. + */ + + /* withoutOccurrences is irreflexive. */ + inv { (that as Occurrence) != (that.that as Occurrence) } + } + + feature predecessors: Occurrence[0..*] subsets withoutOccurrences { + doc + /* + * Occurrences that end before this occurrence starts. + */ + } + + feature successors: Occurrence[0..*] subsets withoutOccurrences inverse of predecessors { + doc + /* + * Occurrences that start after this occurrence ends. + */ + + /* successors is transitive. */ + feature earlierOccurrence: Occurrence[1] subsets that; + feature laterOccurrence: Occurrence[1] subsets self; + subset laterOccurrence.successors subsets earlierOccurrence.successors; + } + + feature immediatePredecessors: Occurrence[0..*] subsets predecessors { + doc + /* + * Occurrences that end just before this occurrence starts, with no + * possibility of other occurrences happening in the time between them. + */ + } + + feature immediateSuccessors: Occurrence[0..*] subsets successors inverse of immediatePredecessors { + doc + /* + * Occurrences that start just after this occurrence ends, with no + * possibility of other occurrences happening in the time between them. + */ + + disjoint earlierOccurrence.successors from laterOccurrence.predecessors; + } + + feature timeEnclosedOccurrences: Occurrence[1..*] subsets occurrences { + doc + /* + * Occurrences that start no earlier than and end no later than + * this occurrence, including at least this occurrence. + */ + + /* + * timeEnclosedOccurrences and successors constrain each other. All successors of + * (occurrences happening after) time enclosing occurrences (inverse of + * timeEnclosedOccurrences) are also successors of their timeEnclosedOccurrences. + * And predecessors of (occurrences happening before) time enclosing occurrences + * are predecessors of their timeEnclosedOccurrences. + */ + feature longerOccurrence: Occurrence[1] subsets that; + feature shorterOccurrence: Occurrence[1] subsets self; + subset longerOccurrence.predecessors subsets shorterOccurrence.predecessors; + subset longerOccurrence.successors subsets shorterOccurrence.successors; + + /* timeEnclosedOccurrences is transitive. */ + subset shorterOccurrence.timeEnclosedOccurrences subsets longerOccurrence.timeEnclosedOccurrences; + } + + feature all timeCoincidentOccurrences: Occurrence[1..*] subsets timeEnclosedOccurrences inverse of timeCoincidentOccurrences { + doc + /* + * Occurrences that start at the same time and end at the same time as this occurrence, + * including at least this occurrence. + */ + + feature thatOccurrence: Occurrence[1] subsets longerOccurrence; + feature thisOccurrence: Occurrence[1] subsets shorterOccurrence; + + /* timeCoincidentOccurrences occurrences happen during each other. */ + connector :HappensDuring + from [1] shorterOccurrence references thisOccurrence + to [1] longerOccurrence references thatOccurrence; + + /* timeCoincidentOccurrences is transitive */ + subset thatOccurrence.timeCoincidentOccurrences + subsets thisOccurrence.timeCoincidentOccurrences; + } + + feature spaceEnclosedOccurrences: Occurrence[1..*] subsets occurrences { + doc + /* + * Occurrences that this one completely includes in space (not necessarily in time), + * including this one. + */ + + feature largerSpace: Occurrence[1] subsets that; + feature smallerSpace: Occurrence[1] subsets self; + + /* spaceEnclosedOccurrences is transitive. */ + subset smallerSpace.spaceEnclosedOccurrences subsets largerSpace.spaceEnclosedOccurrences; + + /* smallerSpace are outside occurrences that are outside their largerSpace */ + subset smallerSpace.outsideOfOccurrences subsets largerSpace.outsideOfOccurrences; + } + + feature all spaceTimeEnclosedOccurrences: Occurrence[1..*] subsets timeEnclosedOccurrences, spaceEnclosedOccurrences + intersects timeEnclosedOccurrences, spaceEnclosedOccurrences { + doc + /* + * Occurrences that this one completely includes in both space and time, + * including this one. + */ + + /* spaceTimeEnclosedOccurrences is transitive */ + subset largerSpace.spaceTimeEnclosedOccurrences subsets smallerSpace.spaceTimeEnclosedOccurrences; + } + + feature all spaceTimeEnclosedPoints : Occurrence[1..*] subsets spaceTimeEnclosedOccurrences { + doc + /* + * All space time enclosed occurrences that take up zero time and space. + */ + + redefines innerSpaceDimension = 0; + binding [1] startShot = [1] endShot; + } + + feature spaceTimeCoincidentOccurrences: Occurrence[1..*] + subsets timeCoincidentOccurrences, spaceEnclosedOccurrences, spaceTimeEnclosedOccurrences + intersects timeCoincidentOccurrences, spaceEnclosedOccurrences inverse of spaceTimeCoincidentOccurrences { + doc + /* + * Occurrences that this one completely includes in both space and time, + * and vice-versa, including this one. + */ + + feature redefines thatOccurrence subsets largerSpace; + feature redefines thisOccurrence subsets smallerSpace; + + /* spaceTimeCoincidentOccurrences occurrences are inside of each other. */ + connector :InsideOf + from [1] largerSpace references thatOccurrence + to [1] smallerSpace references thisOccurrence; + + /* spaceTimeCoincidentOccurrences is transitive */ + subset thatOccurrence.spaceTimeCoincidentOccurrences + subsets thisOccurrence.spaceTimeCoincidentOccurrences; + } + + feature outsideOfOccurrences: Occurrence[0..*] subsets withoutOccurrences inverse of outsideOfOccurrences { + doc + /* + * Occurrences that do not overlap in space (not necessarily in time, see successors). + */ + } + + feature justOutsideOfOccurrences: Occurrence[0..*] subsets outsideOfOccurrences inverse of justOutsideOfOccurrences { + doc + /* + * Occurrences that have no space between some of their space slices and some space slices of this occurrence. + */ + + feature separateSpaceToo: Occurrence[1] subsets that; + feature separateSpace: Occurrence[1] subsets self; + + connector :MatesWith [1..*] + from [0..*] separateSpaceToo references separateSpaceToo.spaceSlices + to [0..*] separateSpace references separateSpace.spaceSlices; + } + + feature matingOccurrences: Occurrence[1..*] subsets justOutsideOfOccurrences inverse of matingOccurrences { + doc + /* + * Occurrences that have no space between them and this one. + */ + + feature matingSpaceToo: Occurrence[1] subsets that; + feature matingSpace: Occurrence[1] subsets self; + feature matingOccurrence: Occurrence [1] { + portion feature redefines spaceBoundary [1]; + inv { contains(unionsOf, union(matingSpaceToo, matingSpace)) } + portion feature redefines spaceInterior [0]; + } + } + + feature innerSpaceDimension : Natural [1] { + doc + /* + * The number of variables needed to identify space points in this occurrence, from 0 + * to 3, without regard to higher dimensional spaces it might be embedded in. + */ + } + + inv { innerSpaceDimension <= 3 } + + feature outerSpaceDimension : Natural [0..1] { + doc + /* + * For occurrences of innerSpaceDimension 1 or 2, the number of variables needed to + * identify their space points in higher dimensions they might be embedded in, from + * the innerSpaceDimension to 3. An outerSpaceDimension equal to innerSpaceDimension + * indicates the occurrence is spatially straight (innerSpaceDimension 1 embedded in + * 2 or 3 dimensions) or flat (innerSpaceDimension 2 embedded in 3 dimensions). + */ + } + inv { notEmpty(outerSpaceDimension) implies + (outerSpaceDimension >= innerSpaceDimension & outerSpaceDimension <= 3) } + + portion feature all portions: Occurrence[1..*] subsets spaceTimeEnclosedOccurrences { + doc + /* + * All spaceTimeEnclosedOccurrences that have the same portionOfLife (considered the same + * thing occurring). + */ + + portion redefines portionOfLife = (that as Occurrence).portionOfLife; + } + + feature portionOf : Occurrence[1..*] inverse of portions { + doc + /* + * Occurrences of which this occurrence is a portion, including at + * least this occurrence. + */ + } + + portion feature timeSlices: Occurrence[1..*] subsets portions { + doc + /* + * Portions of an occurrence taking up all of its space over some period of time, + * including at least this occurrence. + */ + } + + feature timeSliceOf : Occurrence[1..*] subsets portionOf inverse of timeSlices { + doc + /* + * Occurrences of which this occurrence is a time slice, including at least this + * occurrence. + */ + + feature timeSliceOccurrence: Occurrence[1] subsets that; + feature timeSlicedOccurrence: Occurrence[1] subsets self; + + /* timeSliceOf is transitive */ + subset timeSlicedOccurrence.timeSliceOf subsets timeSliceOccurrence.timeSliceOf; + } + + portion feature all snapshots: Occurrence[1..*] subsets timeSlices { + doc + /* + * Time slices of an occurrence that happen at a single instant of time + * (i.e., have no duration). + */ + binding [1] startShot = [1] endShot; + } + inv { snapshots == union(startShot, union(middleTimeSlice.snapshots, endShot)) } + + feature snapshotOf : Occurrence[0..*] subsets timeSliceOf inverse of snapshots { + doc + /* + * Occurrences of which this occurrence is a snapshot. + */ + } + + portion feature startShot: Occurrence[1] subsets snapshots { + doc + /* + * The snapshot representing the start of the occurrence in time. + */ + } + + portion feature middleTimeSlice: Occurrence[0..1] subsets timeSlices { + doc + /* + * A time slice that takes all the time between the start shot and end shot. There + * is none when the startShot and endShot are the same. + */ + } + inv { isEmpty((that as Occurrence).middleTimeSlice) == ((that as Occurrence).startShot == (that as Occurrence).endShot) } + + connector :HappensJustBefore + from [1] earlierOccurrence references startShot + to [0..1] laterOccurrence references middleTimeSlice { + doc + /* + * The startShot happens immediately before the middle time slice. + */ + } + + portion feature endShot: Occurrence[1] subsets snapshots { + doc + /* + * The snapshot at the end of the occurrence in time. + */ + + /* suboccurrences at the end of an Occurrence must also end. */ + feature subendshot : Occurrence [0..*] chains self.suboccurrences.endShot { + feature superendshot : Occurrence [1] subsets that; + subset superendshot subsets self.timeCoincidentOccurrences; } + } + + connector :HappensJustBefore + from [0..1] earlierOccurrence references middleTimeSlice + to [1] laterOccurrence references endShot { + doc + /* + * The endShot happens after the middle time slice. + */ + } + + portion feature spaceSlices: Occurrence[1..*] subsets portions { + doc + /* + * Portions of this occurrence that extend for exactly the same time and some or all + * the space, relative to spatial location of this occurrence, including at least + * this occurrence. + */ + } + + feature spaceSliceOf: Occurrence[1..*] subsets portionOf inverse of spaceSlices { + doc + /* + * Occurrences of which this occurrence is a space slice, including at least this + * occurrence. + */ + + feature spaceSliceOccurrence: Occurrence[1] subsets that; + feature spaceSlicedOccurrence: Occurrence[1] subsets self; + inv { spaceSliceOccurrence.innerSpaceDimension <= spaceSlicedOccurrence.innerSpaceDimension } + + /* spaceSliceOf is transitive */ + subset spaceSlicedOccurrence.spaceSliceOf subsets spaceSliceOccurrence.spaceSliceOf; + } + + portion feature spaceShots: Occurrence[1..*] subsets spaceSlices { + doc + /* + * All spaceSlices of this occurrence that are of a lower inner space dimension than it. + */ + } + + feature all spaceShotOf: Occurrence[0..*] subsets spaceSliceOf inverse of spaceShots { + doc + /* + * All occurrences of which this occurrence is a space shot. + */ + + feature spaceShotOccurrence: Occurrence[1] subsets that; + feature spaceShottedOccurrence: Occurrence[1] subsets self; + inv { spaceShotOccurrence.innerSpaceDimension < spaceShottedOccurrence.innerSpaceDimension } + + /* spaceShotOf is transitive */ + subset spaceShottedOccurrence.spaceShotOf subsets spaceShotOccurrence.spaceShotOf; + } + + feature unionsOf: Set[0..*] { + doc + /* + * Sets of occurrences, where the time and space taken by all the occurrences in each + * set together is the same as taken by this occurrence (all four dimensional points in + * the occurrences of each set are at the same time and space as those of this + * occurrence). + */ + + feature redefines elements: Occurrence[0..*]; + feature union: Occurrence[0..1]; + + connector :Within + from [0..*] smallerOccurrence references elements + to [1] largerOccurrence references union; + connector :Within + from [0..*] smallerOccurrence references union.spaceTimeEnclosedPoints + to [1..*] largerOccurrence references elements; + } + binding [0..1] unionsOf.union = [1] self; + + feature intersectionsOf: Set[0..*] { + doc + /* + * Sets of occurrences, where the time and space taken in common between the occurrences + * in each set is at the same as taken by this occurrence (all four dimensional points + * common to the occurrences in each set are at the same time and space as those in this + * occurrence). + */ + + feature redefines elements: Occurrence[0..*] { + feature all notIntersection: Occurrence[0..*] subsets spaceTimeEnclosedPoints; + } + feature intersection: Occurrence[0..1]; + + connector :Within + from [1] smallerOccurrence references intersection + to [0..*] largerOccurrence references elements; + connector :Without + from [0..*] separateOccurrenceToo references elements.notIntersection + to [1] separateOccurrence references intersection; + connector :Without + from [0..*] separateOccurrenceToo references elements.notIntersection + to [1..*] separateOccurrence references elements; + } + binding [0..1] intersectionsOf.intersection = [1] self; + + feature differencesOf: OrderedSet[0..*] { + doc + /* + * Ordered sets of occurrences, where the time and space taken by first occurrence in + * each set that is not in the time and space taken by the remaining occurrences is the + * same as taken by this occurrence (all four dimensional points in the minuend that are + * not in any subtrahend are at the same time and space as those in this occurrence). + */ + feature redefines elements: Occurrence[0..*]; + feature difference: Occurrence[0..1]; + feature minuend: Occurrence [0..1] subsets elements, interdiff.elements = head(elements); + feature subtrahend: Occurrence[*] subsets elements = tail(elements); + feature interdiff: Set [0..1] { + feature redefines elements: Occurrence[1..*]; + feature all notSubtrahend: Occurrence [0..*] subsets elements; + } + + connector :Without + from [0..*] separateOccurrenceToo references interdiff.notSubtrahend + to [1..*] separateOccurrence references subtrahend; + + inv { isEmpty(difference) == isEmpty(interdiff) } + inv { notEmpty(difference) implies (difference.intersectionsOf == interdiff) } + } + binding [0..1] differencesOf.difference = [1] self; + + portion feature spaceInterior: Occurrence[0..1] subsets spaceSlices { + doc + /* + * A space slice of this occurrence that includes all its space shots except the + * space boundary, which must exist and be outsideOf it. The space interior must be + * of the same inner space dimension as this occurrence, except if it is zero, + * whereupon there is no space interior. + */ + } + + feature spaceInteriorOf: Occurrence[0..1] subsets spaceSliceOf inverse of spaceInterior { + doc + /* + * An Occurrence of which this one is the space interior. + */ + } + + inv { notEmpty(spaceInterior) implies spaceInterior.innerSpaceDimension == innerSpaceDimension } + + portion feature spaceBoundary: Occurrence[0..1] subsets spaceShots { + doc + /* + * The space shot of this Occurrence that is not among those of its space interior, + * which must be outside it. It must not have a spaceBoundary. It can be divided + * into space slices that also have no spaceBoundary, where the outer one surrounds + * the inner ones. + */ + + inv { isClosed == true } + + feature spaceBounder: Occurrence [1] subsets self; + + feature outer: Occurrence [0..1] subsets spaceSlices { + feature redefines isClosed = true; + feature redefines innerSpaceDimension = spaceBounder.innerSpaceDimension; + } + + feature inner: Occurrence [0..*] subsets spaceSlices { + feature redefines isClosed = true; + feature redefines innerSpaceDimension = spaceBounder.innerSpaceDimension; + } + + inv { notEmpty(inner) implies notEmpty(outer) } + inv { notEmpty(outer) implies + contains(unionsOf, union(outer, inner)) } + } + + feature spaceBoundaryOf: Occurrence[0..*] subsets spaceShotOf inverse of spaceBoundary { + doc + /* + * An Occurrence of which this one is the space boundary. + */ + + feature spaceBounderOf: Occurrence subsets self; + inv { spaceBounderOf.spaceBoundary == that.that } + } + + inv { not isClosed implies contains((that as Occurrence).unionsOf, union(spaceBoundary, spaceInterior)) } + inv { innerSpaceDimension == 0 implies isEmpty(spaceBoundary) } + + connector :SurroundedBy + from [0..*] surroundedSpace references spaceInterior + to [1] surroundingSpace references spaceBoundary.outer; + + connector :SurroundedBy + from [0..*] surroundedSpace references spaceBoundary.inner + to [1] surroundingSpace references spaceInterior; + + feature innerSpaceOccurrences: Occurrence [0..*] subsets outsideOfOccurrences { + doc + /* + * Occurrences that completely occupy the space surrounded by an inner space boundary of this occurrence. + */ + + feature redefines innerSpaceOccurrences [0]; + + /* innerSpace is the spaceInterior of hOccurrence, which is formed from an inner space boundary of outerSpace. */ + feature outerSpace: Occurrence[1] subsets that; + feature innerSpace: Occurrence[1] subsets self; + feature hOccurrence: Occurrence [1]; + connector hbi: WithinBoth [0..1] from [0..1] hOccurrence.spaceBoundary to [0..1] outerSpace.spaceBoundary.inner; + connector hbo: WithinBoth [0..1] from [0..1] hOccurrence.spaceBoundary to [0..1] outerSpace; + connector :WithinBoth from [1] hOccurrence.spaceInterior to [1] innerSpace; + inv { (isEmpty(hbi) == notEmpty(hbo)) & (notEmpty(hbo) == outerSpace.isClosed) } + } + + feature surroundedByOccurrences: Occurrence [0..*] subsets outsideOfOccurrences { + doc + /* + * Occurrences that have inner spaces that completely include this occurrence. + */ + + feature surroundedSpace: Occurrence [1] subsets that; + feature surroundingSpace: Occurrence [1] subsets self; + + connector :InsideOf + from [0..1] smallerOccurrence references surroundedSpace + to [1..*] largerOccurrence references surroundingSpace.innerSpaceOccurrences; + } + + feature isClosed : Boolean [1] { + doc + /* + * Tells whether an occurrence has a spaceBoundary, true if it does, false otherwise. + */ + } + inv { isClosed == isEmpty((that as Occurrence).spaceBoundary) } + + var feature incomingTransfers: Transfers::Transfer[0..*] subsets Transfers::transfers { + doc + /* + * The incoming transfers received by this occurrence. + */ + + end feature redefines source; + end feature redefines target; + } + + feature isDispatch : Boolean[1] default false { + doc + /* + * Determines whether transfers to the dispatch scope might be accepted more than once. + */ + } + feature dispatchScope: Occurrence [1] default self; + connector :HappensDuring from [1] self to [1] dispatchScope; + + feature isRunToCompletion: Boolean [1] default true { + doc + /* + * Determines whether transition performances might happen during state entry performances + * within the run to completion scope. + */ + } + feature runToCompletionScope: Occurrence [1] default self; + connector :HappensDuring from [1] self to [1] runToCompletionScope; + + feature incomingTransferSort : IncomingTransferSort [0..*] default earlierFirstIncomingTransferSort { + doc + /* + * Determines which transfer to accept when multiple are available and which of the unaccepted + * transfers are never to be accepted (dispatched). + */ + } + + var feature all incomingTransfersToSelf subsets incomingTransfers { + doc + /* + * The incoming transfers with this occurrence as the target. + */ + + end feature redefines source; + end feature redefines target = that; + } + + var feature outgoingTransfers: Transfers::Transfer[0..*] subsets Transfers::transfers { + doc + /* + * The outgoing transfers sent from this occurrence. + */ + + end feature redefines source; + end feature redefines target; + } + + var feature all outgoingTransfersFromSelf subsets outgoingTransfers { + doc + /* + * The outgoing transfers with this occurrence as the source. + */ + + end feature redefines source = that; + end feature redefines target; + } + } + + abstract class all Life specializes Occurrence { + binding portionOf = self { + doc + /* + * Lives are only portions of themselves. + */ + } + } + + abstract feature occurrences: Occurrence[0..*] nonunique subsets things; + + predicate IncomingTransferSort specializes Performances::BooleanEvaluation { + in t1: Transfers::Transfer [1]; + in t2: Transfers::Transfer [1]; + return t1First: Boolean [1]; + } + + bool earlierFirstIncomingTransferSort : IncomingTransferSort { + return t1First = includes(t1.endShot.successors, t2.endShot); + } + + assoc all SelfSameLifeLink specializes BinaryLink { + doc + /* + * SelfSameLifeLink is a binary association that is equivalent to SelfLink if the + * linked things are DataValues, but asserts that the linked things are portions of + * the same Life if they are Occurrences. + */ + + end myselfSameLives [1..*] feature myselfSameLife: Anything redefines source; + end selfSameLives [1..*] feature selfSameLife: Anything redefines target; + + feature all sourceOccurrence : Occurrence [0..1] subsets myselfSameLife; + feature all targetOccurrence : Occurrence [0..1] subsets selfSameLife, sourceOccurrence.sameLifeOccurrences; + binding oSelf of sourceOccurrence.portionOfLife = targetOccurrence.portionOfLife; + + feature all sourceDataValue : DataValue [0..1] subsets myselfSameLife; + feature all targetDataValue : DataValue [0..1] subsets selfSameLife; + binding dSelf of sourceDataValue = targetDataValue; + } + + subclassifier SelfLink specializes SelfSameLifeLink; + + assoc HappensLink specializes BinaryLink disjoint from Occurrence { + doc + /* + * HappensLink is the most general associations that assert temporal relationships between a + * sourceOccurrence and a targetOccurrence. Because HappensLinks assert temporal + * relationships, they cannot also be Occurrences that happen in time. Therefore + * HappensLink is disjoint with LinkObject, that is, no HappensLink can also be a + * LinkObject. + */ + + end feature sourceOccurrence: Occurrence redefines BinaryLink::source; + end feature targetOccurrence: Occurrence redefines BinaryLink::target; + } + + assoc all HappensDuring specializes HappensLink { + doc + /* + * HappensDuring asserts that the shorterOccurrence happens during the longerOccurrence. + * That is, the time interval of the shorterOccurrence is completely within that of the + * longerOccurrence, or every snapshot of the shorterOccurrence happens while (at the + * same time as) some snapshot of the longerOccurrence. Note that this means every + * Occurrence HappensDuring itself and that HappensDuring is transitive. + */ + + end feature shorterOccurrence: Occurrence redefines sourceOccurrence crosses longerOccurrence.timeEnclosedOccurrences; + end happensDuring [1..*] feature longerOccurrence: Occurrence redefines targetOccurrence; + } + + assoc all HappensWhile specializes HappensDuring { + doc + /* + * HappensWhile asserts that two occurrences happen during each other, that is, they + * each start at the same time and end at the same time. + */ + + end feature thisOccurrence: Occurrence redefines shorterOccurrence crosses thatOccurrence.timeCoincidentOccurrences; + end happensWhile [1..*] subsets timeCoincidentOccurrences feature thatOccurrence: Occurrence redefines longerOccurrence; + } + + assoc SpaceLink specializes BinaryLink disjoint from Occurrence { + doc + /* + * SpaceLink is the most general association that asserts spatial relationships between a + * sourceOccurrence and a targetOccurrence. Because SpaceLinks assert spatial + * relationships, they cannot also be Occurrences that happen in space. Therefore + * SpaceLink is disjoint with LinkObject, that is, no SpaceLink can also be a + * LinkObject. + */ + + end feature sourceOccurrence: Occurrence redefines BinaryLink::source; + end feature targetOccurrence: Occurrence redefines BinaryLink::target; + } + + assoc all InsideOf specializes SpaceLink { + doc + /* + * InsideOf asserts that its largerSpace completely overlaps its smallerSpace in space (not + * necessarily in time, see HappensDuring). That is, all four dimensional points of the + * smallerSpace are in the spatial extent of the largerSpace. Note that this means every + * Occurrence is InsideOf itself and that InsideOf is transitive. + */ + + end feature smallerSpace: Occurrence redefines source crosses largerSpace.spaceEnclosedOccurrences; + end insideOf [1..*] feature largerSpace: Occurrence redefines target; + } + + assoc all Within specializes HappensDuring, InsideOf intersects HappensDuring, InsideOf { + doc + /* + * Within asserts that its largerOccurrence completely overlaps its smallerOccurrence in + * time and space. That is, all four dimensional points of the smallerOccurrence happen + * during and are included in the space of the largerOccurrence. This means every occurrence + * is Within itself and Within is transitive. + */ + + end feature smallerOccurrence: Occurrence redefines shorterOccurrence, smallerSpace + crosses largerOccurrence.spaceTimeEnclosedOccurrences; + end within [1..*] feature largerOccurrence: Occurrence redefines longerOccurrence, largerSpace; + } + + assoc all WithinBoth specializes Within, HappensWhile { + doc + /* + * WithinBoth asserts that two occurrences are Within each other, that is, they occupy the + * same four dimensional region. Note that this means every Occurrence is WithinBoth with + * itself and transitive. + */ + + end feature thisOccurrence redefines smallerOccurrence, HappensWhile::thisOccurrence + crosses thatOccurrence.spaceTimeCoincidentOccurrences; + end withinBoth subsets spaceTimeCoincidentOccurrences feature thatOccurrence redefines largerOccurrence, HappensWhile::thatOccurrence; + } + + assoc all PortionOf specializes Within { + doc + /* + * PortionOf asserts one occurrence is a portion of another, including at least itself. + */ + + end feature portionOccurrence: Occurrence redefines smallerOccurrence crosses portionedOccurrence.portions; + end portionWithin subsets portionOf feature portionedOccurrence: Occurrence redefines largerOccurrence; + } + + assoc all TimeSliceOf specializes PortionOf { + doc + /* + * TimeSliceOf asserts one occurrence is a time slice of another, including at least itself. + */ + + end feature timeSliceOccurrence: Occurrence redefines portionOccurrence crosses timeSlicedOccurrence.timeSlices; + end timeSliceWithin subsets timeSliceOf feature timeSlicedOccurrence: Occurrence redefines portionedOccurrence; + } + + assoc all SnapshotOf specializes TimeSliceOf { + doc + /* + * SnapshotsOf asserts one occurrence is a snapshot of another. + */ + + end feature snapshotOccurrence: Occurrence redefines timeSliceOccurrence crosses snapshottedOccurrence.snapshots; + end snapshotWithin subsets snapshotOf feature snapshottedOccurrence: Occurrence redefines timeSlicedOccurrence; + } + + assoc all SpaceSliceOf specializes PortionOf { + doc + /* + * SpaceSliceOf asserts that its spaceSliceOccurrence extends for exactly the same time and + * some or all the space of the spaceSlicedOccurrence and that the spaceSliceOccurrence is + * of the same of lower innerSpaceDimension than the spaceSliceOccurrence. Note that this + * means every occurrence is a SpaceSliceOf itself and SpaceSliceOf is transitive. + */ + + end feature spaceSliceOccurrence: Occurrence redefines portionOccurrence crosses spaceSlicedOccurrence.spaceSlices; + end spaceSliceWithin subsets spaceSliceOf feature spaceSlicedOccurrence: Occurrence redefines portionedOccurrence; + } + + assoc all SpaceShotOf specializes SpaceSliceOf { + doc + /* + * SpaceShotOf asserts that its spaceShotOccurrence is of a lower inner space dimension than + * it spaceShottedOccurrence. + */ + + end feature spaceShotOccurrence: Occurrence redefines spaceSliceOccurrence crosses spaceShottedOccurrence.spaceShots; + end spaceShotWithin subsets spaceSliceOf feature spaceShottedOccurrence: Occurrence redefines spaceSlicedOccurrence; + } + + assoc all Without specializes BinaryLink unions HappensBefore, OutsideOf { + doc + /* + * Without is the most general association that asserts complete separation (no overlap) in + * either space or time, or both, between two occurrences. That is, no four dimensional + * points are in both occurrences. Note that this means no Occurrence is Without itself. + */ + + end feature separateOccurrenceToo: Occurrence redefines BinaryLink::source + crosses separateOccurrence.withoutOccurrences; + end feature separateOccurrence: Occurrence redefines BinaryLink::target + crosses separateOccurrenceToo.withoutOccurrences; + } + + assoc all HappensBefore specializes HappensLink, Without { + doc + /* + * HappensBefore asserts that the earlierOccurrence is completely separated in time (not + * necessarily in space, see OutsideOf), with the earlierOccurrence happening completely + * before the laterOccurrence. That is, no snapshot of the earlierOccurrence happens at the + * same time as any snapshot of the laterOccurrence, with all snapshots of earlierOccurrence + * happening before those the laterOccurrence, including the endShot of the earlierOccurrence + * and startShot of the laterOccurrence. Note that this means no Occurrence HappensBefore + * itself. + */ + + end feature earlierOccurrence: Occurrence redefines sourceOccurrence, separateOccurrenceToo + crosses laterOccurrence.predecessors; + end feature laterOccurrence: Occurrence redefines targetOccurrence, separateOccurrence + crosses earlierOccurrence.successors; + } + + assoc all HappensJustBefore specializes HappensBefore { + doc + /* + * HappensJustBefore is HappensBefore asserting that there is no possibility of another + * occurrences happening in the time between the earlierOccurrence and laterOccurrence. + */ + + end feature redefines earlierOccurrence: Occurrence crosses laterOccurrence.immediatePredecessors; + end feature redefines laterOccurrence: Occurrence crosses earlierOccurrence.immediateSuccessors; + } + + feature all happensBeforeLinks: HappensBefore[0..*] nonunique subsets binaryLinks { + doc + /* + * happensBeforeLinks is a specialization of binaryLinks restricted to type HappensBefore. + * It is the default subsetting for succession connectors. + */ + + end feature earlierOccurrence: Occurrence redefines HappensBefore::earlierOccurrence, binaryLinks::source; + end feature laterOccurrence: Occurrence redefines HappensBefore::laterOccurrence, binaryLinks::target; + } + + assoc all OutsideOf specializes SpaceLink, Without { + doc + /* + * OutsideOf asserts that two occurrences do not overlap in space (not necessarily in time, + * see HappensBefore). That is, no four dimensional points of the occurrences are in the + * spatial extent of both of them. This means no Occurrence is OutsideOf itself. + */ + + end feature separateSpaceToo: Occurrence redefines sourceOccurrence, separateOccurrenceToo + crosses separateSpace.outsideOfOccurrences; + end feature separateSpace: Occurrence redefines targetOccurrence, separateOccurrence + crosses separateSpaceToo.outsideOfOccurrences; + } + + assoc all JustOutsideOf specializes OutsideOf { + doc + /* + * JustOutsideOf is an OutsideOf asserting that two occurrences have some space slices with + * no space between them. + */ + + end feature redefines separateSpaceToo: Occurrence + crosses separateSpace.justOutsideOfOccurrences; + end feature redefines separateSpace: Occurrence + crosses separateSpaceToo.justOutsideOfOccurrences; + } + + assoc all MatesWith specializes JustOutsideOf { + doc + /* + * MatesWith is an OutsideOf asserting that two occurrences have no space between them. + */ + + end feature matingSpaceToo: Occurrence redefines separateSpaceToo + crosses matingSpace.matingOccurrences; + end feature matingSpace: Occurrence redefines separateSpace + crosses matingSpaceToo.matingOccurrences; + } + + assoc all InnerSpaceOf specializes OutsideOf { + doc + /* + * InnerSpaceOf is an OutsideOf asserting that the space surrounded by an inner space boundary + * of one occurrence (outer space) is completely occupied by another occurrence (inner space). + */ + + end feature outerSpace: Occurrence redefines separateSpaceToo; + end feature innerSpace: Occurrence redefines separateSpace crosses outerSpace.innerSpaceOccurrences; + } + + assoc all SurroundedBy specializes OutsideOf { + doc + /* + * SurroundedBy is an OutsideOf asserting that one occurrence (surrounded space) is included + * in space by an inner space occurrence of another (surrounding space). + */ + + end feature surroundedSpace: Occurrence redefines separateSpaceToo; + end feature surroundingSpace: Occurrence redefines separateSpace crosses surroundedSpace.surroundedByOccurrences; + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Performances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Performances.kerml new file mode 100644 index 00000000..709feea6 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Performances.kerml @@ -0,0 +1,293 @@ +standard library package Performances { + doc + /* + * This package defines classifiers and features that related to the typing of performances and evaluations. + */ + + private import Base::Anything; + private import Base::things; + private import Occurrences::Occurrence; + private import Occurrences::occurrences; + private import Occurrences::HappensDuring; + private import Objects::Object; + private import Links::BinaryLink; + private import Metaobjects::Metaobject; + private import Transfers::Transfer; + private import Transfers::transfers; + private import Transfers::TransferBefore; + private import Transfers::transfersBefore; + private import ScalarValues::*; + private import SequenceFunctions::includes; + + abstract behavior Performance specializes Occurrence disjoint from Object { + doc + /* + * Performance is the most general class of behavioral Occurrences that may be performed over time. + */ + + feature self: Performance redefines Occurrence::self; + + feature involvedObjects: Object[0..*] { + doc + /* + * Objects that are involved in this Performance. + */ + } + + feature performers: Object[0..*] subsets involvedObjects { + doc + /* + * Objects that enact this Performance. + */ + } + + feature redefines isDispatch default true; + feature redefines dispatchScope default thisPerformance; + + step enclosedPerformances: Performance[0..*] subsets performances, timeEnclosedOccurrences + intersects performances, timeEnclosedOccurrences { + doc + /* + * timeEnclosedOccurrences of this Performance that are also Performances. + */ + } + + feature thisPerformance: Performance [1] default self { + doc + /* + * Defaults to the root of the subperformance composition tree. + */ + } + connector :HappensDuring from [1] self to [1] thisPerformance; + + composite step subperformances: Performance[0..*] subsets enclosedPerformances, suboccurrences + intersects enclosedPerformances, suboccurrences { + doc + /* + * enclosedPerformances that are composite. + */ + + feature redefines this default (that as Performance).this { + doc + /* + * The default "this" context of a subperformance is the same as that of its owning Performance. + * This means that the context for any Performance that is in a composition tree rooted + * in a Performance that is not itself owned by an Object is the root Performance. If the + * root Performance is an ownedPerformance of an Object, then that Object is the context. + */ + } + + feature redefines thisPerformance default (that as Performance).thisPerformance; + } + } + + abstract function Evaluation specializes Performance { + doc + /* + * Evaluation is the most general class of functions that may be evaluated to compute + * a result. + */ + + return result: Anything[0..*] nonunique; + } + + abstract predicate BooleanEvaluation specializes Evaluation { + doc + /* + * BooleanEvaluation is a specialization of Evaluation that is the most general class of + * Predicates that may be evaluated to produce a Boolean truth value. + */ + + return : Boolean[1]; + } + + abstract function MetadataAccessEvaluation specializes Evaluation { + doc + /* + * MetadataAccessEvaluation is a specialization of Evaluation for the case of MetadataAccessExpressions. + */ + + return : Metaobject[1..*]; + } + + abstract function LiteralEvaluation specializes Evaluation { + doc + /* + * LiteralEvaluation is a specialization of Evaluation for the case of LiteralExpressions. + */ + + return : ScalarValue[1]; + } + + abstract predicate LiteralBooleanEvaluation specializes LiteralEvaluation, BooleanEvaluation + intersects LiteralEvaluation, BooleanEvaluation { + doc + /* + * LiteralBooleanEvaluation is a specialization of LiteralEvaluation for the case of LiteralBooleans. + * It is also a predicate and thus a specialization of BooleanEvaluation. + */ + + return : Boolean[1]; + } + abstract function LiteralIntegerEvaluation specializes LiteralEvaluation { + doc + /* + * LiteralIntegerEvaluation is a specialization of LiteralEvaluation for the case of LiteralIntegers. + */ + + return : Integer[1]; + } + + abstract function LiteralRationalEvaluation specializes LiteralEvaluation { + doc + /* + * LiteralRationalEvaluation is a specialization of LiteralEvaluation for the case of LiteralRationals. + * (Note: Return type is Real to allow easy type conformance of LiteralRationals when a Real result is expected.) + */ + + return : Real[1]; + } + + abstract function LiteralStringEvaluation specializes LiteralEvaluation { + doc + /* + * LiteralStringEvaluation is a specialization of LiteralEvaluation for the case of LiteralStrings. + */ + + return : String[1]; + } + + function NullEvaluation specializes Evaluation { + doc + /* + * NullEvaluation is a specialization of Evaluation for the case of NullExpressions. + */ + + return : Anything[0..0]; + } + + assoc all InvolvedIn specializes BinaryLink { + doc + /* + * InvolvedIn asserts that the involvedObject is involved in the Behavior carried out by the + * involvingPerformance. + */ + + end feature involvedObject: Object redefines source crosses involvingPerformance.involvedObjects; + end feature involvingPerformance: Performance redefines target crosses involvedObject.involvingPerformances; + } + + assoc all Performs specializes InvolvedIn { + doc + /* + * Performs asserts that the performer enacts the Behavior carried out by the performance. + */ + + end feature performerObject: Object redefines involvedObject crosses performance.performers; + end feature performance: Performance redefines involvingPerformance crosses performerObject.enactedPerformances; + } + + abstract step performances: Performance[0..*] nonunique subsets occurrences { + doc + /* + * performances is the most general feature for performances of Behaviors. + */ + } + + abstract expr evaluations: Evaluation[0..*] nonunique subsets performances { + doc + /* + * evaluations is a specialization of performances for evaluations of Functions. + */ + } + + abstract expr constructorEvaluations [0..*] nonunique subsets evaluations { + doc + /* + * constructorEvaluations is a specialization of evaluations that restricts the multiplicity + * of its result parameter to 1..1, requiring a constructorEvaluation to result in a single value. + */ + + return result [1..1]; + } + + abstract expr booleanEvaluations: BooleanEvaluation[0..*] nonunique subsets evaluations { + doc + /* + * booleanEvaluations is a specialization of evaluations restricted to type BooleanEvaluation. + */ + } + + abstract expr trueEvaluations subsets booleanEvaluations { + doc + /* + * trueEvaluations is a subset of booleanEvaluations that result in true. It is the most general + * feature of invariants that are not negated. + */ + + private feature trueValue = true; + binding result = trueValue; + } + + abstract expr falseEvaluations subsets booleanEvaluations { + doc + /* + * falseEvaluations is a subset of booleanEvaluations that result in false. It is the most general + * feature of invariants that are negated. + */ + + private feature falseValue = false; + binding result = falseValue; + } + + abstract expr metadataAccessEvaluations: MetadataAccessEvaluation[0..*] nonunique subsets evaluations { + doc + /* + * metadataAccessEvaluations is a specialization of evaluations restricted to type MetadataAccessEvaluation. + */ + } + + abstract expr literalEvaluations: LiteralEvaluation[0..*] nonunique subsets evaluations { + doc + /* + * literalEvaluations is a specialization of evaluations restricted to type LiteralEvaluation. + */ + } + + abstract expr literalBooleanEvaluations: LiteralBooleanEvaluation[0..*] nonunique subsets literalEvaluations, booleanEvaluations + intersects literalEvaluations, booleanEvaluations { + doc + /* + * literaBooleanlEvaluations is a specialization of literalEvaluations and booleanEvaluations restricted + * to type LiteralBooleanEvaluation. + */ + } + + abstract expr literalIntegerEvaluations: LiteralIntegerEvaluation[0..*] nonunique subsets literalEvaluations { + doc + /* + * literalEvaluations is a specialization of evaluations restricted to type LiteralEvaluation. + */ + } + + abstract expr literalRationalEvaluations: LiteralRationalEvaluation[0..*] nonunique subsets literalEvaluations { + doc + /* + * literalRationalEvaluations is a specialization of literalEvaluations restricted to type LiteralRationalEvaluation. + */ + } + + abstract expr literalStringEvaluations: LiteralStringEvaluation[0..*] nonunique subsets literalEvaluations { + doc + /* + * literalStringEvaluations is a specialization of literalEvaluations restricted to type LiteralStringEvaluation. + */ + } + + abstract expr nullEvaluations: NullEvaluation[0..*] nonunique subsets evaluations { + doc + /* + * nullEvaluations is a specialization of evaluations restricted to type NullEvaluation. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml new file mode 100644 index 00000000..2f859a17 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml @@ -0,0 +1,197 @@ +standard library package SpatialFrames { + doc + /* + * This package models spatial frames of reference for quantifying the position of points + * in a three-dimensional space. + */ + + private import Clocks::*; + private import ScalarValues::NumericalValue; + private import VectorValues::ThreeVectorValue; + private import VectorValues::CartesianThreeVectorValue; + private import VectorFunctions::isZeroVector; + private import Occurrences::Life; + private import Objects::Body; + private import Objects::Point; + private import ControlFunctions::forAll; + private import SequenceFunctions::includes; + + private struct DefaultFrameLife[1] :> SpatialFrame, Life { + doc + /* + * DefaultFrameLife is the classifier of the singleton Life of the defaultFrame. + */ + } + + feature defaultFrame : DefaultFrameLife[1] { + doc + /* + * defaultFrame is a fixed SpatialFrame used as a universal default. + */ + } + + abstract struct SpatialFrame specializes Body { + doc + /* + * A SpatialFrame is a three-dimensional Body that provides a spatial extent that + * acts as a frame of reference for defining the physical position and displacement + * vectors of Points over time. + */ + } + + abstract function PositionOf { + doc + /* + * The PositionOf a Point relative to a SpatialFrame, at a specific time relative to a given + * Clock, as a positionVector that is a ThreeVectorValue. + */ + + in point : Point[1]; + in time : NumericalValue[1]; + in frame : SpatialFrame[1] default defaultFrame; + in clock : Clock[1] default frame.localClock; + return positionVector : ThreeVectorValue[1]; + + inv positionTimePrecondition { + doc + /* + * The given point must exist at the given time. + */ + + TimeOf(point.startShot) <= time and + time <= TimeOf(point.endShot) + } + + inv spacePositionConstraint { + doc + /* + * The result positionVector is equal to the PositionOf the Point spaceShot of the + * frame that encloses the given point, at the given time. + */ + + (frame.spaceShots as Point)->forAll{in p : Point; + p.spaceTimeEnclosedOccurrences->includes(point) implies + positionVector == PositionOf(p, time, frame) + } + } + } + + abstract function CurrentPositionOf { + doc + /* + * The CurrentPositionOf a Point relative to a SpatialFrame and a Clock is the PositionOf + * the Point relative to the SpatialFrame at the currentTime of the Clock. + */ + + in point : Point[1]; + in frame : SpatialFrame[1] default defaultFrame; + in clock : Clock[1] default frame.localClock; + return positionVector : ThreeVectorValue[1] = + PositionOf(point, clock.currentTime, frame, clock); + } + + function DisplacementOf { + doc + /* + * The DisplacementOf two Points relative to a SpatialFrame, at a specific time relative to a + * given Clock, is the displacementVector computed as the difference between the PositionOf the + * first Point and PositionOf the second Point, relative to that SpatialFrame, at that time. + */ + + in point1 : Point[1]; + in point2 : Point[1]; + in time : NumericalValue; + in frame : SpatialFrame[1] default defaultFrame; + in clock : Clock[1] default frame.localClock; + return displacementVector : ThreeVectorValue[1] = + PositionOf(point2, time, frame, clock) - PositionOf(point1, time, frame, clock); + + inv zeroDisplacementConstraint { + doc + /* + * If either point1 or point2 occurs within the other, then the displacementVector is + * the zero vector. + */ + + (point1.spaceTimeEnclosedOccurrences->includes(point2) or + point2.spaceTimeEnclosedOccurrences->includes(point1)) implies + isZeroVector(displacementVector) + } + } + + function CurrentDisplacementOf { + doc + /* + * The CurrentDisplacementOf two Points relative to a SpatialFrame and Clock is the DisplacementOf + * the Points relative to the SpatialFrame at the currentTime of the Clock. + */ + + in point1 : Point[1]; + in point2 : Point[1]; + in frame : SpatialFrame[1] default defaultFrame; + in clock : Clock[1] default frame.localClock; + return displacementVector : ThreeVectorValue[1] = + DisplacementOf(point1, point2, clock.currentTime, frame, clock); + } + + abstract struct CartesianSpatialFrame :> SpatialFrame { + doc + /* + * A CartesianSpatialFrame is a SpatialFrame relative to which all position and displacement + * vectors can be represented as CartesianThreeVectorValues. + */ + } + + abstract function CartesianPositionOf :> PositionOf { + doc + /* + * The PositionOf a Point relative to a CartesianSpatialFrame is a CartesianThreeVectorValue. + */ + + in point : Point[1]; + in time : NumericalValue[1]; + in frame : CartesianSpatialFrame[1]; + in clock : Clock[1] default frame.localClock; + return positionVector : CartesianThreeVectorValue[1]; + } + + abstract function CartesianCurrentPositionOf :> CurrentPositionOf { + doc + /* + * The CurrentPositionOf a Point relative to a CartesianSpatialFrame is a CartesianThreeVectorValue. + */ + + in point : Point[1]; + in frame : CartesianSpatialFrame[1]; + in clock : Clock[1] default frame.localClock; + return positionVector : CartesianThreeVectorValue[1]; + } + + function CartesianDisplacementOf :> DisplacementOf { + doc + /* + * The DisplacementOf two Points relative to a CartesianSpatialFrame is a CartesianThreeVectorValue. + */ + + in point1 : Point[1]; + in point2 : Point[1]; + in time : NumericalValue[1]; + in frame : CartesianSpatialFrame[1]; + in clock : Clock[1] default frame.localClock; + return displacementVector : CartesianThreeVectorValue[1]; + } + + function CartesianCurrentDisplacementOf :> CurrentDisplacementOf { + doc + /* + * The CurrentDisplacementOf two Points relative to a CartesianSpatialFrame is a CartesianThreeVectorValue. + */ + + in point1 : Point[1]; + in point2 : Point[1]; + in frame : CartesianSpatialFrame[1]; + in clock : Clock[1] default frame.localClock; + return displacementVector : CartesianThreeVectorValue[1]; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml new file mode 100644 index 00000000..04a45b36 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml @@ -0,0 +1,145 @@ +standard library package StatePerformances { + doc + /* + * This package contains a library model of the semantics of state-based behavior, + * including the performance of (behavioral) states and the transitions between them. + */ + + private import ScalarValues::Boolean; + private import ScalarValues::Natural; + private import TransitionPerformances::TransitionPerformance; + private import Occurrences::Occurrence; + private import Occurrences::HappensDuring; + private import Transfers::Transfer; + private import Transfers::MessageTransfer; + private import Performances::Performance; + private import ControlPerformances::DecisionPerformance; + private import ControlFunctions::forAll; + private import ControlFunctions::select; + private import ControlFunctions::collect; + private import SequenceFunctions::*; + + behavior StatePerformance specializes DecisionPerformance { + feature isTriggerDuring: Boolean default true; + + abstract step middle[1..*] { + doc + /* + * All modeler-defined steps must subset this. + */ + } + + /* + * Note: All steps are implicitly considered to be enclosedPerformances, + * and hence happening during the state performance. + */ + + step entry[1]; + step do[1] subsets middle; + step exit[1]; + + step nonDoMiddle[*] subsets middle = middle->excluding(do); + + private succession [1] entry then [*] middle; + private succession [1] do.startShot then [*] nonDoMiddle.startShot; + private succession [*] middle then [1] exit; + + + feature incomingTransitionTrigger : MessageTransfer [0..1] default null { + doc + /* + * Transfer that triggered a transition into this state performance. + */ + } + + private inv { isEmpty(accepted) == isEmpty(acceptable) } + feature accepted: Transfer[0..1] subsets acceptable { + doc + /* A transfer to the trigger target of an outgoing transition performance + * for an outgoing successon that is taken for this state occurrence. + */ + } + feature deferrable: Transfer[0..*] subsets acceptable { + doc + /* Transfers to trigger targets of outgoing transition performances can be + * considered for acceptance more than once. + */ + } + abstract feature acceptable: Transfer[*] { + doc + /* + * Transfers that might be accepted. + */ + feature thatSP : StatePerformance [1] = that as StatePerformance; + feature accableT : Transfer redefines self; + feature accT : Transfer = thatSP.accepted; + inv { accableT == accT | incomingTransferSort(accT, accableT) } + inv { isDispatch implies + allSubstatePerformances(dispatchScope)->forAll{in oSP : StatePerformance; + oSP == thatSP | isEmpty(oSP.accepted) | + includes(thatSP.exit.startShot.successors, oSP.exit.startShot) | + ( oSP.accepted != accableT & + ( incomingTransferSort(oSP.accepted, accableT) | + includes(oSP.deferrable, accableT) ) ) } } + } + + function allSubstatePerformances { + in p : Performance [1]; + feature substatePerformances: StatePerformance [*] = + p.subperformances->select{in subp:Performance; subp istype StatePerformance}; + return : StatePerformance [*] = + union(substatePerformances, + substatePerformances->collect{in sp:StatePerformance; allSubstatePerformances(sp) } ); + } + + private succession [*] acceptable then [1] exit; + + feature redefines isRunToCompletion default this.isRunToCompletion; + feature redefines runToCompletionScope default this.runToCompletionScope; + inv { isRunToCompletion implies + allSubtransitionPerformances(runToCompletionScope)->forAll{in tp : TransitionPerformance; + includes(tp.successors, entry) | includes(tp.predecessors, entry) } + } + + function allSubtransitionPerformances { + in p : Performance [1]; + feature subtransitionPerformances: TransitionPerformance [*] = + p.subperformances->select{in subp:Performance; + subp istype StateTransitionPerformance }; + return : TransitionPerformance [*] = + union(subtransitionPerformances, + subtransitionPerformances->collect{in sp:TransitionPerformance; + allSubtransitionPerformances(sp) } ); + } + } + + behavior StateTransitionPerformance specializes TransitionPerformance { + feature isTriggerDuring: Boolean[1]; + inv { not transitionLinkSource.isTriggerDuring | isTriggerDuring } + + in feature transitionLinkSource: StatePerformance redefines TransitionPerformance::transitionLinkSource { + feature redefines accepted; + feature redefines StatePerformance::acceptable; + } + private succession [*] transitionLinkSource.nonDoMiddle then [1] Performance::self; + + private feature transitionLinkTarget [0..1] : Occurrence = transitionLink.laterOccurrence { + inv { (that istype StatePerformance) implies + (that as StatePerformance).incomingTransitionTrigger == trigger } + } + + feature acceptable: Transfer [*] subsets transitionLinkSource.acceptable, triggerTarget.incomingTransfersToSelf; + + feature trigger redefines TransitionPerformance::trigger subsets acceptable, transitionLinkSource.accepted { + feature redefines endShot; + } + + private feature tdNum: Natural [1] = if not isTriggerDuring ? 0 else size(trigger); + private connector linkTriggerDuring: HappensDuring[tdNum] from [*] trigger.endShot to [0..1] transitionLinkSource; + + private succession all [*] acceptable then [*] guard; + private succession [*] guard then [1] transitionLinkSource.exit; + + private succession [accNum] accept then [1] transitionLinkSource.exit; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Transfers.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Transfers.kerml new file mode 100644 index 00000000..1f537bc1 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Transfers.kerml @@ -0,0 +1,281 @@ +standard library package Transfers { + doc + /* + * This package defines the transfer interactions used to type flows. + */ + + private import Base::Anything; + private import Occurrences::*; + private import Links::*; + private import Objects::BinaryLinkObject; + private import Performances::Performance; + private import Performances::performances; + private import ScalarValues::Boolean; + private import ScalarValues::Natural; + private import SequenceFunctions::*; + + interaction Transfer specializes Performance, BinaryLink { + doc + /* + * A Transfer represents the transfer of a payload from the source of the interaction + * to the target of the interaction. + */ + + end feature source: Occurrence redefines BinaryLink::source { + doc + /* + * The entity whose output is the source of the payload to be transferred. + */ + + feature sourceOutput: Anything[0..*]; + } + + end feature target: Occurrence redefines BinaryLink::target { + doc + /* + * The entity whose input is the target of the payload to be transferred. + */ + + feature targetInput: Anything[0..*]; + } + + feature isInstant: Boolean[1] { + doc + /* + * If isInstance is true, then the transfer is instantaneous. + */ + } + + feature payload: Anything[1..*] { + doc + /* + * The things that are to be transferred. + */ + } + + feature payloadNum: Natural [1] = size(payload); + + private instantNum: Natural[1] = if isInstant? 1 else 0; + private binding instant[instantNum] of [0..1] startShot = [0..1] endShot { + doc + /* + * If isInstant is true, then the start and end of the transfer happen at the same time. + */ + } + } + + interaction MessageTransfer specializes Transfer { + doc + /* + * A MessageTransfer is a Transfer that does not specify where the payload is picked + * up and dropped off (see FlowTransfer). They are sent by SendPerformances and + * accepted by AcceptPerformances. + */ + } + + interaction FlowTransfer specializes Transfer disjoint from MessageTransfer { + doc + /* + * A FlowTransfer is a Transfer identifying an output feature of the source from which + * to pick up a payload and an input feature of the target to which to drop it off. They can + * start when the payload is available at the source and move or copy it to the target. + */ + + feature isMove: Boolean[1] default true { + doc + /* + * If isMove is true, then the entire payload leaves the source at the start + * of the transfer. + */ + } + + feature isPush: Boolean[1] default true { + doc + /* + * If isPush is true, then the transfer begins when the payload is available + * at the source. + */ + } + + connector sourceOutputLink: BinaryLinkObject[payloadNum] { + doc + /* + * The output of the payloads from the sourceOutput. + */ + + end [1] feature transferSource references source; + end [payloadNum] feature transferPayload references payload subsets transferSource.sourceOutput; + } + + connector targetInputLink: BinaryLinkObject[payloadNum] { + doc + /* + * The input of the payload to the targetInput. + */ + + end [1] feature transferTarget references target; + end [payloadNum] feature transferPayload references payload subsets transferTarget.targetInput; + } + + private connector sending: HappensDuring[payloadNum] from [1] startShot to [payloadNum] sourceOutputLink { + doc + /* + * The start of the transfer happens during the output of each of the payloads from the + * source. + */ + } + + private connector moving: HappensWhile[0..*] from [0..*] sourceOutputLink.endShot to [0..1] startShot { + doc + /* + * If isMove is true, then all payloads leave the source at the start + * of the transfer. + */ + } + private inv { isMove implies size(moving) == size(sourceOutputLink) } + + private connector pushing: HappensWhile[0..*] from [0..*] sourceOutputLink.startShot to [0..1] startShot { + doc + /* + * If isPush is true, then the transfer begins when the payloads are available + * at the source. + */ + } + private inv { isPush implies size(pushing) == size(sourceOutputLink) } + + private connector delivering: HappensWhile[payloadNum] from [payloadNum] targetInputLink.startShot to [1] endShot { + doc + /* + * The input of each of the payloads to the target starts at the end of the transfer. + */ + } + } + + interaction TransferBefore specializes Transfer, HappensBefore intersects Transfer, HappensBefore { + doc + /* + * TransferBefore is a specialization of Transfer in which the source happens before + * the transfer, which happens before the target. + */ + + end feature source: Occurrence redefines Transfer::source, HappensBefore::earlierOccurrence; + end feature target: Occurrence redefines Transfer::target, HappensBefore::laterOccurrence; + + feature self: TransferBefore redefines Performance::self; + + private succession source then self; + private succession self then target; + } + + interaction FlowTransferBefore specializes TransferBefore, FlowTransfer intersects FlowTransfer, TransferBefore { + doc + /* + * FlowTransferBefore is a FlowTransfer that is also a TransferBefore. + */ + + end feature source: Occurrence redefines Transfer::source, TransferBefore::source; + end feature target: Occurrence redefines Transfer::target, TransferBefore::target; + } + + abstract step transfers: Transfer[0..*] nonunique subsets performances, binaryLinks { + doc + /* + * transfers is a specialization of performances and binaryLinks restricted to type + * Transfer. + */ + + end feature source: Occurrence redefines Transfer::source, binaryLinks::source; + end feature target: Occurrence redefines Transfer::target, binaryLinks::target; + } + + abstract step messageTransfers: MessageTransfer[0..*] nonunique subsets transfers { + doc + /* + * messageTransfers is a specialization of transfers restricted to type MessageTransfers. + */ + + end feature source: Occurrence redefines MessageTransfer::source, transfers::source; + end feature target: Occurrence redefines MessageTransfer::target, transfers::target; + } + + abstract flow flowTransfers: FlowTransfer[0..*] nonunique subsets transfers { + doc + /* + * flowTransfers is a specialization of transfers restricted to type FlowTransfers. + * It is the default subsetting for non-succession flows. + */ + + end feature source: Occurrence redefines FlowTransfer::source, transfers::source; + end feature target: Occurrence redefines FlowTransfer::target, transfers::target; + } + + abstract flow transfersBefore: TransferBefore[0..*] nonunique subsets transfers, happensBeforeLinks + intersects transfers, happensBeforeLinks { + doc + /* + * transfersBefore is a specialization of transfers and happensBeforeLinks restricted to + * type TransferBefore. + */ + + end feature source: Occurrence redefines TransferBefore::source, transfers::source, happensBeforeLinks::earlierOccurrence; + end feature target: Occurrence redefines TransferBefore::target, transfers::target, happensBeforeLinks::laterOccurrence; + } + + abstract flow flowTransfersBefore: FlowTransferBefore[0..*] nonunique subsets flowTransfers, transfersBefore + intersects flowTransfers, transfersBefore { + doc + /* + * flowTransfersBefore is a specialization of flowTransfers and transfersBefore that is restricted + * to type FlowTransferBefore. IT is the default subsetting for succession flows. + */ + + end feature source: Occurrence redefines FlowTransferBefore::source, flowTransfers::source, transfersBefore::source; + end feature target: Occurrence redefines FlowTransferBefore::target, flowTransfers::target, transfersBefore::target; + } + + behavior SendPerformance specializes Performance { + doc + /* + * SendPerformances are Performance that require an outgoingTransferFromSelf + * from a designated sender Occurrence carrying a given payload, optionally to a designated receiver. + */ + + in feature payload [0..*]; + in feature sender: Occurrence[1] default this; + in feature receiver: Occurrence[0..1]; + feature sentTransfer: MessageTransfer [1] subsets sender.outgoingTransfersFromSelf { + feature redefines payload = SendPerformance::payload; + } + binding [0..1] receiver.incomingTransfersToSelf = [1] sentTransfer; + + succession self then sentTransfer; + } + + behavior AcceptPerformance specializes Performance { + doc + /* + * AcceptPerformance is a performance that requires an incomingTransferToSelf + * of a desigated receiver Occurrence, providing its payload as output. + */ + inout feature payload[0..*]; + in feature receiver: Occurrence[1] default this; + feature acceptedTransfer: MessageTransfer[1] subsets receiver.incomingTransfersToSelf; + succession acceptedTransfer then self.endShot; + + binding payload = acceptedTransfer.payload; + } + + abstract step sendPerformances: SendPerformance[0..*] nonunique subsets performances { + doc + /* + * sendPerformances is a specialization of performances for SendPerformances. + */ + } + + abstract step acceptPerformances: AcceptPerformance[0..*] nonunique subsets performances { + doc + /* + * acceptPerformances is a specialization of performances for AcceptPerformances. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml new file mode 100644 index 00000000..85c0132e --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml @@ -0,0 +1,66 @@ +standard library package TransitionPerformances { + doc + /* + * This package contains a library model of the semantics of conditional transitions between occurrences, + * including the performance of specified Behaviors when the transition occurs. + */ + + private import ScalarValues::Boolean; + private import ScalarValues::Natural; + private import SequenceFunctions::isEmpty; + private import Occurrences::Occurrence; + private import Occurrences::HappensBefore; + private import Performances::Performance; + private import Performances::Evaluation; + private import Transfers::MessageTransfer; + private import Transfers::AcceptPerformance; + private import Transfers::acceptPerformances; + private import ControlFunctions::allTrue; + private import SequenceFunctions::size; + + abstract behavior TransitionPerformance { + in feature transitionLinkSource: Performance[1]; + + feature trigger: MessageTransfer[*]; + bool guard[*] subsets enclosedPerformances; + step effect[*] subsets enclosedPerformances; + + feature triggerTarget : Occurrence [1] default this; + feature transitionLink: HappensBefore[0..1]; + + private binding [0..1] transitionLink.earlierOccurrence = [1] transitionLinkSource; + private succession [1] transitionLinkSource then [*] effect; + private succession [*] effect then [1] transitionLink.laterOccurrence; + + private connector [0..1] transitionLink to [1..*] trigger; + private connector all guardConstraint: TPCGuardConstraint[*] + from [0..1] transitionLink to [*] guard; + + private succession all [*] trigger then [*] guard; + private succession all [*] guard then [*] effect; + + feature accNum: Natural [1] = if isEmpty(trigger) ? 0 else 1; + step accept: AcceptPerformance[accNum] subsets timeEnclosedOccurrences, acceptPerformances { + feature redefines acceptedTransfer = trigger; + } + binding accept.receiver = triggerTarget; + + private succession [*] guard then [accNum] accept; + } + + behavior NonStateTransitionPerformance specializes TransitionPerformance { + feature isTriggerAfter: Boolean default true; + private succession [1] transitionLinkSource then [1] Performance::self; + private feature taNum: Natural [1] = if isTriggerAfter ? size(trigger) else 0; + private succession triggerAfter [taNum] first [0..1] transitionLinkSource then [*] trigger.endShot; + + private succession all [*] guard then [0..1] transitionLink.laterOccurrence; + } + + assoc struct TPCGuardConstraint { + end guardedLink [0..1] feature constrainedHBLink: HappensBefore; + end bool constrainedGuard; + + private inv { allTrue(constrainedGuard()) } + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Triggers.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Triggers.kerml new file mode 100644 index 00000000..d30897b5 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Triggers.kerml @@ -0,0 +1,188 @@ +standard library package Triggers { + doc + /* + * This package contains functions that return ChangeSignals for triggering + * when a Boolean condition changes from false to true, at a specific time + * or after a specific time delay. + */ + + private import ScalarValues::Boolean; + private import ScalarValues::NumericalValue; + private import Occurrences::Occurrence; + + public import Clocks::*; + public import Observation::*; + + struct TimeSignal :> ChangeSignal { + doc + /* + * A TimeSignal is a ChangeSignal whose condition is the currentTime + * of a given Clock reaching a specific signalTime. + */ + + feature signalTime : NumericalValue[1] { + doc + /* + * The time at which the TimeSignal should be sent. + */ + } + + feature signalClock : Clock[1] { + doc + /* + * The Clock whose currentTime is being monitored. + */ + } + + private bool :>> signalCondition { + doc + /* + * The Boolean condition of the currentTime of the signalClock being + * equal to the signalTime. + */ + + signalClock.currentTime == signalTime + } + } + + function TriggerWhen { + doc + /* + * TriggerWhen returns a monitored ChangeSignal for a given condition, + * to be sent to a given receiver when the condition occurs. + */ + + in bool condition[1] { + doc + /* + * The BooleanExpression to be monitored for changing from + * false to true. + */ + } + + in feature receiver : Occurrence [1] { + doc + /* + * The Occurrence to which the ChangeSignal is to be sent. + */ + } + + in feature monitor : ChangeMonitor[1] default defaultMonitor { + doc + /* + * The ChangeMonitor to be used to monitor the ChangeSignal condition. + * The default is the Observation::defaultMonitor. + */ + } + + return feature changeSignal : ChangeSignal[1] = new ChangeSignal(condition, monitor) { + doc + /* + * The ChangeSignal for the condition, as monitored by the monitor. + */ + } + + step :> monitor.startObservation { + in observer = receiver; + in signal = changeSignal; + } + } + + function TriggerAt { + doc + /* + * TriggerAt returns a monitored TimeSignal to be sent to a receiver when + * the currentTime of a given Clock reaches a specific timeInstant. + */ + + in feature timeInstant : NumericalValue[1] { + doc + /* + * The time instant, relative to the clock, at which the TimeSignal should be sent. + */ + } + + in feature receiver : Occurrence[1] { + doc + /* + * The Occurrence to which the TimeSignal is to be sent. + */ + } + + in feature clock : Clock[1] default localClock { + doc + /* + * The Clock to be used as the reference for the timeInstant. The default is + * the localClock, which will be bound when the function is invoked. + */ + } + + in feature monitor : ChangeMonitor[1] default defaultMonitor { + doc + /* + * The ChangeMonitor to be used to monitor the TimeSignal condition. + * The default is the Observation::defaultMonitor. + */ + } + + return feature timeSignal : TimeSignal[1] = new TimeSignal(timeInstant, clock, monitor) { + doc + /* + * The TimeSignal for the given timeInstant, as monitored by the monitor. + */ + } + + step :> monitor.startObservation { + in observer = receiver; + in signal = timeSignal; + } + } + + function TriggerAfter { + doc + /* + * TriggerAfter returns a monitored TimeSignal to be sent to a receiver after + * a certain time delay relative to a given Clock. + */ + + in feature delay : NumericalValue[1] { + doc + /* + * The time duration, relative to the clock, after which the TimeSignal is sent. + */ + } + + in feature receiver : Occurrence[1] { + doc + /* + * The Occurrence to which the TimeSignal is to be sent. + */ + } + + in feature clock : Clock[1] default localClock { + doc + /* + * The Clock to be used as the reference for the time delay. The default is + * the localClock, which will be bound when the function is invoked. + */ + } + + in feature monitor : ChangeMonitor[1] default defaultMonitor { + doc + /* + * The ChangeMonitor to be used to monitor the TimeSignal condition. + * The default is the Observation::defaultMonitor. + */ + } + + return signal : TimeSignal[1] = + TriggerAt(clock.currentTime + delay, receiver, clock, monitor) { + doc + /* + * The TimeSignal for the currentTime of the clock when the function is invoked + * plus the given time delay, as monitored by the monitor. + */ + } + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Actions.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Actions.sysml new file mode 100644 index 00000000..3e7be628 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Actions.sysml @@ -0,0 +1,552 @@ +standard library package Actions { + doc + /* + * This package defines the base types for actions and related behavioral elements in the + * SysML language. + */ + + private import Base::Anything; + private import ScalarValues::Positive; + private import ScalarValues::Natural; + private import SequenceFunctions::size; + private import SequenceFunctions::isEmpty; + private import Occurrences::Occurrence; + private import Occurrences::HappensWhile; + private import Performances::Performance; + private import Performances::performances; + private import Transfers::SendPerformance; + private import Transfers::sendPerformances; + private import Transfers::AcceptPerformance; + private import Transfers::acceptPerformances; + private import FeatureReferencingPerformances::FeatureWritePerformance; + private import ControlPerformances::MergePerformance; + private import ControlPerformances::DecisionPerformance; + private import ControlPerformances::IfThenPerformance; + private import ControlPerformances::IfThenElsePerformance; + private import ControlPerformances::LoopPerformance; + private import TransitionPerformances::TransitionPerformance; + private import TransitionPerformances::NonStateTransitionPerformance; + private import Transfers::MessageTransfer; + private import Flows::MessageAction; + private import OccurrenceFunctions::destroy; + + abstract action def Action :> Performance { + doc + /* + * Action is the most general class of Performances of ActionDefinitions in a system or + * part of a system. Action is the base class of all ActionDefinitions. + */ + + ref action self: Action :>> Performance::self; + ref action incomingTransfers :>> Performance::incomingTransfers; + + action start: Action :>> startShot { + doc + /* + * The starting snapshot of an Action. + */ + } + + action done: Action :>> endShot { + doc + /* + * The ending snapshot of an Action. + */ + } + + action subactions: Action[0..*] :> actions, subperformances { + doc + /* + * The subperformances of this Action that are Actions. + */ + + ref occurrence :>> Action::this, actions::this, subperformances::this = (that as Action).this { + doc + /* + * The "this" reference of a subaction is always the same as that of + * its owning Action. + */ + } + } + + action sendSubactions: SendAction[0..*] :> subactions, sendActions { + doc + /* + * The subactions of this Action that are SendActions. + */ + } + + action acceptSubactions: AcceptAction[0..*] :> subactions, acceptActions { + doc + /* + * The subactions of this Action that are AcceptActions. + */ + } + + abstract action terminateSubactions : TerminateAction[0..*] :> subactions, terminateActions { + doc + /* + * The subactions of this Action that are TerminateActions. + */ + } + + abstract action controls : ControlAction[0..*] :> subactions { + doc + /* + * The subactions of this Action that are ControlActions. + */ + } + + abstract action merges : MergeAction[0..*] :> controls { + doc + /* + * The controls of this Action that are MergeActions. + */ + } + + abstract action decisions : DecisionAction :> controls { + doc + /* + * The controls of this Action that are DecisionActions. + */ + } + + abstract action joins : JoinAction :> controls { + doc + /* + * The controls of this Action that are JoinActions. + */ + } + + abstract action forks : ForkAction :> controls { + doc + /* + * The controls of this Action that are ForkActions. + */ + } + + abstract action transitions : TransitionAction[0..*] :> subactions, transitionActions { + doc + /* + * The subactions of this Action that are TransitionActions. + */ + } + + abstract action decisionTransitions : DecisionTransitionAction[0..*] :> transitions { + doc + /* + * The subactions of this Action that are DecisionTransitionActions. + */ + } + + abstract action assignments : AssignmentAction[0..*] :> subactions, assignmentActions { + doc + /* + * The subactions of this Action that are AssignmentActions. + */ + + in target; + } + + abstract action ifSubactions : IfThenAction[0..*] :> subactions, ifThenActions { + doc + /* + * The subactions of this Action that are IfThenActions (including IfThenElseActions). + */ + } + + abstract action loops : LoopAction[0..*] :> subactions, loopActions { + doc + /* + * The subactions of this Action that are LoopActions. + */ + } + + abstract action whileLoops : WhileLoopAction[0..*] :> loops, whileLoopActions { + doc + /* + * The loops of this Action that are WhileLoopActions. + */ + } + + abstract action forLoops : ForLoopAction[0..*] :> loops, forLoopActions { + doc + /* + * The loops of this Action that are ForLoopActions. + */ + } + } + + abstract action actions: Action[0..*] nonunique :> performances { + doc + /* + * actions is the base feature for all ActionUsages. + */ + } + + action def SendAction :> Action, SendPerformance { + doc + /* + * A SendAction is an Action used to type SendActionUsages. It initiates an outgoingTransferFromSelf + * from a designated sender Occurrence with a given payload, optionally to a designated receiver. + */ + + in :>> payload [0..*]; + ref sentMessage :>> sentTransfer: MessageTransfer, MessageAction { + in :>> MessageTransfer::payload, MessageAction::payload; + } + } + + abstract action sendActions: SendAction[0..*] nonunique :> actions, sendPerformances { + doc + /* + * sendActions is the base feature for all SendActionUsages. + */ + } + + action def AcceptMessageAction :> Action, AcceptPerformance { + doc + /* + * An AcceptMessageAction is an Action that identifies an incomingTransferToSelf + * of a designated receiver Occurrence, providing its payload as output. + */ + inout :>> payload; + ref acceptedMessage :>> acceptedTransfer: MessageTransfer, MessageAction { + in :>> MessageTransfer::payload, MessageAction::payload; + } + } + + action def AcceptAction :> AcceptMessageAction { + doc + /* + * An AcceptAction is an AcceptMessageAction used to type AcceptActionUsages that are + * not accepters for TransitionActions. It waits for a payload or message of the specified + * kind to be accepted by a nested state transition. + */ + ref :>> acceptedMessage = aState.aTransition.accepter.acceptedMessage; + state aState { + transition aTransition first start accept apayload: Anything via receiver then done; + } + bind payload = aState.aTransition.apayload; + } + + abstract action acceptActions: AcceptAction[0..*] nonunique :> actions, acceptPerformances { + doc + /* + * acceptActions is the base feature for standalone AcceptActionUsages. + */ + } + + abstract action def TerminateAction :> Action { + doc + /* + * A TerminateAction is an Action that terminates a given Occurrence, meaning + * that the Occurrence ends during the performance of this Action. TerminateAction + * is the base type for all TerminateActionUsages. + */ + + in occurrence terminatedOccurrence[1] { + doc + /* + * The Occurrence to be terminated. + */ + } + + action terminateOccurrence : destroy[1] { + in occ = terminatedOccurrence; + } + } + + abstract action terminateActions : TerminateAction[0..*] nonunique :> actions { + doc + /* + * terminateActions is the base feature for all TerminateActionUsages. + */ + + in occurrence terminatedOccurrence default that as Occurrence { + doc + /* + * The default terminatedOccurrence for a terminateAction is its + * featuring occurrence (which will generally be a containing Action). + */ + } + } + + abstract action def ControlAction :> Action { + doc + /* + * A ControlAction is the Action of a control node, which has no inherent behavior. + */ + + bind start = done { + doc + /* + * A ControlAction is instantaneous. + */ + } + } + + action def MergeAction :> ControlAction, MergePerformance { + doc + /* + * A MergeAction is the ControlAction for a merge node. + * + * Note: Incoming succession connectors to a MergeAction must have source multiplicity + * 0..1 and subset the incomingHBLink feature inherited from MergePerformance. + */ + } + + action def DecisionAction :> ControlAction, DecisionPerformance { + doc + /* + * A DecisionAction is the ControlAction for a decision node. + * + * Note: Outgoing succession connectors from a DecisionAction must have target multiplicity + * 0..1 and subset the outgoingHBLink feature inherited from DecisionPerformance. + * If an outgoing succession has a guard, it should have a transitionStep typed by + * DecisionTransition. + */ + } + + action def JoinAction :> ControlAction { + doc + /* + * A JoinAction is the ControlAction for a JoinNode. + * + * Note: Join behavior results from requiring that the source multiplicity of all + * incoming succession connectors be 1..1. + */ + } + + action def ForkAction :> ControlAction { + doc + /* + * A ForkAction is the ControlAction for a ForkNode. + * + * Note: Fork behavior results from requiring that the target multiplicity of all + * outgoing succession connectors be 1..1. + */ + } + + abstract action def TransitionAction :> Action, TransitionPerformance { + doc + /* + * A TransitionAction is a TransitionPerformance with an Action as transitionLinkSource. + * It is the base type of all TransitionUsages. + */ + + in transitionLinkSource : Action :>> TransitionPerformance::transitionLinkSource; + ref acceptedMessage : MessageTransfer, MessageAction :>> trigger { + in :>> MessageTransfer::payload, MessageAction::payload; + } + + ref receiver :>> triggerTarget; + + action accepter : AcceptMessageAction :>> 'accept'; + + bind receiver = accepter.receiver; + bind acceptedMessage = accepter.acceptedMessage; + + action effect: Action :>> TransitionPerformance::effect; + } + + action def DecisionTransitionAction :> TransitionAction, NonStateTransitionPerformance { + doc + /* + * A DecisionTransitionAction is a TransitionAction and NonStateTransitionPerformance that has a + * guard, but no trigger or effects. It is the base type of TransitionUsages used as + * conditional successions in action models. + */ + + ref action :>> accepter[0..0]; + ref action :>> effect[0..0]; + } + + abstract action transitionActions: TransitionAction[0..*] nonunique :> actions { + doc + /* + * transitionActions is the base feature for all TransitionUsages. + */ + } + + action def AssignmentAction :> FeatureWritePerformance, Action { + doc + /* + * An AssignmentAction is an Action, used to type an AssignmentActionUsage. It is also a + * FeatureWritePerformance that updates the accessedFeature of its target Occurrence with + * the given replacementValues. + */ + + in target : Occurrence[1]; + inout replacementValues : Anything[0..*] nonunique; + } + + abstract action assignmentActions : AssignmentAction[0..*] nonunique :> actions { + doc + /* + * assignmentActions is the base feature for all AssignmentActionsUsages. + */ + + in target : Occurrence[1] default that as Occurrence { + doc + /* + * The default target for assignmentActions is its featuring instance (if that is + * an Occurrence). + */ + } + } + + action def IfThenAction :> Action, IfThenPerformance { + doc + /* + * An IfThenAction is a Kernel IfThenPerformance that is also an Action. + * It is the base type for all IfActionUsages. + */ + + in ifTest[1]; + in action thenClause[0..1]; + } + + action def IfThenElseAction :> IfThenAction, IfThenElsePerformance { + doc + /* + * An IfThenElseAction is a Kernel IfThenElsePeformance that is also an IfThenAction. + * It is the base type for all IfActionUsages that have an elseAction. + */ + + in ifTest[1]; + in action thenClause[0..1]; + in action elseClause[0..1]; + } + + abstract action ifThenActions : IfThenAction[0..*] nonunique :> actions { + doc + /* + * ifThenActions is the base feature for all IfActionUsages. + */ + } + + abstract action ifThenElseActions : IfThenElseAction[0..*] nonunique :> actions { + doc + /* + * ifThenElseActions is the base feature for all IfActionUsages that have an elseAction. + */ + } + + abstract action def LoopAction :> Action { + doc + /* + * A LoopAction is the base type for all LoopActionUsages. + */ + + in ref iterator; + + in action body[0..*] { + doc + /* + * The action that is performed repeatedly in the loop. + */ + } + } + + action def WhileLoopAction :> LoopAction, LoopPerformance { + doc + /* + * A WhileLoopAction is a Kernel LoopPerformance that is also a LoopAction. + * It is the base type for all WhileLoopActionUsages. + */ + + in whileTest default {true} { + doc + /* + * A Boolean expression that must be true for the loop to continue. + * It is evaluated before the body is performed and is always evaluated at + * least once. + */ + } + + in action body { + doc + /* + * The action that is performed while the whileTest is true and the + * untilTest is false. + */ + } + + in untilTest default {false} { + doc + /* + * A Boolean expression that must be false for the loop to continue. + * It is evaluated after the body is performed. + */ + } + } + + action def ForLoopAction :> LoopAction { + doc + /* + * A ForLoopAction is a LoopAction that iterates over an ordered sequence of values. + * It is the base type for all ForLoopActionUsages. + */ + + protected ref var[0..1] :> seq { + doc + /* + * The loop variable that is assigned successive elements of seq on each + * iteration of the loop. + */ + } + + in ref seq { + doc + /* + * The sequence of values over which the loop iterates. + */ + } + + in action body { + doc + /* + * The action that is performed on each iteration of the loop. + */ + } + + private attribute index : Positive { + doc + /* + * The index of the element of seq assigned to var on the current iteration + * of the loop. + */ + } + + private action initialization + assign index := 1; + then private action whileLoop + while index <= size(seq) { + assign var := seq#(index); + then perform body; + then assign index := index + 1; + } + } + + abstract action loopActions : LoopAction[0..*] nonunique :> actions { + doc + /* + * loopActions is the base feature for all LoopActionUsages. + */ + } + + abstract action whileLoopActions : WhileLoopAction[0..*] nonunique :> loopActions { + doc + /* + * whileLoopActions is the base feature for all WhileLoopActionUsages. + */ + } + + abstract action forLoopActions : ForLoopAction[0..*] nonunique :> loopActions { + doc + /* + * forLoopActions is the base feature for all ForLoopActionUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Allocations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Allocations.sysml new file mode 100644 index 00000000..c76472c3 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Allocations.sysml @@ -0,0 +1,29 @@ +standard library package Allocations { + doc + /* + * This package defines the base types for allocations and related structural elements + * in the SysML language. + */ + + private import Base::Anything; + private import Connections::*; + + allocation def Allocation :> BinaryConnection { + doc + /* + * Allocation is the most general class of allocation, represented as a connection + * between the source of the allocation and the target. Allocation is the base type + * of all AllocationDefinitions. + */ + + end source: Anything :>> BinaryConnection::source; + end target: Anything :>> BinaryConnection::target; + } + + abstract allocation allocations: Allocation[0..*] nonunique :> binaryConnections { + doc + /* + * allocations is the base feature of all AllocationUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/AnalysisCases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/AnalysisCases.sysml new file mode 100644 index 00000000..6af7c041 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/AnalysisCases.sysml @@ -0,0 +1,38 @@ +standard library package AnalysisCases { + doc + /* + * This package defines the base types for analysis cases and related behavioral elements + * in the SysML language. + */ + + private import Performances::Evaluation; + private import Performances::evaluations; + private import Calculations::Calculation; + private import Cases::Case; + private import Cases::cases; + + abstract analysis def AnalysisCase :> Case { + doc + /* + * AnalysisCase is the most general class of performances of AnalysisCaseDefinitions. + * AnalysisCase is the base class of all AnalysisCaseDefinitions. + */ + + ref analysis self : AnalysisCase :>> Case::self; + subject subj :>> Case::subj; + + abstract analysis subAnalysisCases : AnalysisCase[0..*] :> analysisCases, subcases { + doc + /* + * Other AnalysisCases carried out as part of the performance of this AnalysisCase. + */ + } + } + + abstract analysis analysisCases : AnalysisCase[0..*] nonunique :> cases { + doc + /* + * analysisCases is the base feature of all AnalysisCaseUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Attributes.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Attributes.sysml new file mode 100644 index 00000000..8562b015 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Attributes.sysml @@ -0,0 +1,25 @@ +standard library package Attributes { +doc +/* + * This package defines the base types for attributes and related structural elements + * in the SysML language. + */ + + private import Base::DataValue; + private import Base::dataValues; + + alias AttributeValue for DataValue { + doc + /* + * AttributeValue is the most general type of data values that represent qualities or characteristics + * of a system or part of a system. AttributeValue is the base type of all AttributeDefinitions. + */ + } + + alias attributeValues for dataValues { + doc + /* + * attributeValues is the base feature for all AttributeUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Calculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Calculations.sysml new file mode 100644 index 00000000..598ed1e4 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Calculations.sysml @@ -0,0 +1,37 @@ +standard library package Calculations { + doc + /* + * This package defines the base types for calculations and related behavioral elements in the + * SysML language. + */ + + private import Performances::Evaluation; + private import Performances::evaluations; + private import Actions::Action; + private import Actions::actions; + + abstract calc def Calculation :> Action, Evaluation { + doc + /* + * Calculation is the most general class of evaluations of CalculationDefinitions in a + * system or part of a system. Calculation is the base class of all CalculationDefinitions. + */ + + ref calc self: Calculation :>> Action::self, Evaluation::self; + + abstract calc subcalculations: Calculation :> calculations, subactions { + doc + /* + * The subactions of this Calculation that are Calculations. + */ + } + + } + + abstract calc calculations: Calculation[0..*] nonunique :> actions, evaluations { + doc + /* + * calculations is the base Feature for all CalculationUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Cases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Cases.sysml new file mode 100644 index 00000000..f934b48e --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Cases.sysml @@ -0,0 +1,71 @@ +standard library package Cases { + doc + /* + * This package defines the base types for cases and related behavioral elements + * in the SysML language. + */ + + private import Base::Anything; + private import Requirements::RequirementCheck; + private import Calculations::Calculation; + private import Calculations::calculations; + private import Parts::Part; + private import Parts::parts; + + abstract case def Case :> Calculation { + doc + /* + * Case is the most general class of performances of CaseDefinitions. + * Case is the base class of all CaseDefinitions. + */ + + ref case self : Case :>> Calculation::self; + + subject subj : Anything[1] { + doc + /* + * The subject that was investigated by this Case. + */ + } + + ref part actors : Part[0..*] :> parts { + doc + /* + * The Parts that fill the role of actors for this Case. + * (Note: This is not itself an actor parameter, because specific actor + * parameters will be added for specific Cases.) + */ + } + + objective obj : RequirementCheck[1] { + doc + /* + * A check of whether the objective RequirementUsage was satisfied for this Case. + */ + + subject subj default Case::result; + } + + return ref result[0..*] { + doc + /* + * The result determined by the case, which should satisfy the case objective. + */ + } + + abstract case subcases : Case[0..*] :> cases, subcalculations { + doc + /* + * Other Cases carried out as part of the performance of this Case. + */ + } + + } + + abstract case cases : Case[0..*] nonunique :> calculations { + doc + /* + * cases is the base Feature of all CaseUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Connections.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Connections.sysml new file mode 100644 index 00000000..469be297 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Connections.sysml @@ -0,0 +1,60 @@ +standard library package Connections { + doc + /* + * This package defines the base types for connections and related structural elements + * in the SysML language. + */ + + private import Base::Anything; + private import Occurrences::Occurrence; + private import Occurrences::HappensDuring; + private import Objects::LinkObject; + private import Objects::linkObjects; + private import Objects::BinaryLinkObject; + private import Objects::binaryLinkObjects; + private import Transfers::Transfer; + private import Transfers::transfers; + private import Transfers::FlowTransfer; + private import Transfers::flowTransfers; + private import Transfers::FlowTransferBefore; + private import Transfers::flowTransfersBefore; + private import ScalarValues::Natural; + private import Parts::Part; + private import Parts::parts; + private import Actions::Action; + private import Actions::actions; + + abstract connection def Connection :> LinkObject, Part { + doc + /* + * Connection is the most general class of links between things within some + * containing structure. Connection is the base type of all ConnectionDefinitions. + */ + } + + abstract connection def BinaryConnection :> BinaryLinkObject, Connection { + doc + /* + * BinaryConnection is the most general class of binary links between two things + * within some containing structure. BinaryConnection is the base type of all + * ConnectionDefinitions with exactly two ends. + */ + + end source: Anything :>> BinaryLinkObject::source; + end target: Anything :>> BinaryLinkObject::target; + } + + abstract connection connections: Connection[0..*] nonunique :> linkObjects, parts { + doc + /* + * connections is the base feature of all ConnectionUsages. + */ + } + + abstract connection binaryConnections: Connection[0..*] nonunique :> connections, binaryLinkObjects { + doc + /* + * binaryConnections is the base feature of all binary ConnectionUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Constraints.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Constraints.sysml new file mode 100644 index 00000000..8f4b6060 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Constraints.sysml @@ -0,0 +1,44 @@ +standard library package Constraints { + doc + /* + * This package defines the base types for constraints and related elements in the + * SysML language. + */ + + private import Performances::BooleanEvaluation; + private import Performances::booleanEvaluations; + private import Performances::trueEvaluations; + private import Performances::falseEvaluations; + + abstract constraint def ConstraintCheck :> BooleanEvaluation { + doc + /* + * ConstraintCheck is the most general class for constraint checking. ConstraintCheck is the base + * type of all ConstraintDefinitions. + */ + + ref constraint self: ConstraintCheck :>> BooleanEvaluation::self; + } + + abstract constraint constraintChecks: ConstraintCheck[0..*] nonunique :> booleanEvaluations { + doc + /* + * constraintChecks is the base feature of all ConstraintUsages. + */ + } + + abstract constraint assertedConstraintChecks :> constraintChecks, trueEvaluations { + doc + /* + * assertedConstraintChecks is the subset of constraintChecks for ConstraintChecks asserted to be true. + */ + } + + abstract constraint negatedConstraintChecks :> constraintChecks, falseEvaluations { + doc + /* + * negatedConstraintChecks is the subset of constraintChecks for ConstraintChecks asserted to be false. + */ + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Flows.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Flows.sysml new file mode 100644 index 00000000..f2646f69 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Flows.sysml @@ -0,0 +1,126 @@ +standard library package Flows { + doc + /* + * This package defines the base types for flows and related behavioral elements + * in the SysML language. + */ + + private import Links::Link; + private import Occurrences::Occurrence; + private import Occurrences::HappensDuring; + private import Objects::binaryLinkObjects; + private import Transfers::Transfer; + private import Transfers::transfers; + private import Transfers::FlowTransfer; + private import Transfers::flowTransfers; + private import Transfers::FlowTransferBefore; + private import Transfers::flowTransfersBefore; + private import Actions::Action; + private import Actions::actions; + private import ScalarValues::Natural; + + abstract flow def MessageAction :> Action, Link { + doc + /* + * MessageAction is the most general class of actions that represent + * interactions between linked things. It is the base type of all + * FlowDefinitions. + */ + + ref payload [0..*] { + doc + /* + * A payload that may be transferred during the interaction. + */ + } + } + + abstract flow def Message :> MessageAction, Transfer { + doc + /* + * Message is the subclass of message connections that represent + * a transfer of objects or values between two occurrences. It is + * the base type of all FlowUsages. + */ + + ref payload :>> MessageAction::payload, Transfer::payload; + + private ref action thisConnection = self; + + in event occurrence sourceEvent [1] default thisConnection.start { + doc + /* + * An occurrence happening during the source of this message + * that is either the start of the mssage or happens before it. + */ + } + in event occurrence targetEvent [1] default thisConnection.done { + doc + /* + * An occurrence happening during the target of this message + * that is either the end of the message or happens after it. + */ + } + + connection :HappensDuring connect sourceEvent to [1] source; + connection :HappensDuring connect targetEvent to [1] target; + + private attribute seBeforeNum: Natural[1] = if sourceEvent==thisConnection.start ? 0 else 1; + private attribute teAfterNum: Natural[1] = if targetEvent==thisConnection.done ? 0 else 1; + succession [seBeforeNum] first [0..1] sourceEvent then [0..1] self; + succession [teAfterNum] first [0..1] self then [0..1] targetEvent; + } + + abstract flow def Flow :> Message, FlowTransfer { + doc + /* + * Flow is a subclass of messages that are also flow transfers. + * It is the base type for FlowUsages that identify their source output and + * target input. + */ + + end occurrence source: Occurrence :>> Message::source, FlowTransfer::source; + end occurrence target: Occurrence :>> Message::target, FlowTransfer::target; + } + + abstract flow def SuccessionFlow :> Flow, FlowTransferBefore { + doc + /* + * SuccessionFlow is a subclass of flowss that appen after their source and + * before their target. It is the base type for all SuccessionFlowUsages. + */ + + ref self : SuccessionFlow :>> Flow::self, FlowTransferBefore::self; + + end occurrence source: Occurrence :>> Flow::source, FlowTransferBefore::source; + end occurrence target: Occurrence :>> Flow::target, FlowTransferBefore::target; + } + + abstract message messages: Message[0..*] nonunique :> transfers, actions { + doc + /* + * messages is the base feature of all FlowUsages. + */ + } + + abstract flow flows: Flow[0..*] nonunique :> messages, flowTransfers { + doc + /* + * flows is the base feature for FlowUsages that identify their source output + * and target input. + */ + + end occurrence source: Occurrence :>> Flow::source, messages::source, flowTransfers::source; + end occurrence target: Occurrence :>> Flow::target, messages::target, flowTransfers::target; + } + + abstract flow successionFlows: SuccessionFlow[0..*] nonunique :> flows, flowTransfersBefore { + doc + /* + * successionFlows is the base feature of all SuccessionFlowUsages. + */ + + end occurrence source: Occurrence :>> SuccessionFlow::source, flows::source, flowTransfersBefore::source; + end occurrence target: Occurrence :>> SuccessionFlow::target, flows::target, flowTransfersBefore::target; + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Interfaces.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Interfaces.sysml new file mode 100644 index 00000000..2cbe4444 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Interfaces.sysml @@ -0,0 +1,89 @@ +standard library package Interfaces { + doc + /* + * This package defines the base types for interfaces and related structural elements in the SysML language. + */ + + private import Connections::Connection; + private import Connections::connections; + private import Connections::BinaryConnection; + private import Connections::binaryConnections; + private import Ports::Port; + + private import ScalarValues::Natural; + private import SequenceFunctions::size; + private import SequenceFunctions::excludingAt; + private import ControlFunctions::selectOne; + + private import SequenceFunctions::notEmpty; + + private calc def excludingOnce { + doc + /* + * Return a sequence that is the same as the input sequence, but with a single + * instance of a given value removed. The given value must be in the input sequence. + */ + in seq[1..*] nonunique ordered; + in value[1] :> seq; + + private attribute position : Natural[1] = (1..size(seq))->selectOne{in i; seq#(i) == value}; + seq->excludingAt(position) + } + + abstract interface def Interface :> Connection { + doc + /* + * Interface is the most general class of links between Ports on Parts + * within some containing structure. Interface is the base type of all + * InterfaceDefinitions. + * + * Transfers outgoing from any one of the participant Ports of an Interface + * may be targeted to one of the other participant Ports (depending on any + * other Interfaces in which the Port is also participating). + */ + + ref port :>> participant : Port [2..*] nonunique ordered { + doc + /* + * The participants of an Interface must be Ports. The interfacingPorts of + * each participant Port include all the other participants in the Interface. + */ + + protected ref thisParticipant :>> self; + protected ref otherParticipants : Port [1..*] nonunique :> interfacingPorts + default participant->excludingOnce(thisParticipant); + } + } + + abstract interface def BinaryInterface :> Interface, BinaryConnection { + doc + /* + * BinaryInterface is the most general class of links between two Ports + * on Parts within some containing structure. BinaryInterface is the base + * type of all binary InterfaceDefinitions which have exactly two ends. + * + * Transfers outgoing from each participant Port of a BinaryInterface may be + * targeted to the other participant Port (depending on any other Interfaces + * in which the Port is also participating). + */ + + ref port :>> Interface::participant, BinaryConnection::participant[2] nonunique ordered; + + end port source: Port :>> BinaryConnection::source; + end port target: Port :>> BinaryConnection::target; + } + + abstract interface interfaces: Interface[0..*] nonunique :> connections { + doc + /* + * interfaces is the base feature of all InterfaceUsages. + */ + } + + abstract interface binaryInterfaces: BinaryInterface[0..*] nonunique :> interfaces, binaryConnections { + doc + /* + * interfaces is the base feature of all binary InterfaceUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Items.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Items.sysml new file mode 100644 index 00000000..e14fe70f --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Items.sysml @@ -0,0 +1,153 @@ +standard library package Items { + doc + /* + * This package defines the base types for items and related structural elements in the + * SysML language. + */ + + private import Objects::Object; + private import Objects::objects; + private import Parts::Part; + private import Parts::parts; + private import Occurrences::HappensWhile; + private import Occurrences::JustOutsideOf; + private import Objects::StructuredSpaceObject; + private import Constraints::ConstraintCheck; + private import Constraints::constraintChecks; + private import CollectionFunctions::contains; + private import SequenceFunctions::isEmpty; + private import SequenceFunctions::notEmpty; + private import SequenceFunctions::includes; + private import SequenceFunctions::union; + private import ControlFunctions::forAll; + + abstract item def Item :> Object { + doc + /* + * Item is the most general class of objects that are part of, exist in or flow through a system. + * Item is the base type of all ItemDefinitions. + */ + + ref self: Item :>> Object::self; + + item start: Item :>> startShot; + item done: Item :>> endShot; + + item shape : Item :>> spaceBoundary { + doc + /* + * The shape of an Item is its spatial boundary. + */ + } + + item envelopingShapes : Item[0..*] { + doc + /* + * Each enveloping shape is the shape of an Item that spacially overlaps this Item for its + * entire lifetime. + */ + + ref item envelopedItem :>> that; + + assert constraint { + doc + /* + * Enables two dimensional items to be enveloped by two or three dimensional shapes. + */ + innerSpaceDimension == + (if envelopedItem.innerSpaceDimension == 3 | envelopedItem.outerSpaceDimension == 3? 2 + else envelopedItem.outerSpaceDimension - 1) + } + assert constraint { (that as Item).innerSpaceDimension < 3 implies notEmpty(outerSpaceDimension) } + + item envelopingItem [1]; + + assert constraint { + doc + /* + * This constraint prevents an envelopingShape from being a portion. + */ + + envelopingItem.shape.spaceTimeCoincidentOccurrences->includes(that) and + envelopingItem.spaceTimeEnclosedOccurrences->includes(that.that) + } + } + + item boundingShapes : StructuredSpaceObject [0..*] :> envelopingShapes { + doc + /* + * envelopingShapes that are structured space objects with every face or every edge + * intersecting this Item. + */ + + ref item boundingShape: Item :>> self; + + private item :>> faces { + ref item face :>> self; + item inter [1]; + assert constraint { contains(inter.intersectionsOf, union(face, boundingShape)) } + } + private item :>> edges { + ref item edge :>> self; + item inter [1]; + assert constraint { isEmpty(faces) implies + contains(inter.intersectionsOf, union(edge, boundingShape)) } + } + } + + item voids :>> innerSpaceOccurrences [0..*] { + doc + /* + * Voids are inner space occurrences of this Item. + */ + } + + attribute isSolid = isEmpty(voids) { + doc + /* + * An Item is solid if it has no voids. + */ + } + + abstract item subitems: Item[0..*] :> items, subobjects { + doc + /* + * The Items that are composite subitems of this Item. + */ + + private ref redefines Item::incomingTransferSort, subobjects::incomingTransferSort; + } + + abstract part subparts: Part[0..*] :> subitems, parts { + doc + /* + * The subitems of this Item that are Parts. + */ + } + + abstract constraint checkedConstraints: ConstraintCheck[0..*] :> constraintChecks, ownedPerformances { + doc + /* + * Constraints that have been checked by this Item. + */ + } + } + + connection def Touches :> JustOutsideOf, HappensWhile { + doc + /* + * Touching items are just outside each other and happen at the same time. + */ + + end touchesToo [0..*] item touchedItemToo :>> separateSpaceToo, thisOccurrence; + end touches [0..*] item touchedItem :>> separateSpace, thatOccurrence; + } + + abstract item items : Item[0..*] nonunique :> objects { + doc + /* + * items is the base feature of all ItemUsages. + */ + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Metadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Metadata.sysml new file mode 100644 index 00000000..8b86c2a4 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Metadata.sysml @@ -0,0 +1,32 @@ +standard library package Metadata { +doc +/* + * This package defines the base types for metadata definitions and related + * metadata annotations in the SysML language. + */ + + private import Metaobjects::Metaobject; + private import Metaobjects::metaobjects; + private import Items::Item; + private import Items::items; + + abstract metadata def MetadataItem :> Metaobject, Item { + doc + /* + * MetadataItem is the most general class of Items that represent Metaobjects. + * MetadataItem is the base type of all MetadataDefinitions. + */ + + ref self : MetadataItem redefines Metaobject::self, Item::self; + } + + abstract item metadataItems : MetadataItem[0..*] :> metaobjects, items { + doc + /* + * metadataItems is the base feature of all MetadataUsages. + * + * Note: It is not itself a MetadataUsage, because it is not being used as an + * AnnotatingElement here. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Parts.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Parts.sysml new file mode 100644 index 00000000..5cf3ad07 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Parts.sysml @@ -0,0 +1,81 @@ +standard library package Parts { +doc +/* + * This package defines the base types for parts and related structural elements in the + * SysML language. + */ + + private import Objects::Object; + private import Objects::objects; + private import Items::Item; + private import Items::items; + private import Ports::Port; + private import Ports::ports; + private import Actions::Action; + private import Actions::actions; + private import States::StateAction; + private import States::stateActions; + + abstract part def Part :> Item { + doc + /* + * Part is the most general class of objects that represent all or a part of a system. + * Part is the base type of all PartDefinitions. + */ + + ref self: Part :>> Item::self; + + part start: Part :>> Item::start; + part done: Part :>> Item::done; + + abstract port ownedPorts: Port[0..*] :> ports, timeEnclosedOccurrences { + doc + /* + * Ports that are owned by this Part. + */ + } + + abstract ref action performedActions: Action[0..*] :> actions, enactedPerformances { + doc + /* + * Actions that are performed by this Part. + */ + } + + abstract action ownedActions: Action[0..*] :> actions, ownedPerformances { + doc + /* + * Actions that are owned by this Part. + */ + + ref part this : Part :>> Action::this, ownedPerformances::this = that as Part { + doc + /* + * The "this" reference of an ownedAction is always its owning Part. + */ + } + } + + abstract ref state exhibitedStates: StateAction[0..*] :> stateActions, performedActions { + doc + /* + * StateActions that are exhibited by this Part. + */ + } + + abstract state ownedStates: StateAction[0..*] :> stateActions, ownedActions { + doc + /* + * StateActions that are owned by this Part. + */ + } + } + + abstract part parts: Part[0..*] nonunique :> items { + doc + /* + * parts is the base feature of all part properties. + */ + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Ports.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Ports.sysml new file mode 100644 index 00000000..f1b844df --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Ports.sysml @@ -0,0 +1,54 @@ +standard library package Ports { + doc + /* + * This package defines the base types for ports and related structural elements + * in the SysML language. + */ + + private import Objects::Object; + private import Objects::objects; + + abstract port def Port :> Object { + doc + /* + * Port is the most general class of objects that represent connection points + * for interacting with a Part. Port is the base type of all PortDefinitions. + * + * Transfers outgoing from a Port are always targeted to a Port connected to + * the original Port by an Interface. + */ + + ref self: Port :>> Object::self; + + port subports: Port [0..*] :> ports, timeEnclosedOccurrences { + doc + /* + * The Ports that are subports of this Port. + */ + } + + abstract ref port interfacingPorts : Port[0..*] nonunique :> ports { + doc + /* + * Ports that are connected to this Port by an Interface. + */ + } + + ref :>> outgoingTransfersFromSelf :> interfacingPorts.incomingTransfersToSelf { + doc + /* + * The target of each of the outgoingTransfersFromSelf of a Port must be an interfacingPort. + */ + + end ref source; + end ref target; + } + } + + abstract port ports : Port[0..*] nonunique :> objects { + doc + /* + * ports is the base feature of all PortUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Requirements.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Requirements.sysml new file mode 100644 index 00000000..2ea58f69 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Requirements.sysml @@ -0,0 +1,194 @@ +standard library package Requirements { + doc + /* + * This package defines the base types for requirements and related elements in the SysML language. + */ + + private import Base::Anything; + private import ScalarValues::String; + private import ControlFunctions::allTrue; + private import Constraints::constraintChecks; + private import Constraints::assertedConstraintChecks; + private import Constraints::negatedConstraintChecks; + private import Parts::Part; + private import Parts::parts; + private import Actions::Action; + private import Interfaces::Interface; + private import Attributes::AttributeValue; + + private abstract constraint def RequirementConstraintCheck { + doc + /* + * RequirementConstraintCheck is the base ConstraintCheck for RequirementCheck, defining the + * separate assumptions and required constraints such that, if all the assumptions are true, + * then all the required constraints must be true. + */ + + constraint assumptions[0..*] :> constraintChecks, subperformances { + doc + /* + * Assumptions that must hold for the required constraints to apply. + */ + } + + constraint constraints[0..*] :> constraintChecks, subperformances { + doc + /* + * The required constraints that are to be checked. + */ + } + + return result = allTrue(assumptions()) implies allTrue(constraints()) { + doc + /* + * If all the assumptions are true, then all the required constraints must hold. + */ + } + } + + abstract requirement def RequirementCheck :> RequirementConstraintCheck { + doc + /* + * RequirementCheck is the most general class for requirements checking. RequirementsCheck is the base + * type of all requirement definitions. + */ + + ref requirement :>> self: RequirementCheck; + + subject subj : Anything[1] { + doc + /* + * The entity that is being checked for satisfaction of the required constraints. + */ + } + + ref part actors : Part[0..*] { + doc + /* + * The Parts that fill the role of actors for this RequirementCheck. + * (Note: This is not itself an actor parameter, because specific actor + * parameters will be added for specific RequirementChecks.) + */ + } + + ref part stakeholders : Part[0..*] { + doc + /* + * The Parts that represent stakeholders interested in the concern being checked. + * (Note: This is not itself a stakeholder parameter, because specific stakeholder + * parameters will be added for specific RequirementChecks.) + */ + } + + /* + * Note: assumptions and constraints are redefined here solely to simplify the + * resolution of their qualified names as library elements. + */ + constraint assumptions :>> RequirementConstraintCheck::assumptions; + constraint constraints :>> RequirementConstraintCheck::constraints; + + abstract requirement subrequirements[0..*] :> requirementChecks, constraints { + doc + /* + * Nested requirements, which are also required constraints. + */ + } + + abstract concern concerns[0..*] :> concernChecks, subrequirements { + doc + /* + * The checks of any concerns being addressed (as required constraints). + */ + } + + } + + requirement def FunctionalRequirementCheck :> RequirementCheck { + doc + /* + * A functional requirement specifies an action that a system, or part of a system, must perform. + */ + + subject: Action; + } + + requirement def InterfaceRequirementCheck :> RequirementCheck { + doc + /* + * An interface requirement specifies an interface for connecting systems and system parts, which + * optionally may include item flows across the interface and/or interface constraints. + */ + + subject: Interface; + } + + requirement def PerformanceRequirementCheck :> RequirementCheck { + doc + /* + * A performance requirement quantitavely measures the extent to which a system, or a system part, + * satisfies a required capability or condition. + */ + + subject: AttributeValue; + } + + requirement def PhysicalRequirementCheck :> RequirementCheck { + doc + /* + * A physical requirement specifies physical characteristics and/or physical constraints of the + * system, or a system part. + */ + + subject: Part; + } + + requirement def DesignConstraintCheck :> RequirementCheck { + doc + /* + * A design constraint specifies a constraint on the implementation of the system or system part, + * such as the system must use a commercial off the shelf component. + */ + + subject: Part; + } + + concern def ConcernCheck :> RequirementCheck { + doc + /* + * ConcernCheck is the most general class for concern checking. ConcernCheck is the base type of + * all ConcernDefinitions. + */ + + ref concern :>> self: ConcernCheck; + + } + + abstract requirement requirementChecks: RequirementCheck[0..*] nonunique :> constraintChecks { + doc + /* + * requirementChecks is the base feature of all requirement usages. + */ + } + + abstract requirement satisfiedRequirementChecks :> requirementChecks, assertedConstraintChecks { + doc + /* + * satisfiedRequirementChecks is the subset of requirementChecks for Requirements asserted to be satisfied. + */ + } + + abstract requirement notSatisfiedRequirementChecks: RequirementCheck[0..*] :> requirementChecks, negatedConstraintChecks { + doc + /* + * notSatisfiedRequirementChecks is the subset of requirementChecks for Requirements asserted to be not satisfied. + */ + } + + abstract concern concernChecks: ConcernCheck[0..*] nonunique :> requirementChecks { + doc + /* + * concernChecks is the base feature of all ConcernUsages. + */ + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/StandardViewDefinitions.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/StandardViewDefinitions.sysml new file mode 100644 index 00000000..94f975fb --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/StandardViewDefinitions.sysml @@ -0,0 +1,123 @@ +standard library package StandardViewDefinitions { + doc /* + * This package defines the standard view definitions for the SysML language. + */ + public import SysML::*; + + view def GeneralView { + doc /* + * View definition to present any members of exposed model element(s). + * This is the most general view, enabling presentation of any model element. + * The typical rendering in graphical notation is as a graph of nodes and edges. + * Specializations of GeneralView can be specified through appropriate selection of filters, e.g.: + * - package view, filtering on Package, Package containment, package Import + * - definition and usage view, filtering on Definition, Usage, Specialization, FeatureTyping (covering defined by) + * - requirement view, filtering on RequirementDefinition, RequirementUsage, Specialization, FeatureTyping, + * SatisfyRequirementUsage, AllocationDefinition, AllocationUsage, + * - view and viewpoint view, filtering on ViewDefinition, ViewUsage, ViewpointDefinition, ViewpointUsage, + * RenderingDefinition, RenderingUsage, ConcernDefinition, ConcernUsage, StakeholderMembership, ... + * - language extension view, filtering on Metaclass, MetadataFeature, MetadataAccessExpression, ... + * Note: filters are specified by referencing concepts from the KerML.kerml and SysML.sysml standard library packages. + */ + } + + view def InterconnectionView { + doc /* + * View definition to present exposed features as nodes, nested features as + * nested nodes, and connections between features + * as edges between (nested) nodes. Nested nodes may present boundary features + * (e.g., ports, parameters). + */ + } + + view def ActionFlowView specializes InterconnectionView { + doc /* + * View definition to present connections between actions. + * Valid nodes and edges in an ActionFlowView are: + * - Actions with nested actions + * - Parameters with direction + * - Flow connection usages (e.g., kinds of transfers from output to input) + * - Binding connections between parameters (e.g., delegate a parameter from + * one level of nesting to another) + * - Proxy connection points + * - Swim lanes + * - Conditional succession + * - Control nodes (fork, join, decision, merge) + * - Control structures, e.g., if-then-else, until-while-loop, for-loop + * - Send and accept actions + * - Change and time triggers + * - Compartments on actions and parameters + */ + } + + view def StateTransitionView specializes InterconnectionView { + doc /* + * View definition to present states and their transitions. + * Valid nodes and edges in a StateTransitionView are: + * - States with nested states + * - Entry, do, and exit actions + * - Transition usages with triggers, guards, and actions + * - Compartments on states + */ + } + + view def SequenceView { + doc /* + * View definition to present time ordering of event occurrences on lifelines + * of exposed features. + * Valid nodes and edges in a SequenceView are: + * - Features such as parts with their lifelines + * - Event occurrences on the lifelines + * - Messages sent from one part to another with and without a type of flow + * - Succession between event occurrences + * - Nested sequence view (e.g., a reference to a view) + * - Compartments + * The typical rendering in graphical notation depicts the exposed features + * horizontally along the top, with vertical lifelines. The time axis is + * vertical, with time increasing from top to bottom. + */ + } + + view def GeometryView { + doc /* + * View definition to present a visualization of exposed spatial items in two + * or three dimensions + * Valid nodes and edges in a GeometryView are: + * - Spatial item, including shape + * - Coordinate frame + * - Feature related to spatial item, such as a quantity (e.g. temperature) + * of which values are to be rendered on a color scale + * The typical rendering in graphical notation would include a number of + * visualization parameters, such as: + * - 2D or 3D view + * - viewing direction + * - zoom level + * - light sources + * - object projection mode, e.g., isometric, perspective, orthographic + * - object rendering mode, e.g., shaded, wireframe, hidden line + * - object pan (placement) and rotate (orientation) settings + * - color maps + */ + } + + view def GridView { + doc /* + * View definition to present exposed model elements and their relationships, + * arranged in a rectangular grid. + * GridView is the generalization of the following more specialized views: + * - Tabular view + * - Data value tabular view + * - Relationship matrix view, e.g. presenting allocation or dependency relationships + */ + } + + view def BrowserView { + doc /* + * View definition to present the hierarchical membership structure of model + * elements starting from one or more exposed root elements. + * The typical rendering in graphical notation is as an indented list of rows, + * consisting of dynamically collapsible-expandable nodes that represent + * branches and leaves of the tree, as in graphical user interface widgets. + */ + } +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/States.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/States.sysml new file mode 100644 index 00000000..9d77348f --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/States.sysml @@ -0,0 +1,103 @@ +standard library package States { + doc + /* + * This package defines the base types for states and related behavioral elements in the + * SysML language. + */ + + private import Occurrences::Occurrence; + private import StatePerformances::StatePerformance; + private import StatePerformances::StateTransitionPerformance; + private import Actions::Action; + private import Actions::TransitionAction; + private import Actions::transitionActions; + private import Actions::AcceptAction; + private import Actions::actions; + private import SequenceFunctions::notEmpty; + private import SequenceFunctions::size; + + abstract state def StateAction :> Action, StatePerformance { + doc + /* + * A StateAction is a kind of Action that is also a StatePerformance. It is the base type for all + * StateDefinitions. + */ + + entry action entryAction :>> 'entry'; + do action doAction: Action :>> 'do'; + exit action exitAction: Action :>> 'exit'; + + attribute :>> isTriggerDuring; + + ref state self: StateAction :>> Action::self, StatePerformance::self; + ref state start: StateAction :>> Action::start, StatePerformance::startShot; + ref state done: StateAction :>> Action::done, StatePerformance::endShot; + + action :>> subactions :> middle { + doc + /* + * The subperformances of this StateAction that are Actions, other than the entry and exit Actions. + * These subactions all take place in the "middle" of the StatePerformance, that is, after the + * entry Action and before the exit Action. + */ + } + + action substates: StateAction[0..*] :> stateActions, subactions { + doc + /* + * The subactions of this state that are states. + * + * NOTE: This feature is declared as an ActionUsage, not a StateUsage, so that the constraint + * checkStateUsageExclusiveStateSpecialization does not apply to it, since this constraint + * would otherwise incorrectly require that "substates" subset "exclusiveStates". + */ + } + + abstract state exclusiveStates: StateAction[0..*] :> substates { + doc + /* + * The substates of this state that are mutually exclusive, that is, whose performances do not + * overlap in time. + */ + } + + abstract action stateTransitions: StateTransitionAction[0..*] :> transitions { + doc + /* + * The transitions of this state that are state transitions. + */ + } + + succession stateSequencing first [0..1] exclusiveStates then [0..1] exclusiveStates { + doc + /* + * Exclusive states cannot overlap, so it must be possible to strictly sequence them in time. + */ + } + assert constraint {notEmpty(exclusiveStates) implies size(stateSequencing) == size(exclusiveStates) - 1} + } + + action def StateTransitionAction :> TransitionAction, StateTransitionPerformance { + doc + /* + * A StateTransitionAction is a TransitionAction and a StateTransitionPerformance whose transitionLinkSource + * is a State. It is the base type of TransitionUsages used transitions in state models. + */ + + in transitionLinkSource[1]: StateAction :>> + TransitionAction::transitionLinkSource, StateTransitionPerformance::transitionLinkSource; + + inout payload[0..*]; + in :>> receiver; + + bind payload = accepter.payload; + bind receiver = accepter.receiver; + } + + abstract state stateActions: StateAction[0..*] nonunique :> actions { + doc + /* + * stateActions is the base feature for all StateUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/SysML.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/SysML.sysml new file mode 100644 index 00000000..03ffd6d2 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/SysML.sysml @@ -0,0 +1,539 @@ +standard library package SysML { + doc + /* + * This package contains a reflective KerML model of the KerML abstract syntax. + */ + + private import ScalarValues::*; + public import Systems::*; + + package Systems { + public import KerML::Kernel::*; + + metadata def AcceptActionUsage specializes ActionUsage { + derived ref item receiverArgument : Expression[0..1] subsets Metadata::metadataItems; + derived ref item payloadParameter : ReferenceUsage[1..1] subsets nestedReference, parameter subsets Metadata::metadataItems; + derived ref item payloadArgument : Expression[0..1] subsets Metadata::metadataItems; + } + + metadata def ActionDefinition specializes Behavior, OccurrenceDefinition { + derived ref item 'action' : ActionUsage[0..*] ordered subsets step, usage subsets Metadata::metadataItems; + } + + metadata def ActionUsage specializes Step, OccurrenceUsage { + derived ref item actionDefinition : Behavior[0..*] ordered redefines behavior, occurrenceDefinition subsets Metadata::metadataItems; + } + + metadata def ActorMembership specializes ParameterMembership { + derived item ownedActorParameter : PartUsage[1..1] redefines ownedMemberParameter subsets Metadata::metadataItems; + } + + metadata def AllocationDefinition specializes ConnectionDefinition { + derived ref item 'allocation' : AllocationUsage[0..*] ordered subsets usage subsets Metadata::metadataItems; + } + + metadata def AllocationUsage specializes ConnectionUsage { + derived ref item allocationDefinition : AllocationDefinition[0..*] ordered redefines connectionDefinition subsets Metadata::metadataItems; + } + + metadata def AnalysisCaseDefinition specializes CaseDefinition { + derived ref item resultExpression : Expression[0..1] subsets expression, ownedFeature subsets Metadata::metadataItems; + } + + metadata def AnalysisCaseUsage specializes CaseUsage { + derived ref item analysisCaseDefinition : AnalysisCaseDefinition[0..1] redefines caseDefinition subsets Metadata::metadataItems; + derived ref item resultExpression : Expression[0..1] subsets ownedFeature subsets Metadata::metadataItems; + } + + metadata def AssertConstraintUsage specializes ConstraintUsage, Invariant { + derived ref item assertedConstraint : ConstraintUsage[1..1] subsets Metadata::metadataItems; + } + + metadata def AssignmentActionUsage specializes ActionUsage { + derived ref item targetArgument : Expression[0..1] subsets Metadata::metadataItems; + derived ref item valueExpression : Expression[0..1] subsets Metadata::metadataItems; + derived ref item referent : Feature[1..1] subsets member subsets Metadata::metadataItems; + } + + metadata def AttributeDefinition specializes DataType, Definition; + + metadata def AttributeUsage specializes Usage { + derived attribute isReference : Boolean[1..1] redefines isReference; + + derived ref item attributeDefinition : DataType[0..*] ordered redefines definition subsets Metadata::metadataItems; + } + + metadata def BindingConnectorAsUsage specializes BindingConnector, ConnectorAsUsage; + + metadata def CalculationDefinition specializes Function, ActionDefinition { + derived ref item calculation : CalculationUsage[0..*] ordered subsets 'action', expression subsets Metadata::metadataItems; + } + + metadata def CalculationUsage specializes Expression, ActionUsage { + derived ref item calculationDefinition : Function[0..1] ordered redefines function, actionDefinition subsets Metadata::metadataItems; + } + + metadata def CaseDefinition specializes CalculationDefinition { + derived ref item objectiveRequirement : RequirementUsage[0..1] ordered subsets usage subsets Metadata::metadataItems; + derived ref item subjectParameter : Usage[1..1] subsets parameter, usage subsets Metadata::metadataItems; + derived ref item actorParameter : PartUsage[0..*] ordered subsets parameter, usage subsets Metadata::metadataItems; + } + + metadata def CaseUsage specializes CalculationUsage { + derived ref item objectiveRequirement : RequirementUsage[0..1] ordered subsets usage subsets Metadata::metadataItems; + derived ref item caseDefinition : CaseDefinition[0..1] redefines calculationDefinition subsets Metadata::metadataItems; + derived ref item subjectParameter : Usage[1..1] subsets parameter, usage subsets Metadata::metadataItems; + derived ref item actorParameter : PartUsage[0..*] ordered subsets parameter, usage subsets Metadata::metadataItems; + } + + metadata def ConcernDefinition specializes RequirementDefinition; + + metadata def ConcernUsage specializes RequirementUsage { + derived ref item concernDefinition : ConcernDefinition[0..1] redefines requirementDefinition subsets Metadata::metadataItems; + } + + metadata def ConjugatedPortDefinition specializes PortDefinition { + derived ref item originalPortDefinition : PortDefinition[1..1] redefines owningNamespace subsets Metadata::metadataItems; + derived ref item ownedPortConjugator : PortConjugation[1..1] redefines ownedConjugator subsets Metadata::metadataItems; + } + + metadata def ConjugatedPortTyping specializes FeatureTyping { + ref item conjugatedPortDefinition : ConjugatedPortDefinition[1..1] redefines type subsets Metadata::metadataItems; + derived ref item portDefinition : PortDefinition[1..1] subsets Metadata::metadataItems; + } + + metadata def ConnectionDefinition specializes AssociationStructure, PartDefinition { + attribute isSufficient : Boolean[1..1] redefines isSufficient; + + derived ref item connectionEnd : Usage[0..*] ordered redefines associationEnd subsets Metadata::metadataItems; + } + + metadata def ConnectionUsage specializes ConnectorAsUsage, PartUsage { + derived ref item connectionDefinition : AssociationStructure[0..*] ordered subsets itemDefinition redefines association subsets Metadata::metadataItems; + } + + abstract metadata def ConnectorAsUsage specializes Usage, Connector; + + metadata def ConstraintDefinition specializes OccurrenceDefinition, Predicate; + + metadata def ConstraintUsage specializes BooleanExpression, OccurrenceUsage { + derived ref item constraintDefinition : Predicate[0..1] redefines predicate subsets Metadata::metadataItems; + } + + abstract metadata def ControlNode specializes ActionUsage; + + metadata def DecisionNode specializes ControlNode; + + metadata def Definition specializes Classifier { + attribute isVariation : Boolean[1..1]; + + derived ref item 'variant' : Usage[0..*] subsets ownedMember subsets Metadata::metadataItems; + derived item variantMembership : VariantMembership[0..*] subsets ownedMembership subsets Metadata::metadataItems; + derived ref item usage : Usage[0..*] ordered subsets feature subsets Metadata::metadataItems; + derived ref item directedUsage : Usage[0..*] ordered subsets directedFeature, usage subsets Metadata::metadataItems; + derived ref item ownedUsage : Usage[0..*] ordered subsets ownedFeature, usage subsets Metadata::metadataItems; + derived ref item ownedReference : ReferenceUsage[0..*] ordered subsets ownedUsage subsets Metadata::metadataItems; + derived ref item ownedAttribute : AttributeUsage[0..*] ordered subsets ownedUsage subsets Metadata::metadataItems; + derived ref item ownedEnumeration : EnumerationUsage[0..*] ordered subsets ownedAttribute subsets Metadata::metadataItems; + derived ref item ownedOccurrence : OccurrenceUsage[0..*] ordered subsets ownedUsage subsets Metadata::metadataItems; + derived ref item ownedItem : ItemUsage[0..*] ordered subsets ownedOccurrence subsets Metadata::metadataItems; + derived ref item ownedPart : PartUsage[0..*] ordered subsets ownedItem subsets Metadata::metadataItems; + derived ref item ownedPort : PortUsage[0..*] ordered subsets ownedUsage subsets Metadata::metadataItems; + derived ref item ownedConnection : ConnectorAsUsage[0..*] ordered subsets ownedUsage subsets Metadata::metadataItems; + derived ref item ownedFlow : FlowUsage[0..*] subsets ownedConnection subsets Metadata::metadataItems; + derived ref item ownedInterface : InterfaceUsage[0..*] ordered subsets ownedConnection subsets Metadata::metadataItems; + derived ref item ownedAllocation : AllocationUsage[0..*] ordered subsets ownedConnection subsets Metadata::metadataItems; + derived ref item ownedAction : ActionUsage[0..*] ordered subsets ownedOccurrence subsets Metadata::metadataItems; + derived ref item ownedState : StateUsage[0..*] ordered subsets ownedAction subsets Metadata::metadataItems; + derived ref item ownedTransition : TransitionUsage[0..*] subsets ownedUsage subsets Metadata::metadataItems; + derived ref item ownedCalculation : CalculationUsage[0..*] ordered subsets ownedAction subsets Metadata::metadataItems; + derived ref item ownedConstraint : ConstraintUsage[0..*] ordered subsets ownedOccurrence subsets Metadata::metadataItems; + derived ref item ownedRequirement : RequirementUsage[0..*] ordered subsets ownedConstraint subsets Metadata::metadataItems; + derived ref item ownedConcern : ConcernUsage[0..*] subsets ownedRequirement subsets Metadata::metadataItems; + derived ref item ownedCase : CaseUsage[0..*] ordered subsets ownedCalculation subsets Metadata::metadataItems; + derived ref item ownedAnalysisCase : AnalysisCaseUsage[0..*] ordered subsets ownedCase subsets Metadata::metadataItems; + derived ref item ownedVerificationCase : VerificationCaseUsage[0..*] ordered subsets ownedCase subsets Metadata::metadataItems; + derived ref item ownedUseCase : UseCaseUsage[0..*] ordered subsets ownedCase subsets Metadata::metadataItems; + derived ref item ownedView : ViewUsage[0..*] ordered subsets ownedPart subsets Metadata::metadataItems; + derived ref item ownedViewpoint : ViewpointUsage[0..*] ordered subsets ownedRequirement subsets Metadata::metadataItems; + derived ref item ownedRendering : RenderingUsage[0..*] ordered subsets ownedPart subsets Metadata::metadataItems; + derived ref item ownedMetadata : MetadataUsage[0..*] ordered subsets ownedItem subsets Metadata::metadataItems; + } + + metadata def EnumerationDefinition specializes AttributeDefinition { + attribute isVariation : Boolean[1..1] redefines isVariation; + + derived ref item enumeratedValue : EnumerationUsage[0..*] ordered redefines 'variant' subsets Metadata::metadataItems; + } + + metadata def EnumerationUsage specializes AttributeUsage { + derived ref item enumerationDefinition : EnumerationDefinition[1..1] redefines attributeDefinition subsets Metadata::metadataItems; + } + + metadata def EventOccurrenceUsage specializes OccurrenceUsage { + derived attribute isReference : Boolean[1..1] redefines isReference; + + derived ref item eventOccurrence : OccurrenceUsage[1..1] subsets Metadata::metadataItems; + } + + metadata def ExhibitStateUsage specializes StateUsage, PerformActionUsage { + derived ref item exhibitedState : StateUsage[1..1] redefines performedAction subsets Metadata::metadataItems; + } + + abstract metadata def Expose specializes Import { + attribute visibility : VisibilityKind[1..1] redefines visibility; + attribute isImportAll : Boolean[1..1] redefines isImportAll; + } + + metadata def FlowDefinition specializes Interaction, ActionDefinition { + derived ref item flowEnd : Usage[0..*] redefines associationEnd subsets Metadata::metadataItems; + } + + metadata def FlowUsage specializes ConnectorAsUsage, Flow, ActionUsage { + derived ref item flowDefinition : Interaction[0..*] ordered redefines actionDefinition, interaction subsets Metadata::metadataItems; + } + + metadata def ForLoopActionUsage specializes LoopActionUsage { + derived ref item seqArgument : Expression[1..1] subsets Metadata::metadataItems; + derived ref item loopVariable : ReferenceUsage[1..1] subsets Metadata::metadataItems; + } + + metadata def ForkNode specializes ControlNode; + + metadata def FramedConcernMembership specializes RequirementConstraintMembership { + attribute kind : RequirementConstraintKind[1..1] redefines kind; + + derived item ownedConcern : ConcernUsage[1..1] redefines ownedConstraint subsets Metadata::metadataItems; + derived ref item referencedConcern : ConcernUsage[1..1] redefines referencedConstraint subsets Metadata::metadataItems; + } + + metadata def IfActionUsage specializes ActionUsage { + derived ref item elseAction : ActionUsage[0..1] subsets Metadata::metadataItems; + derived ref item thenAction : ActionUsage[1..1] subsets Metadata::metadataItems; + derived ref item ifArgument : Expression[1..1] subsets Metadata::metadataItems; + } + + metadata def IncludeUseCaseUsage specializes UseCaseUsage, PerformActionUsage { + derived ref item useCaseIncluded : UseCaseUsage[1..1] redefines performedAction subsets Metadata::metadataItems; + } + + metadata def InterfaceDefinition specializes ConnectionDefinition { + derived ref item interfaceEnd : PortUsage[0..*] ordered redefines connectionEnd subsets Metadata::metadataItems; + } + + metadata def InterfaceUsage specializes ConnectionUsage { + derived ref item interfaceDefinition : InterfaceDefinition[0..*] redefines connectionDefinition subsets Metadata::metadataItems; + } + + metadata def ItemDefinition specializes Structure, OccurrenceDefinition; + + metadata def ItemUsage specializes OccurrenceUsage { + derived ref item itemDefinition : Structure[0..*] ordered subsets occurrenceDefinition subsets Metadata::metadataItems subsets Metadata::metadataItems; + } + + metadata def JoinNode specializes ControlNode; + + abstract metadata def LoopActionUsage specializes ActionUsage { + derived ref item bodyAction : ActionUsage[1..1] subsets Metadata::metadataItems; + } + + metadata def MembershipExpose specializes MembershipImport, Expose; + + metadata def MergeNode specializes ControlNode; + + metadata def MetadataDefinition specializes ItemDefinition, Metaclass; + + metadata def MetadataUsage specializes ItemUsage, MetadataFeature { + derived ref item metadataDefinition : Metaclass[0..1] redefines itemDefinition, metaclass subsets Metadata::metadataItems; + } + + metadata def NamespaceExpose specializes Expose, NamespaceImport; + + metadata def ObjectiveMembership specializes FeatureMembership { + derived item ownedObjectiveRequirement : RequirementUsage[1..1] redefines ownedMemberFeature subsets Metadata::metadataItems; + } + + metadata def OccurrenceDefinition specializes Definition, Class { + attribute isIndividual : Boolean[1..1]; + } + + metadata def OccurrenceUsage specializes Usage { + attribute isIndividual : Boolean[1..1]; + attribute portionKind : PortionKind[0..1]; + + derived ref item occurrenceDefinition : Class[0..*] ordered redefines definition subsets Metadata::metadataItems; + derived ref item individualDefinition : OccurrenceDefinition[0..1] subsets occurrenceDefinition subsets Metadata::metadataItems; + } + + metadata def PartDefinition specializes ItemDefinition; + + metadata def PartUsage specializes ItemUsage { + derived ref item partDefinition : PartDefinition[0..*] ordered subsets itemDefinition subsets Metadata::metadataItems; + } + + metadata def PerformActionUsage specializes ActionUsage, EventOccurrenceUsage { + derived ref item performedAction : ActionUsage[1..1] redefines eventOccurrence subsets Metadata::metadataItems; + } + + metadata def PortConjugation specializes Conjugation { + ref item originalPortDefinition : PortDefinition[1..1] redefines originalType subsets Metadata::metadataItems; + derived ref item conjugatedPortDefinition : ConjugatedPortDefinition[1..1] redefines owningType subsets Metadata::metadataItems; + } + + metadata def PortDefinition specializes OccurrenceDefinition, Structure { + derived ref item conjugatedPortDefinition : ConjugatedPortDefinition[0..1] subsets ownedMember subsets Metadata::metadataItems; + } + + metadata def PortUsage specializes OccurrenceUsage { + derived ref item portDefinition : PortDefinition[0..*] ordered redefines occurrenceDefinition subsets Metadata::metadataItems; + } + + enum def PortionKind { + enum 'timeslice'; + enum 'snapshot'; + } + + metadata def ReferenceUsage specializes Usage { + derived attribute isReference : Boolean[1..1] redefines isReference; + } + + metadata def RenderingDefinition specializes PartDefinition { + derived ref item 'rendering' : RenderingUsage[0..*] ordered subsets usage subsets Metadata::metadataItems; + } + + metadata def RenderingUsage specializes PartUsage { + derived ref item renderingDefinition : RenderingDefinition[0..1] redefines partDefinition subsets Metadata::metadataItems; + } + + enum def RequirementConstraintKind { + enum assumption; + enum 'requirement'; + } + + metadata def RequirementConstraintMembership specializes FeatureMembership { + attribute kind : RequirementConstraintKind[1..1]; + + derived item ownedConstraint : ConstraintUsage[1..1] redefines ownedMemberFeature subsets Metadata::metadataItems; + derived ref item referencedConstraint : ConstraintUsage[1..1] subsets Metadata::metadataItems; + } + + metadata def RequirementDefinition specializes ConstraintDefinition { + attribute reqId : String[0..1] redefines declaredShortName; + derived attribute text : String[0..*]; + + derived ref item subjectParameter : Usage[1..1] subsets parameter, usage subsets Metadata::metadataItems; + derived ref item actorParameter : PartUsage[0..*] ordered subsets parameter, usage subsets Metadata::metadataItems; + derived ref item stakeholderParameter : PartUsage[0..*] ordered subsets parameter, usage subsets Metadata::metadataItems; + derived ref item assumedConstraint : ConstraintUsage[0..*] ordered subsets ownedFeature subsets Metadata::metadataItems; + derived ref item requiredConstraint : ConstraintUsage[0..*] ordered subsets ownedFeature subsets Metadata::metadataItems; + derived ref item framedConcern : ConcernUsage[0..*] ordered subsets requiredConstraint subsets Metadata::metadataItems; + } + + metadata def RequirementUsage specializes ConstraintUsage { + attribute reqId : String[0..1] redefines declaredShortName; + derived attribute text : String[0..*]; + + derived ref item requirementDefinition : RequirementDefinition[0..1] redefines constraintDefinition subsets Metadata::metadataItems; + derived ref item requiredConstraint : ConstraintUsage[0..*] ordered subsets ownedFeature subsets Metadata::metadataItems; + derived ref item assumedConstraint : ConstraintUsage[0..*] ordered subsets ownedFeature subsets Metadata::metadataItems; + derived ref item subjectParameter : Usage[1..1] subsets parameter, usage subsets Metadata::metadataItems; + derived ref item framedConcern : ConcernUsage[0..*] ordered subsets requiredConstraint subsets Metadata::metadataItems; + derived ref item actorParameter : PartUsage[0..*] ordered subsets parameter, usage subsets Metadata::metadataItems; + derived ref item stakeholderParameter : PartUsage[0..*] ordered subsets parameter, usage subsets Metadata::metadataItems; + } + + metadata def RequirementVerificationMembership specializes RequirementConstraintMembership { + attribute kind : RequirementConstraintKind[1..1] redefines kind; + + derived item ownedRequirement : RequirementUsage[1..1] redefines ownedConstraint subsets Metadata::metadataItems; + derived ref item verifiedRequirement : RequirementUsage[1..1] redefines referencedConstraint subsets Metadata::metadataItems; + } + + metadata def SatisfyRequirementUsage specializes RequirementUsage, AssertConstraintUsage { + derived ref item satisfiedRequirement : RequirementUsage[1..1] redefines assertedConstraint subsets Metadata::metadataItems; + derived ref item satisfyingFeature : Feature[1..1] subsets Metadata::metadataItems; + } + + metadata def SendActionUsage specializes ActionUsage { + derived ref item receiverArgument : Expression[0..1] subsets Metadata::metadataItems; + derived ref item payloadArgument : Expression[1..1] subsets Metadata::metadataItems; + derived ref item senderArgument : Expression[0..1] subsets Metadata::metadataItems; + } + + metadata def StakeholderMembership specializes ParameterMembership { + derived item ownedStakeholderParameter : PartUsage[1..1] redefines ownedMemberParameter subsets Metadata::metadataItems; + } + + metadata def StateDefinition specializes ActionDefinition { + attribute isParallel : Boolean[1..1]; + + derived ref item 'state' : StateUsage[0..*] ordered subsets 'action' subsets Metadata::metadataItems; + derived ref item entryAction : ActionUsage[0..1] subsets Metadata::metadataItems; + derived ref item doAction : ActionUsage[0..1] subsets Metadata::metadataItems; + derived ref item exitAction : ActionUsage[0..1] subsets Metadata::metadataItems; + } + + enum def StateSubactionKind { + enum 'entry'; + enum 'do'; + enum 'exit'; + } + + metadata def StateSubactionMembership specializes FeatureMembership { + attribute kind : StateSubactionKind[1..1]; + + derived item 'action' : ActionUsage[1..1] redefines ownedMemberFeature subsets Metadata::metadataItems; + } + + metadata def StateUsage specializes ActionUsage { + attribute isParallel : Boolean[1..1]; + + derived ref item stateDefinition : Behavior[0..*] ordered redefines actionDefinition subsets Metadata::metadataItems; + derived ref item entryAction : ActionUsage[0..1] subsets Metadata::metadataItems; + derived ref item doAction : ActionUsage[0..1] subsets Metadata::metadataItems; + derived ref item exitAction : ActionUsage[0..1] subsets Metadata::metadataItems; + } + + metadata def SubjectMembership specializes ParameterMembership { + derived item ownedSubjectParameter : Usage[1..1] redefines ownedMemberParameter subsets Metadata::metadataItems; + } + + metadata def SuccessionAsUsage specializes ConnectorAsUsage, Succession; + + metadata def SuccessionFlowUsage specializes SuccessionFlow, FlowUsage; + + metadata def TerminateActionUsage specializes ActionUsage { + derived ref item terminatedOccurrenceArgument : Expression[0..1] subsets Metadata::metadataItems; + } + + enum def TransitionFeatureKind { + enum trigger; + enum guard; + enum effect; + } + + metadata def TransitionFeatureMembership specializes FeatureMembership { + attribute kind : TransitionFeatureKind[1..1]; + + derived item transitionFeature : Step[1..1] redefines ownedMemberFeature subsets Metadata::metadataItems; + } + + metadata def TransitionUsage specializes ActionUsage { + derived ref item source : ActionUsage[1..1] subsets Metadata::metadataItems; + derived ref item target : ActionUsage[1..1] subsets Metadata::metadataItems; + derived ref item triggerAction : AcceptActionUsage[0..*] subsets ownedFeature subsets Metadata::metadataItems; + derived ref item guardExpression : Expression[0..*] subsets ownedFeature subsets Metadata::metadataItems; + derived ref item effectAction : ActionUsage[0..*] subsets feature subsets Metadata::metadataItems; + derived ref item 'succession' : Succession[1..1] subsets ownedMember subsets Metadata::metadataItems; + } + + metadata def TriggerInvocationExpression specializes InvocationExpression { + attribute kind : TriggerKind[1..1]; + } + + enum def TriggerKind { + enum 'when'; + enum 'at'; + enum 'after'; + } + + metadata def Usage specializes Feature { + attribute isVariation : Boolean[1..1]; + derived attribute mayTimeVary : Boolean[1..1] redefines isVariable; + derived attribute isReference : Boolean[1..1]; + + derived ref item 'variant' : Usage[0..*] subsets ownedMember subsets Metadata::metadataItems; + derived item variantMembership : VariantMembership[0..*] subsets ownedMembership subsets Metadata::metadataItems; + derived ref item owningDefinition : Definition[0..1] subsets owningType subsets Metadata::metadataItems; + derived ref item owningUsage : Usage[0..1] subsets owningType subsets Metadata::metadataItems; + derived ref item definition : Classifier[0..*] ordered redefines type subsets Metadata::metadataItems; + derived ref item usage : Usage[0..*] ordered subsets feature subsets Metadata::metadataItems; + derived ref item directedUsage : Usage[0..*] ordered subsets directedFeature, usage subsets Metadata::metadataItems; + derived ref item nestedUsage : Usage[0..*] ordered subsets ownedFeature, usage subsets Metadata::metadataItems; + derived ref item nestedReference : ReferenceUsage[0..*] ordered subsets nestedUsage subsets Metadata::metadataItems; + derived ref item nestedAttribute : AttributeUsage[0..*] ordered subsets nestedUsage subsets Metadata::metadataItems; + derived ref item nestedEnumeration : EnumerationUsage[0..*] ordered subsets nestedAttribute subsets Metadata::metadataItems; + derived ref item nestedOccurrence : OccurrenceUsage[0..*] ordered subsets nestedUsage subsets Metadata::metadataItems; + derived ref item nestedItem : ItemUsage[0..*] ordered subsets nestedOccurrence subsets Metadata::metadataItems; + derived ref item nestedPart : PartUsage[0..*] ordered subsets nestedItem subsets Metadata::metadataItems; + derived ref item nestedPort : PortUsage[0..*] ordered subsets nestedUsage subsets Metadata::metadataItems; + derived ref item nestedConnection : ConnectorAsUsage[0..*] ordered subsets nestedUsage subsets Metadata::metadataItems; + derived ref item nestedFlow : FlowUsage[0..*] subsets nestedConnection subsets Metadata::metadataItems; + derived ref item nestedInterface : InterfaceUsage[0..*] ordered subsets nestedConnection subsets Metadata::metadataItems; + derived ref item nestedAllocation : AllocationUsage[0..*] ordered subsets nestedConnection subsets Metadata::metadataItems; + derived ref item nestedAction : ActionUsage[0..*] ordered subsets nestedOccurrence subsets Metadata::metadataItems; + derived ref item nestedState : StateUsage[0..*] ordered subsets nestedAction subsets Metadata::metadataItems; + derived ref item nestedTransition : TransitionUsage[0..*] subsets nestedUsage subsets Metadata::metadataItems; + derived ref item nestedCalculation : CalculationUsage[0..*] ordered subsets nestedAction subsets Metadata::metadataItems; + derived ref item nestedConstraint : ConstraintUsage[0..*] ordered subsets nestedOccurrence subsets Metadata::metadataItems; + derived ref item nestedRequirement : RequirementUsage[0..*] ordered subsets nestedConstraint subsets Metadata::metadataItems; + derived ref item nestedConcern : ConcernUsage[0..*] subsets nestedRequirement subsets Metadata::metadataItems; + derived ref item nestedCase : CaseUsage[0..*] ordered subsets nestedCalculation subsets Metadata::metadataItems; + derived ref item nestedAnalysisCase : AnalysisCaseUsage[0..*] ordered subsets nestedCase subsets Metadata::metadataItems; + derived ref item nestedVerificationCase : VerificationCaseUsage[0..*] ordered subsets nestedCase subsets Metadata::metadataItems; + derived ref item nestedUseCase : UseCaseUsage[0..*] ordered subsets nestedCase subsets Metadata::metadataItems; + derived ref item nestedView : ViewUsage[0..*] ordered subsets nestedPart subsets Metadata::metadataItems; + derived ref item nestedViewpoint : ViewpointUsage[0..*] ordered subsets nestedRequirement subsets Metadata::metadataItems; + derived ref item nestedRendering : RenderingUsage[0..*] ordered subsets nestedPart subsets Metadata::metadataItems; + derived ref item nestedMetadata : MetadataUsage[0..*] ordered subsets nestedItem subsets Metadata::metadataItems; + } + + metadata def UseCaseDefinition specializes CaseDefinition { + derived ref item includedUseCase : UseCaseUsage[0..*] ordered subsets Metadata::metadataItems; + } + + metadata def UseCaseUsage specializes CaseUsage { + derived ref item useCaseDefinition : UseCaseDefinition[0..1] redefines caseDefinition subsets Metadata::metadataItems; + derived ref item includedUseCase : UseCaseUsage[0..*] ordered subsets Metadata::metadataItems; + } + + metadata def VariantMembership specializes OwningMembership { + derived item ownedVariantUsage : Usage[1..1] redefines ownedMemberElement subsets Metadata::metadataItems; + } + + metadata def VerificationCaseDefinition specializes CaseDefinition { + derived ref item verifiedRequirement : RequirementUsage[0..*] ordered subsets Metadata::metadataItems; + } + + metadata def VerificationCaseUsage specializes CaseUsage { + derived ref item verificationCaseDefinition : VerificationCaseDefinition[0..1] subsets caseDefinition subsets Metadata::metadataItems; + derived ref item verifiedRequirement : RequirementUsage[0..*] ordered subsets Metadata::metadataItems; + } + + metadata def ViewDefinition specializes PartDefinition { + derived ref item 'view' : ViewUsage[0..*] ordered subsets usage subsets Metadata::metadataItems; + derived ref item satisfiedViewpoint : ViewpointUsage[0..*] ordered subsets ownedRequirement subsets Metadata::metadataItems; + derived ref item viewRendering : RenderingUsage[0..1] subsets Metadata::metadataItems; + derived ref item viewCondition : Expression[0..*] ordered subsets ownedMember subsets Metadata::metadataItems; + } + + metadata def ViewRenderingMembership specializes FeatureMembership { + derived item ownedRendering : RenderingUsage[1..1] redefines ownedMemberFeature subsets Metadata::metadataItems; + derived ref item referencedRendering : RenderingUsage[1..1] subsets Metadata::metadataItems; + } + + metadata def ViewUsage specializes PartUsage { + derived ref item viewDefinition : ViewDefinition[0..1] redefines partDefinition subsets Metadata::metadataItems; + derived ref item satisfiedViewpoint : ViewpointUsage[0..*] ordered subsets nestedRequirement subsets Metadata::metadataItems; + derived ref item exposedElement : Element[0..*] ordered subsets member subsets Metadata::metadataItems; + derived ref item viewRendering : RenderingUsage[0..1] subsets Metadata::metadataItems; + derived ref item viewCondition : Expression[0..*] ordered subsets ownedMember subsets Metadata::metadataItems; + } + + metadata def ViewpointDefinition specializes RequirementDefinition { + derived ref item viewpointStakeholder : PartUsage[0..*] ordered subsets Metadata::metadataItems; + } + + metadata def ViewpointUsage specializes RequirementUsage { + derived ref item viewpointDefinition : ViewpointDefinition[0..1] redefines requirementDefinition subsets Metadata::metadataItems; + derived ref item viewpointStakeholder : PartUsage[0..*] ordered subsets Metadata::metadataItems; + } + + metadata def WhileLoopActionUsage specializes LoopActionUsage { + derived ref item whileArgument : Expression[1..1] subsets Metadata::metadataItems; + derived ref item untilArgument : Expression[0..1] subsets Metadata::metadataItems; + } + + } + +} diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/UseCases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/UseCases.sysml new file mode 100644 index 00000000..46899f33 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/UseCases.sysml @@ -0,0 +1,57 @@ +standard library package UseCases { + doc + /* + * This package defines the base types for use cases and related behavioral elements in the SysML language. + */ + + private import Cases::Case; + private import Cases::cases; + + use case def UseCase :> Case { + doc + /* + * UseCase is the most general class of performances of UseCaseDefinitions. + * UseCase is the base class of all UseCaseDefinitions. + */ + + ref use case self : UseCase :>> Case::self; + subject subj :>> Case::subj; + objective obj :>> Case::obj; + + ref use case start: UseCase :>> start { + doc + /* + * The starting snapshot of a Use Case. + */ + } + + ref use case done: UseCase :>> done { + doc + /* + * The ending snapshot of a Use Case. + */ + } + + abstract use case subUseCases : UseCase[0..*] :> useCases, subcases { + doc + /* + * Other UseCases carried out as part of the performance of this UseCase. + */ + } + + abstract ref use case includedUseCases : UseCase[0..*] :> useCases, enclosedPerformances { + doc + /* + * Other UseCases included by this UseCase (i.e., as modeled by an + * IncludeUseCaseUsage). + */ + } + } + + use case useCases : UseCase[0..*] nonunique :> cases { + doc + /* + * useCases is the base feature of all UseCaseUsages. + */ + } +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/VerificationCases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/VerificationCases.sysml new file mode 100644 index 00000000..6ac9d78e --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/VerificationCases.sysml @@ -0,0 +1,103 @@ +standard library package VerificationCases { + doc + /* + * This package defines the base types for verification cases and related behavioral elements + * in the SysML language. + */ + + private import Cases::Case; + private import Cases::cases; + private import Requirements::RequirementCheck; + private import ScalarValues::Boolean; + + abstract verification def VerificationCase :> Case { + doc + /* + * VerificationCase is the most general class of performances of VerificationCaseDefinitions. + * VericationCase is the base class of all VerificationCaseDefinitions. + */ + + ref verification self : VerificationCase :>> Case::self; + subject subj :>> Case::subj; + return verdict : VerdictKind :>> result; + + objective obj :>> Case::obj { + subject subj = VerificationCase::subj; + + requirement requirementVerifications : RequirementCheck[0..*] :> subrequirements { + doc + /* + * A record of the evaluations of the RequirementChecks of requirements being verified. + */ + } + } + + ref requirement requirementVerifications : RequirementCheck[0..*] = obj.requirementVerifications { + doc + /* + * Checks on whether the verifiedRequirements of the VerificationCase have been satisfied. + */ + } + + abstract verification subVerificationCases : VerificationCase[0..*] :> verificationCases, subcases { + doc + /* + * The subcases of this VerificationCase that are VerificationCaseUsages. + */ + } + + } + + abstract verification verificationCases : VerificationCase[0..*] nonunique :> cases { + doc + /* + * verificationCases is the base feature of all VerificationCaseUsages. + */ + } + + enum def VerdictKind { + doc + /* + * VerdictKind is an enumeration of the possible results of a VerificationCase. + */ + + pass; + fail; + inconclusive; + error; + } + + calc def PassIf { + doc + /* + * PassIf returns a pass or fail VerdictKind depending on whether its argument is + * true or false. + */ + + in attribute isPassing : Boolean; + return attribute verdict : VerdictKind = if isPassing? VerdictKind::pass else VerdictKind::fail; + } + + metadata def VerificationMethod { + doc + /* + * VerificationMethod can be used as metadata annotating a verification case or action. + */ + + attribute kind : VerificationMethodKind[1..*]; + } + + enum def VerificationMethodKind { + doc + /* + * VerificationMethodKind is an enumeration of the standard methods by which verification + * can be carried out. + */ + + inspect; + analyze; + demo; + test; + } + +} \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Views.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Views.sysml new file mode 100644 index 00000000..30847804 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Views.sysml @@ -0,0 +1,164 @@ +standard library package Views { + doc + /* + * This package defines the base types for views, viewpoints, renderings and related elements + * in the SysML language. + */ + + private import Parts::Part; + private import Parts::parts; + private import Requirements::RequirementCheck; + private import Requirements::requirementChecks; + + abstract view def View :> Part { + ref view :>> self : View; + + abstract ref view subviews : View[0..*] :> views { + doc + /* + * Other Views that are used in the rendering of this View. + */ + } + + abstract ref rendering viewRendering : Rendering[0..1] { + doc + /* + * The rendering of this View. + */ + } + + viewpoint viewpointSatisfactions : ViewpointCheck[0..*] :> viewpointChecks, checkedConstraints { + doc + /* + * Checks that the View satisfies all required ViewpointUsages. + */ + } + + satisfy requirement viewpointConformance by that { + doc + /* + * An assertion that all viewpointSatisfactions are true. + */ + + require viewpointSatisfactions { + doc + /* + * The required ViewpointChecks. + */ + ref :>> ownedPerformances::this, subperformances::this default that.that; + } + } + } + + abstract viewpoint def ViewpointCheck :> RequirementCheck { + doc + /* + * ViewpointCheck is a RequirementCheck for checking if a View meets the concerns of viewpoint stakeholders. + * It is the base type of all ViewpointDefinitions. + */ + + ref viewpoint :>> self : ViewpointCheck; + subject subj : View[1] :>> RequirementCheck::subj; + } + + abstract rendering def Rendering :> Part { + doc + /* + * Rendering is the base type of all RenderingDefinitions. + */ + + ref rendering :>> self : Rendering; + + abstract ref rendering subrenderings : Rendering[0..*] :> renderings { + doc + /* + * Other Renderings used to carry out this Rendering. + */ + } + } + + rendering def TextualRendering :> Rendering { + doc + /* + * A TextualRendering is a Rendering of a View into a textual format. + */ + } + + rendering def GraphicalRendering :> Rendering { + doc + /* + * A GraphicalRendering is a Rendering of a View into a Graphical format. + */ + } + + rendering def TabularRendering :> Rendering { + doc + /* + * A TabularRendering is a Rendering of a View into a tabular format. + */ + } + + abstract view views : View[0..*] nonunique :> parts { + doc + /* + * views is the base feature of all ViewUsages. + */ + } + + abstract viewpoint viewpointChecks : ViewpointCheck[0..*] nonunique :> requirementChecks { + doc + /* + * viewpointChecks is the base feature of all ViewpointUsages. + */ + } + + abstract rendering renderings : Rendering[0..*] nonunique :> parts { + doc + /* + * renderings is the base feature of all RenderingUsages. + */ + } + + rendering asTextualNotation : TextualRendering[1] :> renderings { + doc + /* + * asTextualNotation renders a View into textual notation as defined in the + * KerML and SysML specifications. + */ + } + + rendering asTreeDiagram : GraphicalRendering[1] :> renderings { + doc + /* + * asTreeDiagram renders a View as a tree diagram, using the + * graphical notation defined in the SysML specification. + */ + } + + rendering asInterconnectionDiagram : GraphicalRendering[1] :> renderings { + doc + /* + * asInterconnectionDiagram renders a View as an interconnection + * diagram, using the graphical notation defined in the SysML specification. + */ + } + + rendering asElementTable : TabularRendering[1] :> renderings { + doc + /* + * asElementTable renders a View as a table, with one row for each exposed + * Element and columns rendered by applying the columnViews in order to the + * Element in each row. + */ + + view columnView[0..*] ordered { + doc + /* + * The Views to be rendered in the column cells, in order, of each rows of the table. + */ + + abstract ref rendering :>> viewRendering[0..1]; + } + rendering :>> subrenderings[0..*] = columnView.viewRendering; + } +} \ No newline at end of file diff --git a/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs b/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs new file mode 100644 index 00000000..83c446bf --- /dev/null +++ b/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs @@ -0,0 +1,114 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using DemaConsulting.SysML2Tools.Parser; + +namespace DemaConsulting.SysML2Tools.Tests.Parser; + +/// +/// Tests for . +/// +public sealed class WorkspaceParserTests +{ + /// + /// An empty SysML file (just EOF) should produce no diagnostics. + /// + [Fact] + public void ParseSource_EmptyFile_NoErrors() + { + var diagnostics = WorkspaceParser.ParseSource("", string.Empty); + Assert.Empty(diagnostics); + } + + /// + /// A minimal valid package declaration should produce no diagnostics. + /// + [Fact] + public void ParseSource_MinimalPackage_NoErrors() + { + const string source = "package MyPackage {}"; + var diagnostics = WorkspaceParser.ParseSource("", source); + Assert.Empty(diagnostics); + } + + /// + /// A minimal valid part definition should produce no diagnostics. + /// + [Fact] + public void ParseSource_PartDef_NoErrors() + { + const string source = """ + package Example { + part def Wheel { + attribute radius : Real; + } + } + """; + var diagnostics = WorkspaceParser.ParseSource("", source); + Assert.Empty(diagnostics); + } + + /// + /// Garbled text that is not valid SysML should produce at least one error. + /// + [Fact] + public void ParseSource_InvalidSyntax_ReportsError() + { + const string source = "@@@ NOT VALID SYSML @@@"; + var diagnostics = WorkspaceParser.ParseSource("", source); + Assert.NotEmpty(diagnostics); + Assert.Contains(diagnostics, d => d.Severity == DiagnosticSeverity.Error); + } + + /// + /// Diagnostic file path is propagated from the caller. + /// + [Fact] + public void ParseSource_ErrorPath_MatchesSuppliedPath() + { + const string path = "my-model.sysml"; + var diagnostics = WorkspaceParser.ParseSource(path, "@@@"); + Assert.All(diagnostics, d => Assert.Equal(path, d.FilePath)); + } + + /// + /// The OMG stdlib (94 embedded files) should load and parse without any errors. + /// + [Fact] + public void Parse_StdlibOnly_NoErrors() + { + var result = WorkspaceParser.Parse([]); + Assert.False(result.HasErrors, + $"Stdlib parse errors:{Environment.NewLine}" + + string.Join(Environment.NewLine, result.Diagnostics.Select(d => $" {d.FilePath}({d.Line},{d.Column}): {d.Message}"))); + } + + /// + /// Stdlib is always loaded — even when no user files are passed. + /// Phase 1 loads the 58 SysML stdlib files; KerML files are embedded but parsed in Phase 2. + /// + [Fact] + public void Parse_FilesCount_IncludesStdlib() + { + var result = WorkspaceParser.Parse([]); + Assert.True(result.Files.Count >= 58, + $"Expected at least 58 stdlib files, got {result.Files.Count}"); + } +} From 4017e44e15bd212bb211e82036f062141c66dc7b Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 20:30:55 -0400 Subject: [PATCH 02/15] docs(phase1): update design, verification, and requirements for Parser and Lint - Update both introduction.md files: Scope, Software Structure, Folder Layout - Replace Phase 0 stubs in sysml2-tools-core.md and verification counterpart - Add Lint subsystem to sysml2-tools-tool.md (mermaid, CLI interface, data flow) - Add ANTLR4 to OTS docs and ots.md listings - Create parser.md design and verification docs - Create lint.md design and verification docs - Create parser.yaml, lint.yaml, antlr4.yaml requirements - Rename Stdlib folders to CamelCase (no spaces) - Move ANTLR4 generated C# from Parser/Generated to Parser/Antlr - Move Antlr editorconfig rules into root .editorconfig - Add Stdlib/README.md and Parser/Antlr/README.md - Add ANTLR4 exclusion and new review sets to .reviewmark.yaml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .cspell.yaml | 1 - .editorconfig | 9 + .reviewmark.yaml | 53 + docs/design/definition.yaml | 5 + docs/design/introduction.md | 34 +- docs/design/ots.md | 1 + docs/design/ots/antlr4.md | 50 + docs/design/sysml2-tools-core.md | 96 +- docs/design/sysml2-tools-core/parser.md | 101 + docs/design/sysml2-tools-tool.md | 17 +- docs/design/sysml2-tools-tool/lint.md | 48 + docs/reqstream/ots/antlr4.yaml | 40 + docs/reqstream/sysml2-tools-core/parser.yaml | 72 + docs/reqstream/sysml2-tools-tool/lint.yaml | 48 + docs/verification/definition.yaml | 5 + docs/verification/introduction.md | 13 +- docs/verification/ots.md | 1 + docs/verification/ots/antlr4.md | 83 + docs/verification/sysml2-tools-core.md | 21 +- docs/verification/sysml2-tools-core/parser.md | 61 + docs/verification/sysml2-tools-tool/lint.md | 30 + requirements.yaml | 3 + .../Grammar/README.md | 8 +- .../Parser/Antlr/README.md | 9 + .../Parser/Antlr/SysMLv2Lexer.cs | 910 + .../Parser/Antlr/SysMLv2Lexer.interp | 695 + .../Parser/Antlr/SysMLv2Lexer.tokens | 444 + .../Parser/Antlr/SysMLv2Parser.cs | 37758 ++++++++++++++++ .../Parser/Antlr/SysMLv2Parser.interp | 915 + .../Parser/Antlr/SysMLv2Parser.tokens | 444 + .../Parser/Antlr/SysMLv2ParserBaseListener.cs | 5477 +++ .../Parser/Antlr/SysMLv2ParserBaseVisitor.cs | 4559 ++ .../Parser/Antlr/SysMLv2ParserListener.cs | 4555 ++ .../Parser/Antlr/SysMLv2ParserVisitor.cs | 2748 ++ .../Internal/SysmlDiagnosticListener.cs | 2 +- .../Parser/WorkspaceParser.cs | 2 +- .../Analysis/AnalysisTooling.sysml | 0 .../Analysis/SampledFunctions.sysml | 0 .../Analysis/StateSpaceRepresentation.sysml | 0 .../Analysis/TradeStudies.sysml | 0 .../CausationConnections.sysml | 0 .../CauseAndEffect}/CauseAndEffect.sysml | 0 .../Geometry/ShapeItems.sysml | 0 .../Geometry/SpatialItems.sysml | 0 .../Metadata/ImageMetadata.sysml | 0 .../Metadata/ModelingMetadata.sysml | 0 .../ParametersOfInterestMetadata.sysml | 0 .../Metadata/RiskMetadata.sysml | 0 .../QuantitiesAndUnits}/ISQ.sysml | 0 .../QuantitiesAndUnits}/ISQAcoustics.sysml | 0 .../ISQAtomicNuclear.sysml | 0 .../QuantitiesAndUnits}/ISQBase.sysml | 0 .../ISQCharacteristicNumbers.sysml | 0 .../ISQChemistryMolecular.sysml | 0 .../ISQCondensedMatter.sysml | 0 .../ISQElectromagnetism.sysml | 0 .../QuantitiesAndUnits}/ISQInformation.sysml | 0 .../QuantitiesAndUnits}/ISQLight.sysml | 0 .../QuantitiesAndUnits}/ISQMechanics.sysml | 0 .../QuantitiesAndUnits}/ISQSpaceTime.sysml | 0 .../ISQThermodynamics.sysml | 0 .../MeasurementRefCalculations.sysml | 0 .../MeasurementReferences.sysml | 0 .../QuantitiesAndUnits}/Quantities.sysml | 0 .../QuantityCalculations.sysml | 0 .../QuantitiesAndUnits}/SI.sysml | 0 .../QuantitiesAndUnits}/SIPrefixes.sysml | 0 .../TensorCalculations.sysml | 0 .../QuantitiesAndUnits}/Time.sysml | 0 .../USCustomaryUnits.sysml | 0 .../VectorCalculations.sysml | 0 .../DerivationConnections.sysml | 0 .../RequirementDerivation.sysml | 0 .../KernelDataTypeLibrary}/Collections.kerml | 0 .../KernelDataTypeLibrary}/ScalarValues.kerml | 0 .../KernelDataTypeLibrary}/VectorValues.kerml | 0 .../BaseFunctions.kerml | 0 .../BooleanFunctions.kerml | 0 .../CollectionFunctions.kerml | 0 .../ComplexFunctions.kerml | 0 .../ControlFunctions.kerml | 0 .../DataFunctions.kerml | 0 .../IntegerFunctions.kerml | 0 .../NaturalFunctions.kerml | 0 .../NumericalFunctions.kerml | 0 .../OccurrenceFunctions.kerml | 0 .../RationalFunctions.kerml | 0 .../RealFunctions.kerml | 0 .../ScalarFunctions.kerml | 0 .../SequenceFunctions.kerml | 0 .../StringFunctions.kerml | 0 .../TrigFunctions.kerml | 0 .../VectorFunctions.kerml | 0 .../KernelSemanticLibrary}/Base.kerml | 0 .../KernelSemanticLibrary}/Clocks.kerml | 0 .../ControlPerformances.kerml | 0 .../FeatureReferencingPerformances.kerml | 0 .../KernelSemanticLibrary}/KerML.kerml | 0 .../KernelSemanticLibrary}/Links.kerml | 0 .../KernelSemanticLibrary}/Metaobjects.kerml | 0 .../KernelSemanticLibrary}/Objects.kerml | 0 .../KernelSemanticLibrary}/Observation.kerml | 0 .../KernelSemanticLibrary}/Occurrences.kerml | 0 .../KernelSemanticLibrary}/Performances.kerml | 0 .../SpatialFrames.kerml | 0 .../StatePerformances.kerml | 0 .../KernelSemanticLibrary}/Transfers.kerml | 0 .../TransitionPerformances.kerml | 0 .../KernelSemanticLibrary}/Triggers.kerml | 0 .../Stdlib/README.md | 31 + .../Actions.sysml | 0 .../Allocations.sysml | 0 .../AnalysisCases.sysml | 0 .../Attributes.sysml | 0 .../Calculations.sysml | 0 .../Cases.sysml | 0 .../Connections.sysml | 0 .../Constraints.sysml | 0 .../Flows.sysml | 0 .../Interfaces.sysml | 0 .../Items.sysml | 0 .../Metadata.sysml | 0 .../Parts.sysml | 0 .../Ports.sysml | 0 .../Requirements.sysml | 0 .../StandardViewDefinitions.sysml | 0 .../States.sysml | 0 .../SysML.sysml | 0 .../UseCases.sysml | 0 .../VerificationCases.sysml | 0 .../Views.sysml | 0 131 files changed, 59315 insertions(+), 34 deletions(-) create mode 100644 docs/design/ots/antlr4.md create mode 100644 docs/design/sysml2-tools-core/parser.md create mode 100644 docs/design/sysml2-tools-tool/lint.md create mode 100644 docs/reqstream/ots/antlr4.yaml create mode 100644 docs/reqstream/sysml2-tools-core/parser.yaml create mode 100644 docs/reqstream/sysml2-tools-tool/lint.yaml create mode 100644 docs/verification/ots/antlr4.md create mode 100644 docs/verification/sysml2-tools-core/parser.md create mode 100644 docs/verification/sysml2-tools-tool/lint.md create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/README.md create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.interp create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.tokens create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.interp create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.tokens create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseListener.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseVisitor.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserListener.cs create mode 100644 src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserVisitor.cs rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Analysis/AnalysisTooling.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Analysis/SampledFunctions.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Analysis/StateSpaceRepresentation.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Analysis/TradeStudies.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Cause and Effect => DomainLibraries/CauseAndEffect}/CausationConnections.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Cause and Effect => DomainLibraries/CauseAndEffect}/CauseAndEffect.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Geometry/ShapeItems.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Geometry/SpatialItems.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Metadata/ImageMetadata.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Metadata/ModelingMetadata.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Metadata/ParametersOfInterestMetadata.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries => DomainLibraries}/Metadata/RiskMetadata.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQ.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQAcoustics.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQAtomicNuclear.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQBase.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQCharacteristicNumbers.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQChemistryMolecular.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQCondensedMatter.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQElectromagnetism.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQInformation.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQLight.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQMechanics.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQSpaceTime.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/ISQThermodynamics.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/MeasurementRefCalculations.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/MeasurementReferences.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/Quantities.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/QuantityCalculations.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/SI.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/SIPrefixes.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/TensorCalculations.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/Time.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/USCustomaryUnits.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Quantities and Units => DomainLibraries/QuantitiesAndUnits}/VectorCalculations.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Requirement Derivation => DomainLibraries/RequirementDerivation}/DerivationConnections.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Domain Libraries/Requirement Derivation => DomainLibraries/RequirementDerivation}/RequirementDerivation.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Data Type Library => KernelLibraries/KernelDataTypeLibrary}/Collections.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Data Type Library => KernelLibraries/KernelDataTypeLibrary}/ScalarValues.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Data Type Library => KernelLibraries/KernelDataTypeLibrary}/VectorValues.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/BaseFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/BooleanFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/CollectionFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/ComplexFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/ControlFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/DataFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/IntegerFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/NaturalFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/NumericalFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/OccurrenceFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/RationalFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/RealFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/ScalarFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/SequenceFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/StringFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/TrigFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Function Library => KernelLibraries/KernelFunctionLibrary}/VectorFunctions.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Base.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Clocks.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/ControlPerformances.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/FeatureReferencingPerformances.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/KerML.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Links.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Metaobjects.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Objects.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Observation.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Occurrences.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Performances.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/SpatialFrames.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/StatePerformances.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Transfers.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/TransitionPerformances.kerml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Kernel Libraries/Kernel Semantic Library => KernelLibraries/KernelSemanticLibrary}/Triggers.kerml (100%) create mode 100644 src/DemaConsulting.SysML2Tools/Stdlib/README.md rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Actions.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Allocations.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/AnalysisCases.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Attributes.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Calculations.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Cases.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Connections.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Constraints.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Flows.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Interfaces.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Items.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Metadata.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Parts.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Ports.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Requirements.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/StandardViewDefinitions.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/States.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/SysML.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/UseCases.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/VerificationCases.sysml (100%) rename src/DemaConsulting.SysML2Tools/Stdlib/{Systems Library => SystemsLibrary}/Views.sysml (100%) diff --git a/.cspell.yaml b/.cspell.yaml index 15daf5cf..c68c6b53 100644 --- a/.cspell.yaml +++ b/.cspell.yaml @@ -73,7 +73,6 @@ ignorePaths: - "**/third-party/**" - "**/3rd-party/**" - "**/generated/**" - - "**/Generated/**" - "**/Stdlib/**" - "**/AGENT_REPORT_*.md" - "**/.agent-logs/**" diff --git a/.editorconfig b/.editorconfig index 204f58d4..a1856b59 100644 --- a/.editorconfig +++ b/.editorconfig @@ -93,3 +93,12 @@ dotnet_code_quality_unused_parameters = all:suggestion # Nullable reference types csharp_nullable_reference_types = enable + +# ANTLR4-generated C# — suppress diagnostics that do not apply to generated code +[src/DemaConsulting.SysML2Tools/Parser/Antlr/*.cs] +generated_code = true +# CS1584/CS1658 — XML doc cref uses SysML keywords ('namespace', 'class') as identifiers +dotnet_diagnostic.CS1584.severity = none +dotnet_diagnostic.CS1658.severity = none +# CS3021 — CLSCompliant attribute; assembly does not declare [CLSCompliant] +dotnet_diagnostic.CS3021.severity = none diff --git a/.reviewmark.yaml b/.reviewmark.yaml index 5cecd3f9..07c2d240 100644 --- a/.reviewmark.yaml +++ b/.reviewmark.yaml @@ -15,6 +15,7 @@ needs-review: - "docs/user_guide/**/*.md" # User guide documentation - "!**/obj/**" # Exclude build output - "!**/bin/**" # Exclude build output + - "!src/**/Parser/Antlr/**" # ANTLR4-generated C# — not hand-written - "!node_modules/**" # Exclude npm dependencies - "!**/.venv/**" # Exclude Python virtual environment @@ -137,6 +138,40 @@ reviews: paths: - "docs/reqstream/sysml2-tools-core/**/*.yaml" + - id: SysML2Tools-Core-Parser-Design + title: Review that DemaConsulting.SysML2Tools Parser Design is Consistent and Complete + context: + - docs/reqstream/sysml2-tools-core.yaml + paths: + - "docs/design/introduction.md" + - "docs/design/sysml2-tools-core.md" + - "docs/design/sysml2-tools-core/parser.md" + - "docs/design/ots/antlr4.md" + + - id: SysML2Tools-Core-Parser-Verification + title: Review that DemaConsulting.SysML2Tools Parser Verification is Consistent and Complete + context: + - docs/reqstream/sysml2-tools-core.yaml + paths: + - "docs/verification/introduction.md" + - "docs/verification/sysml2-tools-core.md" + - "docs/verification/sysml2-tools-core/parser.md" + - "docs/verification/ots/antlr4.md" + + - id: SysML2Tools-Core-Parser-Implementation + title: Review of DemaConsulting.SysML2Tools Parser Implementation + context: + - docs/reqstream/sysml2-tools-core/parser.yaml + - docs/design/sysml2-tools-core/parser.md + paths: + - "src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs" + - "src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs" + - "src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs" + - "src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs" + - "src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs" + - "src/DemaConsulting.SysML2Tools/Parser/Internal/StdlibLoader.cs" + - "test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs" + # SysML2Tools SVG Renderer - id: SysML2Tools-Svg-Architecture title: Review that DemaConsulting.SysML2Tools.Svg Architecture Satisfies Requirements @@ -321,6 +356,17 @@ reviews: - "src/**/Utilities/PathHelpers.cs" - "test/**/Utilities/PathHelpersTests.cs" + - id: SysML2Tools-Tool-Lint + title: Review of SysML2 Tools Lint subsystem architecture and interfaces + context: + - docs/design/sysml2-tools-tool.md + - docs/reqstream/sysml2-tools-tool.yaml + paths: + - "docs/reqstream/sysml2-tools-tool/lint.yaml" + - "docs/design/sysml2-tools-tool/lint.md" + - "docs/verification/sysml2-tools-tool/lint.md" + - "src/**/Lint/LintCommand.cs" + # OTS Items - id: OTS-BuildMark title: Review of BuildMark OTS verification evidence @@ -391,3 +437,10 @@ reviews: - "docs/reqstream/ots/xunit.yaml" - "docs/design/ots/xunit.md" - "docs/verification/ots/xunit.md" + + - id: OTS-ANTLR4 + title: Review of ANTLR4 OTS verification evidence + paths: + - "docs/reqstream/ots/antlr4.yaml" + - "docs/design/ots/antlr4.md" + - "docs/verification/ots/antlr4.md" diff --git a/docs/design/definition.yaml b/docs/design/definition.yaml index cfc9e881..aa936a7c 100644 --- a/docs/design/definition.yaml +++ b/docs/design/definition.yaml @@ -1,8 +1,10 @@ --- resource-path: - docs/design + - docs/design/sysml2-tools-core - docs/design/sysml2-tools-tool - docs/design/sysml2-tools-tool/cli + - docs/design/sysml2-tools-tool/lint - docs/design/sysml2-tools-tool/self-test - docs/design/sysml2-tools-tool/utilities - docs/design/ots @@ -15,14 +17,17 @@ input-files: - docs/design/sysml2-tools-tool/program.md - docs/design/sysml2-tools-tool/cli.md - docs/design/sysml2-tools-tool/cli/context.md + - docs/design/sysml2-tools-tool/lint.md - docs/design/sysml2-tools-tool/self-test.md - docs/design/sysml2-tools-tool/self-test/validation.md - docs/design/sysml2-tools-tool/utilities.md - docs/design/sysml2-tools-tool/utilities/path-helpers.md - docs/design/sysml2-tools-core.md + - docs/design/sysml2-tools-core/parser.md - docs/design/sysml2-tools-svg.md - docs/design/sysml2-tools-png.md - docs/design/ots.md + - docs/design/ots/antlr4.md - docs/design/ots/buildmark.md - docs/design/ots/fileassert.md - docs/design/ots/pandoc.md diff --git a/docs/design/introduction.md b/docs/design/introduction.md index 1727867e..751006d2 100644 --- a/docs/design/introduction.md +++ b/docs/design/introduction.md @@ -19,13 +19,20 @@ This document covers the detailed design of the following software items: **Local items:** -- **DemaConsulting.SysML2Tools** (System — core library, Phase 0 stub) +- **DemaConsulting.SysML2Tools** (System — core library) + - **Parser** (Subsystem) — SysML v2 parsing engine + - **WorkspaceParser** (Unit) — public parsing API + - **Internal** (Subsystem) — internal implementation + - **SysmlDiagnosticListener** (Unit) — ANTLR4 error listener + - **StdlibLoader** (Unit) — embedded stdlib loader - **DemaConsulting.SysML2Tools.Svg** (System — SVG renderer, Phase 0 stub) - **DemaConsulting.SysML2Tools.Png** (System — PNG renderer, Phase 0 stub) - **DemaConsulting.SysML2Tools.Tool** (System — dotnet tool) - **Program** — entry point and execution orchestrator - **Cli** subsystem - **Context** — command-line argument parser and I/O owner + - **Lint** (Subsystem) — lint command implementation + - **LintCommand** (Unit) — lint subcommand handler - **SelfTest** subsystem - **Validation** — self-validation test runner - **Utilities** subsystem @@ -33,6 +40,7 @@ This document covers the detailed design of the following software items: **OTS items:** +- **ANTLR4** — integration and usage design - **BuildMark** — integration and usage design - **FileAssert** — integration and usage design - **Pandoc** — integration and usage design @@ -54,9 +62,12 @@ The following topics are out of scope: The following list shows how the SysML2 Tools software items are organized across the system, subsystem, and unit levels: -- **DemaConsulting.SysML2Tools** (System) — core library: SysML v2 parsing, semantic - model, layout algorithms, and `IRenderer` interface - - TODO: subsystems and units to be defined in Phase 1+ +- **DemaConsulting.SysML2Tools** (System) — core library: SysML v2 parsing engine, embedded stdlib, and future semantic model/layout + - **Parser** (Subsystem) — SysML v2 parsing engine + - **WorkspaceParser** (Unit) — public API: parses file glob patterns and source strings against the embedded stdlib + - **Internal** (Subsystem) — internal implementation details + - **SysmlDiagnosticListener** (Unit) — collects ANTLR4 syntax errors as SysmlDiagnostic records + - **StdlibLoader** (Unit) — enumerates and loads embedded .sysml stdlib resources; defers .kerml to Phase 2 - **DemaConsulting.SysML2Tools.Svg** (System) — SVG renderer: renders `LayoutTree` to SVG output with zero external dependencies - TODO: subsystems and units to be defined in Phase 4+ @@ -68,6 +79,8 @@ system, subsystem, and unit levels: - **Program** (Unit) — entry point and execution orchestrator - **Cli** (Subsystem) — command-line argument parsing and I/O - **Context** (Unit) — argument parser and I/O owner + - **Lint** (Subsystem) — lint command implementation + - **LintCommand** (Unit) — resolves glob patterns, invokes WorkspaceParser, reports diagnostics - **SelfTest** (Subsystem) — self-validation test runner - **Validation** (Unit) — self-validation test runner - **Utilities** (Subsystem) — shared utilities @@ -75,6 +88,7 @@ system, subsystem, and unit levels: **OTS Dependencies:** +- ANTLR4 (OTS) — ANTLR4 runtime (Antlr4.Runtime.Standard) - BuildMark (OTS) — build-notes documentation tool - FileAssert (OTS) — document assertion tool - Pandoc (OTS) — Markdown-to-HTML conversion tool @@ -94,19 +108,27 @@ The source code folder structure mirrors the top-level system breakdown above, g reviewers an explicit navigation aid from design to code: - **src/** — source projects - - **DemaConsulting.SysML2Tools/** — core library (Phase 0: stub) + - **DemaConsulting.SysML2Tools/** — core library + - **Grammar/** — ANTLR4 grammar files (hand-maintained; see Grammar/README.md) + - **Parser/** — SysML v2 parsing subsystem + - **Antlr/** — ANTLR4-generated C# (committed; not hand-written) + - **Internal/** — internal implementation (SysmlDiagnosticListener, StdlibLoader) + - **Stdlib/** — embedded SysML v2 standard library files (EPL-2.0; see Stdlib/README.md) - **DemaConsulting.SysML2Tools.Svg/** — SVG renderer (Phase 0: stub) - **DemaConsulting.SysML2Tools.Png/** — PNG renderer (Phase 0: stub) - **DemaConsulting.SysML2Tools.Tool/** — dotnet tool CLI wrapper - **Cli/** — command-line interface subsystem + - **Lint/** — lint command subsystem - **SelfTest/** — self-validation subsystem - **Utilities/** — shared utilities subsystem - **docs/design/** — design documentation - - **sysml2-tools-core/** — TODO: core library unit/subsystem design (Phase 1+) + - **sysml2-tools-core/** — core library unit/subsystem design + - **parser/** — Parser subsystem design (Internal subsystem) - **sysml2-tools-svg/** — TODO: SVG renderer unit/subsystem design (Phase 4+) - **sysml2-tools-png/** — TODO: PNG renderer unit/subsystem design (Phase 4+) - **sysml2-tools-tool/** — DemaConsulting.SysML2Tools.Tool unit/subsystem design - **cli/** — Cli subsystem design + - **lint/** — Lint subsystem design - **self-test/** — SelfTest subsystem design - **utilities/** — Utilities subsystem design diff --git a/docs/design/ots.md b/docs/design/ots.md index a93e212f..ba856207 100644 --- a/docs/design/ots.md +++ b/docs/design/ots.md @@ -13,6 +13,7 @@ scope; only how this project integrates and uses each item is documented. The following OTS items have integration design documentation: +- ANTLR4 (_antlr4.md_) — ANTLR4 runtime (Antlr4.Runtime.Standard) - BuildMark (_buildmark.md_) — build-notes documentation tool - FileAssert (_fileassert.md_) — document assertion tool - Pandoc (_pandoc.md_) — Markdown-to-HTML conversion tool diff --git a/docs/design/ots/antlr4.md b/docs/design/ots/antlr4.md new file mode 100644 index 00000000..1baf0eb6 --- /dev/null +++ b/docs/design/ots/antlr4.md @@ -0,0 +1,50 @@ +## ANTLR4 + +This document describes the integration and usage design for the `ANTLR4` OTS software item +(`Antlr4.Runtime.Standard` 4.13.1). + +### Purpose + +`Antlr4.Runtime.Standard` is the official ANTLR4 C# runtime library. It is used to execute the +pre-generated SysML v2 lexer and parser (`SysMLv2Lexer` and `SysMLv2Parser`) that were produced +from the hand-maintained ANTLR4 grammar files in `Grammar/`. The runtime provides the core +infrastructure for tokenizing SysML v2 source text, building concrete syntax trees, and +dispatching syntax errors to registered error listeners. + +### Features Used + +- `AntlrInputStream` — wraps a `string` source for character-by-character input consumption by + the lexer. +- `CommonTokenStream` — bridges the lexer to the parser by buffering the token sequence produced + by `SysMLv2Lexer`. +- Generated lexer class `SysMLv2Lexer` and generated parser class `SysMLv2Parser` — produced from + the grammar files using `antlr-4.13.1-complete.jar` and committed under `Parser/Antlr/`. +- `IAntlrErrorListener` — interface implemented by `SysmlDiagnosticListener` to receive + parser syntax errors. +- `IAntlrErrorListener` — interface implemented by `SysmlDiagnosticListener` to receive + lexer syntax errors. + +### Integration Pattern + +The grammar files (`Grammar/SysMLv2Lexer.g4` and `Grammar/SysMLv2Parser.g4`) are the +authoritative source. The generated C# files are produced by running +`antlr-4.13.1-complete.jar` as documented in `Grammar/README.md` and committed to the +`Parser/Antlr/` folder. The generated files must not be manually edited. + +At runtime the integration sequence is as follows: + +1. A `SysmlDiagnosticListener` is constructed, bound to the current file path and a shared + diagnostic list. +2. An `AntlrInputStream` is created from the source text string. +3. A `SysMLv2Lexer` is instantiated over the input stream. The default error listeners are + removed and the `SysmlDiagnosticListener` is registered on the lexer. +4. A `CommonTokenStream` is created from the lexer. +5. A `SysMLv2Parser` is instantiated over the token stream. The default error listeners are + removed and the same `SysmlDiagnosticListener` is registered on the parser. +6. The entry rule `rootNamespace()` is invoked. In Phase 1 the returned CST root is discarded. +7. Any lexer or parser errors encountered during steps 3–6 are delivered to + `SysmlDiagnosticListener` via the `IAntlrErrorListener` interface, which appends a + `SysmlDiagnostic` record to the shared list. + +No initialization or disposal beyond the steps above is required; ANTLR4 objects are +short-lived and garbage-collected after each parse call. diff --git a/docs/design/sysml2-tools-core.md b/docs/design/sysml2-tools-core.md index 57405aa6..49eaf4f8 100644 --- a/docs/design/sysml2-tools-core.md +++ b/docs/design/sysml2-tools-core.md @@ -2,17 +2,77 @@ ## Architecture -The `DemaConsulting.SysML2Tools` core library provides the SysML v2 parsing engine, -semantic model, layout algorithms, and the `IRenderer` interface shared by all renderer -packages. This system is a Phase 0 stub; detailed design will be populated in Phase 1+. +The `DemaConsulting.SysML2Tools` core library provides the SysML v2 parsing engine, embedded +standard library, and the foundation for future semantic model, layout algorithms, and the +`IRenderer` interface shared by all renderer packages. + +The system contains one subsystem in Phase 1: **Parser**, which is further divided into the public +API unit (`WorkspaceParser`) and an internal subsystem (`Internal`) containing +`SysmlDiagnosticListener` and `StdlibLoader`. Supporting data types (`DiagnosticSeverity`, +`SysmlDiagnostic`, `WorkspaceParseResult`) are declared at the `Parser` namespace level. + +```mermaid +flowchart TD + subgraph Parser + WorkspaceParser + subgraph Internal + SysmlDiagnosticListener + StdlibLoader + end + end + WorkspaceParser --> StdlibLoader + WorkspaceParser --> SysmlDiagnosticListener +``` ## External Interfaces -*To be defined in Phase 1+.* +**WorkspaceParser.Parse**: Parses the embedded stdlib plus every file in the provided collection. + +- *Type*: In-process .NET static method. +- *Role*: Provider. +- *Contract*: Accepts `IEnumerable filePaths`; returns `WorkspaceParseResult` containing + all parsed file paths and all collected diagnostics. +- *Constraints*: `filePaths` must not be null; each path must be a readable file. Stdlib files are + always parsed first. + +**WorkspaceParser.ParseSource**: Parses an in-memory source string with a caller-supplied virtual +file path. + +- *Type*: In-process .NET static method. +- *Role*: Provider. +- *Contract*: Accepts `string filePath` (virtual or real) and `string content`; returns + `IReadOnlyList` containing all diagnostics from parsing that single source. +- *Constraints*: None. Both parameters are used as-is; `filePath` appears verbatim in diagnostics. + +**WorkspaceParseResult**: Aggregate result record returned by `WorkspaceParser.Parse`. + +- *Type*: Sealed class. +- *Role*: Provider. +- *Contract*: Exposes `IReadOnlyList Files`, `IReadOnlyList Diagnostics`, + and `bool HasErrors`. + +**SysmlDiagnostic**: Record representing a single diagnostic message. + +- *Type*: Sealed record. +- *Role*: Data transfer object. +- *Contract*: Fields — `string FilePath`, `int Line`, `int Column`, + `DiagnosticSeverity Severity`, `string Message`. + +**DiagnosticSeverity**: Enumeration of diagnostic severity levels. + +- *Type*: Enum. +- *Role*: Data type. +- *Values*: `Info`, `Warning`, `Error`. ## Dependencies -*To be defined in Phase 1+.* +- **Antlr4.Runtime.Standard** — ANTLR4 C# runtime; provides `AntlrInputStream`, + `CommonTokenStream`, `IAntlrErrorListener`, and the infrastructure for running + the pre-generated `SysMLv2Lexer` and `SysMLv2Parser`. See *ANTLR4 Integration Design*. +- **Embedded Stdlib resources** — 94 SysML v2 standard library files (58 `.sysml` + 36 + `.kerml`) from the Systems-Modeling/SysML-v2-Release tag 2026-04; licensed EPL-2.0 and + committed under `Stdlib/`. Phase 1 loads only the `.sysml` files; `.kerml` files are + embedded but not parsed until Phase 2. ## Risk Control Measures @@ -20,9 +80,29 @@ N/A — not a safety-classified software item. ## Data Flow -*To be defined in Phase 1+.* +1. `WorkspaceParser.Parse` calls `StdlibLoader.LoadAll()`, which enumerates all embedded + manifest resources whose names match the `Stdlib.` prefix and end with `.sysml`, then + reads each resource stream into a `(virtualPath, content)` pair. +2. For each stdlib pair and then for each caller-supplied file path, `WorkspaceParser` reads + the file content and calls the internal `ParseSource` overload. +3. The internal `ParseSource` creates a `SysmlDiagnosticListener` bound to the current file + path and a shared `List`. +4. `SysMLv2Lexer` is constructed over an `AntlrInputStream`; the listener is registered on + the lexer. A `CommonTokenStream` wraps the lexer. `SysMLv2Parser` is constructed over the + token stream; the listener is also registered on the parser. +5. The entry rule `rootNamespace()` is invoked; the resulting CST root is discarded in Phase 1. + Any lexer or parser errors invoke `SysmlDiagnosticListener.SyntaxError`, which appends a + new `SysmlDiagnostic(filePath, line, column, Error, message)` to the shared list. +6. After all files are processed, `WorkspaceParser.Parse` wraps the accumulated file list and + diagnostic list in a `WorkspaceParseResult` and returns it. ## Design Constraints -- Platform: multi-targets net8.0, net9.0, and net10.0 framework compatibility specifications - on Windows, Linux, and macOS. +- Platform: multi-targets net8.0, net9.0, and net10.0 on Windows, Linux, and macOS. +- The `.kerml` stdlib files are embedded as assembly resources but are not parsed in Phase 1; + KerML grammar support is deferred to Phase 2. +- The ANTLR4-generated C# files under `Parser/Antlr/` are committed to the repository and + must not be manually edited; they are regenerated using `antlr-4.13.1-complete.jar` as + documented in `Grammar/README.md`. +- Phase 1 performs syntax-only parsing (CST construction). No semantic model, symbol table, + or reference resolution is performed. diff --git a/docs/design/sysml2-tools-core/parser.md b/docs/design/sysml2-tools-core/parser.md new file mode 100644 index 00000000..7cf891ce --- /dev/null +++ b/docs/design/sysml2-tools-core/parser.md @@ -0,0 +1,101 @@ +## Parser + +### Overview + +The `Parser` subsystem is responsible for all SysML v2 syntax parsing within the +`DemaConsulting.SysML2Tools` core library. It provides the public API consumed by other systems +(`WorkspaceParser`) and an internal subsystem (`Internal`) that encapsulates ANTLR4 runtime +interaction and embedded stdlib loading. + +The subsystem contains the following items: + +- **WorkspaceParser** (Unit) — public API: accepts file paths or in-memory source strings and + returns parsed results with diagnostics. +- **Internal** (Subsystem) — internal implementation: + - **SysmlDiagnosticListener** (Unit) — ANTLR4 error listener that maps lexer and parser + syntax errors to `SysmlDiagnostic` records. + - **StdlibLoader** (Unit) — enumerates and reads embedded `.sysml` stdlib resources; + defers `.kerml` files to Phase 2. + +Supporting data types declared at the `Parser` namespace level: + +- **DiagnosticSeverity** (enum) — `Info`, `Warning`, `Error`. +- **SysmlDiagnostic** (sealed record) — `FilePath`, `Line`, `Column`, `Severity`, `Message`. +- **WorkspaceParseResult** (sealed class) — `Files`, `Diagnostics`, `HasErrors`. + +### Interfaces + +**WorkspaceParser.Parse**: Parses stdlib plus caller-supplied files. + +- *Type*: In-process .NET public static method. +- *Role*: Provider. +- *Contract*: `public static WorkspaceParseResult Parse(IEnumerable filePaths)` — + loads all embedded `.sysml` stdlib files first, then reads and parses each caller-supplied + file path. Returns a `WorkspaceParseResult` containing every parsed file path and every + collected `SysmlDiagnostic`. +- *Constraints*: `filePaths` must not be null (`ArgumentNullException` is thrown); each path + must be readable via `File.ReadAllText`. + +**WorkspaceParser.ParseSource**: Parses a single in-memory source string. + +- *Type*: In-process .NET public static method. +- *Role*: Provider. +- *Contract*: `public static IReadOnlyList ParseSource(string filePath, string content)` — + creates a fresh `SysmlDiagnosticListener`, runs the ANTLR4 pipeline over `content`, and + returns all diagnostics. `filePath` appears verbatim in every diagnostic produced. +- *Constraints*: None; both parameters are used as-is. + +**WorkspaceParseResult.HasErrors**: Reports whether any error-severity diagnostic was collected. + +- *Type*: In-process .NET public property (derived). +- *Role*: Provider. +- *Contract*: Returns `true` if and only if at least one `SysmlDiagnostic` in `Diagnostics` + has `Severity == DiagnosticSeverity.Error`; returns `false` otherwise. + +### Design + +#### WorkspaceParser + +`WorkspaceParser` is a static class with two public methods and one private helper. The private +`ParseSource(string filePath, string content, List diagnostics)` overload is +the central parse routine shared by both public methods: + +1. Constructs a `SysmlDiagnosticListener` bound to `filePath` and the shared `diagnostics` list. +2. Creates an `AntlrInputStream` from `content`. +3. Instantiates `SysMLv2Lexer` over the input stream; removes default error listeners and + registers the `SysmlDiagnosticListener`. +4. Wraps the lexer in a `CommonTokenStream`. +5. Instantiates `SysMLv2Parser` over the token stream; removes default error listeners and + registers the same `SysmlDiagnosticListener`. +6. Calls `parser.rootNamespace()` to trigger full parsing; the returned CST root is discarded + in Phase 1. + +`WorkspaceParser.Parse` collects file paths and diagnostics into shared lists, then wraps them +in a `WorkspaceParseResult`. Stdlib files are always parsed first so that user-file diagnostics +appear after stdlib diagnostics in the returned list. + +#### SysmlDiagnosticListener + +`SysmlDiagnosticListener` implements both `IAntlrErrorListener` (parser errors) and +`IAntlrErrorListener` (lexer errors). Both interface methods delegate to the private +`Append(int line, int column, string msg)` method, which constructs a +`SysmlDiagnostic(_filePath, line, column, DiagnosticSeverity.Error, msg)` and appends it to +the shared `_diagnostics` list. All ANTLR4-reported errors are mapped to `Error` severity. + +#### StdlibLoader + +`StdlibLoader` is a static class with one internal method: `LoadAll()`. It enumerates +`Assembly.GetManifestResourceNames()`, filters to names that start with the computed +`ResourcePrefix` (`DemaConsulting.SysML2Tools.Stdlib.`) and end with `.sysml` +(case-insensitive). For each matching name it: + +1. Derives the virtual path by replacing the resource prefix with the `[stdlib]` prefix. +2. Opens the resource stream, reads it to a string using `StreamReader`, and yields the + `(virtualPath, content)` pair. + +Resource names ending with `.kerml` are skipped; KerML parsing requires a separate grammar +and is deferred to Phase 2. + +The ANTLR4-generated files in `Parser/Antlr/` (`SysMLv2Lexer.cs`, `SysMLv2Parser.cs`, and +related files) are committed to the repository and are not hand-written. They must not be +manually edited; see `Grammar/README.md` for regeneration instructions. diff --git a/docs/design/sysml2-tools-tool.md b/docs/design/sysml2-tools-tool.md index a7b7adc7..5d4438e6 100644 --- a/docs/design/sysml2-tools-tool.md +++ b/docs/design/sysml2-tools-tool.md @@ -12,6 +12,9 @@ flowchart TD subgraph Cli Context end + subgraph Lint + LintCommand + end subgraph SelfTest Validation end @@ -19,15 +22,17 @@ flowchart TD PathHelpers end Program --> Context + Program --> LintCommand Program --> Validation Validation --> Program Validation --> PathHelpers ``` `Program` is the entry point. It creates a `Context` from the `Cli` subsystem, dispatches to -`Validation` when `--validate` is passed, and returns the exit code from `Context`. `Validation` -calls `Program.Run` recursively to exercise the tool during self-testing, and uses `PathHelpers` -to construct safe temporary file paths. +`LintCommand` when the `lint` subcommand is passed, dispatches to `Validation` when `--validate` +is passed, and returns the exit code from `Context`. `Validation` calls `Program.Run` recursively +to exercise the tool during self-testing, and uses `PathHelpers` to construct safe temporary file +paths. ## External Interfaces @@ -37,7 +42,8 @@ to construct safe temporary file paths. - *Role*: Consumer (the host environment invokes the system with command-line arguments). - *Contract*: Accepts arguments `-v`/`--version`, `-?`/`-h`/`--help`, `--silent`, `--validate`, `--results `, `--result ` (legacy alias for `--results`), `--depth `, and - `--log `. Returns exit code 0 for success and 1 for failures. + `--log `. Accepts `lint ` as a subcommand that invokes lint mode. Returns + exit code 0 for success and 1 for failures. - *Constraints*: Unknown arguments cause exit code 1 and an error message on stderr. **Standard Output**: Normal program output written to `Console.Out`. @@ -77,6 +83,8 @@ to construct safe temporary file paths. ## Dependencies +- **DemaConsulting.SysML2Tools**: provides `WorkspaceParser`, `WorkspaceParseResult`, and + `SysmlDiagnostic` for SysML v2 parsing in the Lint subsystem. - **DemaConsulting.TestResults**: provides `TestResults`, `TestResult`, and `TestOutcome` for accumulating self-validation results. - **DemaConsulting.TestResults.IO**: provides `TrxSerializer` and `JUnitSerializer` for writing @@ -97,6 +105,7 @@ N/A - not a safety-classified software item. - `--version` flag → `context.WriteLine(Version)`, then return. - Otherwise, `PrintBanner` is called first; then: - `--help` flag → `PrintHelp(context)`, then return. + - `lint` subcommand → `LintCommand.Run(context)`. - `--validate` flag → `Validation.Run(context)`. - No flags → `RunToolLogic(context)`. 4. `Program.Main` returns `context.ExitCode` (0 if no errors were reported, 1 otherwise). diff --git a/docs/design/sysml2-tools-tool/lint.md b/docs/design/sysml2-tools-tool/lint.md new file mode 100644 index 00000000..4b68982d --- /dev/null +++ b/docs/design/sysml2-tools-tool/lint.md @@ -0,0 +1,48 @@ +## Lint + +### Overview + +The `Lint` subsystem implements the `lint` subcommand of the `DemaConsulting.SysML2Tools.Tool` +CLI application. It accepts one or more file glob patterns, resolves them to concrete file paths, +invokes `WorkspaceParser.Parse` from the `DemaConsulting.SysML2Tools` core library, and reports +each diagnostic to the context output in a standard `path(line,col): severity: message` format. +The subsystem contains one unit: `LintCommand`. + +### Interfaces + +**LintCommand.Run**: Entry point for the lint subcommand. + +- *Type*: In-process .NET static method. +- *Role*: Provider. +- *Contract*: `internal static void Run(Context context)` — reads `context.Files` (the list of + glob patterns supplied as positional CLI arguments), resolves them to file paths, calls + `WorkspaceParser.Parse`, writes each diagnostic, and calls `context.WriteError` if any + error-severity diagnostics were found (which sets exit code 1). +- *Constraints*: If no files are resolved from the provided patterns, writes an error message + and returns immediately without invoking the parser. + +### Design + +`LintCommand` is a static class containing the public `Run` method and a private `ResolveFiles` +helper. + +`ResolveFiles` iterates over the provided pattern list. For each pattern it splits the path into +a directory component and a filename glob component using `Path.GetDirectoryName` and +`Path.GetFileName`. If the directory exists it calls `Directory.GetFiles(dir, glob, +TopDirectoryOnly)` to enumerate matching files. If the directory does not exist but the pattern +itself is an existing file path, it is added directly. + +`Run` checks for an empty resolved file list and emits an error if no input files were found. +Otherwise it logs a `"Linting N file(s)..."` status line, calls `WorkspaceParser.Parse(files)`, +then iterates over `result.Diagnostics`. Error-severity diagnostics are written via +`context.WriteError`; all others via `context.WriteLine`. After reporting all diagnostics it +writes either a summary error count (via `context.WriteError`) or a `"lint: no errors found."` +message (via `context.WriteLine`). + +The diagnostic output format is: +`{FilePath}({Line},{Column}): {severity}: {Message}` + +where `{severity}` is the lowercased `DiagnosticSeverity` enum value name. + +The `Lint` subsystem depends on `DemaConsulting.SysML2Tools.Parser.WorkspaceParser` from the +core library and on `Context` from the `Cli` subsystem. diff --git a/docs/reqstream/ots/antlr4.yaml b/docs/reqstream/ots/antlr4.yaml new file mode 100644 index 00000000..8cda78ae --- /dev/null +++ b/docs/reqstream/ots/antlr4.yaml @@ -0,0 +1,40 @@ +--- +# ANTLR4 OTS Software Requirements +# +# Requirements for the ANTLR4 runtime (Antlr4.Runtime.Standard) functionality. + +sections: + - title: OTS Software Requirements + sections: + - title: ANTLR4 Requirements + requirements: + - id: SysML2Tools-OTS-ANTLR4-Parse + title: >- + ANTLR4 runtime shall parse SysML v2 token streams according to the + grammar rules and return a parse tree. + justification: | + Antlr4.Runtime.Standard executes the pre-generated SysMLv2Lexer and + SysMLv2Parser classes. These tokenize SysML v2 source text and build a + concrete syntax tree rooted at the rootNamespace rule. Passing parse runs + confirm the runtime correctly drives the generated parser. + tags: [ots] + tests: + - ParseSource_EmptyFile_NoErrors + - ParseSource_MinimalPackage_NoErrors + - ParseSource_PartDef_NoErrors + - Parse_StdlibOnly_NoErrors + + - id: SysML2Tools-OTS-ANTLR4-Errors + title: >- + ANTLR4 runtime shall report syntax errors via the registered error + listener interface. + justification: | + IAntlrErrorListener is the ANTLR4 extension point for collecting lexer + and parser errors. SysmlDiagnosticListener implements both + IAntlrErrorListener (lexer) and IAntlrErrorListener (parser). + Passing error-path tests confirm the runtime invokes the registered listener + for invalid input. + tags: [ots] + tests: + - ParseSource_InvalidSyntax_ReportsError + - ParseSource_ErrorPath_MatchesSuppliedPath diff --git a/docs/reqstream/sysml2-tools-core/parser.yaml b/docs/reqstream/sysml2-tools-core/parser.yaml new file mode 100644 index 00000000..574510b4 --- /dev/null +++ b/docs/reqstream/sysml2-tools-core/parser.yaml @@ -0,0 +1,72 @@ +--- +# Parser Subsystem Requirements +# +# PURPOSE: +# - Define requirements for the SysML2Tools Parser subsystem +# - WorkspaceParser provides the public API for parsing SysML v2 files and source strings +# - Requirements describe observable parsing behavior, not internal implementation + +sections: + - title: Parser Subsystem Requirements + requirements: + - id: SysML2Tools-Core-Parser-StdlibLoad + title: >- + WorkspaceParser shall load all embedded .sysml stdlib files before parsing + user-supplied files. + justification: | + The SysML v2 standard library defines the base types and packages that all + user models reference. Loading stdlib first ensures that user files are parsed + in the correct context and that stdlib errors are reported before user errors. + tests: + - Parse_StdlibOnly_NoErrors + - Parse_FilesCount_IncludesStdlib + + - id: SysML2Tools-Core-Parser-Diagnostics + title: >- + WorkspaceParser shall report syntax errors as SysmlDiagnostic records + containing the file path, line number, column offset, severity, and message. + justification: | + Structured diagnostics allow callers to present errors to users with precise + location information (file, line, column) and enable programmatic filtering + by severity level. + tests: + - ParseSource_InvalidSyntax_ReportsError + - ParseSource_ErrorPath_MatchesSuppliedPath + + - id: SysML2Tools-Core-Parser-ParseGlobs + title: >- + WorkspaceParser.Parse shall accept a collection of file paths and parse each + file against the embedded stdlib. + justification: | + A collection-based API allows callers to supply any number of pre-resolved + file paths and receive a single aggregate result, simplifying integration + with CLI tools and test harnesses. + tests: + - Parse_StdlibOnly_NoErrors + - Parse_FilesCount_IncludesStdlib + + - id: SysML2Tools-Core-Parser-ParseSource + title: >- + WorkspaceParser.ParseSource shall parse an in-memory source string using the + caller-supplied virtual file path for diagnostic attribution. + justification: | + In-memory parsing without requiring a physical file is essential for testing + and for future IDE integration scenarios where source text is provided directly + by the editor without being written to disk. + tests: + - ParseSource_EmptyFile_NoErrors + - ParseSource_MinimalPackage_NoErrors + - ParseSource_PartDef_NoErrors + - ParseSource_InvalidSyntax_ReportsError + - ParseSource_ErrorPath_MatchesSuppliedPath + + - id: SysML2Tools-Core-Parser-HasErrors + title: >- + WorkspaceParseResult.HasErrors shall return true if and only if at least one + Error-severity diagnostic is present in the result. + justification: | + Callers need a simple boolean gate to decide whether to fail a build or report + errors without inspecting the full diagnostic list themselves. + tests: + - Parse_StdlibOnly_NoErrors + - ParseSource_InvalidSyntax_ReportsError diff --git a/docs/reqstream/sysml2-tools-tool/lint.yaml b/docs/reqstream/sysml2-tools-tool/lint.yaml new file mode 100644 index 00000000..86cc145b --- /dev/null +++ b/docs/reqstream/sysml2-tools-tool/lint.yaml @@ -0,0 +1,48 @@ +--- +# Lint Subsystem Requirements +# +# PURPOSE: +# - Define requirements for the SysML2Tools Lint subsystem +# - LintCommand resolves glob patterns, invokes WorkspaceParser, and reports diagnostics +# - Subsystem requirements describe the externally visible linting behavior + +sections: + - title: Lint Subsystem Requirements + requirements: + - id: SysML2Tools-Tool-Lint-Patterns + title: >- + The LintCommand shall accept one or more file glob patterns as positional + arguments. + justification: | + Users specify which SysML files to lint using file glob patterns (e.g., + src/**/*.sysml). Accepting multiple patterns in a single invocation allows + flexible targeting of file sets without requiring shell expansion. + tests: [] + + - id: SysML2Tools-Tool-Lint-Parse + title: >- + The LintCommand shall invoke WorkspaceParser.Parse with the resolved file + paths derived from the provided patterns. + justification: | + Delegating parsing to WorkspaceParser ensures that all SysML files are + validated against the embedded stdlib and that diagnostics are collected + consistently for all user-supplied files. + tests: [] + + - id: SysML2Tools-Tool-Lint-Report + title: >- + The LintCommand shall write each diagnostic to the context output in the + format: path(line,col): severity: message. + justification: | + A standard diagnostic format is recognized by IDEs, CI tools, and problem + matchers, enabling automated parsing of lint results without custom tooling. + tests: [] + + - id: SysML2Tools-Tool-Lint-ExitCode + title: >- + The LintCommand shall cause the tool to return exit code 1 if any + error-severity diagnostics are present. + justification: | + A non-zero exit code enables CI/CD pipelines to detect and surface lint + failures automatically, preventing silent acceptance of invalid SysML models. + tests: [] diff --git a/docs/verification/definition.yaml b/docs/verification/definition.yaml index f24e500f..57530cf5 100644 --- a/docs/verification/definition.yaml +++ b/docs/verification/definition.yaml @@ -1,8 +1,10 @@ --- resource-path: - docs/verification + - docs/verification/sysml2-tools-core - docs/verification/sysml2-tools-tool - docs/verification/sysml2-tools-tool/cli + - docs/verification/sysml2-tools-tool/lint - docs/verification/sysml2-tools-tool/self-test - docs/verification/sysml2-tools-tool/utilities - docs/verification/ots @@ -15,14 +17,17 @@ input-files: - docs/verification/sysml2-tools-tool/program.md - docs/verification/sysml2-tools-tool/cli.md - docs/verification/sysml2-tools-tool/cli/context.md + - docs/verification/sysml2-tools-tool/lint.md - docs/verification/sysml2-tools-tool/self-test.md - docs/verification/sysml2-tools-tool/self-test/validation.md - docs/verification/sysml2-tools-tool/utilities.md - docs/verification/sysml2-tools-tool/utilities/path-helpers.md - docs/verification/sysml2-tools-core.md + - docs/verification/sysml2-tools-core/parser.md - docs/verification/sysml2-tools-svg.md - docs/verification/sysml2-tools-png.md - docs/verification/ots.md + - docs/verification/ots/antlr4.md - docs/verification/ots/buildmark.md - docs/verification/ots/fileassert.md - docs/verification/ots/pandoc.md diff --git a/docs/verification/introduction.md b/docs/verification/introduction.md index 7fc74fd5..3dfaf4d5 100644 --- a/docs/verification/introduction.md +++ b/docs/verification/introduction.md @@ -17,13 +17,20 @@ This document covers the verification design for the following software items: **Local items:** -- **DemaConsulting.SysML2Tools** (System — core library, Phase 0 stub) +- **DemaConsulting.SysML2Tools** (System — core library) + - **Parser** (Subsystem) — SysML v2 parsing engine + - **WorkspaceParser** (Unit) — public parsing API + - **Internal** (Subsystem) — internal implementation + - **SysmlDiagnosticListener** (Unit) — ANTLR4 error listener + - **StdlibLoader** (Unit) — embedded stdlib loader - **DemaConsulting.SysML2Tools.Svg** (System — SVG renderer, Phase 0 stub) - **DemaConsulting.SysML2Tools.Png** (System — PNG renderer, Phase 0 stub) - **DemaConsulting.SysML2Tools.Tool** (System — dotnet tool) - **Program** (Unit) — entry point and execution orchestrator - **Cli** (Subsystem) — command-line argument parsing and I/O - **Context** (Unit) — argument parser and I/O owner + - **Lint** (Subsystem) — lint command implementation + - **LintCommand** (Unit) — lint subcommand handler - **SelfTest** (Subsystem) — self-validation test runner - **Validation** (Unit) — self-validation test runner - **Utilities** (Subsystem) — shared utilities @@ -31,6 +38,7 @@ This document covers the verification design for the following software items: **OTS items:** +- **ANTLR4** — ANTLR4 runtime (Antlr4.Runtime.Standard) - **BuildMark** — build-notes documentation tool - **FileAssert** — document assertion tool - **Pandoc** — Markdown-to-HTML conversion tool @@ -55,7 +63,8 @@ The following topics are out of scope: The test folder structure mirrors the source subsystem breakdown: - **test/** — test projects - - **DemaConsulting.SysML2Tools.Tests/** — TODO: core library tests (Phase 1+) + - **DemaConsulting.SysML2Tools.Tests/** — core library unit tests + - **Parser/** — WorkspaceParser and related tests - **DemaConsulting.SysML2Tools.Svg.Tests/** — TODO: SVG renderer tests (Phase 4+) - **DemaConsulting.SysML2Tools.Png.Tests/** — TODO: PNG renderer tests (Phase 4+) - **DemaConsulting.SysML2Tools.Tool.Tests/** — dotnet tool unit and integration tests diff --git a/docs/verification/ots.md b/docs/verification/ots.md index a8aeb412..1bf24b45 100644 --- a/docs/verification/ots.md +++ b/docs/verification/ots.md @@ -16,6 +16,7 @@ Internal OTS tool design is out of scope; only integration and usage evidence is The following OTS items have verification evidence in this section: +- ANTLR4 (_antlr4.md_) — ANTLR4 runtime (Antlr4.Runtime.Standard) - BuildMark (_buildmark.md_) — build-notes documentation tool - FileAssert (_fileassert.md_) — document assertion tool - Pandoc (_pandoc.md_) — Markdown-to-HTML conversion tool diff --git a/docs/verification/ots/antlr4.md b/docs/verification/ots/antlr4.md new file mode 100644 index 00000000..666afe0d --- /dev/null +++ b/docs/verification/ots/antlr4.md @@ -0,0 +1,83 @@ +## ANTLR4 Verification + +This document provides the verification evidence for the ANTLR4 OTS software item +(`Antlr4.Runtime.Standard` 4.13.1). Requirements for this OTS item are defined in the ANTLR4 +OTS Software Requirements document. + +### Required Functionality + +`Antlr4.Runtime.Standard` is the ANTLR4 C# runtime used to execute the pre-generated SysML v2 +lexer and parser. It must correctly drive the generated lexer/parser classes against SysML v2 +source text and invoke registered `IAntlrErrorListener` implementations when syntax errors occur. + +### Verification Approach + +ANTLR4 is verified by self-validation evidence from the CI pipeline. The `WorkspaceParser` unit +tests exercise the ANTLR4 runtime end-to-end on every test run. A passing pipeline run for all +scenarios constitutes evidence that both requirements are satisfied. + +`Parse_StdlibOnly_NoErrors` is the primary integration evidence: it parses all 58 embedded +`.sysml` stdlib files through the ANTLR4 runtime and asserts that no error-severity diagnostics +are produced, proving that the runtime correctly processes valid SysML v2 source. + +### Test Scenarios + +#### ParseSource_EmptyFile_NoErrors + +**Scenario**: ANTLR4 runtime drives `SysMLv2Lexer` and `SysMLv2Parser` over an empty string; +`rootNamespace()` is invoked. + +**Expected**: ANTLR4 completes without invoking the error listener; the returned diagnostic list +is empty. + +**Requirement coverage**: `SysML2Tools-OTS-ANTLR4-Parse`. + +#### ParseSource_MinimalPackage_NoErrors + +**Scenario**: ANTLR4 runtime processes `"package MyPackage {}"` through the full lexer/parser +pipeline. + +**Expected**: ANTLR4 tokenizes and parses the input without errors; the returned diagnostic list +is empty. + +**Requirement coverage**: `SysML2Tools-OTS-ANTLR4-Parse`. + +#### ParseSource_PartDef_NoErrors + +**Scenario**: ANTLR4 runtime processes a multi-line SysML source containing a package with a +`part def` block and an attribute declaration. + +**Expected**: ANTLR4 parses all constructs without errors; the returned diagnostic list is +empty. + +**Requirement coverage**: `SysML2Tools-OTS-ANTLR4-Parse`. + +#### ParseSource_InvalidSyntax_ReportsError + +**Scenario**: ANTLR4 runtime encounters `"@@@ NOT VALID SYSML @@@"` which cannot be tokenized +or parsed as valid SysML v2. + +**Expected**: ANTLR4 invokes the registered `SysmlDiagnosticListener` error handler at least +once; the returned diagnostic list is non-empty and contains at least one `Error`-severity entry. + +**Requirement coverage**: `SysML2Tools-OTS-ANTLR4-Errors`. + +#### ParseSource_ErrorPath_MatchesSuppliedPath + +**Scenario**: ANTLR4 runtime encounters `"@@@"` while the listener is bound to path +`"my-model.sysml"`. + +**Expected**: ANTLR4 invokes the registered listener with the error; all diagnostics have +`FilePath == "my-model.sysml"`, confirming the listener receives the correct context. + +**Requirement coverage**: `SysML2Tools-OTS-ANTLR4-Errors`. + +#### Parse_StdlibOnly_NoErrors + +**Scenario**: ANTLR4 runtime processes all 58 embedded `.sysml` stdlib files sequentially +through the full lexer/parser pipeline. + +**Expected**: ANTLR4 parses every stdlib file without invoking the error listener; `HasErrors` +is false. This is the primary integration evidence for the ANTLR4 runtime. + +**Requirement coverage**: `SysML2Tools-OTS-ANTLR4-Parse`, `SysML2Tools-OTS-ANTLR4-Errors`. diff --git a/docs/verification/sysml2-tools-core.md b/docs/verification/sysml2-tools-core.md index 6da1e6a6..8d48108e 100644 --- a/docs/verification/sysml2-tools-core.md +++ b/docs/verification/sysml2-tools-core.md @@ -2,19 +2,26 @@ ## Verification Approach -System-level verification for the `DemaConsulting.SysML2Tools` core library will use -unit tests that exercise the parsing engine, semantic model, layout algorithms, and -`IRenderer` interface. This system is a Phase 0 stub; verification details will be -populated in Phase 1+. +System-level verification for the `DemaConsulting.SysML2Tools` core library uses unit tests +in `DemaConsulting.SysML2Tools.Tests`. Tests exercise the public `WorkspaceParser` API and +validate that the embedded stdlib parses without errors. The xUnit v3 framework discovers +and runs all test methods; results are captured in TRX files consumed by ReqStream. ## Test Environment -*To be defined in Phase 1+.* +Tests run via `dotnet test` against all three target frameworks: net8.0, net9.0, and net10.0. +No external services, files, or environment configuration are required beyond a standard .NET +SDK installation. ## Acceptance Criteria -*To be defined in Phase 1+.* +- All unit tests pass with zero failures across all three target frameworks. +- All 58 embedded `.sysml` stdlib files parse without producing any error-severity diagnostics. +- `WorkspaceParser` correctly propagates the caller-supplied file path in all diagnostics. +- Invalid SysML syntax produces at least one `Error`-severity diagnostic. ## Test Scenarios -*To be defined in Phase 1+.* +See *Parser Verification Design* for the full list of test scenarios. Primary acceptance +evidence is provided by `Parse_StdlibOnly_NoErrors`, which parses all 58 embedded stdlib +`.sysml` files and asserts `HasErrors` is false. diff --git a/docs/verification/sysml2-tools-core/parser.md b/docs/verification/sysml2-tools-core/parser.md new file mode 100644 index 00000000..a8bc1e0d --- /dev/null +++ b/docs/verification/sysml2-tools-core/parser.md @@ -0,0 +1,61 @@ +## Parser + +### Verification Approach + +The `Parser` subsystem is verified by unit tests in `WorkspaceParserTests.cs` in the +`DemaConsulting.SysML2Tools.Tests` project. Tests call `WorkspaceParser.Parse` and +`WorkspaceParser.ParseSource` directly with controlled inputs and assert on the returned +`WorkspaceParseResult` and `IReadOnlyList` values. No mocking is required; +`SysmlDiagnosticListener` and `StdlibLoader` are exercised through the public API. + +### Test Environment + +N/A — standard test environment. No external files, services, or environment configuration are +required. Embedded stdlib resources are part of the assembly under test. + +### Acceptance Criteria + +- All seven unit tests pass with zero failures across net8.0, net9.0, and net10.0. +- An empty source string produces zero diagnostics. +- A valid SysML package declaration produces zero diagnostics. +- A valid SysML part definition produces zero diagnostics. +- Invalid SysML syntax produces at least one `Error`-severity diagnostic. +- The file path supplied to `ParseSource` appears verbatim in all returned diagnostics. +- All 58 embedded `.sysml` stdlib files parse without any error-severity diagnostic. +- `WorkspaceParser.Parse([])` returns a `Files` list containing at least 58 entries. + +### Test Scenarios + +**ParseSource_EmptyFile_NoErrors**: `WorkspaceParser.ParseSource` is called with virtual path +`""` and an empty string; the returned diagnostic list is empty. This scenario is tested +by `ParseSource_EmptyFile_NoErrors`. + +**ParseSource_MinimalPackage_NoErrors**: `WorkspaceParser.ParseSource` is called with +`"package MyPackage {}"` as the source; the returned diagnostic list is empty, confirming that +a minimal valid package declaration parses without errors. This scenario is tested by +`ParseSource_MinimalPackage_NoErrors`. + +**ParseSource_PartDef_NoErrors**: `WorkspaceParser.ParseSource` is called with a multi-line +source containing a package with a `part def` block including an attribute declaration; the +returned diagnostic list is empty, confirming that valid nested SysML constructs parse +correctly. This scenario is tested by `ParseSource_PartDef_NoErrors`. + +**ParseSource_InvalidSyntax_ReportsError**: `WorkspaceParser.ParseSource` is called with +`"@@@ NOT VALID SYSML @@@"`; the returned diagnostic list is non-empty and contains at least +one diagnostic with `Severity == DiagnosticSeverity.Error`, confirming that lexer errors are +surfaced as `Error`-severity diagnostics. This scenario is tested by +`ParseSource_InvalidSyntax_ReportsError`. + +**ParseSource_ErrorPath_MatchesSuppliedPath**: `WorkspaceParser.ParseSource` is called with +path `"my-model.sysml"` and invalid source `"@@@"`; every diagnostic in the returned list has +`FilePath == "my-model.sysml"`, confirming that the virtual path is propagated correctly. This +scenario is tested by `ParseSource_ErrorPath_MatchesSuppliedPath`. + +**Parse_StdlibOnly_NoErrors**: `WorkspaceParser.Parse` is called with an empty file collection; +`result.HasErrors` is false, confirming that all 58 embedded `.sysml` stdlib files parse +without error. Any failures print the full diagnostic list to the assertion message. This +scenario is tested by `Parse_StdlibOnly_NoErrors`. + +**Parse_FilesCount_IncludesStdlib**: `WorkspaceParser.Parse` is called with an empty file +collection; `result.Files.Count` is at least 58, confirming that the stdlib loader enumerates +all `.sysml` resources. This scenario is tested by `Parse_FilesCount_IncludesStdlib`. diff --git a/docs/verification/sysml2-tools-tool/lint.md b/docs/verification/sysml2-tools-tool/lint.md new file mode 100644 index 00000000..dbb58da3 --- /dev/null +++ b/docs/verification/sysml2-tools-tool/lint.md @@ -0,0 +1,30 @@ +## Lint + +### Verification Approach + +The `Lint` subsystem is verified through integration tests that exercise `LintCommand.Run` with +controlled `Context` instances. Tests supply synthetic glob patterns pointing to real or +temporary SysML files and assert on captured diagnostic output and exit codes. The +`WorkspaceParser` is exercised with its real implementation; no mocking is applied. + +### Test Environment + +N/A — standard test environment. Any tests that require `.sysml` input files create them in a +temporary directory and clean them up after each test. + +### Acceptance Criteria + +- `LintCommand.Run` with no resolved input files writes an error message and sets exit code 1. +- `LintCommand.Run` with valid SysML input writes a `"lint: no errors found."` message and + returns exit code 0. +- `LintCommand.Run` with invalid SysML input writes at least one diagnostic in the + `path(line,col): severity: message` format and sets exit code 1. +- Error-severity diagnostics are written via `context.WriteError`; informational diagnostics + are written via `context.WriteLine`. + +### Test Scenarios + +N/A — integration tests for the Lint subsystem are deferred pending end-to-end CLI test +infrastructure. System-level acceptance evidence for the `lint` subcommand will be captured in +integration tests alongside other subcommands. Parser-level behavior is verified by the +`WorkspaceParser` unit tests documented in the *Parser Verification Design*. diff --git a/requirements.yaml b/requirements.yaml index 2da631eb..6a27b730 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -2,17 +2,20 @@ # Root requirements file - includes all system, unit, platform, and OTS requirements includes: - docs/reqstream/sysml2-tools-core.yaml + - docs/reqstream/sysml2-tools-core/parser.yaml - docs/reqstream/sysml2-tools-svg.yaml - docs/reqstream/sysml2-tools-png.yaml - docs/reqstream/sysml2-tools-tool.yaml - docs/reqstream/sysml2-tools-tool/program.yaml - docs/reqstream/sysml2-tools-tool/cli.yaml - docs/reqstream/sysml2-tools-tool/cli/context.yaml + - docs/reqstream/sysml2-tools-tool/lint.yaml - docs/reqstream/sysml2-tools-tool/self-test.yaml - docs/reqstream/sysml2-tools-tool/self-test/validation.yaml - docs/reqstream/sysml2-tools-tool/utilities.yaml - docs/reqstream/sysml2-tools-tool/utilities/path-helpers.yaml - docs/reqstream/sysml2-tools-tool/platform-requirements.yaml + - docs/reqstream/ots/antlr4.yaml - docs/reqstream/ots/xunit.yaml - docs/reqstream/ots/reqstream.yaml - docs/reqstream/ots/buildmark.yaml diff --git a/src/DemaConsulting.SysML2Tools/Grammar/README.md b/src/DemaConsulting.SysML2Tools/Grammar/README.md index 6607b16d..b7bd18ff 100644 --- a/src/DemaConsulting.SysML2Tools/Grammar/README.md +++ b/src/DemaConsulting.SysML2Tools/Grammar/README.md @@ -1,7 +1,7 @@ # Grammar This folder contains the ANTLR4 grammar files for SysML v2 textual notation. -The generated C# parser lives in `../Parser/Generated/` and is committed to the +The generated C# parser lives in `../Parser/Antlr/` and is committed to the repository — no Java is required to build this project. ## Source Versions @@ -30,10 +30,10 @@ To regenerate `../Parser/Generated/` after a grammar update: $java = 'path\to\java.exe' $antlr = 'path\to\antlr-4.13.1-complete.jar' $src = 'src\DemaConsulting.SysML2Tools\Grammar' - $out = 'src\DemaConsulting.SysML2Tools\Parser\Generated' + $out = 'src\DemaConsulting.SysML2Tools\Parser\Antlr' Remove-Item $out\* -Include *.cs,*.interp,*.tokens -Force & $java -jar $antlr -Dlanguage=CSharp ` - -package DemaConsulting.SysML2Tools.Parser.Generated ` + -package DemaConsulting.SysML2Tools.Parser.Antlr ` -listener -visitor -o $out ` $src\SysMLv2Lexer.g4 $src\SysMLv2Parser.g4 ``` @@ -41,6 +41,6 @@ To regenerate `../Parser/Generated/` after a grammar update: 4. Update the version table above. 5. Commit the regenerated files. -> **Note:** The `.interp` and `.tokens` files in `Generated/` are not needed +> **Note:** The `.interp` and `.tokens` files in `Antlr/` are not needed > at runtime — the ANTLR4 ATN is serialized inline in the generated C# — but > they are committed alongside the `.cs` files to keep regeneration reproducible. diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/README.md b/src/DemaConsulting.SysML2Tools/Parser/Antlr/README.md new file mode 100644 index 00000000..0820b120 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/README.md @@ -0,0 +1,9 @@ +# Parser/Antlr + +This folder contains C# source files **generated by ANTLR4** from the grammar +files in `../../Grammar/`. Do not edit these files by hand. + +See [`../../Grammar/README.md`](../../Grammar/README.md) for: + +- Version information (grammar source, ANTLR4 generator, JDK) +- Step-by-step regeneration instructions diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.cs b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.cs new file mode 100644 index 00000000..d79e4a47 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.cs @@ -0,0 +1,910 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/work/DemaConsulting/BuildTools/SysML2Tools/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Lexer.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace DemaConsulting.SysML2Tools.Parser.Antlr { +using System; +using System.IO; +using System.Text; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public partial class SysMLv2Lexer : Lexer { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + ABOUT=1, ABSTRACT=2, ACCEPT=3, ACTION=4, ACTOR=5, AFTER=6, ALIAS=7, ALL=8, + ALLOCATE=9, ALLOCATION=10, ANALYSIS=11, AND=12, AS=13, ASSERT=14, ASSIGN=15, + ASSOC=16, ASSUME=17, AT=18, ATTRIBUTE=19, BEHAVIOR=20, BIND=21, BINDING=22, + BOOL=23, BY=24, CALC=25, CASE=26, CHAINS=27, CLASS=28, CLASSIFIER=29, + COMMENT=30, COMPOSITE=31, CONCERN=32, CONJUGATE=33, CONJUGATES=34, CONJUGATION=35, + CONNECT=36, CONNECTION=37, CONNECTOR=38, CONST=39, CONSTANT=40, CONSTRAINT=41, + CROSSES=42, DATATYPE=43, DECIDE=44, DEF=45, DEFAULT=46, DEFINED=47, DEPENDENCY=48, + DERIVED=49, DIFFERENCES=50, DISJOINING=51, DISJOINT=52, DO=53, DOC=54, + ELSE=55, END=56, ENTRY=57, ENUM=58, EVENT=59, EXHIBIT=60, EXIT=61, EXPOSE=62, + EXPR=63, FALSE=64, FEATURE=65, FEATURED=66, FEATURING=67, FILTER=68, FIRST=69, + FLOW=70, FOR=71, FORK=72, FRAME=73, FROM=74, FUNCTION=75, HASTYPE=76, + IF=77, IMPLIES=78, IMPORT=79, IN=80, INCLUDE=81, INDIVIDUAL=82, INOUT=83, + INTERACTION=84, INTERFACE=85, INTERSECTS=86, INV=87, INVERSE=88, INVERTING=89, + ISTYPE=90, ITEM=91, JOIN=92, LANGUAGE=93, LIBRARY=94, LOCALE=95, LOOP=96, + MEMBER=97, MERGE=98, MESSAGE=99, META=100, METACLASS=101, METADATA=102, + MULTIPLICITY=103, NAMESPACE=104, NEW=105, NONUNIQUE=106, NOT=107, NULL=108, + OBJECTIVE=109, OCCURRENCE=110, OF=111, OR=112, ORDERED=113, OUT=114, PACKAGE=115, + PARALLEL=116, PART=117, PERFORM=118, PORT=119, PORTION=120, PREDICATE=121, + PRIVATE=122, PROTECTED=123, PUBLIC=124, REDEFINES=125, REDEFINITION=126, + REF=127, REFERENCES=128, RENDER=129, RENDERING=130, REP=131, REQUIRE=132, + REQUIREMENT=133, RETURN=134, SATISFY=135, SEND=136, SNAPSHOT=137, SPECIALIZATION=138, + SPECIALIZES=139, STAKEHOLDER=140, STANDARD=141, STATE=142, STEP=143, STRUCT=144, + SUBCLASSIFIER=145, SUBJECT=146, SUBSET=147, SUBSETS=148, SUBTYPE=149, + SUCCESSION=150, TERMINATE=151, THEN=152, TIMESLICE=153, TO=154, TRANSITION=155, + TRUE=156, TYPE=157, TYPED=158, TYPING=159, UNIONS=160, UNTIL=161, USE=162, + VAR=163, VARIANT=164, VARIATION=165, VERIFICATION=166, VERIFY=167, VIA=168, + VIEW=169, VIEWPOINT=170, WHEN=171, WHILE=172, XOR=173, BANG_EQ_EQ=174, + COLON_COLON_GT=175, COLON_GT_GT=176, EQ_EQ_EQ=177, BANG_EQ=178, STAR_STAR=179, + ARROW=180, DOT_DOT=181, DOT_QUESTION=182, COLON_COLON=183, COLON_EQ=184, + COLON_GT=185, LE=186, EQ_EQ=187, FAT_ARROW=188, GE=189, QUESTION_QUESTION=190, + AT_AT=191, HASH=192, DOLLAR=193, PERCENT=194, AMP=195, LPAREN=196, RPAREN=197, + STAR=198, PLUS=199, COMMA=200, MINUS=201, DOT=202, SLASH=203, COLON=204, + SEMI=205, LT=206, EQ=207, GT=208, QUESTION=209, AT_SIGN=210, LBRACK=211, + RBRACK=212, CARET=213, LBRACE=214, PIPE=215, RBRACE=216, TILDE=217, IDENTIFIER=218, + STRING=219, DOUBLE_STRING=220, INTEGER=221, REAL=222, REGULAR_COMMENT=223, + SINGLE_LINE_NOTE=224, BARE_LINE_COMMENT=225, WS=226; + public static string[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static string[] modeNames = { + "DEFAULT_MODE" + }; + + public static readonly string[] ruleNames = { + "ABOUT", "ABSTRACT", "ACCEPT", "ACTION", "ACTOR", "AFTER", "ALIAS", "ALL", + "ALLOCATE", "ALLOCATION", "ANALYSIS", "AND", "AS", "ASSERT", "ASSIGN", + "ASSOC", "ASSUME", "AT", "ATTRIBUTE", "BEHAVIOR", "BIND", "BINDING", "BOOL", + "BY", "CALC", "CASE", "CHAINS", "CLASS", "CLASSIFIER", "COMMENT", "COMPOSITE", + "CONCERN", "CONJUGATE", "CONJUGATES", "CONJUGATION", "CONNECT", "CONNECTION", + "CONNECTOR", "CONST", "CONSTANT", "CONSTRAINT", "CROSSES", "DATATYPE", + "DECIDE", "DEF", "DEFAULT", "DEFINED", "DEPENDENCY", "DERIVED", "DIFFERENCES", + "DISJOINING", "DISJOINT", "DO", "DOC", "ELSE", "END", "ENTRY", "ENUM", + "EVENT", "EXHIBIT", "EXIT", "EXPOSE", "EXPR", "FALSE", "FEATURE", "FEATURED", + "FEATURING", "FILTER", "FIRST", "FLOW", "FOR", "FORK", "FRAME", "FROM", + "FUNCTION", "HASTYPE", "IF", "IMPLIES", "IMPORT", "IN", "INCLUDE", "INDIVIDUAL", + "INOUT", "INTERACTION", "INTERFACE", "INTERSECTS", "INV", "INVERSE", "INVERTING", + "ISTYPE", "ITEM", "JOIN", "LANGUAGE", "LIBRARY", "LOCALE", "LOOP", "MEMBER", + "MERGE", "MESSAGE", "META", "METACLASS", "METADATA", "MULTIPLICITY", "NAMESPACE", + "NEW", "NONUNIQUE", "NOT", "NULL", "OBJECTIVE", "OCCURRENCE", "OF", "OR", + "ORDERED", "OUT", "PACKAGE", "PARALLEL", "PART", "PERFORM", "PORT", "PORTION", + "PREDICATE", "PRIVATE", "PROTECTED", "PUBLIC", "REDEFINES", "REDEFINITION", + "REF", "REFERENCES", "RENDER", "RENDERING", "REP", "REQUIRE", "REQUIREMENT", + "RETURN", "SATISFY", "SEND", "SNAPSHOT", "SPECIALIZATION", "SPECIALIZES", + "STAKEHOLDER", "STANDARD", "STATE", "STEP", "STRUCT", "SUBCLASSIFIER", + "SUBJECT", "SUBSET", "SUBSETS", "SUBTYPE", "SUCCESSION", "TERMINATE", + "THEN", "TIMESLICE", "TO", "TRANSITION", "TRUE", "TYPE", "TYPED", "TYPING", + "UNIONS", "UNTIL", "USE", "VAR", "VARIANT", "VARIATION", "VERIFICATION", + "VERIFY", "VIA", "VIEW", "VIEWPOINT", "WHEN", "WHILE", "XOR", "BANG_EQ_EQ", + "COLON_COLON_GT", "COLON_GT_GT", "EQ_EQ_EQ", "BANG_EQ", "STAR_STAR", "ARROW", + "DOT_DOT", "DOT_QUESTION", "COLON_COLON", "COLON_EQ", "COLON_GT", "LE", + "EQ_EQ", "FAT_ARROW", "GE", "QUESTION_QUESTION", "AT_AT", "HASH", "DOLLAR", + "PERCENT", "AMP", "LPAREN", "RPAREN", "STAR", "PLUS", "COMMA", "MINUS", + "DOT", "SLASH", "COLON", "SEMI", "LT", "EQ", "GT", "QUESTION", "AT_SIGN", + "LBRACK", "RBRACK", "CARET", "LBRACE", "PIPE", "RBRACE", "TILDE", "IDENTIFIER", + "STRING", "DOUBLE_STRING", "INTEGER", "REAL", "REGULAR_COMMENT", "SINGLE_LINE_NOTE", + "BARE_LINE_COMMENT", "WS" + }; + + + public SysMLv2Lexer(ICharStream input) + : this(input, Console.Out, Console.Error) { } + + public SysMLv2Lexer(ICharStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + private static readonly string[] _LiteralNames = { + null, "'about'", "'abstract'", "'accept'", "'action'", "'actor'", "'after'", + "'alias'", "'all'", "'allocate'", "'allocation'", "'analysis'", "'and'", + "'as'", "'assert'", "'assign'", "'assoc'", "'assume'", "'at'", "'attribute'", + "'behavior'", "'bind'", "'binding'", "'bool'", "'by'", "'calc'", "'case'", + "'chains'", "'class'", "'classifier'", "'comment'", "'composite'", "'concern'", + "'conjugate'", "'conjugates'", "'conjugation'", "'connect'", "'connection'", + "'connector'", "'const'", "'constant'", "'constraint'", "'crosses'", "'datatype'", + "'decide'", "'def'", "'default'", "'defined'", "'dependency'", "'derived'", + "'differences'", "'disjoining'", "'disjoint'", "'do'", "'doc'", "'else'", + "'end'", "'entry'", "'enum'", "'event'", "'exhibit'", "'exit'", "'expose'", + "'expr'", "'false'", "'feature'", "'featured'", "'featuring'", "'filter'", + "'first'", "'flow'", "'for'", "'fork'", "'frame'", "'from'", "'function'", + "'hastype'", "'if'", "'implies'", "'import'", "'in'", "'include'", "'individual'", + "'inout'", "'interaction'", "'interface'", "'intersects'", "'inv'", "'inverse'", + "'inverting'", "'istype'", "'item'", "'join'", "'language'", "'library'", + "'locale'", "'loop'", "'member'", "'merge'", "'message'", "'meta'", "'metaclass'", + "'metadata'", "'multiplicity'", "'namespace'", "'new'", "'nonunique'", + "'not'", "'null'", "'objective'", "'occurrence'", "'of'", "'or'", "'ordered'", + "'out'", "'package'", "'parallel'", "'part'", "'perform'", "'port'", "'portion'", + "'predicate'", "'private'", "'protected'", "'public'", "'redefines'", + "'redefinition'", "'ref'", "'references'", "'render'", "'rendering'", + "'rep'", "'require'", "'requirement'", "'return'", "'satisfy'", "'send'", + "'snapshot'", "'specialization'", "'specializes'", "'stakeholder'", "'standard'", + "'state'", "'step'", "'struct'", "'subclassifier'", "'subject'", "'subset'", + "'subsets'", "'subtype'", "'succession'", "'terminate'", "'then'", "'timeslice'", + "'to'", "'transition'", "'true'", "'type'", "'typed'", "'typing'", "'unions'", + "'until'", "'use'", "'var'", "'variant'", "'variation'", "'verification'", + "'verify'", "'via'", "'view'", "'viewpoint'", "'when'", "'while'", "'xor'", + "'!=='", "'::>'", "':>>'", "'==='", "'!='", "'**'", "'->'", "'..'", "'.?'", + "'::'", "':='", "':>'", "'<='", "'=='", "'=>'", "'>='", "'??'", "'@@'", + "'#'", "'$'", "'%'", "'&'", "'('", "')'", "'*'", "'+'", "','", "'-'", + "'.'", "'/'", "':'", "';'", "'<'", "'='", "'>'", "'?'", "'@'", "'['", + "']'", "'^'", "'{'", "'|'", "'}'", "'~'", null, null, null, null, null, + null, null, "'//'" + }; + private static readonly string[] _SymbolicNames = { + null, "ABOUT", "ABSTRACT", "ACCEPT", "ACTION", "ACTOR", "AFTER", "ALIAS", + "ALL", "ALLOCATE", "ALLOCATION", "ANALYSIS", "AND", "AS", "ASSERT", "ASSIGN", + "ASSOC", "ASSUME", "AT", "ATTRIBUTE", "BEHAVIOR", "BIND", "BINDING", "BOOL", + "BY", "CALC", "CASE", "CHAINS", "CLASS", "CLASSIFIER", "COMMENT", "COMPOSITE", + "CONCERN", "CONJUGATE", "CONJUGATES", "CONJUGATION", "CONNECT", "CONNECTION", + "CONNECTOR", "CONST", "CONSTANT", "CONSTRAINT", "CROSSES", "DATATYPE", + "DECIDE", "DEF", "DEFAULT", "DEFINED", "DEPENDENCY", "DERIVED", "DIFFERENCES", + "DISJOINING", "DISJOINT", "DO", "DOC", "ELSE", "END", "ENTRY", "ENUM", + "EVENT", "EXHIBIT", "EXIT", "EXPOSE", "EXPR", "FALSE", "FEATURE", "FEATURED", + "FEATURING", "FILTER", "FIRST", "FLOW", "FOR", "FORK", "FRAME", "FROM", + "FUNCTION", "HASTYPE", "IF", "IMPLIES", "IMPORT", "IN", "INCLUDE", "INDIVIDUAL", + "INOUT", "INTERACTION", "INTERFACE", "INTERSECTS", "INV", "INVERSE", "INVERTING", + "ISTYPE", "ITEM", "JOIN", "LANGUAGE", "LIBRARY", "LOCALE", "LOOP", "MEMBER", + "MERGE", "MESSAGE", "META", "METACLASS", "METADATA", "MULTIPLICITY", "NAMESPACE", + "NEW", "NONUNIQUE", "NOT", "NULL", "OBJECTIVE", "OCCURRENCE", "OF", "OR", + "ORDERED", "OUT", "PACKAGE", "PARALLEL", "PART", "PERFORM", "PORT", "PORTION", + "PREDICATE", "PRIVATE", "PROTECTED", "PUBLIC", "REDEFINES", "REDEFINITION", + "REF", "REFERENCES", "RENDER", "RENDERING", "REP", "REQUIRE", "REQUIREMENT", + "RETURN", "SATISFY", "SEND", "SNAPSHOT", "SPECIALIZATION", "SPECIALIZES", + "STAKEHOLDER", "STANDARD", "STATE", "STEP", "STRUCT", "SUBCLASSIFIER", + "SUBJECT", "SUBSET", "SUBSETS", "SUBTYPE", "SUCCESSION", "TERMINATE", + "THEN", "TIMESLICE", "TO", "TRANSITION", "TRUE", "TYPE", "TYPED", "TYPING", + "UNIONS", "UNTIL", "USE", "VAR", "VARIANT", "VARIATION", "VERIFICATION", + "VERIFY", "VIA", "VIEW", "VIEWPOINT", "WHEN", "WHILE", "XOR", "BANG_EQ_EQ", + "COLON_COLON_GT", "COLON_GT_GT", "EQ_EQ_EQ", "BANG_EQ", "STAR_STAR", "ARROW", + "DOT_DOT", "DOT_QUESTION", "COLON_COLON", "COLON_EQ", "COLON_GT", "LE", + "EQ_EQ", "FAT_ARROW", "GE", "QUESTION_QUESTION", "AT_AT", "HASH", "DOLLAR", + "PERCENT", "AMP", "LPAREN", "RPAREN", "STAR", "PLUS", "COMMA", "MINUS", + "DOT", "SLASH", "COLON", "SEMI", "LT", "EQ", "GT", "QUESTION", "AT_SIGN", + "LBRACK", "RBRACK", "CARET", "LBRACE", "PIPE", "RBRACE", "TILDE", "IDENTIFIER", + "STRING", "DOUBLE_STRING", "INTEGER", "REAL", "REGULAR_COMMENT", "SINGLE_LINE_NOTE", + "BARE_LINE_COMMENT", "WS" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "SysMLv2Lexer.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override string[] ChannelNames { get { return channelNames; } } + + public override string[] ModeNames { get { return modeNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static SysMLv2Lexer() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + private static int[] _serializedATN = { + 4,0,226,1971,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2, + 14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2, + 21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2, + 28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2, + 35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2, + 42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2, + 49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2, + 56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2, + 63,7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2, + 70,7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2, + 77,7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2, + 84,7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2, + 91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2, + 98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104, + 7,104,2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110, + 7,110,2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116, + 7,116,2,117,7,117,2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122, + 7,122,2,123,7,123,2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128, + 7,128,2,129,7,129,2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134, + 7,134,2,135,7,135,2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140, + 7,140,2,141,7,141,2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146, + 7,146,2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152, + 7,152,2,153,7,153,2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158, + 7,158,2,159,7,159,2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164, + 7,164,2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170, + 7,170,2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176, + 7,176,2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182, + 7,182,2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188, + 7,188,2,189,7,189,2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194, + 7,194,2,195,7,195,2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200, + 7,200,2,201,7,201,2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206, + 7,206,2,207,7,207,2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212, + 7,212,2,213,7,213,2,214,7,214,2,215,7,215,2,216,7,216,2,217,7,217,2,218, + 7,218,2,219,7,219,2,220,7,220,2,221,7,221,2,222,7,222,2,223,7,223,2,224, + 7,224,2,225,7,225,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1, + 4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,7, + 1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1, + 9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11, + 1,11,1,11,1,11,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14, + 1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18, + 1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20, + 1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22, + 1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25, + 1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27, + 1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,29,1,29, + 1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32, + 1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33, + 1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34, + 1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36, + 1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37, + 1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39, + 1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40, + 1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,42,1,42, + 1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44, + 1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46, + 1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,48, + 1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49, + 1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50, + 1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52, + 1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,56, + 1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58, + 1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60, + 1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,63, + 1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,65, + 1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,66, + 1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68, + 1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,71,1,71, + 1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,73,1,73,1,73, + 1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75, + 1,75,1,75,1,75,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77, + 1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,80,1,80,1,80,1,80, + 1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81, + 1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,1,83,1,83, + 1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84, + 1,84,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,86,1,86, + 1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,88, + 1,88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,90, + 1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,92, + 1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,94,1,94, + 1,94,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96, + 1,96,1,96,1,96,1,97,1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,98, + 1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,100,1,100,1,100,1,100,1,100, + 1,100,1,100,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,101,1,101, + 1,101,1,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102, + 1,102,1,102,1,102,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, + 1,103,1,104,1,104,1,104,1,104,1,105,1,105,1,105,1,105,1,105,1,105,1,105, + 1,105,1,105,1,105,1,106,1,106,1,106,1,106,1,107,1,107,1,107,1,107,1,107, + 1,108,1,108,1,108,1,108,1,108,1,108,1,108,1,108,1,108,1,108,1,109,1,109, + 1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,110,1,110,1,110, + 1,111,1,111,1,111,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,113, + 1,113,1,113,1,113,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,115, + 1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,116,1,116,1,116,1,116, + 1,116,1,117,1,117,1,117,1,117,1,117,1,117,1,117,1,117,1,118,1,118,1,118, + 1,118,1,118,1,119,1,119,1,119,1,119,1,119,1,119,1,119,1,119,1,120,1,120, + 1,120,1,120,1,120,1,120,1,120,1,120,1,120,1,120,1,121,1,121,1,121,1,121, + 1,121,1,121,1,121,1,121,1,122,1,122,1,122,1,122,1,122,1,122,1,122,1,122, + 1,122,1,122,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,124,1,124,1,124, + 1,124,1,124,1,124,1,124,1,124,1,124,1,124,1,125,1,125,1,125,1,125,1,125, + 1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,126,1,126,1,126,1,126, + 1,127,1,127,1,127,1,127,1,127,1,127,1,127,1,127,1,127,1,127,1,127,1,128, + 1,128,1,128,1,128,1,128,1,128,1,128,1,129,1,129,1,129,1,129,1,129,1,129, + 1,129,1,129,1,129,1,129,1,130,1,130,1,130,1,130,1,131,1,131,1,131,1,131, + 1,131,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,132,1,132,1,132,1,132, + 1,132,1,132,1,132,1,132,1,133,1,133,1,133,1,133,1,133,1,133,1,133,1,134, + 1,134,1,134,1,134,1,134,1,134,1,134,1,134,1,135,1,135,1,135,1,135,1,135, + 1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,137,1,137,1,137, + 1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,137, + 1,138,1,138,1,138,1,138,1,138,1,138,1,138,1,138,1,138,1,138,1,138,1,138, + 1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139, + 1,140,1,140,1,140,1,140,1,140,1,140,1,140,1,140,1,140,1,141,1,141,1,141, + 1,141,1,141,1,141,1,142,1,142,1,142,1,142,1,142,1,143,1,143,1,143,1,143, + 1,143,1,143,1,143,1,144,1,144,1,144,1,144,1,144,1,144,1,144,1,144,1,144, + 1,144,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,145,1,145,1,145,1,145, + 1,145,1,146,1,146,1,146,1,146,1,146,1,146,1,146,1,147,1,147,1,147,1,147, + 1,147,1,147,1,147,1,147,1,148,1,148,1,148,1,148,1,148,1,148,1,148,1,148, + 1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,150, + 1,150,1,150,1,150,1,150,1,150,1,150,1,150,1,150,1,150,1,151,1,151,1,151, + 1,151,1,151,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152, + 1,153,1,153,1,153,1,154,1,154,1,154,1,154,1,154,1,154,1,154,1,154,1,154, + 1,154,1,154,1,155,1,155,1,155,1,155,1,155,1,156,1,156,1,156,1,156,1,156, + 1,157,1,157,1,157,1,157,1,157,1,157,1,158,1,158,1,158,1,158,1,158,1,158, + 1,158,1,159,1,159,1,159,1,159,1,159,1,159,1,159,1,160,1,160,1,160,1,160, + 1,160,1,160,1,161,1,161,1,161,1,161,1,162,1,162,1,162,1,162,1,163,1,163, + 1,163,1,163,1,163,1,163,1,163,1,163,1,164,1,164,1,164,1,164,1,164,1,164, + 1,164,1,164,1,164,1,164,1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,165, + 1,165,1,165,1,165,1,165,1,165,1,166,1,166,1,166,1,166,1,166,1,166,1,166, + 1,167,1,167,1,167,1,167,1,168,1,168,1,168,1,168,1,168,1,169,1,169,1,169, + 1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,170,1,170,1,170,1,170,1,170, + 1,171,1,171,1,171,1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,173,1,173, + 1,173,1,173,1,174,1,174,1,174,1,174,1,175,1,175,1,175,1,175,1,176,1,176, + 1,176,1,176,1,177,1,177,1,177,1,178,1,178,1,178,1,179,1,179,1,179,1,180, + 1,180,1,180,1,181,1,181,1,181,1,182,1,182,1,182,1,183,1,183,1,183,1,184, + 1,184,1,184,1,185,1,185,1,185,1,186,1,186,1,186,1,187,1,187,1,187,1,188, + 1,188,1,188,1,189,1,189,1,189,1,190,1,190,1,190,1,191,1,191,1,192,1,192, + 1,193,1,193,1,194,1,194,1,195,1,195,1,196,1,196,1,197,1,197,1,198,1,198, + 1,199,1,199,1,200,1,200,1,201,1,201,1,202,1,202,1,203,1,203,1,204,1,204, + 1,205,1,205,1,206,1,206,1,207,1,207,1,208,1,208,1,209,1,209,1,210,1,210, + 1,211,1,211,1,212,1,212,1,213,1,213,1,214,1,214,1,215,1,215,1,216,1,216, + 1,217,1,217,5,217,1852,8,217,10,217,12,217,1855,9,217,1,218,1,218,1,218, + 1,218,5,218,1861,8,218,10,218,12,218,1864,9,218,1,218,1,218,1,219,1,219, + 1,219,1,219,5,219,1872,8,219,10,219,12,219,1875,9,219,1,219,1,219,1,220, + 4,220,1880,8,220,11,220,12,220,1881,1,221,5,221,1885,8,221,10,221,12,221, + 1888,9,221,1,221,1,221,4,221,1892,8,221,11,221,12,221,1893,1,221,1,221, + 3,221,1898,8,221,1,221,4,221,1901,8,221,11,221,12,221,1902,3,221,1905, + 8,221,1,221,4,221,1908,8,221,11,221,12,221,1909,1,221,1,221,3,221,1914, + 8,221,1,221,4,221,1917,8,221,11,221,12,221,1918,3,221,1921,8,221,1,222, + 1,222,1,222,1,222,5,222,1927,8,222,10,222,12,222,1930,9,222,1,222,1,222, + 1,222,1,222,1,222,1,222,1,222,5,222,1939,8,222,10,222,12,222,1942,9,222, + 1,222,1,222,3,222,1946,8,222,1,223,1,223,1,223,1,223,1,223,5,223,1953, + 8,223,10,223,12,223,1956,9,223,1,223,1,223,1,224,1,224,1,224,1,224,1,224, + 1,225,4,225,1966,8,225,11,225,12,225,1967,1,225,1,225,2,1928,1940,0,226, + 1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14, + 29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26, + 53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38, + 77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50, + 101,51,103,52,105,53,107,54,109,55,111,56,113,57,115,58,117,59,119,60, + 121,61,123,62,125,63,127,64,129,65,131,66,133,67,135,68,137,69,139,70, + 141,71,143,72,145,73,147,74,149,75,151,76,153,77,155,78,157,79,159,80, + 161,81,163,82,165,83,167,84,169,85,171,86,173,87,175,88,177,89,179,90, + 181,91,183,92,185,93,187,94,189,95,191,96,193,97,195,98,197,99,199,100, + 201,101,203,102,205,103,207,104,209,105,211,106,213,107,215,108,217,109, + 219,110,221,111,223,112,225,113,227,114,229,115,231,116,233,117,235,118, + 237,119,239,120,241,121,243,122,245,123,247,124,249,125,251,126,253,127, + 255,128,257,129,259,130,261,131,263,132,265,133,267,134,269,135,271,136, + 273,137,275,138,277,139,279,140,281,141,283,142,285,143,287,144,289,145, + 291,146,293,147,295,148,297,149,299,150,301,151,303,152,305,153,307,154, + 309,155,311,156,313,157,315,158,317,159,319,160,321,161,323,162,325,163, + 327,164,329,165,331,166,333,167,335,168,337,169,339,170,341,171,343,172, + 345,173,347,174,349,175,351,176,353,177,355,178,357,179,359,180,361,181, + 363,182,365,183,367,184,369,185,371,186,373,187,375,188,377,189,379,190, + 381,191,383,192,385,193,387,194,389,195,391,196,393,197,395,198,397,199, + 399,200,401,201,403,202,405,203,407,204,409,205,411,206,413,207,415,208, + 417,209,419,210,421,211,423,212,425,213,427,214,429,215,431,216,433,217, + 435,218,437,219,439,220,441,221,443,222,445,223,447,224,449,225,451,226, + 1,0,10,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,2,0,39,39,92, + 92,2,0,34,34,92,92,1,0,48,57,2,0,69,69,101,101,2,0,43,43,45,45,3,0,10, + 10,13,13,42,42,2,0,10,10,13,13,3,0,9,10,13,13,32,32,1990,0,1,1,0,0,0,0, + 3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0, + 0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25, + 1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0, + 0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47, + 1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0, + 0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69, + 1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0, + 0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91, + 1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0, + 0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0, + 0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0, + 0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0, + 0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0, + 0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0, + 0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0, + 0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0, + 0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0, + 0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0, + 0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0, + 0,0,0,203,1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0, + 0,0,0,213,1,0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0, + 0,0,0,223,1,0,0,0,0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231,1,0, + 0,0,0,233,1,0,0,0,0,235,1,0,0,0,0,237,1,0,0,0,0,239,1,0,0,0,0,241,1,0, + 0,0,0,243,1,0,0,0,0,245,1,0,0,0,0,247,1,0,0,0,0,249,1,0,0,0,0,251,1,0, + 0,0,0,253,1,0,0,0,0,255,1,0,0,0,0,257,1,0,0,0,0,259,1,0,0,0,0,261,1,0, + 0,0,0,263,1,0,0,0,0,265,1,0,0,0,0,267,1,0,0,0,0,269,1,0,0,0,0,271,1,0, + 0,0,0,273,1,0,0,0,0,275,1,0,0,0,0,277,1,0,0,0,0,279,1,0,0,0,0,281,1,0, + 0,0,0,283,1,0,0,0,0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291,1,0, + 0,0,0,293,1,0,0,0,0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1,0, + 0,0,0,303,1,0,0,0,0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311,1,0, + 0,0,0,313,1,0,0,0,0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321,1,0, + 0,0,0,323,1,0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331,1,0, + 0,0,0,333,1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341,1,0, + 0,0,0,343,1,0,0,0,0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351,1,0, + 0,0,0,353,1,0,0,0,0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0,0,0,361,1,0, + 0,0,0,363,1,0,0,0,0,365,1,0,0,0,0,367,1,0,0,0,0,369,1,0,0,0,0,371,1,0, + 0,0,0,373,1,0,0,0,0,375,1,0,0,0,0,377,1,0,0,0,0,379,1,0,0,0,0,381,1,0, + 0,0,0,383,1,0,0,0,0,385,1,0,0,0,0,387,1,0,0,0,0,389,1,0,0,0,0,391,1,0, + 0,0,0,393,1,0,0,0,0,395,1,0,0,0,0,397,1,0,0,0,0,399,1,0,0,0,0,401,1,0, + 0,0,0,403,1,0,0,0,0,405,1,0,0,0,0,407,1,0,0,0,0,409,1,0,0,0,0,411,1,0, + 0,0,0,413,1,0,0,0,0,415,1,0,0,0,0,417,1,0,0,0,0,419,1,0,0,0,0,421,1,0, + 0,0,0,423,1,0,0,0,0,425,1,0,0,0,0,427,1,0,0,0,0,429,1,0,0,0,0,431,1,0, + 0,0,0,433,1,0,0,0,0,435,1,0,0,0,0,437,1,0,0,0,0,439,1,0,0,0,0,441,1,0, + 0,0,0,443,1,0,0,0,0,445,1,0,0,0,0,447,1,0,0,0,0,449,1,0,0,0,0,451,1,0, + 0,0,1,453,1,0,0,0,3,459,1,0,0,0,5,468,1,0,0,0,7,475,1,0,0,0,9,482,1,0, + 0,0,11,488,1,0,0,0,13,494,1,0,0,0,15,500,1,0,0,0,17,504,1,0,0,0,19,513, + 1,0,0,0,21,524,1,0,0,0,23,533,1,0,0,0,25,537,1,0,0,0,27,540,1,0,0,0,29, + 547,1,0,0,0,31,554,1,0,0,0,33,560,1,0,0,0,35,567,1,0,0,0,37,570,1,0,0, + 0,39,580,1,0,0,0,41,589,1,0,0,0,43,594,1,0,0,0,45,602,1,0,0,0,47,607,1, + 0,0,0,49,610,1,0,0,0,51,615,1,0,0,0,53,620,1,0,0,0,55,627,1,0,0,0,57,633, + 1,0,0,0,59,644,1,0,0,0,61,652,1,0,0,0,63,662,1,0,0,0,65,670,1,0,0,0,67, + 680,1,0,0,0,69,691,1,0,0,0,71,703,1,0,0,0,73,711,1,0,0,0,75,722,1,0,0, + 0,77,732,1,0,0,0,79,738,1,0,0,0,81,747,1,0,0,0,83,758,1,0,0,0,85,766,1, + 0,0,0,87,775,1,0,0,0,89,782,1,0,0,0,91,786,1,0,0,0,93,794,1,0,0,0,95,802, + 1,0,0,0,97,813,1,0,0,0,99,821,1,0,0,0,101,833,1,0,0,0,103,844,1,0,0,0, + 105,853,1,0,0,0,107,856,1,0,0,0,109,860,1,0,0,0,111,865,1,0,0,0,113,869, + 1,0,0,0,115,875,1,0,0,0,117,880,1,0,0,0,119,886,1,0,0,0,121,894,1,0,0, + 0,123,899,1,0,0,0,125,906,1,0,0,0,127,911,1,0,0,0,129,917,1,0,0,0,131, + 925,1,0,0,0,133,934,1,0,0,0,135,944,1,0,0,0,137,951,1,0,0,0,139,957,1, + 0,0,0,141,962,1,0,0,0,143,966,1,0,0,0,145,971,1,0,0,0,147,977,1,0,0,0, + 149,982,1,0,0,0,151,991,1,0,0,0,153,999,1,0,0,0,155,1002,1,0,0,0,157,1010, + 1,0,0,0,159,1017,1,0,0,0,161,1020,1,0,0,0,163,1028,1,0,0,0,165,1039,1, + 0,0,0,167,1045,1,0,0,0,169,1057,1,0,0,0,171,1067,1,0,0,0,173,1078,1,0, + 0,0,175,1082,1,0,0,0,177,1090,1,0,0,0,179,1100,1,0,0,0,181,1107,1,0,0, + 0,183,1112,1,0,0,0,185,1117,1,0,0,0,187,1126,1,0,0,0,189,1134,1,0,0,0, + 191,1141,1,0,0,0,193,1146,1,0,0,0,195,1153,1,0,0,0,197,1159,1,0,0,0,199, + 1167,1,0,0,0,201,1172,1,0,0,0,203,1182,1,0,0,0,205,1191,1,0,0,0,207,1204, + 1,0,0,0,209,1214,1,0,0,0,211,1218,1,0,0,0,213,1228,1,0,0,0,215,1232,1, + 0,0,0,217,1237,1,0,0,0,219,1247,1,0,0,0,221,1258,1,0,0,0,223,1261,1,0, + 0,0,225,1264,1,0,0,0,227,1272,1,0,0,0,229,1276,1,0,0,0,231,1284,1,0,0, + 0,233,1293,1,0,0,0,235,1298,1,0,0,0,237,1306,1,0,0,0,239,1311,1,0,0,0, + 241,1319,1,0,0,0,243,1329,1,0,0,0,245,1337,1,0,0,0,247,1347,1,0,0,0,249, + 1354,1,0,0,0,251,1364,1,0,0,0,253,1377,1,0,0,0,255,1381,1,0,0,0,257,1392, + 1,0,0,0,259,1399,1,0,0,0,261,1409,1,0,0,0,263,1413,1,0,0,0,265,1421,1, + 0,0,0,267,1433,1,0,0,0,269,1440,1,0,0,0,271,1448,1,0,0,0,273,1453,1,0, + 0,0,275,1462,1,0,0,0,277,1477,1,0,0,0,279,1489,1,0,0,0,281,1501,1,0,0, + 0,283,1510,1,0,0,0,285,1516,1,0,0,0,287,1521,1,0,0,0,289,1528,1,0,0,0, + 291,1542,1,0,0,0,293,1550,1,0,0,0,295,1557,1,0,0,0,297,1565,1,0,0,0,299, + 1573,1,0,0,0,301,1584,1,0,0,0,303,1594,1,0,0,0,305,1599,1,0,0,0,307,1609, + 1,0,0,0,309,1612,1,0,0,0,311,1623,1,0,0,0,313,1628,1,0,0,0,315,1633,1, + 0,0,0,317,1639,1,0,0,0,319,1646,1,0,0,0,321,1653,1,0,0,0,323,1659,1,0, + 0,0,325,1663,1,0,0,0,327,1667,1,0,0,0,329,1675,1,0,0,0,331,1685,1,0,0, + 0,333,1698,1,0,0,0,335,1705,1,0,0,0,337,1709,1,0,0,0,339,1714,1,0,0,0, + 341,1724,1,0,0,0,343,1729,1,0,0,0,345,1735,1,0,0,0,347,1739,1,0,0,0,349, + 1743,1,0,0,0,351,1747,1,0,0,0,353,1751,1,0,0,0,355,1755,1,0,0,0,357,1758, + 1,0,0,0,359,1761,1,0,0,0,361,1764,1,0,0,0,363,1767,1,0,0,0,365,1770,1, + 0,0,0,367,1773,1,0,0,0,369,1776,1,0,0,0,371,1779,1,0,0,0,373,1782,1,0, + 0,0,375,1785,1,0,0,0,377,1788,1,0,0,0,379,1791,1,0,0,0,381,1794,1,0,0, + 0,383,1797,1,0,0,0,385,1799,1,0,0,0,387,1801,1,0,0,0,389,1803,1,0,0,0, + 391,1805,1,0,0,0,393,1807,1,0,0,0,395,1809,1,0,0,0,397,1811,1,0,0,0,399, + 1813,1,0,0,0,401,1815,1,0,0,0,403,1817,1,0,0,0,405,1819,1,0,0,0,407,1821, + 1,0,0,0,409,1823,1,0,0,0,411,1825,1,0,0,0,413,1827,1,0,0,0,415,1829,1, + 0,0,0,417,1831,1,0,0,0,419,1833,1,0,0,0,421,1835,1,0,0,0,423,1837,1,0, + 0,0,425,1839,1,0,0,0,427,1841,1,0,0,0,429,1843,1,0,0,0,431,1845,1,0,0, + 0,433,1847,1,0,0,0,435,1849,1,0,0,0,437,1856,1,0,0,0,439,1867,1,0,0,0, + 441,1879,1,0,0,0,443,1920,1,0,0,0,445,1945,1,0,0,0,447,1947,1,0,0,0,449, + 1959,1,0,0,0,451,1965,1,0,0,0,453,454,5,97,0,0,454,455,5,98,0,0,455,456, + 5,111,0,0,456,457,5,117,0,0,457,458,5,116,0,0,458,2,1,0,0,0,459,460,5, + 97,0,0,460,461,5,98,0,0,461,462,5,115,0,0,462,463,5,116,0,0,463,464,5, + 114,0,0,464,465,5,97,0,0,465,466,5,99,0,0,466,467,5,116,0,0,467,4,1,0, + 0,0,468,469,5,97,0,0,469,470,5,99,0,0,470,471,5,99,0,0,471,472,5,101,0, + 0,472,473,5,112,0,0,473,474,5,116,0,0,474,6,1,0,0,0,475,476,5,97,0,0,476, + 477,5,99,0,0,477,478,5,116,0,0,478,479,5,105,0,0,479,480,5,111,0,0,480, + 481,5,110,0,0,481,8,1,0,0,0,482,483,5,97,0,0,483,484,5,99,0,0,484,485, + 5,116,0,0,485,486,5,111,0,0,486,487,5,114,0,0,487,10,1,0,0,0,488,489,5, + 97,0,0,489,490,5,102,0,0,490,491,5,116,0,0,491,492,5,101,0,0,492,493,5, + 114,0,0,493,12,1,0,0,0,494,495,5,97,0,0,495,496,5,108,0,0,496,497,5,105, + 0,0,497,498,5,97,0,0,498,499,5,115,0,0,499,14,1,0,0,0,500,501,5,97,0,0, + 501,502,5,108,0,0,502,503,5,108,0,0,503,16,1,0,0,0,504,505,5,97,0,0,505, + 506,5,108,0,0,506,507,5,108,0,0,507,508,5,111,0,0,508,509,5,99,0,0,509, + 510,5,97,0,0,510,511,5,116,0,0,511,512,5,101,0,0,512,18,1,0,0,0,513,514, + 5,97,0,0,514,515,5,108,0,0,515,516,5,108,0,0,516,517,5,111,0,0,517,518, + 5,99,0,0,518,519,5,97,0,0,519,520,5,116,0,0,520,521,5,105,0,0,521,522, + 5,111,0,0,522,523,5,110,0,0,523,20,1,0,0,0,524,525,5,97,0,0,525,526,5, + 110,0,0,526,527,5,97,0,0,527,528,5,108,0,0,528,529,5,121,0,0,529,530,5, + 115,0,0,530,531,5,105,0,0,531,532,5,115,0,0,532,22,1,0,0,0,533,534,5,97, + 0,0,534,535,5,110,0,0,535,536,5,100,0,0,536,24,1,0,0,0,537,538,5,97,0, + 0,538,539,5,115,0,0,539,26,1,0,0,0,540,541,5,97,0,0,541,542,5,115,0,0, + 542,543,5,115,0,0,543,544,5,101,0,0,544,545,5,114,0,0,545,546,5,116,0, + 0,546,28,1,0,0,0,547,548,5,97,0,0,548,549,5,115,0,0,549,550,5,115,0,0, + 550,551,5,105,0,0,551,552,5,103,0,0,552,553,5,110,0,0,553,30,1,0,0,0,554, + 555,5,97,0,0,555,556,5,115,0,0,556,557,5,115,0,0,557,558,5,111,0,0,558, + 559,5,99,0,0,559,32,1,0,0,0,560,561,5,97,0,0,561,562,5,115,0,0,562,563, + 5,115,0,0,563,564,5,117,0,0,564,565,5,109,0,0,565,566,5,101,0,0,566,34, + 1,0,0,0,567,568,5,97,0,0,568,569,5,116,0,0,569,36,1,0,0,0,570,571,5,97, + 0,0,571,572,5,116,0,0,572,573,5,116,0,0,573,574,5,114,0,0,574,575,5,105, + 0,0,575,576,5,98,0,0,576,577,5,117,0,0,577,578,5,116,0,0,578,579,5,101, + 0,0,579,38,1,0,0,0,580,581,5,98,0,0,581,582,5,101,0,0,582,583,5,104,0, + 0,583,584,5,97,0,0,584,585,5,118,0,0,585,586,5,105,0,0,586,587,5,111,0, + 0,587,588,5,114,0,0,588,40,1,0,0,0,589,590,5,98,0,0,590,591,5,105,0,0, + 591,592,5,110,0,0,592,593,5,100,0,0,593,42,1,0,0,0,594,595,5,98,0,0,595, + 596,5,105,0,0,596,597,5,110,0,0,597,598,5,100,0,0,598,599,5,105,0,0,599, + 600,5,110,0,0,600,601,5,103,0,0,601,44,1,0,0,0,602,603,5,98,0,0,603,604, + 5,111,0,0,604,605,5,111,0,0,605,606,5,108,0,0,606,46,1,0,0,0,607,608,5, + 98,0,0,608,609,5,121,0,0,609,48,1,0,0,0,610,611,5,99,0,0,611,612,5,97, + 0,0,612,613,5,108,0,0,613,614,5,99,0,0,614,50,1,0,0,0,615,616,5,99,0,0, + 616,617,5,97,0,0,617,618,5,115,0,0,618,619,5,101,0,0,619,52,1,0,0,0,620, + 621,5,99,0,0,621,622,5,104,0,0,622,623,5,97,0,0,623,624,5,105,0,0,624, + 625,5,110,0,0,625,626,5,115,0,0,626,54,1,0,0,0,627,628,5,99,0,0,628,629, + 5,108,0,0,629,630,5,97,0,0,630,631,5,115,0,0,631,632,5,115,0,0,632,56, + 1,0,0,0,633,634,5,99,0,0,634,635,5,108,0,0,635,636,5,97,0,0,636,637,5, + 115,0,0,637,638,5,115,0,0,638,639,5,105,0,0,639,640,5,102,0,0,640,641, + 5,105,0,0,641,642,5,101,0,0,642,643,5,114,0,0,643,58,1,0,0,0,644,645,5, + 99,0,0,645,646,5,111,0,0,646,647,5,109,0,0,647,648,5,109,0,0,648,649,5, + 101,0,0,649,650,5,110,0,0,650,651,5,116,0,0,651,60,1,0,0,0,652,653,5,99, + 0,0,653,654,5,111,0,0,654,655,5,109,0,0,655,656,5,112,0,0,656,657,5,111, + 0,0,657,658,5,115,0,0,658,659,5,105,0,0,659,660,5,116,0,0,660,661,5,101, + 0,0,661,62,1,0,0,0,662,663,5,99,0,0,663,664,5,111,0,0,664,665,5,110,0, + 0,665,666,5,99,0,0,666,667,5,101,0,0,667,668,5,114,0,0,668,669,5,110,0, + 0,669,64,1,0,0,0,670,671,5,99,0,0,671,672,5,111,0,0,672,673,5,110,0,0, + 673,674,5,106,0,0,674,675,5,117,0,0,675,676,5,103,0,0,676,677,5,97,0,0, + 677,678,5,116,0,0,678,679,5,101,0,0,679,66,1,0,0,0,680,681,5,99,0,0,681, + 682,5,111,0,0,682,683,5,110,0,0,683,684,5,106,0,0,684,685,5,117,0,0,685, + 686,5,103,0,0,686,687,5,97,0,0,687,688,5,116,0,0,688,689,5,101,0,0,689, + 690,5,115,0,0,690,68,1,0,0,0,691,692,5,99,0,0,692,693,5,111,0,0,693,694, + 5,110,0,0,694,695,5,106,0,0,695,696,5,117,0,0,696,697,5,103,0,0,697,698, + 5,97,0,0,698,699,5,116,0,0,699,700,5,105,0,0,700,701,5,111,0,0,701,702, + 5,110,0,0,702,70,1,0,0,0,703,704,5,99,0,0,704,705,5,111,0,0,705,706,5, + 110,0,0,706,707,5,110,0,0,707,708,5,101,0,0,708,709,5,99,0,0,709,710,5, + 116,0,0,710,72,1,0,0,0,711,712,5,99,0,0,712,713,5,111,0,0,713,714,5,110, + 0,0,714,715,5,110,0,0,715,716,5,101,0,0,716,717,5,99,0,0,717,718,5,116, + 0,0,718,719,5,105,0,0,719,720,5,111,0,0,720,721,5,110,0,0,721,74,1,0,0, + 0,722,723,5,99,0,0,723,724,5,111,0,0,724,725,5,110,0,0,725,726,5,110,0, + 0,726,727,5,101,0,0,727,728,5,99,0,0,728,729,5,116,0,0,729,730,5,111,0, + 0,730,731,5,114,0,0,731,76,1,0,0,0,732,733,5,99,0,0,733,734,5,111,0,0, + 734,735,5,110,0,0,735,736,5,115,0,0,736,737,5,116,0,0,737,78,1,0,0,0,738, + 739,5,99,0,0,739,740,5,111,0,0,740,741,5,110,0,0,741,742,5,115,0,0,742, + 743,5,116,0,0,743,744,5,97,0,0,744,745,5,110,0,0,745,746,5,116,0,0,746, + 80,1,0,0,0,747,748,5,99,0,0,748,749,5,111,0,0,749,750,5,110,0,0,750,751, + 5,115,0,0,751,752,5,116,0,0,752,753,5,114,0,0,753,754,5,97,0,0,754,755, + 5,105,0,0,755,756,5,110,0,0,756,757,5,116,0,0,757,82,1,0,0,0,758,759,5, + 99,0,0,759,760,5,114,0,0,760,761,5,111,0,0,761,762,5,115,0,0,762,763,5, + 115,0,0,763,764,5,101,0,0,764,765,5,115,0,0,765,84,1,0,0,0,766,767,5,100, + 0,0,767,768,5,97,0,0,768,769,5,116,0,0,769,770,5,97,0,0,770,771,5,116, + 0,0,771,772,5,121,0,0,772,773,5,112,0,0,773,774,5,101,0,0,774,86,1,0,0, + 0,775,776,5,100,0,0,776,777,5,101,0,0,777,778,5,99,0,0,778,779,5,105,0, + 0,779,780,5,100,0,0,780,781,5,101,0,0,781,88,1,0,0,0,782,783,5,100,0,0, + 783,784,5,101,0,0,784,785,5,102,0,0,785,90,1,0,0,0,786,787,5,100,0,0,787, + 788,5,101,0,0,788,789,5,102,0,0,789,790,5,97,0,0,790,791,5,117,0,0,791, + 792,5,108,0,0,792,793,5,116,0,0,793,92,1,0,0,0,794,795,5,100,0,0,795,796, + 5,101,0,0,796,797,5,102,0,0,797,798,5,105,0,0,798,799,5,110,0,0,799,800, + 5,101,0,0,800,801,5,100,0,0,801,94,1,0,0,0,802,803,5,100,0,0,803,804,5, + 101,0,0,804,805,5,112,0,0,805,806,5,101,0,0,806,807,5,110,0,0,807,808, + 5,100,0,0,808,809,5,101,0,0,809,810,5,110,0,0,810,811,5,99,0,0,811,812, + 5,121,0,0,812,96,1,0,0,0,813,814,5,100,0,0,814,815,5,101,0,0,815,816,5, + 114,0,0,816,817,5,105,0,0,817,818,5,118,0,0,818,819,5,101,0,0,819,820, + 5,100,0,0,820,98,1,0,0,0,821,822,5,100,0,0,822,823,5,105,0,0,823,824,5, + 102,0,0,824,825,5,102,0,0,825,826,5,101,0,0,826,827,5,114,0,0,827,828, + 5,101,0,0,828,829,5,110,0,0,829,830,5,99,0,0,830,831,5,101,0,0,831,832, + 5,115,0,0,832,100,1,0,0,0,833,834,5,100,0,0,834,835,5,105,0,0,835,836, + 5,115,0,0,836,837,5,106,0,0,837,838,5,111,0,0,838,839,5,105,0,0,839,840, + 5,110,0,0,840,841,5,105,0,0,841,842,5,110,0,0,842,843,5,103,0,0,843,102, + 1,0,0,0,844,845,5,100,0,0,845,846,5,105,0,0,846,847,5,115,0,0,847,848, + 5,106,0,0,848,849,5,111,0,0,849,850,5,105,0,0,850,851,5,110,0,0,851,852, + 5,116,0,0,852,104,1,0,0,0,853,854,5,100,0,0,854,855,5,111,0,0,855,106, + 1,0,0,0,856,857,5,100,0,0,857,858,5,111,0,0,858,859,5,99,0,0,859,108,1, + 0,0,0,860,861,5,101,0,0,861,862,5,108,0,0,862,863,5,115,0,0,863,864,5, + 101,0,0,864,110,1,0,0,0,865,866,5,101,0,0,866,867,5,110,0,0,867,868,5, + 100,0,0,868,112,1,0,0,0,869,870,5,101,0,0,870,871,5,110,0,0,871,872,5, + 116,0,0,872,873,5,114,0,0,873,874,5,121,0,0,874,114,1,0,0,0,875,876,5, + 101,0,0,876,877,5,110,0,0,877,878,5,117,0,0,878,879,5,109,0,0,879,116, + 1,0,0,0,880,881,5,101,0,0,881,882,5,118,0,0,882,883,5,101,0,0,883,884, + 5,110,0,0,884,885,5,116,0,0,885,118,1,0,0,0,886,887,5,101,0,0,887,888, + 5,120,0,0,888,889,5,104,0,0,889,890,5,105,0,0,890,891,5,98,0,0,891,892, + 5,105,0,0,892,893,5,116,0,0,893,120,1,0,0,0,894,895,5,101,0,0,895,896, + 5,120,0,0,896,897,5,105,0,0,897,898,5,116,0,0,898,122,1,0,0,0,899,900, + 5,101,0,0,900,901,5,120,0,0,901,902,5,112,0,0,902,903,5,111,0,0,903,904, + 5,115,0,0,904,905,5,101,0,0,905,124,1,0,0,0,906,907,5,101,0,0,907,908, + 5,120,0,0,908,909,5,112,0,0,909,910,5,114,0,0,910,126,1,0,0,0,911,912, + 5,102,0,0,912,913,5,97,0,0,913,914,5,108,0,0,914,915,5,115,0,0,915,916, + 5,101,0,0,916,128,1,0,0,0,917,918,5,102,0,0,918,919,5,101,0,0,919,920, + 5,97,0,0,920,921,5,116,0,0,921,922,5,117,0,0,922,923,5,114,0,0,923,924, + 5,101,0,0,924,130,1,0,0,0,925,926,5,102,0,0,926,927,5,101,0,0,927,928, + 5,97,0,0,928,929,5,116,0,0,929,930,5,117,0,0,930,931,5,114,0,0,931,932, + 5,101,0,0,932,933,5,100,0,0,933,132,1,0,0,0,934,935,5,102,0,0,935,936, + 5,101,0,0,936,937,5,97,0,0,937,938,5,116,0,0,938,939,5,117,0,0,939,940, + 5,114,0,0,940,941,5,105,0,0,941,942,5,110,0,0,942,943,5,103,0,0,943,134, + 1,0,0,0,944,945,5,102,0,0,945,946,5,105,0,0,946,947,5,108,0,0,947,948, + 5,116,0,0,948,949,5,101,0,0,949,950,5,114,0,0,950,136,1,0,0,0,951,952, + 5,102,0,0,952,953,5,105,0,0,953,954,5,114,0,0,954,955,5,115,0,0,955,956, + 5,116,0,0,956,138,1,0,0,0,957,958,5,102,0,0,958,959,5,108,0,0,959,960, + 5,111,0,0,960,961,5,119,0,0,961,140,1,0,0,0,962,963,5,102,0,0,963,964, + 5,111,0,0,964,965,5,114,0,0,965,142,1,0,0,0,966,967,5,102,0,0,967,968, + 5,111,0,0,968,969,5,114,0,0,969,970,5,107,0,0,970,144,1,0,0,0,971,972, + 5,102,0,0,972,973,5,114,0,0,973,974,5,97,0,0,974,975,5,109,0,0,975,976, + 5,101,0,0,976,146,1,0,0,0,977,978,5,102,0,0,978,979,5,114,0,0,979,980, + 5,111,0,0,980,981,5,109,0,0,981,148,1,0,0,0,982,983,5,102,0,0,983,984, + 5,117,0,0,984,985,5,110,0,0,985,986,5,99,0,0,986,987,5,116,0,0,987,988, + 5,105,0,0,988,989,5,111,0,0,989,990,5,110,0,0,990,150,1,0,0,0,991,992, + 5,104,0,0,992,993,5,97,0,0,993,994,5,115,0,0,994,995,5,116,0,0,995,996, + 5,121,0,0,996,997,5,112,0,0,997,998,5,101,0,0,998,152,1,0,0,0,999,1000, + 5,105,0,0,1000,1001,5,102,0,0,1001,154,1,0,0,0,1002,1003,5,105,0,0,1003, + 1004,5,109,0,0,1004,1005,5,112,0,0,1005,1006,5,108,0,0,1006,1007,5,105, + 0,0,1007,1008,5,101,0,0,1008,1009,5,115,0,0,1009,156,1,0,0,0,1010,1011, + 5,105,0,0,1011,1012,5,109,0,0,1012,1013,5,112,0,0,1013,1014,5,111,0,0, + 1014,1015,5,114,0,0,1015,1016,5,116,0,0,1016,158,1,0,0,0,1017,1018,5,105, + 0,0,1018,1019,5,110,0,0,1019,160,1,0,0,0,1020,1021,5,105,0,0,1021,1022, + 5,110,0,0,1022,1023,5,99,0,0,1023,1024,5,108,0,0,1024,1025,5,117,0,0,1025, + 1026,5,100,0,0,1026,1027,5,101,0,0,1027,162,1,0,0,0,1028,1029,5,105,0, + 0,1029,1030,5,110,0,0,1030,1031,5,100,0,0,1031,1032,5,105,0,0,1032,1033, + 5,118,0,0,1033,1034,5,105,0,0,1034,1035,5,100,0,0,1035,1036,5,117,0,0, + 1036,1037,5,97,0,0,1037,1038,5,108,0,0,1038,164,1,0,0,0,1039,1040,5,105, + 0,0,1040,1041,5,110,0,0,1041,1042,5,111,0,0,1042,1043,5,117,0,0,1043,1044, + 5,116,0,0,1044,166,1,0,0,0,1045,1046,5,105,0,0,1046,1047,5,110,0,0,1047, + 1048,5,116,0,0,1048,1049,5,101,0,0,1049,1050,5,114,0,0,1050,1051,5,97, + 0,0,1051,1052,5,99,0,0,1052,1053,5,116,0,0,1053,1054,5,105,0,0,1054,1055, + 5,111,0,0,1055,1056,5,110,0,0,1056,168,1,0,0,0,1057,1058,5,105,0,0,1058, + 1059,5,110,0,0,1059,1060,5,116,0,0,1060,1061,5,101,0,0,1061,1062,5,114, + 0,0,1062,1063,5,102,0,0,1063,1064,5,97,0,0,1064,1065,5,99,0,0,1065,1066, + 5,101,0,0,1066,170,1,0,0,0,1067,1068,5,105,0,0,1068,1069,5,110,0,0,1069, + 1070,5,116,0,0,1070,1071,5,101,0,0,1071,1072,5,114,0,0,1072,1073,5,115, + 0,0,1073,1074,5,101,0,0,1074,1075,5,99,0,0,1075,1076,5,116,0,0,1076,1077, + 5,115,0,0,1077,172,1,0,0,0,1078,1079,5,105,0,0,1079,1080,5,110,0,0,1080, + 1081,5,118,0,0,1081,174,1,0,0,0,1082,1083,5,105,0,0,1083,1084,5,110,0, + 0,1084,1085,5,118,0,0,1085,1086,5,101,0,0,1086,1087,5,114,0,0,1087,1088, + 5,115,0,0,1088,1089,5,101,0,0,1089,176,1,0,0,0,1090,1091,5,105,0,0,1091, + 1092,5,110,0,0,1092,1093,5,118,0,0,1093,1094,5,101,0,0,1094,1095,5,114, + 0,0,1095,1096,5,116,0,0,1096,1097,5,105,0,0,1097,1098,5,110,0,0,1098,1099, + 5,103,0,0,1099,178,1,0,0,0,1100,1101,5,105,0,0,1101,1102,5,115,0,0,1102, + 1103,5,116,0,0,1103,1104,5,121,0,0,1104,1105,5,112,0,0,1105,1106,5,101, + 0,0,1106,180,1,0,0,0,1107,1108,5,105,0,0,1108,1109,5,116,0,0,1109,1110, + 5,101,0,0,1110,1111,5,109,0,0,1111,182,1,0,0,0,1112,1113,5,106,0,0,1113, + 1114,5,111,0,0,1114,1115,5,105,0,0,1115,1116,5,110,0,0,1116,184,1,0,0, + 0,1117,1118,5,108,0,0,1118,1119,5,97,0,0,1119,1120,5,110,0,0,1120,1121, + 5,103,0,0,1121,1122,5,117,0,0,1122,1123,5,97,0,0,1123,1124,5,103,0,0,1124, + 1125,5,101,0,0,1125,186,1,0,0,0,1126,1127,5,108,0,0,1127,1128,5,105,0, + 0,1128,1129,5,98,0,0,1129,1130,5,114,0,0,1130,1131,5,97,0,0,1131,1132, + 5,114,0,0,1132,1133,5,121,0,0,1133,188,1,0,0,0,1134,1135,5,108,0,0,1135, + 1136,5,111,0,0,1136,1137,5,99,0,0,1137,1138,5,97,0,0,1138,1139,5,108,0, + 0,1139,1140,5,101,0,0,1140,190,1,0,0,0,1141,1142,5,108,0,0,1142,1143,5, + 111,0,0,1143,1144,5,111,0,0,1144,1145,5,112,0,0,1145,192,1,0,0,0,1146, + 1147,5,109,0,0,1147,1148,5,101,0,0,1148,1149,5,109,0,0,1149,1150,5,98, + 0,0,1150,1151,5,101,0,0,1151,1152,5,114,0,0,1152,194,1,0,0,0,1153,1154, + 5,109,0,0,1154,1155,5,101,0,0,1155,1156,5,114,0,0,1156,1157,5,103,0,0, + 1157,1158,5,101,0,0,1158,196,1,0,0,0,1159,1160,5,109,0,0,1160,1161,5,101, + 0,0,1161,1162,5,115,0,0,1162,1163,5,115,0,0,1163,1164,5,97,0,0,1164,1165, + 5,103,0,0,1165,1166,5,101,0,0,1166,198,1,0,0,0,1167,1168,5,109,0,0,1168, + 1169,5,101,0,0,1169,1170,5,116,0,0,1170,1171,5,97,0,0,1171,200,1,0,0,0, + 1172,1173,5,109,0,0,1173,1174,5,101,0,0,1174,1175,5,116,0,0,1175,1176, + 5,97,0,0,1176,1177,5,99,0,0,1177,1178,5,108,0,0,1178,1179,5,97,0,0,1179, + 1180,5,115,0,0,1180,1181,5,115,0,0,1181,202,1,0,0,0,1182,1183,5,109,0, + 0,1183,1184,5,101,0,0,1184,1185,5,116,0,0,1185,1186,5,97,0,0,1186,1187, + 5,100,0,0,1187,1188,5,97,0,0,1188,1189,5,116,0,0,1189,1190,5,97,0,0,1190, + 204,1,0,0,0,1191,1192,5,109,0,0,1192,1193,5,117,0,0,1193,1194,5,108,0, + 0,1194,1195,5,116,0,0,1195,1196,5,105,0,0,1196,1197,5,112,0,0,1197,1198, + 5,108,0,0,1198,1199,5,105,0,0,1199,1200,5,99,0,0,1200,1201,5,105,0,0,1201, + 1202,5,116,0,0,1202,1203,5,121,0,0,1203,206,1,0,0,0,1204,1205,5,110,0, + 0,1205,1206,5,97,0,0,1206,1207,5,109,0,0,1207,1208,5,101,0,0,1208,1209, + 5,115,0,0,1209,1210,5,112,0,0,1210,1211,5,97,0,0,1211,1212,5,99,0,0,1212, + 1213,5,101,0,0,1213,208,1,0,0,0,1214,1215,5,110,0,0,1215,1216,5,101,0, + 0,1216,1217,5,119,0,0,1217,210,1,0,0,0,1218,1219,5,110,0,0,1219,1220,5, + 111,0,0,1220,1221,5,110,0,0,1221,1222,5,117,0,0,1222,1223,5,110,0,0,1223, + 1224,5,105,0,0,1224,1225,5,113,0,0,1225,1226,5,117,0,0,1226,1227,5,101, + 0,0,1227,212,1,0,0,0,1228,1229,5,110,0,0,1229,1230,5,111,0,0,1230,1231, + 5,116,0,0,1231,214,1,0,0,0,1232,1233,5,110,0,0,1233,1234,5,117,0,0,1234, + 1235,5,108,0,0,1235,1236,5,108,0,0,1236,216,1,0,0,0,1237,1238,5,111,0, + 0,1238,1239,5,98,0,0,1239,1240,5,106,0,0,1240,1241,5,101,0,0,1241,1242, + 5,99,0,0,1242,1243,5,116,0,0,1243,1244,5,105,0,0,1244,1245,5,118,0,0,1245, + 1246,5,101,0,0,1246,218,1,0,0,0,1247,1248,5,111,0,0,1248,1249,5,99,0,0, + 1249,1250,5,99,0,0,1250,1251,5,117,0,0,1251,1252,5,114,0,0,1252,1253,5, + 114,0,0,1253,1254,5,101,0,0,1254,1255,5,110,0,0,1255,1256,5,99,0,0,1256, + 1257,5,101,0,0,1257,220,1,0,0,0,1258,1259,5,111,0,0,1259,1260,5,102,0, + 0,1260,222,1,0,0,0,1261,1262,5,111,0,0,1262,1263,5,114,0,0,1263,224,1, + 0,0,0,1264,1265,5,111,0,0,1265,1266,5,114,0,0,1266,1267,5,100,0,0,1267, + 1268,5,101,0,0,1268,1269,5,114,0,0,1269,1270,5,101,0,0,1270,1271,5,100, + 0,0,1271,226,1,0,0,0,1272,1273,5,111,0,0,1273,1274,5,117,0,0,1274,1275, + 5,116,0,0,1275,228,1,0,0,0,1276,1277,5,112,0,0,1277,1278,5,97,0,0,1278, + 1279,5,99,0,0,1279,1280,5,107,0,0,1280,1281,5,97,0,0,1281,1282,5,103,0, + 0,1282,1283,5,101,0,0,1283,230,1,0,0,0,1284,1285,5,112,0,0,1285,1286,5, + 97,0,0,1286,1287,5,114,0,0,1287,1288,5,97,0,0,1288,1289,5,108,0,0,1289, + 1290,5,108,0,0,1290,1291,5,101,0,0,1291,1292,5,108,0,0,1292,232,1,0,0, + 0,1293,1294,5,112,0,0,1294,1295,5,97,0,0,1295,1296,5,114,0,0,1296,1297, + 5,116,0,0,1297,234,1,0,0,0,1298,1299,5,112,0,0,1299,1300,5,101,0,0,1300, + 1301,5,114,0,0,1301,1302,5,102,0,0,1302,1303,5,111,0,0,1303,1304,5,114, + 0,0,1304,1305,5,109,0,0,1305,236,1,0,0,0,1306,1307,5,112,0,0,1307,1308, + 5,111,0,0,1308,1309,5,114,0,0,1309,1310,5,116,0,0,1310,238,1,0,0,0,1311, + 1312,5,112,0,0,1312,1313,5,111,0,0,1313,1314,5,114,0,0,1314,1315,5,116, + 0,0,1315,1316,5,105,0,0,1316,1317,5,111,0,0,1317,1318,5,110,0,0,1318,240, + 1,0,0,0,1319,1320,5,112,0,0,1320,1321,5,114,0,0,1321,1322,5,101,0,0,1322, + 1323,5,100,0,0,1323,1324,5,105,0,0,1324,1325,5,99,0,0,1325,1326,5,97,0, + 0,1326,1327,5,116,0,0,1327,1328,5,101,0,0,1328,242,1,0,0,0,1329,1330,5, + 112,0,0,1330,1331,5,114,0,0,1331,1332,5,105,0,0,1332,1333,5,118,0,0,1333, + 1334,5,97,0,0,1334,1335,5,116,0,0,1335,1336,5,101,0,0,1336,244,1,0,0,0, + 1337,1338,5,112,0,0,1338,1339,5,114,0,0,1339,1340,5,111,0,0,1340,1341, + 5,116,0,0,1341,1342,5,101,0,0,1342,1343,5,99,0,0,1343,1344,5,116,0,0,1344, + 1345,5,101,0,0,1345,1346,5,100,0,0,1346,246,1,0,0,0,1347,1348,5,112,0, + 0,1348,1349,5,117,0,0,1349,1350,5,98,0,0,1350,1351,5,108,0,0,1351,1352, + 5,105,0,0,1352,1353,5,99,0,0,1353,248,1,0,0,0,1354,1355,5,114,0,0,1355, + 1356,5,101,0,0,1356,1357,5,100,0,0,1357,1358,5,101,0,0,1358,1359,5,102, + 0,0,1359,1360,5,105,0,0,1360,1361,5,110,0,0,1361,1362,5,101,0,0,1362,1363, + 5,115,0,0,1363,250,1,0,0,0,1364,1365,5,114,0,0,1365,1366,5,101,0,0,1366, + 1367,5,100,0,0,1367,1368,5,101,0,0,1368,1369,5,102,0,0,1369,1370,5,105, + 0,0,1370,1371,5,110,0,0,1371,1372,5,105,0,0,1372,1373,5,116,0,0,1373,1374, + 5,105,0,0,1374,1375,5,111,0,0,1375,1376,5,110,0,0,1376,252,1,0,0,0,1377, + 1378,5,114,0,0,1378,1379,5,101,0,0,1379,1380,5,102,0,0,1380,254,1,0,0, + 0,1381,1382,5,114,0,0,1382,1383,5,101,0,0,1383,1384,5,102,0,0,1384,1385, + 5,101,0,0,1385,1386,5,114,0,0,1386,1387,5,101,0,0,1387,1388,5,110,0,0, + 1388,1389,5,99,0,0,1389,1390,5,101,0,0,1390,1391,5,115,0,0,1391,256,1, + 0,0,0,1392,1393,5,114,0,0,1393,1394,5,101,0,0,1394,1395,5,110,0,0,1395, + 1396,5,100,0,0,1396,1397,5,101,0,0,1397,1398,5,114,0,0,1398,258,1,0,0, + 0,1399,1400,5,114,0,0,1400,1401,5,101,0,0,1401,1402,5,110,0,0,1402,1403, + 5,100,0,0,1403,1404,5,101,0,0,1404,1405,5,114,0,0,1405,1406,5,105,0,0, + 1406,1407,5,110,0,0,1407,1408,5,103,0,0,1408,260,1,0,0,0,1409,1410,5,114, + 0,0,1410,1411,5,101,0,0,1411,1412,5,112,0,0,1412,262,1,0,0,0,1413,1414, + 5,114,0,0,1414,1415,5,101,0,0,1415,1416,5,113,0,0,1416,1417,5,117,0,0, + 1417,1418,5,105,0,0,1418,1419,5,114,0,0,1419,1420,5,101,0,0,1420,264,1, + 0,0,0,1421,1422,5,114,0,0,1422,1423,5,101,0,0,1423,1424,5,113,0,0,1424, + 1425,5,117,0,0,1425,1426,5,105,0,0,1426,1427,5,114,0,0,1427,1428,5,101, + 0,0,1428,1429,5,109,0,0,1429,1430,5,101,0,0,1430,1431,5,110,0,0,1431,1432, + 5,116,0,0,1432,266,1,0,0,0,1433,1434,5,114,0,0,1434,1435,5,101,0,0,1435, + 1436,5,116,0,0,1436,1437,5,117,0,0,1437,1438,5,114,0,0,1438,1439,5,110, + 0,0,1439,268,1,0,0,0,1440,1441,5,115,0,0,1441,1442,5,97,0,0,1442,1443, + 5,116,0,0,1443,1444,5,105,0,0,1444,1445,5,115,0,0,1445,1446,5,102,0,0, + 1446,1447,5,121,0,0,1447,270,1,0,0,0,1448,1449,5,115,0,0,1449,1450,5,101, + 0,0,1450,1451,5,110,0,0,1451,1452,5,100,0,0,1452,272,1,0,0,0,1453,1454, + 5,115,0,0,1454,1455,5,110,0,0,1455,1456,5,97,0,0,1456,1457,5,112,0,0,1457, + 1458,5,115,0,0,1458,1459,5,104,0,0,1459,1460,5,111,0,0,1460,1461,5,116, + 0,0,1461,274,1,0,0,0,1462,1463,5,115,0,0,1463,1464,5,112,0,0,1464,1465, + 5,101,0,0,1465,1466,5,99,0,0,1466,1467,5,105,0,0,1467,1468,5,97,0,0,1468, + 1469,5,108,0,0,1469,1470,5,105,0,0,1470,1471,5,122,0,0,1471,1472,5,97, + 0,0,1472,1473,5,116,0,0,1473,1474,5,105,0,0,1474,1475,5,111,0,0,1475,1476, + 5,110,0,0,1476,276,1,0,0,0,1477,1478,5,115,0,0,1478,1479,5,112,0,0,1479, + 1480,5,101,0,0,1480,1481,5,99,0,0,1481,1482,5,105,0,0,1482,1483,5,97,0, + 0,1483,1484,5,108,0,0,1484,1485,5,105,0,0,1485,1486,5,122,0,0,1486,1487, + 5,101,0,0,1487,1488,5,115,0,0,1488,278,1,0,0,0,1489,1490,5,115,0,0,1490, + 1491,5,116,0,0,1491,1492,5,97,0,0,1492,1493,5,107,0,0,1493,1494,5,101, + 0,0,1494,1495,5,104,0,0,1495,1496,5,111,0,0,1496,1497,5,108,0,0,1497,1498, + 5,100,0,0,1498,1499,5,101,0,0,1499,1500,5,114,0,0,1500,280,1,0,0,0,1501, + 1502,5,115,0,0,1502,1503,5,116,0,0,1503,1504,5,97,0,0,1504,1505,5,110, + 0,0,1505,1506,5,100,0,0,1506,1507,5,97,0,0,1507,1508,5,114,0,0,1508,1509, + 5,100,0,0,1509,282,1,0,0,0,1510,1511,5,115,0,0,1511,1512,5,116,0,0,1512, + 1513,5,97,0,0,1513,1514,5,116,0,0,1514,1515,5,101,0,0,1515,284,1,0,0,0, + 1516,1517,5,115,0,0,1517,1518,5,116,0,0,1518,1519,5,101,0,0,1519,1520, + 5,112,0,0,1520,286,1,0,0,0,1521,1522,5,115,0,0,1522,1523,5,116,0,0,1523, + 1524,5,114,0,0,1524,1525,5,117,0,0,1525,1526,5,99,0,0,1526,1527,5,116, + 0,0,1527,288,1,0,0,0,1528,1529,5,115,0,0,1529,1530,5,117,0,0,1530,1531, + 5,98,0,0,1531,1532,5,99,0,0,1532,1533,5,108,0,0,1533,1534,5,97,0,0,1534, + 1535,5,115,0,0,1535,1536,5,115,0,0,1536,1537,5,105,0,0,1537,1538,5,102, + 0,0,1538,1539,5,105,0,0,1539,1540,5,101,0,0,1540,1541,5,114,0,0,1541,290, + 1,0,0,0,1542,1543,5,115,0,0,1543,1544,5,117,0,0,1544,1545,5,98,0,0,1545, + 1546,5,106,0,0,1546,1547,5,101,0,0,1547,1548,5,99,0,0,1548,1549,5,116, + 0,0,1549,292,1,0,0,0,1550,1551,5,115,0,0,1551,1552,5,117,0,0,1552,1553, + 5,98,0,0,1553,1554,5,115,0,0,1554,1555,5,101,0,0,1555,1556,5,116,0,0,1556, + 294,1,0,0,0,1557,1558,5,115,0,0,1558,1559,5,117,0,0,1559,1560,5,98,0,0, + 1560,1561,5,115,0,0,1561,1562,5,101,0,0,1562,1563,5,116,0,0,1563,1564, + 5,115,0,0,1564,296,1,0,0,0,1565,1566,5,115,0,0,1566,1567,5,117,0,0,1567, + 1568,5,98,0,0,1568,1569,5,116,0,0,1569,1570,5,121,0,0,1570,1571,5,112, + 0,0,1571,1572,5,101,0,0,1572,298,1,0,0,0,1573,1574,5,115,0,0,1574,1575, + 5,117,0,0,1575,1576,5,99,0,0,1576,1577,5,99,0,0,1577,1578,5,101,0,0,1578, + 1579,5,115,0,0,1579,1580,5,115,0,0,1580,1581,5,105,0,0,1581,1582,5,111, + 0,0,1582,1583,5,110,0,0,1583,300,1,0,0,0,1584,1585,5,116,0,0,1585,1586, + 5,101,0,0,1586,1587,5,114,0,0,1587,1588,5,109,0,0,1588,1589,5,105,0,0, + 1589,1590,5,110,0,0,1590,1591,5,97,0,0,1591,1592,5,116,0,0,1592,1593,5, + 101,0,0,1593,302,1,0,0,0,1594,1595,5,116,0,0,1595,1596,5,104,0,0,1596, + 1597,5,101,0,0,1597,1598,5,110,0,0,1598,304,1,0,0,0,1599,1600,5,116,0, + 0,1600,1601,5,105,0,0,1601,1602,5,109,0,0,1602,1603,5,101,0,0,1603,1604, + 5,115,0,0,1604,1605,5,108,0,0,1605,1606,5,105,0,0,1606,1607,5,99,0,0,1607, + 1608,5,101,0,0,1608,306,1,0,0,0,1609,1610,5,116,0,0,1610,1611,5,111,0, + 0,1611,308,1,0,0,0,1612,1613,5,116,0,0,1613,1614,5,114,0,0,1614,1615,5, + 97,0,0,1615,1616,5,110,0,0,1616,1617,5,115,0,0,1617,1618,5,105,0,0,1618, + 1619,5,116,0,0,1619,1620,5,105,0,0,1620,1621,5,111,0,0,1621,1622,5,110, + 0,0,1622,310,1,0,0,0,1623,1624,5,116,0,0,1624,1625,5,114,0,0,1625,1626, + 5,117,0,0,1626,1627,5,101,0,0,1627,312,1,0,0,0,1628,1629,5,116,0,0,1629, + 1630,5,121,0,0,1630,1631,5,112,0,0,1631,1632,5,101,0,0,1632,314,1,0,0, + 0,1633,1634,5,116,0,0,1634,1635,5,121,0,0,1635,1636,5,112,0,0,1636,1637, + 5,101,0,0,1637,1638,5,100,0,0,1638,316,1,0,0,0,1639,1640,5,116,0,0,1640, + 1641,5,121,0,0,1641,1642,5,112,0,0,1642,1643,5,105,0,0,1643,1644,5,110, + 0,0,1644,1645,5,103,0,0,1645,318,1,0,0,0,1646,1647,5,117,0,0,1647,1648, + 5,110,0,0,1648,1649,5,105,0,0,1649,1650,5,111,0,0,1650,1651,5,110,0,0, + 1651,1652,5,115,0,0,1652,320,1,0,0,0,1653,1654,5,117,0,0,1654,1655,5,110, + 0,0,1655,1656,5,116,0,0,1656,1657,5,105,0,0,1657,1658,5,108,0,0,1658,322, + 1,0,0,0,1659,1660,5,117,0,0,1660,1661,5,115,0,0,1661,1662,5,101,0,0,1662, + 324,1,0,0,0,1663,1664,5,118,0,0,1664,1665,5,97,0,0,1665,1666,5,114,0,0, + 1666,326,1,0,0,0,1667,1668,5,118,0,0,1668,1669,5,97,0,0,1669,1670,5,114, + 0,0,1670,1671,5,105,0,0,1671,1672,5,97,0,0,1672,1673,5,110,0,0,1673,1674, + 5,116,0,0,1674,328,1,0,0,0,1675,1676,5,118,0,0,1676,1677,5,97,0,0,1677, + 1678,5,114,0,0,1678,1679,5,105,0,0,1679,1680,5,97,0,0,1680,1681,5,116, + 0,0,1681,1682,5,105,0,0,1682,1683,5,111,0,0,1683,1684,5,110,0,0,1684,330, + 1,0,0,0,1685,1686,5,118,0,0,1686,1687,5,101,0,0,1687,1688,5,114,0,0,1688, + 1689,5,105,0,0,1689,1690,5,102,0,0,1690,1691,5,105,0,0,1691,1692,5,99, + 0,0,1692,1693,5,97,0,0,1693,1694,5,116,0,0,1694,1695,5,105,0,0,1695,1696, + 5,111,0,0,1696,1697,5,110,0,0,1697,332,1,0,0,0,1698,1699,5,118,0,0,1699, + 1700,5,101,0,0,1700,1701,5,114,0,0,1701,1702,5,105,0,0,1702,1703,5,102, + 0,0,1703,1704,5,121,0,0,1704,334,1,0,0,0,1705,1706,5,118,0,0,1706,1707, + 5,105,0,0,1707,1708,5,97,0,0,1708,336,1,0,0,0,1709,1710,5,118,0,0,1710, + 1711,5,105,0,0,1711,1712,5,101,0,0,1712,1713,5,119,0,0,1713,338,1,0,0, + 0,1714,1715,5,118,0,0,1715,1716,5,105,0,0,1716,1717,5,101,0,0,1717,1718, + 5,119,0,0,1718,1719,5,112,0,0,1719,1720,5,111,0,0,1720,1721,5,105,0,0, + 1721,1722,5,110,0,0,1722,1723,5,116,0,0,1723,340,1,0,0,0,1724,1725,5,119, + 0,0,1725,1726,5,104,0,0,1726,1727,5,101,0,0,1727,1728,5,110,0,0,1728,342, + 1,0,0,0,1729,1730,5,119,0,0,1730,1731,5,104,0,0,1731,1732,5,105,0,0,1732, + 1733,5,108,0,0,1733,1734,5,101,0,0,1734,344,1,0,0,0,1735,1736,5,120,0, + 0,1736,1737,5,111,0,0,1737,1738,5,114,0,0,1738,346,1,0,0,0,1739,1740,5, + 33,0,0,1740,1741,5,61,0,0,1741,1742,5,61,0,0,1742,348,1,0,0,0,1743,1744, + 5,58,0,0,1744,1745,5,58,0,0,1745,1746,5,62,0,0,1746,350,1,0,0,0,1747,1748, + 5,58,0,0,1748,1749,5,62,0,0,1749,1750,5,62,0,0,1750,352,1,0,0,0,1751,1752, + 5,61,0,0,1752,1753,5,61,0,0,1753,1754,5,61,0,0,1754,354,1,0,0,0,1755,1756, + 5,33,0,0,1756,1757,5,61,0,0,1757,356,1,0,0,0,1758,1759,5,42,0,0,1759,1760, + 5,42,0,0,1760,358,1,0,0,0,1761,1762,5,45,0,0,1762,1763,5,62,0,0,1763,360, + 1,0,0,0,1764,1765,5,46,0,0,1765,1766,5,46,0,0,1766,362,1,0,0,0,1767,1768, + 5,46,0,0,1768,1769,5,63,0,0,1769,364,1,0,0,0,1770,1771,5,58,0,0,1771,1772, + 5,58,0,0,1772,366,1,0,0,0,1773,1774,5,58,0,0,1774,1775,5,61,0,0,1775,368, + 1,0,0,0,1776,1777,5,58,0,0,1777,1778,5,62,0,0,1778,370,1,0,0,0,1779,1780, + 5,60,0,0,1780,1781,5,61,0,0,1781,372,1,0,0,0,1782,1783,5,61,0,0,1783,1784, + 5,61,0,0,1784,374,1,0,0,0,1785,1786,5,61,0,0,1786,1787,5,62,0,0,1787,376, + 1,0,0,0,1788,1789,5,62,0,0,1789,1790,5,61,0,0,1790,378,1,0,0,0,1791,1792, + 5,63,0,0,1792,1793,5,63,0,0,1793,380,1,0,0,0,1794,1795,5,64,0,0,1795,1796, + 5,64,0,0,1796,382,1,0,0,0,1797,1798,5,35,0,0,1798,384,1,0,0,0,1799,1800, + 5,36,0,0,1800,386,1,0,0,0,1801,1802,5,37,0,0,1802,388,1,0,0,0,1803,1804, + 5,38,0,0,1804,390,1,0,0,0,1805,1806,5,40,0,0,1806,392,1,0,0,0,1807,1808, + 5,41,0,0,1808,394,1,0,0,0,1809,1810,5,42,0,0,1810,396,1,0,0,0,1811,1812, + 5,43,0,0,1812,398,1,0,0,0,1813,1814,5,44,0,0,1814,400,1,0,0,0,1815,1816, + 5,45,0,0,1816,402,1,0,0,0,1817,1818,5,46,0,0,1818,404,1,0,0,0,1819,1820, + 5,47,0,0,1820,406,1,0,0,0,1821,1822,5,58,0,0,1822,408,1,0,0,0,1823,1824, + 5,59,0,0,1824,410,1,0,0,0,1825,1826,5,60,0,0,1826,412,1,0,0,0,1827,1828, + 5,61,0,0,1828,414,1,0,0,0,1829,1830,5,62,0,0,1830,416,1,0,0,0,1831,1832, + 5,63,0,0,1832,418,1,0,0,0,1833,1834,5,64,0,0,1834,420,1,0,0,0,1835,1836, + 5,91,0,0,1836,422,1,0,0,0,1837,1838,5,93,0,0,1838,424,1,0,0,0,1839,1840, + 5,94,0,0,1840,426,1,0,0,0,1841,1842,5,123,0,0,1842,428,1,0,0,0,1843,1844, + 5,124,0,0,1844,430,1,0,0,0,1845,1846,5,125,0,0,1846,432,1,0,0,0,1847,1848, + 5,126,0,0,1848,434,1,0,0,0,1849,1853,7,0,0,0,1850,1852,7,1,0,0,1851,1850, + 1,0,0,0,1852,1855,1,0,0,0,1853,1851,1,0,0,0,1853,1854,1,0,0,0,1854,436, + 1,0,0,0,1855,1853,1,0,0,0,1856,1862,5,39,0,0,1857,1858,5,92,0,0,1858,1861, + 9,0,0,0,1859,1861,8,2,0,0,1860,1857,1,0,0,0,1860,1859,1,0,0,0,1861,1864, + 1,0,0,0,1862,1860,1,0,0,0,1862,1863,1,0,0,0,1863,1865,1,0,0,0,1864,1862, + 1,0,0,0,1865,1866,5,39,0,0,1866,438,1,0,0,0,1867,1873,5,34,0,0,1868,1869, + 5,92,0,0,1869,1872,9,0,0,0,1870,1872,8,3,0,0,1871,1868,1,0,0,0,1871,1870, + 1,0,0,0,1872,1875,1,0,0,0,1873,1871,1,0,0,0,1873,1874,1,0,0,0,1874,1876, + 1,0,0,0,1875,1873,1,0,0,0,1876,1877,5,34,0,0,1877,440,1,0,0,0,1878,1880, + 7,4,0,0,1879,1878,1,0,0,0,1880,1881,1,0,0,0,1881,1879,1,0,0,0,1881,1882, + 1,0,0,0,1882,442,1,0,0,0,1883,1885,7,4,0,0,1884,1883,1,0,0,0,1885,1888, + 1,0,0,0,1886,1884,1,0,0,0,1886,1887,1,0,0,0,1887,1889,1,0,0,0,1888,1886, + 1,0,0,0,1889,1891,5,46,0,0,1890,1892,7,4,0,0,1891,1890,1,0,0,0,1892,1893, + 1,0,0,0,1893,1891,1,0,0,0,1893,1894,1,0,0,0,1894,1904,1,0,0,0,1895,1897, + 7,5,0,0,1896,1898,7,6,0,0,1897,1896,1,0,0,0,1897,1898,1,0,0,0,1898,1900, + 1,0,0,0,1899,1901,7,4,0,0,1900,1899,1,0,0,0,1901,1902,1,0,0,0,1902,1900, + 1,0,0,0,1902,1903,1,0,0,0,1903,1905,1,0,0,0,1904,1895,1,0,0,0,1904,1905, + 1,0,0,0,1905,1921,1,0,0,0,1906,1908,7,4,0,0,1907,1906,1,0,0,0,1908,1909, + 1,0,0,0,1909,1907,1,0,0,0,1909,1910,1,0,0,0,1910,1911,1,0,0,0,1911,1913, + 7,5,0,0,1912,1914,7,6,0,0,1913,1912,1,0,0,0,1913,1914,1,0,0,0,1914,1916, + 1,0,0,0,1915,1917,7,4,0,0,1916,1915,1,0,0,0,1917,1918,1,0,0,0,1918,1916, + 1,0,0,0,1918,1919,1,0,0,0,1919,1921,1,0,0,0,1920,1886,1,0,0,0,1920,1907, + 1,0,0,0,1921,444,1,0,0,0,1922,1923,5,47,0,0,1923,1924,5,42,0,0,1924,1928, + 1,0,0,0,1925,1927,9,0,0,0,1926,1925,1,0,0,0,1927,1930,1,0,0,0,1928,1929, + 1,0,0,0,1928,1926,1,0,0,0,1929,1931,1,0,0,0,1930,1928,1,0,0,0,1931,1932, + 5,42,0,0,1932,1946,5,47,0,0,1933,1934,5,47,0,0,1934,1935,5,47,0,0,1935, + 1936,5,42,0,0,1936,1940,1,0,0,0,1937,1939,9,0,0,0,1938,1937,1,0,0,0,1939, + 1942,1,0,0,0,1940,1941,1,0,0,0,1940,1938,1,0,0,0,1941,1943,1,0,0,0,1942, + 1940,1,0,0,0,1943,1944,5,42,0,0,1944,1946,5,47,0,0,1945,1922,1,0,0,0,1945, + 1933,1,0,0,0,1946,446,1,0,0,0,1947,1948,5,47,0,0,1948,1949,5,47,0,0,1949, + 1950,1,0,0,0,1950,1954,8,7,0,0,1951,1953,8,8,0,0,1952,1951,1,0,0,0,1953, + 1956,1,0,0,0,1954,1952,1,0,0,0,1954,1955,1,0,0,0,1955,1957,1,0,0,0,1956, + 1954,1,0,0,0,1957,1958,6,223,0,0,1958,448,1,0,0,0,1959,1960,5,47,0,0,1960, + 1961,5,47,0,0,1961,1962,1,0,0,0,1962,1963,6,224,0,0,1963,450,1,0,0,0,1964, + 1966,7,9,0,0,1965,1964,1,0,0,0,1966,1967,1,0,0,0,1967,1965,1,0,0,0,1967, + 1968,1,0,0,0,1968,1969,1,0,0,0,1969,1970,6,225,0,0,1970,452,1,0,0,0,21, + 0,1853,1860,1862,1871,1873,1881,1886,1893,1897,1902,1904,1909,1913,1918, + 1920,1928,1940,1945,1954,1967,1,6,0,0 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace DemaConsulting.SysML2Tools.Parser.Antlr diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.interp b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.interp new file mode 100644 index 00000000..7d9cd9d7 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.interp @@ -0,0 +1,695 @@ +token literal names: +null +'about' +'abstract' +'accept' +'action' +'actor' +'after' +'alias' +'all' +'allocate' +'allocation' +'analysis' +'and' +'as' +'assert' +'assign' +'assoc' +'assume' +'at' +'attribute' +'behavior' +'bind' +'binding' +'bool' +'by' +'calc' +'case' +'chains' +'class' +'classifier' +'comment' +'composite' +'concern' +'conjugate' +'conjugates' +'conjugation' +'connect' +'connection' +'connector' +'const' +'constant' +'constraint' +'crosses' +'datatype' +'decide' +'def' +'default' +'defined' +'dependency' +'derived' +'differences' +'disjoining' +'disjoint' +'do' +'doc' +'else' +'end' +'entry' +'enum' +'event' +'exhibit' +'exit' +'expose' +'expr' +'false' +'feature' +'featured' +'featuring' +'filter' +'first' +'flow' +'for' +'fork' +'frame' +'from' +'function' +'hastype' +'if' +'implies' +'import' +'in' +'include' +'individual' +'inout' +'interaction' +'interface' +'intersects' +'inv' +'inverse' +'inverting' +'istype' +'item' +'join' +'language' +'library' +'locale' +'loop' +'member' +'merge' +'message' +'meta' +'metaclass' +'metadata' +'multiplicity' +'namespace' +'new' +'nonunique' +'not' +'null' +'objective' +'occurrence' +'of' +'or' +'ordered' +'out' +'package' +'parallel' +'part' +'perform' +'port' +'portion' +'predicate' +'private' +'protected' +'public' +'redefines' +'redefinition' +'ref' +'references' +'render' +'rendering' +'rep' +'require' +'requirement' +'return' +'satisfy' +'send' +'snapshot' +'specialization' +'specializes' +'stakeholder' +'standard' +'state' +'step' +'struct' +'subclassifier' +'subject' +'subset' +'subsets' +'subtype' +'succession' +'terminate' +'then' +'timeslice' +'to' +'transition' +'true' +'type' +'typed' +'typing' +'unions' +'until' +'use' +'var' +'variant' +'variation' +'verification' +'verify' +'via' +'view' +'viewpoint' +'when' +'while' +'xor' +'!==' +'::>' +':>>' +'===' +'!=' +'**' +'->' +'..' +'.?' +'::' +':=' +':>' +'<=' +'==' +'=>' +'>=' +'??' +'@@' +'#' +'$' +'%' +'&' +'(' +')' +'*' +'+' +',' +'-' +'.' +'/' +':' +';' +'<' +'=' +'>' +'?' +'@' +'[' +']' +'^' +'{' +'|' +'}' +'~' +null +null +null +null +null +null +null +'//' +null + +token symbolic names: +null +ABOUT +ABSTRACT +ACCEPT +ACTION +ACTOR +AFTER +ALIAS +ALL +ALLOCATE +ALLOCATION +ANALYSIS +AND +AS +ASSERT +ASSIGN +ASSOC +ASSUME +AT +ATTRIBUTE +BEHAVIOR +BIND +BINDING +BOOL +BY +CALC +CASE +CHAINS +CLASS +CLASSIFIER +COMMENT +COMPOSITE +CONCERN +CONJUGATE +CONJUGATES +CONJUGATION +CONNECT +CONNECTION +CONNECTOR +CONST +CONSTANT +CONSTRAINT +CROSSES +DATATYPE +DECIDE +DEF +DEFAULT +DEFINED +DEPENDENCY +DERIVED +DIFFERENCES +DISJOINING +DISJOINT +DO +DOC +ELSE +END +ENTRY +ENUM +EVENT +EXHIBIT +EXIT +EXPOSE +EXPR +FALSE +FEATURE +FEATURED +FEATURING +FILTER +FIRST +FLOW +FOR +FORK +FRAME +FROM +FUNCTION +HASTYPE +IF +IMPLIES +IMPORT +IN +INCLUDE +INDIVIDUAL +INOUT +INTERACTION +INTERFACE +INTERSECTS +INV +INVERSE +INVERTING +ISTYPE +ITEM +JOIN +LANGUAGE +LIBRARY +LOCALE +LOOP +MEMBER +MERGE +MESSAGE +META +METACLASS +METADATA +MULTIPLICITY +NAMESPACE +NEW +NONUNIQUE +NOT +NULL +OBJECTIVE +OCCURRENCE +OF +OR +ORDERED +OUT +PACKAGE +PARALLEL +PART +PERFORM +PORT +PORTION +PREDICATE +PRIVATE +PROTECTED +PUBLIC +REDEFINES +REDEFINITION +REF +REFERENCES +RENDER +RENDERING +REP +REQUIRE +REQUIREMENT +RETURN +SATISFY +SEND +SNAPSHOT +SPECIALIZATION +SPECIALIZES +STAKEHOLDER +STANDARD +STATE +STEP +STRUCT +SUBCLASSIFIER +SUBJECT +SUBSET +SUBSETS +SUBTYPE +SUCCESSION +TERMINATE +THEN +TIMESLICE +TO +TRANSITION +TRUE +TYPE +TYPED +TYPING +UNIONS +UNTIL +USE +VAR +VARIANT +VARIATION +VERIFICATION +VERIFY +VIA +VIEW +VIEWPOINT +WHEN +WHILE +XOR +BANG_EQ_EQ +COLON_COLON_GT +COLON_GT_GT +EQ_EQ_EQ +BANG_EQ +STAR_STAR +ARROW +DOT_DOT +DOT_QUESTION +COLON_COLON +COLON_EQ +COLON_GT +LE +EQ_EQ +FAT_ARROW +GE +QUESTION_QUESTION +AT_AT +HASH +DOLLAR +PERCENT +AMP +LPAREN +RPAREN +STAR +PLUS +COMMA +MINUS +DOT +SLASH +COLON +SEMI +LT +EQ +GT +QUESTION +AT_SIGN +LBRACK +RBRACK +CARET +LBRACE +PIPE +RBRACE +TILDE +IDENTIFIER +STRING +DOUBLE_STRING +INTEGER +REAL +REGULAR_COMMENT +SINGLE_LINE_NOTE +BARE_LINE_COMMENT +WS + +rule names: +ABOUT +ABSTRACT +ACCEPT +ACTION +ACTOR +AFTER +ALIAS +ALL +ALLOCATE +ALLOCATION +ANALYSIS +AND +AS +ASSERT +ASSIGN +ASSOC +ASSUME +AT +ATTRIBUTE +BEHAVIOR +BIND +BINDING +BOOL +BY +CALC +CASE +CHAINS +CLASS +CLASSIFIER +COMMENT +COMPOSITE +CONCERN +CONJUGATE +CONJUGATES +CONJUGATION +CONNECT +CONNECTION +CONNECTOR +CONST +CONSTANT +CONSTRAINT +CROSSES +DATATYPE +DECIDE +DEF +DEFAULT +DEFINED +DEPENDENCY +DERIVED +DIFFERENCES +DISJOINING +DISJOINT +DO +DOC +ELSE +END +ENTRY +ENUM +EVENT +EXHIBIT +EXIT +EXPOSE +EXPR +FALSE +FEATURE +FEATURED +FEATURING +FILTER +FIRST +FLOW +FOR +FORK +FRAME +FROM +FUNCTION +HASTYPE +IF +IMPLIES +IMPORT +IN +INCLUDE +INDIVIDUAL +INOUT +INTERACTION +INTERFACE +INTERSECTS +INV +INVERSE +INVERTING +ISTYPE +ITEM +JOIN +LANGUAGE +LIBRARY +LOCALE +LOOP +MEMBER +MERGE +MESSAGE +META +METACLASS +METADATA +MULTIPLICITY +NAMESPACE +NEW +NONUNIQUE +NOT +NULL +OBJECTIVE +OCCURRENCE +OF +OR +ORDERED +OUT +PACKAGE +PARALLEL +PART +PERFORM +PORT +PORTION +PREDICATE +PRIVATE +PROTECTED +PUBLIC +REDEFINES +REDEFINITION +REF +REFERENCES +RENDER +RENDERING +REP +REQUIRE +REQUIREMENT +RETURN +SATISFY +SEND +SNAPSHOT +SPECIALIZATION +SPECIALIZES +STAKEHOLDER +STANDARD +STATE +STEP +STRUCT +SUBCLASSIFIER +SUBJECT +SUBSET +SUBSETS +SUBTYPE +SUCCESSION +TERMINATE +THEN +TIMESLICE +TO +TRANSITION +TRUE +TYPE +TYPED +TYPING +UNIONS +UNTIL +USE +VAR +VARIANT +VARIATION +VERIFICATION +VERIFY +VIA +VIEW +VIEWPOINT +WHEN +WHILE +XOR +BANG_EQ_EQ +COLON_COLON_GT +COLON_GT_GT +EQ_EQ_EQ +BANG_EQ +STAR_STAR +ARROW +DOT_DOT +DOT_QUESTION +COLON_COLON +COLON_EQ +COLON_GT +LE +EQ_EQ +FAT_ARROW +GE +QUESTION_QUESTION +AT_AT +HASH +DOLLAR +PERCENT +AMP +LPAREN +RPAREN +STAR +PLUS +COMMA +MINUS +DOT +SLASH +COLON +SEMI +LT +EQ +GT +QUESTION +AT_SIGN +LBRACK +RBRACK +CARET +LBRACE +PIPE +RBRACE +TILDE +IDENTIFIER +STRING +DOUBLE_STRING +INTEGER +REAL +REGULAR_COMMENT +SINGLE_LINE_NOTE +BARE_LINE_COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 226, 1971, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 2, 225, 7, 225, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 192, 1, 192, 1, 193, 1, 193, 1, 194, 1, 194, 1, 195, 1, 195, 1, 196, 1, 196, 1, 197, 1, 197, 1, 198, 1, 198, 1, 199, 1, 199, 1, 200, 1, 200, 1, 201, 1, 201, 1, 202, 1, 202, 1, 203, 1, 203, 1, 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 1, 207, 1, 207, 1, 208, 1, 208, 1, 209, 1, 209, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, 213, 1, 213, 1, 214, 1, 214, 1, 215, 1, 215, 1, 216, 1, 216, 1, 217, 1, 217, 5, 217, 1852, 8, 217, 10, 217, 12, 217, 1855, 9, 217, 1, 218, 1, 218, 1, 218, 1, 218, 5, 218, 1861, 8, 218, 10, 218, 12, 218, 1864, 9, 218, 1, 218, 1, 218, 1, 219, 1, 219, 1, 219, 1, 219, 5, 219, 1872, 8, 219, 10, 219, 12, 219, 1875, 9, 219, 1, 219, 1, 219, 1, 220, 4, 220, 1880, 8, 220, 11, 220, 12, 220, 1881, 1, 221, 5, 221, 1885, 8, 221, 10, 221, 12, 221, 1888, 9, 221, 1, 221, 1, 221, 4, 221, 1892, 8, 221, 11, 221, 12, 221, 1893, 1, 221, 1, 221, 3, 221, 1898, 8, 221, 1, 221, 4, 221, 1901, 8, 221, 11, 221, 12, 221, 1902, 3, 221, 1905, 8, 221, 1, 221, 4, 221, 1908, 8, 221, 11, 221, 12, 221, 1909, 1, 221, 1, 221, 3, 221, 1914, 8, 221, 1, 221, 4, 221, 1917, 8, 221, 11, 221, 12, 221, 1918, 3, 221, 1921, 8, 221, 1, 222, 1, 222, 1, 222, 1, 222, 5, 222, 1927, 8, 222, 10, 222, 12, 222, 1930, 9, 222, 1, 222, 1, 222, 1, 222, 1, 222, 1, 222, 1, 222, 1, 222, 5, 222, 1939, 8, 222, 10, 222, 12, 222, 1942, 9, 222, 1, 222, 1, 222, 3, 222, 1946, 8, 222, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 5, 223, 1953, 8, 223, 10, 223, 12, 223, 1956, 9, 223, 1, 223, 1, 223, 1, 224, 1, 224, 1, 224, 1, 224, 1, 224, 1, 225, 4, 225, 1966, 8, 225, 11, 225, 12, 225, 1967, 1, 225, 1, 225, 2, 1928, 1940, 0, 226, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 196, 393, 197, 395, 198, 397, 199, 399, 200, 401, 201, 403, 202, 405, 203, 407, 204, 409, 205, 411, 206, 413, 207, 415, 208, 417, 209, 419, 210, 421, 211, 423, 212, 425, 213, 427, 214, 429, 215, 431, 216, 433, 217, 435, 218, 437, 219, 439, 220, 441, 221, 443, 222, 445, 223, 447, 224, 449, 225, 451, 226, 1, 0, 10, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 39, 39, 92, 92, 2, 0, 34, 34, 92, 92, 1, 0, 48, 57, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 3, 0, 10, 10, 13, 13, 42, 42, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 1990, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 0, 395, 1, 0, 0, 0, 0, 397, 1, 0, 0, 0, 0, 399, 1, 0, 0, 0, 0, 401, 1, 0, 0, 0, 0, 403, 1, 0, 0, 0, 0, 405, 1, 0, 0, 0, 0, 407, 1, 0, 0, 0, 0, 409, 1, 0, 0, 0, 0, 411, 1, 0, 0, 0, 0, 413, 1, 0, 0, 0, 0, 415, 1, 0, 0, 0, 0, 417, 1, 0, 0, 0, 0, 419, 1, 0, 0, 0, 0, 421, 1, 0, 0, 0, 0, 423, 1, 0, 0, 0, 0, 425, 1, 0, 0, 0, 0, 427, 1, 0, 0, 0, 0, 429, 1, 0, 0, 0, 0, 431, 1, 0, 0, 0, 0, 433, 1, 0, 0, 0, 0, 435, 1, 0, 0, 0, 0, 437, 1, 0, 0, 0, 0, 439, 1, 0, 0, 0, 0, 441, 1, 0, 0, 0, 0, 443, 1, 0, 0, 0, 0, 445, 1, 0, 0, 0, 0, 447, 1, 0, 0, 0, 0, 449, 1, 0, 0, 0, 0, 451, 1, 0, 0, 0, 1, 453, 1, 0, 0, 0, 3, 459, 1, 0, 0, 0, 5, 468, 1, 0, 0, 0, 7, 475, 1, 0, 0, 0, 9, 482, 1, 0, 0, 0, 11, 488, 1, 0, 0, 0, 13, 494, 1, 0, 0, 0, 15, 500, 1, 0, 0, 0, 17, 504, 1, 0, 0, 0, 19, 513, 1, 0, 0, 0, 21, 524, 1, 0, 0, 0, 23, 533, 1, 0, 0, 0, 25, 537, 1, 0, 0, 0, 27, 540, 1, 0, 0, 0, 29, 547, 1, 0, 0, 0, 31, 554, 1, 0, 0, 0, 33, 560, 1, 0, 0, 0, 35, 567, 1, 0, 0, 0, 37, 570, 1, 0, 0, 0, 39, 580, 1, 0, 0, 0, 41, 589, 1, 0, 0, 0, 43, 594, 1, 0, 0, 0, 45, 602, 1, 0, 0, 0, 47, 607, 1, 0, 0, 0, 49, 610, 1, 0, 0, 0, 51, 615, 1, 0, 0, 0, 53, 620, 1, 0, 0, 0, 55, 627, 1, 0, 0, 0, 57, 633, 1, 0, 0, 0, 59, 644, 1, 0, 0, 0, 61, 652, 1, 0, 0, 0, 63, 662, 1, 0, 0, 0, 65, 670, 1, 0, 0, 0, 67, 680, 1, 0, 0, 0, 69, 691, 1, 0, 0, 0, 71, 703, 1, 0, 0, 0, 73, 711, 1, 0, 0, 0, 75, 722, 1, 0, 0, 0, 77, 732, 1, 0, 0, 0, 79, 738, 1, 0, 0, 0, 81, 747, 1, 0, 0, 0, 83, 758, 1, 0, 0, 0, 85, 766, 1, 0, 0, 0, 87, 775, 1, 0, 0, 0, 89, 782, 1, 0, 0, 0, 91, 786, 1, 0, 0, 0, 93, 794, 1, 0, 0, 0, 95, 802, 1, 0, 0, 0, 97, 813, 1, 0, 0, 0, 99, 821, 1, 0, 0, 0, 101, 833, 1, 0, 0, 0, 103, 844, 1, 0, 0, 0, 105, 853, 1, 0, 0, 0, 107, 856, 1, 0, 0, 0, 109, 860, 1, 0, 0, 0, 111, 865, 1, 0, 0, 0, 113, 869, 1, 0, 0, 0, 115, 875, 1, 0, 0, 0, 117, 880, 1, 0, 0, 0, 119, 886, 1, 0, 0, 0, 121, 894, 1, 0, 0, 0, 123, 899, 1, 0, 0, 0, 125, 906, 1, 0, 0, 0, 127, 911, 1, 0, 0, 0, 129, 917, 1, 0, 0, 0, 131, 925, 1, 0, 0, 0, 133, 934, 1, 0, 0, 0, 135, 944, 1, 0, 0, 0, 137, 951, 1, 0, 0, 0, 139, 957, 1, 0, 0, 0, 141, 962, 1, 0, 0, 0, 143, 966, 1, 0, 0, 0, 145, 971, 1, 0, 0, 0, 147, 977, 1, 0, 0, 0, 149, 982, 1, 0, 0, 0, 151, 991, 1, 0, 0, 0, 153, 999, 1, 0, 0, 0, 155, 1002, 1, 0, 0, 0, 157, 1010, 1, 0, 0, 0, 159, 1017, 1, 0, 0, 0, 161, 1020, 1, 0, 0, 0, 163, 1028, 1, 0, 0, 0, 165, 1039, 1, 0, 0, 0, 167, 1045, 1, 0, 0, 0, 169, 1057, 1, 0, 0, 0, 171, 1067, 1, 0, 0, 0, 173, 1078, 1, 0, 0, 0, 175, 1082, 1, 0, 0, 0, 177, 1090, 1, 0, 0, 0, 179, 1100, 1, 0, 0, 0, 181, 1107, 1, 0, 0, 0, 183, 1112, 1, 0, 0, 0, 185, 1117, 1, 0, 0, 0, 187, 1126, 1, 0, 0, 0, 189, 1134, 1, 0, 0, 0, 191, 1141, 1, 0, 0, 0, 193, 1146, 1, 0, 0, 0, 195, 1153, 1, 0, 0, 0, 197, 1159, 1, 0, 0, 0, 199, 1167, 1, 0, 0, 0, 201, 1172, 1, 0, 0, 0, 203, 1182, 1, 0, 0, 0, 205, 1191, 1, 0, 0, 0, 207, 1204, 1, 0, 0, 0, 209, 1214, 1, 0, 0, 0, 211, 1218, 1, 0, 0, 0, 213, 1228, 1, 0, 0, 0, 215, 1232, 1, 0, 0, 0, 217, 1237, 1, 0, 0, 0, 219, 1247, 1, 0, 0, 0, 221, 1258, 1, 0, 0, 0, 223, 1261, 1, 0, 0, 0, 225, 1264, 1, 0, 0, 0, 227, 1272, 1, 0, 0, 0, 229, 1276, 1, 0, 0, 0, 231, 1284, 1, 0, 0, 0, 233, 1293, 1, 0, 0, 0, 235, 1298, 1, 0, 0, 0, 237, 1306, 1, 0, 0, 0, 239, 1311, 1, 0, 0, 0, 241, 1319, 1, 0, 0, 0, 243, 1329, 1, 0, 0, 0, 245, 1337, 1, 0, 0, 0, 247, 1347, 1, 0, 0, 0, 249, 1354, 1, 0, 0, 0, 251, 1364, 1, 0, 0, 0, 253, 1377, 1, 0, 0, 0, 255, 1381, 1, 0, 0, 0, 257, 1392, 1, 0, 0, 0, 259, 1399, 1, 0, 0, 0, 261, 1409, 1, 0, 0, 0, 263, 1413, 1, 0, 0, 0, 265, 1421, 1, 0, 0, 0, 267, 1433, 1, 0, 0, 0, 269, 1440, 1, 0, 0, 0, 271, 1448, 1, 0, 0, 0, 273, 1453, 1, 0, 0, 0, 275, 1462, 1, 0, 0, 0, 277, 1477, 1, 0, 0, 0, 279, 1489, 1, 0, 0, 0, 281, 1501, 1, 0, 0, 0, 283, 1510, 1, 0, 0, 0, 285, 1516, 1, 0, 0, 0, 287, 1521, 1, 0, 0, 0, 289, 1528, 1, 0, 0, 0, 291, 1542, 1, 0, 0, 0, 293, 1550, 1, 0, 0, 0, 295, 1557, 1, 0, 0, 0, 297, 1565, 1, 0, 0, 0, 299, 1573, 1, 0, 0, 0, 301, 1584, 1, 0, 0, 0, 303, 1594, 1, 0, 0, 0, 305, 1599, 1, 0, 0, 0, 307, 1609, 1, 0, 0, 0, 309, 1612, 1, 0, 0, 0, 311, 1623, 1, 0, 0, 0, 313, 1628, 1, 0, 0, 0, 315, 1633, 1, 0, 0, 0, 317, 1639, 1, 0, 0, 0, 319, 1646, 1, 0, 0, 0, 321, 1653, 1, 0, 0, 0, 323, 1659, 1, 0, 0, 0, 325, 1663, 1, 0, 0, 0, 327, 1667, 1, 0, 0, 0, 329, 1675, 1, 0, 0, 0, 331, 1685, 1, 0, 0, 0, 333, 1698, 1, 0, 0, 0, 335, 1705, 1, 0, 0, 0, 337, 1709, 1, 0, 0, 0, 339, 1714, 1, 0, 0, 0, 341, 1724, 1, 0, 0, 0, 343, 1729, 1, 0, 0, 0, 345, 1735, 1, 0, 0, 0, 347, 1739, 1, 0, 0, 0, 349, 1743, 1, 0, 0, 0, 351, 1747, 1, 0, 0, 0, 353, 1751, 1, 0, 0, 0, 355, 1755, 1, 0, 0, 0, 357, 1758, 1, 0, 0, 0, 359, 1761, 1, 0, 0, 0, 361, 1764, 1, 0, 0, 0, 363, 1767, 1, 0, 0, 0, 365, 1770, 1, 0, 0, 0, 367, 1773, 1, 0, 0, 0, 369, 1776, 1, 0, 0, 0, 371, 1779, 1, 0, 0, 0, 373, 1782, 1, 0, 0, 0, 375, 1785, 1, 0, 0, 0, 377, 1788, 1, 0, 0, 0, 379, 1791, 1, 0, 0, 0, 381, 1794, 1, 0, 0, 0, 383, 1797, 1, 0, 0, 0, 385, 1799, 1, 0, 0, 0, 387, 1801, 1, 0, 0, 0, 389, 1803, 1, 0, 0, 0, 391, 1805, 1, 0, 0, 0, 393, 1807, 1, 0, 0, 0, 395, 1809, 1, 0, 0, 0, 397, 1811, 1, 0, 0, 0, 399, 1813, 1, 0, 0, 0, 401, 1815, 1, 0, 0, 0, 403, 1817, 1, 0, 0, 0, 405, 1819, 1, 0, 0, 0, 407, 1821, 1, 0, 0, 0, 409, 1823, 1, 0, 0, 0, 411, 1825, 1, 0, 0, 0, 413, 1827, 1, 0, 0, 0, 415, 1829, 1, 0, 0, 0, 417, 1831, 1, 0, 0, 0, 419, 1833, 1, 0, 0, 0, 421, 1835, 1, 0, 0, 0, 423, 1837, 1, 0, 0, 0, 425, 1839, 1, 0, 0, 0, 427, 1841, 1, 0, 0, 0, 429, 1843, 1, 0, 0, 0, 431, 1845, 1, 0, 0, 0, 433, 1847, 1, 0, 0, 0, 435, 1849, 1, 0, 0, 0, 437, 1856, 1, 0, 0, 0, 439, 1867, 1, 0, 0, 0, 441, 1879, 1, 0, 0, 0, 443, 1920, 1, 0, 0, 0, 445, 1945, 1, 0, 0, 0, 447, 1947, 1, 0, 0, 0, 449, 1959, 1, 0, 0, 0, 451, 1965, 1, 0, 0, 0, 453, 454, 5, 97, 0, 0, 454, 455, 5, 98, 0, 0, 455, 456, 5, 111, 0, 0, 456, 457, 5, 117, 0, 0, 457, 458, 5, 116, 0, 0, 458, 2, 1, 0, 0, 0, 459, 460, 5, 97, 0, 0, 460, 461, 5, 98, 0, 0, 461, 462, 5, 115, 0, 0, 462, 463, 5, 116, 0, 0, 463, 464, 5, 114, 0, 0, 464, 465, 5, 97, 0, 0, 465, 466, 5, 99, 0, 0, 466, 467, 5, 116, 0, 0, 467, 4, 1, 0, 0, 0, 468, 469, 5, 97, 0, 0, 469, 470, 5, 99, 0, 0, 470, 471, 5, 99, 0, 0, 471, 472, 5, 101, 0, 0, 472, 473, 5, 112, 0, 0, 473, 474, 5, 116, 0, 0, 474, 6, 1, 0, 0, 0, 475, 476, 5, 97, 0, 0, 476, 477, 5, 99, 0, 0, 477, 478, 5, 116, 0, 0, 478, 479, 5, 105, 0, 0, 479, 480, 5, 111, 0, 0, 480, 481, 5, 110, 0, 0, 481, 8, 1, 0, 0, 0, 482, 483, 5, 97, 0, 0, 483, 484, 5, 99, 0, 0, 484, 485, 5, 116, 0, 0, 485, 486, 5, 111, 0, 0, 486, 487, 5, 114, 0, 0, 487, 10, 1, 0, 0, 0, 488, 489, 5, 97, 0, 0, 489, 490, 5, 102, 0, 0, 490, 491, 5, 116, 0, 0, 491, 492, 5, 101, 0, 0, 492, 493, 5, 114, 0, 0, 493, 12, 1, 0, 0, 0, 494, 495, 5, 97, 0, 0, 495, 496, 5, 108, 0, 0, 496, 497, 5, 105, 0, 0, 497, 498, 5, 97, 0, 0, 498, 499, 5, 115, 0, 0, 499, 14, 1, 0, 0, 0, 500, 501, 5, 97, 0, 0, 501, 502, 5, 108, 0, 0, 502, 503, 5, 108, 0, 0, 503, 16, 1, 0, 0, 0, 504, 505, 5, 97, 0, 0, 505, 506, 5, 108, 0, 0, 506, 507, 5, 108, 0, 0, 507, 508, 5, 111, 0, 0, 508, 509, 5, 99, 0, 0, 509, 510, 5, 97, 0, 0, 510, 511, 5, 116, 0, 0, 511, 512, 5, 101, 0, 0, 512, 18, 1, 0, 0, 0, 513, 514, 5, 97, 0, 0, 514, 515, 5, 108, 0, 0, 515, 516, 5, 108, 0, 0, 516, 517, 5, 111, 0, 0, 517, 518, 5, 99, 0, 0, 518, 519, 5, 97, 0, 0, 519, 520, 5, 116, 0, 0, 520, 521, 5, 105, 0, 0, 521, 522, 5, 111, 0, 0, 522, 523, 5, 110, 0, 0, 523, 20, 1, 0, 0, 0, 524, 525, 5, 97, 0, 0, 525, 526, 5, 110, 0, 0, 526, 527, 5, 97, 0, 0, 527, 528, 5, 108, 0, 0, 528, 529, 5, 121, 0, 0, 529, 530, 5, 115, 0, 0, 530, 531, 5, 105, 0, 0, 531, 532, 5, 115, 0, 0, 532, 22, 1, 0, 0, 0, 533, 534, 5, 97, 0, 0, 534, 535, 5, 110, 0, 0, 535, 536, 5, 100, 0, 0, 536, 24, 1, 0, 0, 0, 537, 538, 5, 97, 0, 0, 538, 539, 5, 115, 0, 0, 539, 26, 1, 0, 0, 0, 540, 541, 5, 97, 0, 0, 541, 542, 5, 115, 0, 0, 542, 543, 5, 115, 0, 0, 543, 544, 5, 101, 0, 0, 544, 545, 5, 114, 0, 0, 545, 546, 5, 116, 0, 0, 546, 28, 1, 0, 0, 0, 547, 548, 5, 97, 0, 0, 548, 549, 5, 115, 0, 0, 549, 550, 5, 115, 0, 0, 550, 551, 5, 105, 0, 0, 551, 552, 5, 103, 0, 0, 552, 553, 5, 110, 0, 0, 553, 30, 1, 0, 0, 0, 554, 555, 5, 97, 0, 0, 555, 556, 5, 115, 0, 0, 556, 557, 5, 115, 0, 0, 557, 558, 5, 111, 0, 0, 558, 559, 5, 99, 0, 0, 559, 32, 1, 0, 0, 0, 560, 561, 5, 97, 0, 0, 561, 562, 5, 115, 0, 0, 562, 563, 5, 115, 0, 0, 563, 564, 5, 117, 0, 0, 564, 565, 5, 109, 0, 0, 565, 566, 5, 101, 0, 0, 566, 34, 1, 0, 0, 0, 567, 568, 5, 97, 0, 0, 568, 569, 5, 116, 0, 0, 569, 36, 1, 0, 0, 0, 570, 571, 5, 97, 0, 0, 571, 572, 5, 116, 0, 0, 572, 573, 5, 116, 0, 0, 573, 574, 5, 114, 0, 0, 574, 575, 5, 105, 0, 0, 575, 576, 5, 98, 0, 0, 576, 577, 5, 117, 0, 0, 577, 578, 5, 116, 0, 0, 578, 579, 5, 101, 0, 0, 579, 38, 1, 0, 0, 0, 580, 581, 5, 98, 0, 0, 581, 582, 5, 101, 0, 0, 582, 583, 5, 104, 0, 0, 583, 584, 5, 97, 0, 0, 584, 585, 5, 118, 0, 0, 585, 586, 5, 105, 0, 0, 586, 587, 5, 111, 0, 0, 587, 588, 5, 114, 0, 0, 588, 40, 1, 0, 0, 0, 589, 590, 5, 98, 0, 0, 590, 591, 5, 105, 0, 0, 591, 592, 5, 110, 0, 0, 592, 593, 5, 100, 0, 0, 593, 42, 1, 0, 0, 0, 594, 595, 5, 98, 0, 0, 595, 596, 5, 105, 0, 0, 596, 597, 5, 110, 0, 0, 597, 598, 5, 100, 0, 0, 598, 599, 5, 105, 0, 0, 599, 600, 5, 110, 0, 0, 600, 601, 5, 103, 0, 0, 601, 44, 1, 0, 0, 0, 602, 603, 5, 98, 0, 0, 603, 604, 5, 111, 0, 0, 604, 605, 5, 111, 0, 0, 605, 606, 5, 108, 0, 0, 606, 46, 1, 0, 0, 0, 607, 608, 5, 98, 0, 0, 608, 609, 5, 121, 0, 0, 609, 48, 1, 0, 0, 0, 610, 611, 5, 99, 0, 0, 611, 612, 5, 97, 0, 0, 612, 613, 5, 108, 0, 0, 613, 614, 5, 99, 0, 0, 614, 50, 1, 0, 0, 0, 615, 616, 5, 99, 0, 0, 616, 617, 5, 97, 0, 0, 617, 618, 5, 115, 0, 0, 618, 619, 5, 101, 0, 0, 619, 52, 1, 0, 0, 0, 620, 621, 5, 99, 0, 0, 621, 622, 5, 104, 0, 0, 622, 623, 5, 97, 0, 0, 623, 624, 5, 105, 0, 0, 624, 625, 5, 110, 0, 0, 625, 626, 5, 115, 0, 0, 626, 54, 1, 0, 0, 0, 627, 628, 5, 99, 0, 0, 628, 629, 5, 108, 0, 0, 629, 630, 5, 97, 0, 0, 630, 631, 5, 115, 0, 0, 631, 632, 5, 115, 0, 0, 632, 56, 1, 0, 0, 0, 633, 634, 5, 99, 0, 0, 634, 635, 5, 108, 0, 0, 635, 636, 5, 97, 0, 0, 636, 637, 5, 115, 0, 0, 637, 638, 5, 115, 0, 0, 638, 639, 5, 105, 0, 0, 639, 640, 5, 102, 0, 0, 640, 641, 5, 105, 0, 0, 641, 642, 5, 101, 0, 0, 642, 643, 5, 114, 0, 0, 643, 58, 1, 0, 0, 0, 644, 645, 5, 99, 0, 0, 645, 646, 5, 111, 0, 0, 646, 647, 5, 109, 0, 0, 647, 648, 5, 109, 0, 0, 648, 649, 5, 101, 0, 0, 649, 650, 5, 110, 0, 0, 650, 651, 5, 116, 0, 0, 651, 60, 1, 0, 0, 0, 652, 653, 5, 99, 0, 0, 653, 654, 5, 111, 0, 0, 654, 655, 5, 109, 0, 0, 655, 656, 5, 112, 0, 0, 656, 657, 5, 111, 0, 0, 657, 658, 5, 115, 0, 0, 658, 659, 5, 105, 0, 0, 659, 660, 5, 116, 0, 0, 660, 661, 5, 101, 0, 0, 661, 62, 1, 0, 0, 0, 662, 663, 5, 99, 0, 0, 663, 664, 5, 111, 0, 0, 664, 665, 5, 110, 0, 0, 665, 666, 5, 99, 0, 0, 666, 667, 5, 101, 0, 0, 667, 668, 5, 114, 0, 0, 668, 669, 5, 110, 0, 0, 669, 64, 1, 0, 0, 0, 670, 671, 5, 99, 0, 0, 671, 672, 5, 111, 0, 0, 672, 673, 5, 110, 0, 0, 673, 674, 5, 106, 0, 0, 674, 675, 5, 117, 0, 0, 675, 676, 5, 103, 0, 0, 676, 677, 5, 97, 0, 0, 677, 678, 5, 116, 0, 0, 678, 679, 5, 101, 0, 0, 679, 66, 1, 0, 0, 0, 680, 681, 5, 99, 0, 0, 681, 682, 5, 111, 0, 0, 682, 683, 5, 110, 0, 0, 683, 684, 5, 106, 0, 0, 684, 685, 5, 117, 0, 0, 685, 686, 5, 103, 0, 0, 686, 687, 5, 97, 0, 0, 687, 688, 5, 116, 0, 0, 688, 689, 5, 101, 0, 0, 689, 690, 5, 115, 0, 0, 690, 68, 1, 0, 0, 0, 691, 692, 5, 99, 0, 0, 692, 693, 5, 111, 0, 0, 693, 694, 5, 110, 0, 0, 694, 695, 5, 106, 0, 0, 695, 696, 5, 117, 0, 0, 696, 697, 5, 103, 0, 0, 697, 698, 5, 97, 0, 0, 698, 699, 5, 116, 0, 0, 699, 700, 5, 105, 0, 0, 700, 701, 5, 111, 0, 0, 701, 702, 5, 110, 0, 0, 702, 70, 1, 0, 0, 0, 703, 704, 5, 99, 0, 0, 704, 705, 5, 111, 0, 0, 705, 706, 5, 110, 0, 0, 706, 707, 5, 110, 0, 0, 707, 708, 5, 101, 0, 0, 708, 709, 5, 99, 0, 0, 709, 710, 5, 116, 0, 0, 710, 72, 1, 0, 0, 0, 711, 712, 5, 99, 0, 0, 712, 713, 5, 111, 0, 0, 713, 714, 5, 110, 0, 0, 714, 715, 5, 110, 0, 0, 715, 716, 5, 101, 0, 0, 716, 717, 5, 99, 0, 0, 717, 718, 5, 116, 0, 0, 718, 719, 5, 105, 0, 0, 719, 720, 5, 111, 0, 0, 720, 721, 5, 110, 0, 0, 721, 74, 1, 0, 0, 0, 722, 723, 5, 99, 0, 0, 723, 724, 5, 111, 0, 0, 724, 725, 5, 110, 0, 0, 725, 726, 5, 110, 0, 0, 726, 727, 5, 101, 0, 0, 727, 728, 5, 99, 0, 0, 728, 729, 5, 116, 0, 0, 729, 730, 5, 111, 0, 0, 730, 731, 5, 114, 0, 0, 731, 76, 1, 0, 0, 0, 732, 733, 5, 99, 0, 0, 733, 734, 5, 111, 0, 0, 734, 735, 5, 110, 0, 0, 735, 736, 5, 115, 0, 0, 736, 737, 5, 116, 0, 0, 737, 78, 1, 0, 0, 0, 738, 739, 5, 99, 0, 0, 739, 740, 5, 111, 0, 0, 740, 741, 5, 110, 0, 0, 741, 742, 5, 115, 0, 0, 742, 743, 5, 116, 0, 0, 743, 744, 5, 97, 0, 0, 744, 745, 5, 110, 0, 0, 745, 746, 5, 116, 0, 0, 746, 80, 1, 0, 0, 0, 747, 748, 5, 99, 0, 0, 748, 749, 5, 111, 0, 0, 749, 750, 5, 110, 0, 0, 750, 751, 5, 115, 0, 0, 751, 752, 5, 116, 0, 0, 752, 753, 5, 114, 0, 0, 753, 754, 5, 97, 0, 0, 754, 755, 5, 105, 0, 0, 755, 756, 5, 110, 0, 0, 756, 757, 5, 116, 0, 0, 757, 82, 1, 0, 0, 0, 758, 759, 5, 99, 0, 0, 759, 760, 5, 114, 0, 0, 760, 761, 5, 111, 0, 0, 761, 762, 5, 115, 0, 0, 762, 763, 5, 115, 0, 0, 763, 764, 5, 101, 0, 0, 764, 765, 5, 115, 0, 0, 765, 84, 1, 0, 0, 0, 766, 767, 5, 100, 0, 0, 767, 768, 5, 97, 0, 0, 768, 769, 5, 116, 0, 0, 769, 770, 5, 97, 0, 0, 770, 771, 5, 116, 0, 0, 771, 772, 5, 121, 0, 0, 772, 773, 5, 112, 0, 0, 773, 774, 5, 101, 0, 0, 774, 86, 1, 0, 0, 0, 775, 776, 5, 100, 0, 0, 776, 777, 5, 101, 0, 0, 777, 778, 5, 99, 0, 0, 778, 779, 5, 105, 0, 0, 779, 780, 5, 100, 0, 0, 780, 781, 5, 101, 0, 0, 781, 88, 1, 0, 0, 0, 782, 783, 5, 100, 0, 0, 783, 784, 5, 101, 0, 0, 784, 785, 5, 102, 0, 0, 785, 90, 1, 0, 0, 0, 786, 787, 5, 100, 0, 0, 787, 788, 5, 101, 0, 0, 788, 789, 5, 102, 0, 0, 789, 790, 5, 97, 0, 0, 790, 791, 5, 117, 0, 0, 791, 792, 5, 108, 0, 0, 792, 793, 5, 116, 0, 0, 793, 92, 1, 0, 0, 0, 794, 795, 5, 100, 0, 0, 795, 796, 5, 101, 0, 0, 796, 797, 5, 102, 0, 0, 797, 798, 5, 105, 0, 0, 798, 799, 5, 110, 0, 0, 799, 800, 5, 101, 0, 0, 800, 801, 5, 100, 0, 0, 801, 94, 1, 0, 0, 0, 802, 803, 5, 100, 0, 0, 803, 804, 5, 101, 0, 0, 804, 805, 5, 112, 0, 0, 805, 806, 5, 101, 0, 0, 806, 807, 5, 110, 0, 0, 807, 808, 5, 100, 0, 0, 808, 809, 5, 101, 0, 0, 809, 810, 5, 110, 0, 0, 810, 811, 5, 99, 0, 0, 811, 812, 5, 121, 0, 0, 812, 96, 1, 0, 0, 0, 813, 814, 5, 100, 0, 0, 814, 815, 5, 101, 0, 0, 815, 816, 5, 114, 0, 0, 816, 817, 5, 105, 0, 0, 817, 818, 5, 118, 0, 0, 818, 819, 5, 101, 0, 0, 819, 820, 5, 100, 0, 0, 820, 98, 1, 0, 0, 0, 821, 822, 5, 100, 0, 0, 822, 823, 5, 105, 0, 0, 823, 824, 5, 102, 0, 0, 824, 825, 5, 102, 0, 0, 825, 826, 5, 101, 0, 0, 826, 827, 5, 114, 0, 0, 827, 828, 5, 101, 0, 0, 828, 829, 5, 110, 0, 0, 829, 830, 5, 99, 0, 0, 830, 831, 5, 101, 0, 0, 831, 832, 5, 115, 0, 0, 832, 100, 1, 0, 0, 0, 833, 834, 5, 100, 0, 0, 834, 835, 5, 105, 0, 0, 835, 836, 5, 115, 0, 0, 836, 837, 5, 106, 0, 0, 837, 838, 5, 111, 0, 0, 838, 839, 5, 105, 0, 0, 839, 840, 5, 110, 0, 0, 840, 841, 5, 105, 0, 0, 841, 842, 5, 110, 0, 0, 842, 843, 5, 103, 0, 0, 843, 102, 1, 0, 0, 0, 844, 845, 5, 100, 0, 0, 845, 846, 5, 105, 0, 0, 846, 847, 5, 115, 0, 0, 847, 848, 5, 106, 0, 0, 848, 849, 5, 111, 0, 0, 849, 850, 5, 105, 0, 0, 850, 851, 5, 110, 0, 0, 851, 852, 5, 116, 0, 0, 852, 104, 1, 0, 0, 0, 853, 854, 5, 100, 0, 0, 854, 855, 5, 111, 0, 0, 855, 106, 1, 0, 0, 0, 856, 857, 5, 100, 0, 0, 857, 858, 5, 111, 0, 0, 858, 859, 5, 99, 0, 0, 859, 108, 1, 0, 0, 0, 860, 861, 5, 101, 0, 0, 861, 862, 5, 108, 0, 0, 862, 863, 5, 115, 0, 0, 863, 864, 5, 101, 0, 0, 864, 110, 1, 0, 0, 0, 865, 866, 5, 101, 0, 0, 866, 867, 5, 110, 0, 0, 867, 868, 5, 100, 0, 0, 868, 112, 1, 0, 0, 0, 869, 870, 5, 101, 0, 0, 870, 871, 5, 110, 0, 0, 871, 872, 5, 116, 0, 0, 872, 873, 5, 114, 0, 0, 873, 874, 5, 121, 0, 0, 874, 114, 1, 0, 0, 0, 875, 876, 5, 101, 0, 0, 876, 877, 5, 110, 0, 0, 877, 878, 5, 117, 0, 0, 878, 879, 5, 109, 0, 0, 879, 116, 1, 0, 0, 0, 880, 881, 5, 101, 0, 0, 881, 882, 5, 118, 0, 0, 882, 883, 5, 101, 0, 0, 883, 884, 5, 110, 0, 0, 884, 885, 5, 116, 0, 0, 885, 118, 1, 0, 0, 0, 886, 887, 5, 101, 0, 0, 887, 888, 5, 120, 0, 0, 888, 889, 5, 104, 0, 0, 889, 890, 5, 105, 0, 0, 890, 891, 5, 98, 0, 0, 891, 892, 5, 105, 0, 0, 892, 893, 5, 116, 0, 0, 893, 120, 1, 0, 0, 0, 894, 895, 5, 101, 0, 0, 895, 896, 5, 120, 0, 0, 896, 897, 5, 105, 0, 0, 897, 898, 5, 116, 0, 0, 898, 122, 1, 0, 0, 0, 899, 900, 5, 101, 0, 0, 900, 901, 5, 120, 0, 0, 901, 902, 5, 112, 0, 0, 902, 903, 5, 111, 0, 0, 903, 904, 5, 115, 0, 0, 904, 905, 5, 101, 0, 0, 905, 124, 1, 0, 0, 0, 906, 907, 5, 101, 0, 0, 907, 908, 5, 120, 0, 0, 908, 909, 5, 112, 0, 0, 909, 910, 5, 114, 0, 0, 910, 126, 1, 0, 0, 0, 911, 912, 5, 102, 0, 0, 912, 913, 5, 97, 0, 0, 913, 914, 5, 108, 0, 0, 914, 915, 5, 115, 0, 0, 915, 916, 5, 101, 0, 0, 916, 128, 1, 0, 0, 0, 917, 918, 5, 102, 0, 0, 918, 919, 5, 101, 0, 0, 919, 920, 5, 97, 0, 0, 920, 921, 5, 116, 0, 0, 921, 922, 5, 117, 0, 0, 922, 923, 5, 114, 0, 0, 923, 924, 5, 101, 0, 0, 924, 130, 1, 0, 0, 0, 925, 926, 5, 102, 0, 0, 926, 927, 5, 101, 0, 0, 927, 928, 5, 97, 0, 0, 928, 929, 5, 116, 0, 0, 929, 930, 5, 117, 0, 0, 930, 931, 5, 114, 0, 0, 931, 932, 5, 101, 0, 0, 932, 933, 5, 100, 0, 0, 933, 132, 1, 0, 0, 0, 934, 935, 5, 102, 0, 0, 935, 936, 5, 101, 0, 0, 936, 937, 5, 97, 0, 0, 937, 938, 5, 116, 0, 0, 938, 939, 5, 117, 0, 0, 939, 940, 5, 114, 0, 0, 940, 941, 5, 105, 0, 0, 941, 942, 5, 110, 0, 0, 942, 943, 5, 103, 0, 0, 943, 134, 1, 0, 0, 0, 944, 945, 5, 102, 0, 0, 945, 946, 5, 105, 0, 0, 946, 947, 5, 108, 0, 0, 947, 948, 5, 116, 0, 0, 948, 949, 5, 101, 0, 0, 949, 950, 5, 114, 0, 0, 950, 136, 1, 0, 0, 0, 951, 952, 5, 102, 0, 0, 952, 953, 5, 105, 0, 0, 953, 954, 5, 114, 0, 0, 954, 955, 5, 115, 0, 0, 955, 956, 5, 116, 0, 0, 956, 138, 1, 0, 0, 0, 957, 958, 5, 102, 0, 0, 958, 959, 5, 108, 0, 0, 959, 960, 5, 111, 0, 0, 960, 961, 5, 119, 0, 0, 961, 140, 1, 0, 0, 0, 962, 963, 5, 102, 0, 0, 963, 964, 5, 111, 0, 0, 964, 965, 5, 114, 0, 0, 965, 142, 1, 0, 0, 0, 966, 967, 5, 102, 0, 0, 967, 968, 5, 111, 0, 0, 968, 969, 5, 114, 0, 0, 969, 970, 5, 107, 0, 0, 970, 144, 1, 0, 0, 0, 971, 972, 5, 102, 0, 0, 972, 973, 5, 114, 0, 0, 973, 974, 5, 97, 0, 0, 974, 975, 5, 109, 0, 0, 975, 976, 5, 101, 0, 0, 976, 146, 1, 0, 0, 0, 977, 978, 5, 102, 0, 0, 978, 979, 5, 114, 0, 0, 979, 980, 5, 111, 0, 0, 980, 981, 5, 109, 0, 0, 981, 148, 1, 0, 0, 0, 982, 983, 5, 102, 0, 0, 983, 984, 5, 117, 0, 0, 984, 985, 5, 110, 0, 0, 985, 986, 5, 99, 0, 0, 986, 987, 5, 116, 0, 0, 987, 988, 5, 105, 0, 0, 988, 989, 5, 111, 0, 0, 989, 990, 5, 110, 0, 0, 990, 150, 1, 0, 0, 0, 991, 992, 5, 104, 0, 0, 992, 993, 5, 97, 0, 0, 993, 994, 5, 115, 0, 0, 994, 995, 5, 116, 0, 0, 995, 996, 5, 121, 0, 0, 996, 997, 5, 112, 0, 0, 997, 998, 5, 101, 0, 0, 998, 152, 1, 0, 0, 0, 999, 1000, 5, 105, 0, 0, 1000, 1001, 5, 102, 0, 0, 1001, 154, 1, 0, 0, 0, 1002, 1003, 5, 105, 0, 0, 1003, 1004, 5, 109, 0, 0, 1004, 1005, 5, 112, 0, 0, 1005, 1006, 5, 108, 0, 0, 1006, 1007, 5, 105, 0, 0, 1007, 1008, 5, 101, 0, 0, 1008, 1009, 5, 115, 0, 0, 1009, 156, 1, 0, 0, 0, 1010, 1011, 5, 105, 0, 0, 1011, 1012, 5, 109, 0, 0, 1012, 1013, 5, 112, 0, 0, 1013, 1014, 5, 111, 0, 0, 1014, 1015, 5, 114, 0, 0, 1015, 1016, 5, 116, 0, 0, 1016, 158, 1, 0, 0, 0, 1017, 1018, 5, 105, 0, 0, 1018, 1019, 5, 110, 0, 0, 1019, 160, 1, 0, 0, 0, 1020, 1021, 5, 105, 0, 0, 1021, 1022, 5, 110, 0, 0, 1022, 1023, 5, 99, 0, 0, 1023, 1024, 5, 108, 0, 0, 1024, 1025, 5, 117, 0, 0, 1025, 1026, 5, 100, 0, 0, 1026, 1027, 5, 101, 0, 0, 1027, 162, 1, 0, 0, 0, 1028, 1029, 5, 105, 0, 0, 1029, 1030, 5, 110, 0, 0, 1030, 1031, 5, 100, 0, 0, 1031, 1032, 5, 105, 0, 0, 1032, 1033, 5, 118, 0, 0, 1033, 1034, 5, 105, 0, 0, 1034, 1035, 5, 100, 0, 0, 1035, 1036, 5, 117, 0, 0, 1036, 1037, 5, 97, 0, 0, 1037, 1038, 5, 108, 0, 0, 1038, 164, 1, 0, 0, 0, 1039, 1040, 5, 105, 0, 0, 1040, 1041, 5, 110, 0, 0, 1041, 1042, 5, 111, 0, 0, 1042, 1043, 5, 117, 0, 0, 1043, 1044, 5, 116, 0, 0, 1044, 166, 1, 0, 0, 0, 1045, 1046, 5, 105, 0, 0, 1046, 1047, 5, 110, 0, 0, 1047, 1048, 5, 116, 0, 0, 1048, 1049, 5, 101, 0, 0, 1049, 1050, 5, 114, 0, 0, 1050, 1051, 5, 97, 0, 0, 1051, 1052, 5, 99, 0, 0, 1052, 1053, 5, 116, 0, 0, 1053, 1054, 5, 105, 0, 0, 1054, 1055, 5, 111, 0, 0, 1055, 1056, 5, 110, 0, 0, 1056, 168, 1, 0, 0, 0, 1057, 1058, 5, 105, 0, 0, 1058, 1059, 5, 110, 0, 0, 1059, 1060, 5, 116, 0, 0, 1060, 1061, 5, 101, 0, 0, 1061, 1062, 5, 114, 0, 0, 1062, 1063, 5, 102, 0, 0, 1063, 1064, 5, 97, 0, 0, 1064, 1065, 5, 99, 0, 0, 1065, 1066, 5, 101, 0, 0, 1066, 170, 1, 0, 0, 0, 1067, 1068, 5, 105, 0, 0, 1068, 1069, 5, 110, 0, 0, 1069, 1070, 5, 116, 0, 0, 1070, 1071, 5, 101, 0, 0, 1071, 1072, 5, 114, 0, 0, 1072, 1073, 5, 115, 0, 0, 1073, 1074, 5, 101, 0, 0, 1074, 1075, 5, 99, 0, 0, 1075, 1076, 5, 116, 0, 0, 1076, 1077, 5, 115, 0, 0, 1077, 172, 1, 0, 0, 0, 1078, 1079, 5, 105, 0, 0, 1079, 1080, 5, 110, 0, 0, 1080, 1081, 5, 118, 0, 0, 1081, 174, 1, 0, 0, 0, 1082, 1083, 5, 105, 0, 0, 1083, 1084, 5, 110, 0, 0, 1084, 1085, 5, 118, 0, 0, 1085, 1086, 5, 101, 0, 0, 1086, 1087, 5, 114, 0, 0, 1087, 1088, 5, 115, 0, 0, 1088, 1089, 5, 101, 0, 0, 1089, 176, 1, 0, 0, 0, 1090, 1091, 5, 105, 0, 0, 1091, 1092, 5, 110, 0, 0, 1092, 1093, 5, 118, 0, 0, 1093, 1094, 5, 101, 0, 0, 1094, 1095, 5, 114, 0, 0, 1095, 1096, 5, 116, 0, 0, 1096, 1097, 5, 105, 0, 0, 1097, 1098, 5, 110, 0, 0, 1098, 1099, 5, 103, 0, 0, 1099, 178, 1, 0, 0, 0, 1100, 1101, 5, 105, 0, 0, 1101, 1102, 5, 115, 0, 0, 1102, 1103, 5, 116, 0, 0, 1103, 1104, 5, 121, 0, 0, 1104, 1105, 5, 112, 0, 0, 1105, 1106, 5, 101, 0, 0, 1106, 180, 1, 0, 0, 0, 1107, 1108, 5, 105, 0, 0, 1108, 1109, 5, 116, 0, 0, 1109, 1110, 5, 101, 0, 0, 1110, 1111, 5, 109, 0, 0, 1111, 182, 1, 0, 0, 0, 1112, 1113, 5, 106, 0, 0, 1113, 1114, 5, 111, 0, 0, 1114, 1115, 5, 105, 0, 0, 1115, 1116, 5, 110, 0, 0, 1116, 184, 1, 0, 0, 0, 1117, 1118, 5, 108, 0, 0, 1118, 1119, 5, 97, 0, 0, 1119, 1120, 5, 110, 0, 0, 1120, 1121, 5, 103, 0, 0, 1121, 1122, 5, 117, 0, 0, 1122, 1123, 5, 97, 0, 0, 1123, 1124, 5, 103, 0, 0, 1124, 1125, 5, 101, 0, 0, 1125, 186, 1, 0, 0, 0, 1126, 1127, 5, 108, 0, 0, 1127, 1128, 5, 105, 0, 0, 1128, 1129, 5, 98, 0, 0, 1129, 1130, 5, 114, 0, 0, 1130, 1131, 5, 97, 0, 0, 1131, 1132, 5, 114, 0, 0, 1132, 1133, 5, 121, 0, 0, 1133, 188, 1, 0, 0, 0, 1134, 1135, 5, 108, 0, 0, 1135, 1136, 5, 111, 0, 0, 1136, 1137, 5, 99, 0, 0, 1137, 1138, 5, 97, 0, 0, 1138, 1139, 5, 108, 0, 0, 1139, 1140, 5, 101, 0, 0, 1140, 190, 1, 0, 0, 0, 1141, 1142, 5, 108, 0, 0, 1142, 1143, 5, 111, 0, 0, 1143, 1144, 5, 111, 0, 0, 1144, 1145, 5, 112, 0, 0, 1145, 192, 1, 0, 0, 0, 1146, 1147, 5, 109, 0, 0, 1147, 1148, 5, 101, 0, 0, 1148, 1149, 5, 109, 0, 0, 1149, 1150, 5, 98, 0, 0, 1150, 1151, 5, 101, 0, 0, 1151, 1152, 5, 114, 0, 0, 1152, 194, 1, 0, 0, 0, 1153, 1154, 5, 109, 0, 0, 1154, 1155, 5, 101, 0, 0, 1155, 1156, 5, 114, 0, 0, 1156, 1157, 5, 103, 0, 0, 1157, 1158, 5, 101, 0, 0, 1158, 196, 1, 0, 0, 0, 1159, 1160, 5, 109, 0, 0, 1160, 1161, 5, 101, 0, 0, 1161, 1162, 5, 115, 0, 0, 1162, 1163, 5, 115, 0, 0, 1163, 1164, 5, 97, 0, 0, 1164, 1165, 5, 103, 0, 0, 1165, 1166, 5, 101, 0, 0, 1166, 198, 1, 0, 0, 0, 1167, 1168, 5, 109, 0, 0, 1168, 1169, 5, 101, 0, 0, 1169, 1170, 5, 116, 0, 0, 1170, 1171, 5, 97, 0, 0, 1171, 200, 1, 0, 0, 0, 1172, 1173, 5, 109, 0, 0, 1173, 1174, 5, 101, 0, 0, 1174, 1175, 5, 116, 0, 0, 1175, 1176, 5, 97, 0, 0, 1176, 1177, 5, 99, 0, 0, 1177, 1178, 5, 108, 0, 0, 1178, 1179, 5, 97, 0, 0, 1179, 1180, 5, 115, 0, 0, 1180, 1181, 5, 115, 0, 0, 1181, 202, 1, 0, 0, 0, 1182, 1183, 5, 109, 0, 0, 1183, 1184, 5, 101, 0, 0, 1184, 1185, 5, 116, 0, 0, 1185, 1186, 5, 97, 0, 0, 1186, 1187, 5, 100, 0, 0, 1187, 1188, 5, 97, 0, 0, 1188, 1189, 5, 116, 0, 0, 1189, 1190, 5, 97, 0, 0, 1190, 204, 1, 0, 0, 0, 1191, 1192, 5, 109, 0, 0, 1192, 1193, 5, 117, 0, 0, 1193, 1194, 5, 108, 0, 0, 1194, 1195, 5, 116, 0, 0, 1195, 1196, 5, 105, 0, 0, 1196, 1197, 5, 112, 0, 0, 1197, 1198, 5, 108, 0, 0, 1198, 1199, 5, 105, 0, 0, 1199, 1200, 5, 99, 0, 0, 1200, 1201, 5, 105, 0, 0, 1201, 1202, 5, 116, 0, 0, 1202, 1203, 5, 121, 0, 0, 1203, 206, 1, 0, 0, 0, 1204, 1205, 5, 110, 0, 0, 1205, 1206, 5, 97, 0, 0, 1206, 1207, 5, 109, 0, 0, 1207, 1208, 5, 101, 0, 0, 1208, 1209, 5, 115, 0, 0, 1209, 1210, 5, 112, 0, 0, 1210, 1211, 5, 97, 0, 0, 1211, 1212, 5, 99, 0, 0, 1212, 1213, 5, 101, 0, 0, 1213, 208, 1, 0, 0, 0, 1214, 1215, 5, 110, 0, 0, 1215, 1216, 5, 101, 0, 0, 1216, 1217, 5, 119, 0, 0, 1217, 210, 1, 0, 0, 0, 1218, 1219, 5, 110, 0, 0, 1219, 1220, 5, 111, 0, 0, 1220, 1221, 5, 110, 0, 0, 1221, 1222, 5, 117, 0, 0, 1222, 1223, 5, 110, 0, 0, 1223, 1224, 5, 105, 0, 0, 1224, 1225, 5, 113, 0, 0, 1225, 1226, 5, 117, 0, 0, 1226, 1227, 5, 101, 0, 0, 1227, 212, 1, 0, 0, 0, 1228, 1229, 5, 110, 0, 0, 1229, 1230, 5, 111, 0, 0, 1230, 1231, 5, 116, 0, 0, 1231, 214, 1, 0, 0, 0, 1232, 1233, 5, 110, 0, 0, 1233, 1234, 5, 117, 0, 0, 1234, 1235, 5, 108, 0, 0, 1235, 1236, 5, 108, 0, 0, 1236, 216, 1, 0, 0, 0, 1237, 1238, 5, 111, 0, 0, 1238, 1239, 5, 98, 0, 0, 1239, 1240, 5, 106, 0, 0, 1240, 1241, 5, 101, 0, 0, 1241, 1242, 5, 99, 0, 0, 1242, 1243, 5, 116, 0, 0, 1243, 1244, 5, 105, 0, 0, 1244, 1245, 5, 118, 0, 0, 1245, 1246, 5, 101, 0, 0, 1246, 218, 1, 0, 0, 0, 1247, 1248, 5, 111, 0, 0, 1248, 1249, 5, 99, 0, 0, 1249, 1250, 5, 99, 0, 0, 1250, 1251, 5, 117, 0, 0, 1251, 1252, 5, 114, 0, 0, 1252, 1253, 5, 114, 0, 0, 1253, 1254, 5, 101, 0, 0, 1254, 1255, 5, 110, 0, 0, 1255, 1256, 5, 99, 0, 0, 1256, 1257, 5, 101, 0, 0, 1257, 220, 1, 0, 0, 0, 1258, 1259, 5, 111, 0, 0, 1259, 1260, 5, 102, 0, 0, 1260, 222, 1, 0, 0, 0, 1261, 1262, 5, 111, 0, 0, 1262, 1263, 5, 114, 0, 0, 1263, 224, 1, 0, 0, 0, 1264, 1265, 5, 111, 0, 0, 1265, 1266, 5, 114, 0, 0, 1266, 1267, 5, 100, 0, 0, 1267, 1268, 5, 101, 0, 0, 1268, 1269, 5, 114, 0, 0, 1269, 1270, 5, 101, 0, 0, 1270, 1271, 5, 100, 0, 0, 1271, 226, 1, 0, 0, 0, 1272, 1273, 5, 111, 0, 0, 1273, 1274, 5, 117, 0, 0, 1274, 1275, 5, 116, 0, 0, 1275, 228, 1, 0, 0, 0, 1276, 1277, 5, 112, 0, 0, 1277, 1278, 5, 97, 0, 0, 1278, 1279, 5, 99, 0, 0, 1279, 1280, 5, 107, 0, 0, 1280, 1281, 5, 97, 0, 0, 1281, 1282, 5, 103, 0, 0, 1282, 1283, 5, 101, 0, 0, 1283, 230, 1, 0, 0, 0, 1284, 1285, 5, 112, 0, 0, 1285, 1286, 5, 97, 0, 0, 1286, 1287, 5, 114, 0, 0, 1287, 1288, 5, 97, 0, 0, 1288, 1289, 5, 108, 0, 0, 1289, 1290, 5, 108, 0, 0, 1290, 1291, 5, 101, 0, 0, 1291, 1292, 5, 108, 0, 0, 1292, 232, 1, 0, 0, 0, 1293, 1294, 5, 112, 0, 0, 1294, 1295, 5, 97, 0, 0, 1295, 1296, 5, 114, 0, 0, 1296, 1297, 5, 116, 0, 0, 1297, 234, 1, 0, 0, 0, 1298, 1299, 5, 112, 0, 0, 1299, 1300, 5, 101, 0, 0, 1300, 1301, 5, 114, 0, 0, 1301, 1302, 5, 102, 0, 0, 1302, 1303, 5, 111, 0, 0, 1303, 1304, 5, 114, 0, 0, 1304, 1305, 5, 109, 0, 0, 1305, 236, 1, 0, 0, 0, 1306, 1307, 5, 112, 0, 0, 1307, 1308, 5, 111, 0, 0, 1308, 1309, 5, 114, 0, 0, 1309, 1310, 5, 116, 0, 0, 1310, 238, 1, 0, 0, 0, 1311, 1312, 5, 112, 0, 0, 1312, 1313, 5, 111, 0, 0, 1313, 1314, 5, 114, 0, 0, 1314, 1315, 5, 116, 0, 0, 1315, 1316, 5, 105, 0, 0, 1316, 1317, 5, 111, 0, 0, 1317, 1318, 5, 110, 0, 0, 1318, 240, 1, 0, 0, 0, 1319, 1320, 5, 112, 0, 0, 1320, 1321, 5, 114, 0, 0, 1321, 1322, 5, 101, 0, 0, 1322, 1323, 5, 100, 0, 0, 1323, 1324, 5, 105, 0, 0, 1324, 1325, 5, 99, 0, 0, 1325, 1326, 5, 97, 0, 0, 1326, 1327, 5, 116, 0, 0, 1327, 1328, 5, 101, 0, 0, 1328, 242, 1, 0, 0, 0, 1329, 1330, 5, 112, 0, 0, 1330, 1331, 5, 114, 0, 0, 1331, 1332, 5, 105, 0, 0, 1332, 1333, 5, 118, 0, 0, 1333, 1334, 5, 97, 0, 0, 1334, 1335, 5, 116, 0, 0, 1335, 1336, 5, 101, 0, 0, 1336, 244, 1, 0, 0, 0, 1337, 1338, 5, 112, 0, 0, 1338, 1339, 5, 114, 0, 0, 1339, 1340, 5, 111, 0, 0, 1340, 1341, 5, 116, 0, 0, 1341, 1342, 5, 101, 0, 0, 1342, 1343, 5, 99, 0, 0, 1343, 1344, 5, 116, 0, 0, 1344, 1345, 5, 101, 0, 0, 1345, 1346, 5, 100, 0, 0, 1346, 246, 1, 0, 0, 0, 1347, 1348, 5, 112, 0, 0, 1348, 1349, 5, 117, 0, 0, 1349, 1350, 5, 98, 0, 0, 1350, 1351, 5, 108, 0, 0, 1351, 1352, 5, 105, 0, 0, 1352, 1353, 5, 99, 0, 0, 1353, 248, 1, 0, 0, 0, 1354, 1355, 5, 114, 0, 0, 1355, 1356, 5, 101, 0, 0, 1356, 1357, 5, 100, 0, 0, 1357, 1358, 5, 101, 0, 0, 1358, 1359, 5, 102, 0, 0, 1359, 1360, 5, 105, 0, 0, 1360, 1361, 5, 110, 0, 0, 1361, 1362, 5, 101, 0, 0, 1362, 1363, 5, 115, 0, 0, 1363, 250, 1, 0, 0, 0, 1364, 1365, 5, 114, 0, 0, 1365, 1366, 5, 101, 0, 0, 1366, 1367, 5, 100, 0, 0, 1367, 1368, 5, 101, 0, 0, 1368, 1369, 5, 102, 0, 0, 1369, 1370, 5, 105, 0, 0, 1370, 1371, 5, 110, 0, 0, 1371, 1372, 5, 105, 0, 0, 1372, 1373, 5, 116, 0, 0, 1373, 1374, 5, 105, 0, 0, 1374, 1375, 5, 111, 0, 0, 1375, 1376, 5, 110, 0, 0, 1376, 252, 1, 0, 0, 0, 1377, 1378, 5, 114, 0, 0, 1378, 1379, 5, 101, 0, 0, 1379, 1380, 5, 102, 0, 0, 1380, 254, 1, 0, 0, 0, 1381, 1382, 5, 114, 0, 0, 1382, 1383, 5, 101, 0, 0, 1383, 1384, 5, 102, 0, 0, 1384, 1385, 5, 101, 0, 0, 1385, 1386, 5, 114, 0, 0, 1386, 1387, 5, 101, 0, 0, 1387, 1388, 5, 110, 0, 0, 1388, 1389, 5, 99, 0, 0, 1389, 1390, 5, 101, 0, 0, 1390, 1391, 5, 115, 0, 0, 1391, 256, 1, 0, 0, 0, 1392, 1393, 5, 114, 0, 0, 1393, 1394, 5, 101, 0, 0, 1394, 1395, 5, 110, 0, 0, 1395, 1396, 5, 100, 0, 0, 1396, 1397, 5, 101, 0, 0, 1397, 1398, 5, 114, 0, 0, 1398, 258, 1, 0, 0, 0, 1399, 1400, 5, 114, 0, 0, 1400, 1401, 5, 101, 0, 0, 1401, 1402, 5, 110, 0, 0, 1402, 1403, 5, 100, 0, 0, 1403, 1404, 5, 101, 0, 0, 1404, 1405, 5, 114, 0, 0, 1405, 1406, 5, 105, 0, 0, 1406, 1407, 5, 110, 0, 0, 1407, 1408, 5, 103, 0, 0, 1408, 260, 1, 0, 0, 0, 1409, 1410, 5, 114, 0, 0, 1410, 1411, 5, 101, 0, 0, 1411, 1412, 5, 112, 0, 0, 1412, 262, 1, 0, 0, 0, 1413, 1414, 5, 114, 0, 0, 1414, 1415, 5, 101, 0, 0, 1415, 1416, 5, 113, 0, 0, 1416, 1417, 5, 117, 0, 0, 1417, 1418, 5, 105, 0, 0, 1418, 1419, 5, 114, 0, 0, 1419, 1420, 5, 101, 0, 0, 1420, 264, 1, 0, 0, 0, 1421, 1422, 5, 114, 0, 0, 1422, 1423, 5, 101, 0, 0, 1423, 1424, 5, 113, 0, 0, 1424, 1425, 5, 117, 0, 0, 1425, 1426, 5, 105, 0, 0, 1426, 1427, 5, 114, 0, 0, 1427, 1428, 5, 101, 0, 0, 1428, 1429, 5, 109, 0, 0, 1429, 1430, 5, 101, 0, 0, 1430, 1431, 5, 110, 0, 0, 1431, 1432, 5, 116, 0, 0, 1432, 266, 1, 0, 0, 0, 1433, 1434, 5, 114, 0, 0, 1434, 1435, 5, 101, 0, 0, 1435, 1436, 5, 116, 0, 0, 1436, 1437, 5, 117, 0, 0, 1437, 1438, 5, 114, 0, 0, 1438, 1439, 5, 110, 0, 0, 1439, 268, 1, 0, 0, 0, 1440, 1441, 5, 115, 0, 0, 1441, 1442, 5, 97, 0, 0, 1442, 1443, 5, 116, 0, 0, 1443, 1444, 5, 105, 0, 0, 1444, 1445, 5, 115, 0, 0, 1445, 1446, 5, 102, 0, 0, 1446, 1447, 5, 121, 0, 0, 1447, 270, 1, 0, 0, 0, 1448, 1449, 5, 115, 0, 0, 1449, 1450, 5, 101, 0, 0, 1450, 1451, 5, 110, 0, 0, 1451, 1452, 5, 100, 0, 0, 1452, 272, 1, 0, 0, 0, 1453, 1454, 5, 115, 0, 0, 1454, 1455, 5, 110, 0, 0, 1455, 1456, 5, 97, 0, 0, 1456, 1457, 5, 112, 0, 0, 1457, 1458, 5, 115, 0, 0, 1458, 1459, 5, 104, 0, 0, 1459, 1460, 5, 111, 0, 0, 1460, 1461, 5, 116, 0, 0, 1461, 274, 1, 0, 0, 0, 1462, 1463, 5, 115, 0, 0, 1463, 1464, 5, 112, 0, 0, 1464, 1465, 5, 101, 0, 0, 1465, 1466, 5, 99, 0, 0, 1466, 1467, 5, 105, 0, 0, 1467, 1468, 5, 97, 0, 0, 1468, 1469, 5, 108, 0, 0, 1469, 1470, 5, 105, 0, 0, 1470, 1471, 5, 122, 0, 0, 1471, 1472, 5, 97, 0, 0, 1472, 1473, 5, 116, 0, 0, 1473, 1474, 5, 105, 0, 0, 1474, 1475, 5, 111, 0, 0, 1475, 1476, 5, 110, 0, 0, 1476, 276, 1, 0, 0, 0, 1477, 1478, 5, 115, 0, 0, 1478, 1479, 5, 112, 0, 0, 1479, 1480, 5, 101, 0, 0, 1480, 1481, 5, 99, 0, 0, 1481, 1482, 5, 105, 0, 0, 1482, 1483, 5, 97, 0, 0, 1483, 1484, 5, 108, 0, 0, 1484, 1485, 5, 105, 0, 0, 1485, 1486, 5, 122, 0, 0, 1486, 1487, 5, 101, 0, 0, 1487, 1488, 5, 115, 0, 0, 1488, 278, 1, 0, 0, 0, 1489, 1490, 5, 115, 0, 0, 1490, 1491, 5, 116, 0, 0, 1491, 1492, 5, 97, 0, 0, 1492, 1493, 5, 107, 0, 0, 1493, 1494, 5, 101, 0, 0, 1494, 1495, 5, 104, 0, 0, 1495, 1496, 5, 111, 0, 0, 1496, 1497, 5, 108, 0, 0, 1497, 1498, 5, 100, 0, 0, 1498, 1499, 5, 101, 0, 0, 1499, 1500, 5, 114, 0, 0, 1500, 280, 1, 0, 0, 0, 1501, 1502, 5, 115, 0, 0, 1502, 1503, 5, 116, 0, 0, 1503, 1504, 5, 97, 0, 0, 1504, 1505, 5, 110, 0, 0, 1505, 1506, 5, 100, 0, 0, 1506, 1507, 5, 97, 0, 0, 1507, 1508, 5, 114, 0, 0, 1508, 1509, 5, 100, 0, 0, 1509, 282, 1, 0, 0, 0, 1510, 1511, 5, 115, 0, 0, 1511, 1512, 5, 116, 0, 0, 1512, 1513, 5, 97, 0, 0, 1513, 1514, 5, 116, 0, 0, 1514, 1515, 5, 101, 0, 0, 1515, 284, 1, 0, 0, 0, 1516, 1517, 5, 115, 0, 0, 1517, 1518, 5, 116, 0, 0, 1518, 1519, 5, 101, 0, 0, 1519, 1520, 5, 112, 0, 0, 1520, 286, 1, 0, 0, 0, 1521, 1522, 5, 115, 0, 0, 1522, 1523, 5, 116, 0, 0, 1523, 1524, 5, 114, 0, 0, 1524, 1525, 5, 117, 0, 0, 1525, 1526, 5, 99, 0, 0, 1526, 1527, 5, 116, 0, 0, 1527, 288, 1, 0, 0, 0, 1528, 1529, 5, 115, 0, 0, 1529, 1530, 5, 117, 0, 0, 1530, 1531, 5, 98, 0, 0, 1531, 1532, 5, 99, 0, 0, 1532, 1533, 5, 108, 0, 0, 1533, 1534, 5, 97, 0, 0, 1534, 1535, 5, 115, 0, 0, 1535, 1536, 5, 115, 0, 0, 1536, 1537, 5, 105, 0, 0, 1537, 1538, 5, 102, 0, 0, 1538, 1539, 5, 105, 0, 0, 1539, 1540, 5, 101, 0, 0, 1540, 1541, 5, 114, 0, 0, 1541, 290, 1, 0, 0, 0, 1542, 1543, 5, 115, 0, 0, 1543, 1544, 5, 117, 0, 0, 1544, 1545, 5, 98, 0, 0, 1545, 1546, 5, 106, 0, 0, 1546, 1547, 5, 101, 0, 0, 1547, 1548, 5, 99, 0, 0, 1548, 1549, 5, 116, 0, 0, 1549, 292, 1, 0, 0, 0, 1550, 1551, 5, 115, 0, 0, 1551, 1552, 5, 117, 0, 0, 1552, 1553, 5, 98, 0, 0, 1553, 1554, 5, 115, 0, 0, 1554, 1555, 5, 101, 0, 0, 1555, 1556, 5, 116, 0, 0, 1556, 294, 1, 0, 0, 0, 1557, 1558, 5, 115, 0, 0, 1558, 1559, 5, 117, 0, 0, 1559, 1560, 5, 98, 0, 0, 1560, 1561, 5, 115, 0, 0, 1561, 1562, 5, 101, 0, 0, 1562, 1563, 5, 116, 0, 0, 1563, 1564, 5, 115, 0, 0, 1564, 296, 1, 0, 0, 0, 1565, 1566, 5, 115, 0, 0, 1566, 1567, 5, 117, 0, 0, 1567, 1568, 5, 98, 0, 0, 1568, 1569, 5, 116, 0, 0, 1569, 1570, 5, 121, 0, 0, 1570, 1571, 5, 112, 0, 0, 1571, 1572, 5, 101, 0, 0, 1572, 298, 1, 0, 0, 0, 1573, 1574, 5, 115, 0, 0, 1574, 1575, 5, 117, 0, 0, 1575, 1576, 5, 99, 0, 0, 1576, 1577, 5, 99, 0, 0, 1577, 1578, 5, 101, 0, 0, 1578, 1579, 5, 115, 0, 0, 1579, 1580, 5, 115, 0, 0, 1580, 1581, 5, 105, 0, 0, 1581, 1582, 5, 111, 0, 0, 1582, 1583, 5, 110, 0, 0, 1583, 300, 1, 0, 0, 0, 1584, 1585, 5, 116, 0, 0, 1585, 1586, 5, 101, 0, 0, 1586, 1587, 5, 114, 0, 0, 1587, 1588, 5, 109, 0, 0, 1588, 1589, 5, 105, 0, 0, 1589, 1590, 5, 110, 0, 0, 1590, 1591, 5, 97, 0, 0, 1591, 1592, 5, 116, 0, 0, 1592, 1593, 5, 101, 0, 0, 1593, 302, 1, 0, 0, 0, 1594, 1595, 5, 116, 0, 0, 1595, 1596, 5, 104, 0, 0, 1596, 1597, 5, 101, 0, 0, 1597, 1598, 5, 110, 0, 0, 1598, 304, 1, 0, 0, 0, 1599, 1600, 5, 116, 0, 0, 1600, 1601, 5, 105, 0, 0, 1601, 1602, 5, 109, 0, 0, 1602, 1603, 5, 101, 0, 0, 1603, 1604, 5, 115, 0, 0, 1604, 1605, 5, 108, 0, 0, 1605, 1606, 5, 105, 0, 0, 1606, 1607, 5, 99, 0, 0, 1607, 1608, 5, 101, 0, 0, 1608, 306, 1, 0, 0, 0, 1609, 1610, 5, 116, 0, 0, 1610, 1611, 5, 111, 0, 0, 1611, 308, 1, 0, 0, 0, 1612, 1613, 5, 116, 0, 0, 1613, 1614, 5, 114, 0, 0, 1614, 1615, 5, 97, 0, 0, 1615, 1616, 5, 110, 0, 0, 1616, 1617, 5, 115, 0, 0, 1617, 1618, 5, 105, 0, 0, 1618, 1619, 5, 116, 0, 0, 1619, 1620, 5, 105, 0, 0, 1620, 1621, 5, 111, 0, 0, 1621, 1622, 5, 110, 0, 0, 1622, 310, 1, 0, 0, 0, 1623, 1624, 5, 116, 0, 0, 1624, 1625, 5, 114, 0, 0, 1625, 1626, 5, 117, 0, 0, 1626, 1627, 5, 101, 0, 0, 1627, 312, 1, 0, 0, 0, 1628, 1629, 5, 116, 0, 0, 1629, 1630, 5, 121, 0, 0, 1630, 1631, 5, 112, 0, 0, 1631, 1632, 5, 101, 0, 0, 1632, 314, 1, 0, 0, 0, 1633, 1634, 5, 116, 0, 0, 1634, 1635, 5, 121, 0, 0, 1635, 1636, 5, 112, 0, 0, 1636, 1637, 5, 101, 0, 0, 1637, 1638, 5, 100, 0, 0, 1638, 316, 1, 0, 0, 0, 1639, 1640, 5, 116, 0, 0, 1640, 1641, 5, 121, 0, 0, 1641, 1642, 5, 112, 0, 0, 1642, 1643, 5, 105, 0, 0, 1643, 1644, 5, 110, 0, 0, 1644, 1645, 5, 103, 0, 0, 1645, 318, 1, 0, 0, 0, 1646, 1647, 5, 117, 0, 0, 1647, 1648, 5, 110, 0, 0, 1648, 1649, 5, 105, 0, 0, 1649, 1650, 5, 111, 0, 0, 1650, 1651, 5, 110, 0, 0, 1651, 1652, 5, 115, 0, 0, 1652, 320, 1, 0, 0, 0, 1653, 1654, 5, 117, 0, 0, 1654, 1655, 5, 110, 0, 0, 1655, 1656, 5, 116, 0, 0, 1656, 1657, 5, 105, 0, 0, 1657, 1658, 5, 108, 0, 0, 1658, 322, 1, 0, 0, 0, 1659, 1660, 5, 117, 0, 0, 1660, 1661, 5, 115, 0, 0, 1661, 1662, 5, 101, 0, 0, 1662, 324, 1, 0, 0, 0, 1663, 1664, 5, 118, 0, 0, 1664, 1665, 5, 97, 0, 0, 1665, 1666, 5, 114, 0, 0, 1666, 326, 1, 0, 0, 0, 1667, 1668, 5, 118, 0, 0, 1668, 1669, 5, 97, 0, 0, 1669, 1670, 5, 114, 0, 0, 1670, 1671, 5, 105, 0, 0, 1671, 1672, 5, 97, 0, 0, 1672, 1673, 5, 110, 0, 0, 1673, 1674, 5, 116, 0, 0, 1674, 328, 1, 0, 0, 0, 1675, 1676, 5, 118, 0, 0, 1676, 1677, 5, 97, 0, 0, 1677, 1678, 5, 114, 0, 0, 1678, 1679, 5, 105, 0, 0, 1679, 1680, 5, 97, 0, 0, 1680, 1681, 5, 116, 0, 0, 1681, 1682, 5, 105, 0, 0, 1682, 1683, 5, 111, 0, 0, 1683, 1684, 5, 110, 0, 0, 1684, 330, 1, 0, 0, 0, 1685, 1686, 5, 118, 0, 0, 1686, 1687, 5, 101, 0, 0, 1687, 1688, 5, 114, 0, 0, 1688, 1689, 5, 105, 0, 0, 1689, 1690, 5, 102, 0, 0, 1690, 1691, 5, 105, 0, 0, 1691, 1692, 5, 99, 0, 0, 1692, 1693, 5, 97, 0, 0, 1693, 1694, 5, 116, 0, 0, 1694, 1695, 5, 105, 0, 0, 1695, 1696, 5, 111, 0, 0, 1696, 1697, 5, 110, 0, 0, 1697, 332, 1, 0, 0, 0, 1698, 1699, 5, 118, 0, 0, 1699, 1700, 5, 101, 0, 0, 1700, 1701, 5, 114, 0, 0, 1701, 1702, 5, 105, 0, 0, 1702, 1703, 5, 102, 0, 0, 1703, 1704, 5, 121, 0, 0, 1704, 334, 1, 0, 0, 0, 1705, 1706, 5, 118, 0, 0, 1706, 1707, 5, 105, 0, 0, 1707, 1708, 5, 97, 0, 0, 1708, 336, 1, 0, 0, 0, 1709, 1710, 5, 118, 0, 0, 1710, 1711, 5, 105, 0, 0, 1711, 1712, 5, 101, 0, 0, 1712, 1713, 5, 119, 0, 0, 1713, 338, 1, 0, 0, 0, 1714, 1715, 5, 118, 0, 0, 1715, 1716, 5, 105, 0, 0, 1716, 1717, 5, 101, 0, 0, 1717, 1718, 5, 119, 0, 0, 1718, 1719, 5, 112, 0, 0, 1719, 1720, 5, 111, 0, 0, 1720, 1721, 5, 105, 0, 0, 1721, 1722, 5, 110, 0, 0, 1722, 1723, 5, 116, 0, 0, 1723, 340, 1, 0, 0, 0, 1724, 1725, 5, 119, 0, 0, 1725, 1726, 5, 104, 0, 0, 1726, 1727, 5, 101, 0, 0, 1727, 1728, 5, 110, 0, 0, 1728, 342, 1, 0, 0, 0, 1729, 1730, 5, 119, 0, 0, 1730, 1731, 5, 104, 0, 0, 1731, 1732, 5, 105, 0, 0, 1732, 1733, 5, 108, 0, 0, 1733, 1734, 5, 101, 0, 0, 1734, 344, 1, 0, 0, 0, 1735, 1736, 5, 120, 0, 0, 1736, 1737, 5, 111, 0, 0, 1737, 1738, 5, 114, 0, 0, 1738, 346, 1, 0, 0, 0, 1739, 1740, 5, 33, 0, 0, 1740, 1741, 5, 61, 0, 0, 1741, 1742, 5, 61, 0, 0, 1742, 348, 1, 0, 0, 0, 1743, 1744, 5, 58, 0, 0, 1744, 1745, 5, 58, 0, 0, 1745, 1746, 5, 62, 0, 0, 1746, 350, 1, 0, 0, 0, 1747, 1748, 5, 58, 0, 0, 1748, 1749, 5, 62, 0, 0, 1749, 1750, 5, 62, 0, 0, 1750, 352, 1, 0, 0, 0, 1751, 1752, 5, 61, 0, 0, 1752, 1753, 5, 61, 0, 0, 1753, 1754, 5, 61, 0, 0, 1754, 354, 1, 0, 0, 0, 1755, 1756, 5, 33, 0, 0, 1756, 1757, 5, 61, 0, 0, 1757, 356, 1, 0, 0, 0, 1758, 1759, 5, 42, 0, 0, 1759, 1760, 5, 42, 0, 0, 1760, 358, 1, 0, 0, 0, 1761, 1762, 5, 45, 0, 0, 1762, 1763, 5, 62, 0, 0, 1763, 360, 1, 0, 0, 0, 1764, 1765, 5, 46, 0, 0, 1765, 1766, 5, 46, 0, 0, 1766, 362, 1, 0, 0, 0, 1767, 1768, 5, 46, 0, 0, 1768, 1769, 5, 63, 0, 0, 1769, 364, 1, 0, 0, 0, 1770, 1771, 5, 58, 0, 0, 1771, 1772, 5, 58, 0, 0, 1772, 366, 1, 0, 0, 0, 1773, 1774, 5, 58, 0, 0, 1774, 1775, 5, 61, 0, 0, 1775, 368, 1, 0, 0, 0, 1776, 1777, 5, 58, 0, 0, 1777, 1778, 5, 62, 0, 0, 1778, 370, 1, 0, 0, 0, 1779, 1780, 5, 60, 0, 0, 1780, 1781, 5, 61, 0, 0, 1781, 372, 1, 0, 0, 0, 1782, 1783, 5, 61, 0, 0, 1783, 1784, 5, 61, 0, 0, 1784, 374, 1, 0, 0, 0, 1785, 1786, 5, 61, 0, 0, 1786, 1787, 5, 62, 0, 0, 1787, 376, 1, 0, 0, 0, 1788, 1789, 5, 62, 0, 0, 1789, 1790, 5, 61, 0, 0, 1790, 378, 1, 0, 0, 0, 1791, 1792, 5, 63, 0, 0, 1792, 1793, 5, 63, 0, 0, 1793, 380, 1, 0, 0, 0, 1794, 1795, 5, 64, 0, 0, 1795, 1796, 5, 64, 0, 0, 1796, 382, 1, 0, 0, 0, 1797, 1798, 5, 35, 0, 0, 1798, 384, 1, 0, 0, 0, 1799, 1800, 5, 36, 0, 0, 1800, 386, 1, 0, 0, 0, 1801, 1802, 5, 37, 0, 0, 1802, 388, 1, 0, 0, 0, 1803, 1804, 5, 38, 0, 0, 1804, 390, 1, 0, 0, 0, 1805, 1806, 5, 40, 0, 0, 1806, 392, 1, 0, 0, 0, 1807, 1808, 5, 41, 0, 0, 1808, 394, 1, 0, 0, 0, 1809, 1810, 5, 42, 0, 0, 1810, 396, 1, 0, 0, 0, 1811, 1812, 5, 43, 0, 0, 1812, 398, 1, 0, 0, 0, 1813, 1814, 5, 44, 0, 0, 1814, 400, 1, 0, 0, 0, 1815, 1816, 5, 45, 0, 0, 1816, 402, 1, 0, 0, 0, 1817, 1818, 5, 46, 0, 0, 1818, 404, 1, 0, 0, 0, 1819, 1820, 5, 47, 0, 0, 1820, 406, 1, 0, 0, 0, 1821, 1822, 5, 58, 0, 0, 1822, 408, 1, 0, 0, 0, 1823, 1824, 5, 59, 0, 0, 1824, 410, 1, 0, 0, 0, 1825, 1826, 5, 60, 0, 0, 1826, 412, 1, 0, 0, 0, 1827, 1828, 5, 61, 0, 0, 1828, 414, 1, 0, 0, 0, 1829, 1830, 5, 62, 0, 0, 1830, 416, 1, 0, 0, 0, 1831, 1832, 5, 63, 0, 0, 1832, 418, 1, 0, 0, 0, 1833, 1834, 5, 64, 0, 0, 1834, 420, 1, 0, 0, 0, 1835, 1836, 5, 91, 0, 0, 1836, 422, 1, 0, 0, 0, 1837, 1838, 5, 93, 0, 0, 1838, 424, 1, 0, 0, 0, 1839, 1840, 5, 94, 0, 0, 1840, 426, 1, 0, 0, 0, 1841, 1842, 5, 123, 0, 0, 1842, 428, 1, 0, 0, 0, 1843, 1844, 5, 124, 0, 0, 1844, 430, 1, 0, 0, 0, 1845, 1846, 5, 125, 0, 0, 1846, 432, 1, 0, 0, 0, 1847, 1848, 5, 126, 0, 0, 1848, 434, 1, 0, 0, 0, 1849, 1853, 7, 0, 0, 0, 1850, 1852, 7, 1, 0, 0, 1851, 1850, 1, 0, 0, 0, 1852, 1855, 1, 0, 0, 0, 1853, 1851, 1, 0, 0, 0, 1853, 1854, 1, 0, 0, 0, 1854, 436, 1, 0, 0, 0, 1855, 1853, 1, 0, 0, 0, 1856, 1862, 5, 39, 0, 0, 1857, 1858, 5, 92, 0, 0, 1858, 1861, 9, 0, 0, 0, 1859, 1861, 8, 2, 0, 0, 1860, 1857, 1, 0, 0, 0, 1860, 1859, 1, 0, 0, 0, 1861, 1864, 1, 0, 0, 0, 1862, 1860, 1, 0, 0, 0, 1862, 1863, 1, 0, 0, 0, 1863, 1865, 1, 0, 0, 0, 1864, 1862, 1, 0, 0, 0, 1865, 1866, 5, 39, 0, 0, 1866, 438, 1, 0, 0, 0, 1867, 1873, 5, 34, 0, 0, 1868, 1869, 5, 92, 0, 0, 1869, 1872, 9, 0, 0, 0, 1870, 1872, 8, 3, 0, 0, 1871, 1868, 1, 0, 0, 0, 1871, 1870, 1, 0, 0, 0, 1872, 1875, 1, 0, 0, 0, 1873, 1871, 1, 0, 0, 0, 1873, 1874, 1, 0, 0, 0, 1874, 1876, 1, 0, 0, 0, 1875, 1873, 1, 0, 0, 0, 1876, 1877, 5, 34, 0, 0, 1877, 440, 1, 0, 0, 0, 1878, 1880, 7, 4, 0, 0, 1879, 1878, 1, 0, 0, 0, 1880, 1881, 1, 0, 0, 0, 1881, 1879, 1, 0, 0, 0, 1881, 1882, 1, 0, 0, 0, 1882, 442, 1, 0, 0, 0, 1883, 1885, 7, 4, 0, 0, 1884, 1883, 1, 0, 0, 0, 1885, 1888, 1, 0, 0, 0, 1886, 1884, 1, 0, 0, 0, 1886, 1887, 1, 0, 0, 0, 1887, 1889, 1, 0, 0, 0, 1888, 1886, 1, 0, 0, 0, 1889, 1891, 5, 46, 0, 0, 1890, 1892, 7, 4, 0, 0, 1891, 1890, 1, 0, 0, 0, 1892, 1893, 1, 0, 0, 0, 1893, 1891, 1, 0, 0, 0, 1893, 1894, 1, 0, 0, 0, 1894, 1904, 1, 0, 0, 0, 1895, 1897, 7, 5, 0, 0, 1896, 1898, 7, 6, 0, 0, 1897, 1896, 1, 0, 0, 0, 1897, 1898, 1, 0, 0, 0, 1898, 1900, 1, 0, 0, 0, 1899, 1901, 7, 4, 0, 0, 1900, 1899, 1, 0, 0, 0, 1901, 1902, 1, 0, 0, 0, 1902, 1900, 1, 0, 0, 0, 1902, 1903, 1, 0, 0, 0, 1903, 1905, 1, 0, 0, 0, 1904, 1895, 1, 0, 0, 0, 1904, 1905, 1, 0, 0, 0, 1905, 1921, 1, 0, 0, 0, 1906, 1908, 7, 4, 0, 0, 1907, 1906, 1, 0, 0, 0, 1908, 1909, 1, 0, 0, 0, 1909, 1907, 1, 0, 0, 0, 1909, 1910, 1, 0, 0, 0, 1910, 1911, 1, 0, 0, 0, 1911, 1913, 7, 5, 0, 0, 1912, 1914, 7, 6, 0, 0, 1913, 1912, 1, 0, 0, 0, 1913, 1914, 1, 0, 0, 0, 1914, 1916, 1, 0, 0, 0, 1915, 1917, 7, 4, 0, 0, 1916, 1915, 1, 0, 0, 0, 1917, 1918, 1, 0, 0, 0, 1918, 1916, 1, 0, 0, 0, 1918, 1919, 1, 0, 0, 0, 1919, 1921, 1, 0, 0, 0, 1920, 1886, 1, 0, 0, 0, 1920, 1907, 1, 0, 0, 0, 1921, 444, 1, 0, 0, 0, 1922, 1923, 5, 47, 0, 0, 1923, 1924, 5, 42, 0, 0, 1924, 1928, 1, 0, 0, 0, 1925, 1927, 9, 0, 0, 0, 1926, 1925, 1, 0, 0, 0, 1927, 1930, 1, 0, 0, 0, 1928, 1929, 1, 0, 0, 0, 1928, 1926, 1, 0, 0, 0, 1929, 1931, 1, 0, 0, 0, 1930, 1928, 1, 0, 0, 0, 1931, 1932, 5, 42, 0, 0, 1932, 1946, 5, 47, 0, 0, 1933, 1934, 5, 47, 0, 0, 1934, 1935, 5, 47, 0, 0, 1935, 1936, 5, 42, 0, 0, 1936, 1940, 1, 0, 0, 0, 1937, 1939, 9, 0, 0, 0, 1938, 1937, 1, 0, 0, 0, 1939, 1942, 1, 0, 0, 0, 1940, 1941, 1, 0, 0, 0, 1940, 1938, 1, 0, 0, 0, 1941, 1943, 1, 0, 0, 0, 1942, 1940, 1, 0, 0, 0, 1943, 1944, 5, 42, 0, 0, 1944, 1946, 5, 47, 0, 0, 1945, 1922, 1, 0, 0, 0, 1945, 1933, 1, 0, 0, 0, 1946, 446, 1, 0, 0, 0, 1947, 1948, 5, 47, 0, 0, 1948, 1949, 5, 47, 0, 0, 1949, 1950, 1, 0, 0, 0, 1950, 1954, 8, 7, 0, 0, 1951, 1953, 8, 8, 0, 0, 1952, 1951, 1, 0, 0, 0, 1953, 1956, 1, 0, 0, 0, 1954, 1952, 1, 0, 0, 0, 1954, 1955, 1, 0, 0, 0, 1955, 1957, 1, 0, 0, 0, 1956, 1954, 1, 0, 0, 0, 1957, 1958, 6, 223, 0, 0, 1958, 448, 1, 0, 0, 0, 1959, 1960, 5, 47, 0, 0, 1960, 1961, 5, 47, 0, 0, 1961, 1962, 1, 0, 0, 0, 1962, 1963, 6, 224, 0, 0, 1963, 450, 1, 0, 0, 0, 1964, 1966, 7, 9, 0, 0, 1965, 1964, 1, 0, 0, 0, 1966, 1967, 1, 0, 0, 0, 1967, 1965, 1, 0, 0, 0, 1967, 1968, 1, 0, 0, 0, 1968, 1969, 1, 0, 0, 0, 1969, 1970, 6, 225, 0, 0, 1970, 452, 1, 0, 0, 0, 21, 0, 1853, 1860, 1862, 1871, 1873, 1881, 1886, 1893, 1897, 1902, 1904, 1909, 1913, 1918, 1920, 1928, 1940, 1945, 1954, 1967, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.tokens b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.tokens new file mode 100644 index 00000000..691d2df3 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Lexer.tokens @@ -0,0 +1,444 @@ +ABOUT=1 +ABSTRACT=2 +ACCEPT=3 +ACTION=4 +ACTOR=5 +AFTER=6 +ALIAS=7 +ALL=8 +ALLOCATE=9 +ALLOCATION=10 +ANALYSIS=11 +AND=12 +AS=13 +ASSERT=14 +ASSIGN=15 +ASSOC=16 +ASSUME=17 +AT=18 +ATTRIBUTE=19 +BEHAVIOR=20 +BIND=21 +BINDING=22 +BOOL=23 +BY=24 +CALC=25 +CASE=26 +CHAINS=27 +CLASS=28 +CLASSIFIER=29 +COMMENT=30 +COMPOSITE=31 +CONCERN=32 +CONJUGATE=33 +CONJUGATES=34 +CONJUGATION=35 +CONNECT=36 +CONNECTION=37 +CONNECTOR=38 +CONST=39 +CONSTANT=40 +CONSTRAINT=41 +CROSSES=42 +DATATYPE=43 +DECIDE=44 +DEF=45 +DEFAULT=46 +DEFINED=47 +DEPENDENCY=48 +DERIVED=49 +DIFFERENCES=50 +DISJOINING=51 +DISJOINT=52 +DO=53 +DOC=54 +ELSE=55 +END=56 +ENTRY=57 +ENUM=58 +EVENT=59 +EXHIBIT=60 +EXIT=61 +EXPOSE=62 +EXPR=63 +FALSE=64 +FEATURE=65 +FEATURED=66 +FEATURING=67 +FILTER=68 +FIRST=69 +FLOW=70 +FOR=71 +FORK=72 +FRAME=73 +FROM=74 +FUNCTION=75 +HASTYPE=76 +IF=77 +IMPLIES=78 +IMPORT=79 +IN=80 +INCLUDE=81 +INDIVIDUAL=82 +INOUT=83 +INTERACTION=84 +INTERFACE=85 +INTERSECTS=86 +INV=87 +INVERSE=88 +INVERTING=89 +ISTYPE=90 +ITEM=91 +JOIN=92 +LANGUAGE=93 +LIBRARY=94 +LOCALE=95 +LOOP=96 +MEMBER=97 +MERGE=98 +MESSAGE=99 +META=100 +METACLASS=101 +METADATA=102 +MULTIPLICITY=103 +NAMESPACE=104 +NEW=105 +NONUNIQUE=106 +NOT=107 +NULL=108 +OBJECTIVE=109 +OCCURRENCE=110 +OF=111 +OR=112 +ORDERED=113 +OUT=114 +PACKAGE=115 +PARALLEL=116 +PART=117 +PERFORM=118 +PORT=119 +PORTION=120 +PREDICATE=121 +PRIVATE=122 +PROTECTED=123 +PUBLIC=124 +REDEFINES=125 +REDEFINITION=126 +REF=127 +REFERENCES=128 +RENDER=129 +RENDERING=130 +REP=131 +REQUIRE=132 +REQUIREMENT=133 +RETURN=134 +SATISFY=135 +SEND=136 +SNAPSHOT=137 +SPECIALIZATION=138 +SPECIALIZES=139 +STAKEHOLDER=140 +STANDARD=141 +STATE=142 +STEP=143 +STRUCT=144 +SUBCLASSIFIER=145 +SUBJECT=146 +SUBSET=147 +SUBSETS=148 +SUBTYPE=149 +SUCCESSION=150 +TERMINATE=151 +THEN=152 +TIMESLICE=153 +TO=154 +TRANSITION=155 +TRUE=156 +TYPE=157 +TYPED=158 +TYPING=159 +UNIONS=160 +UNTIL=161 +USE=162 +VAR=163 +VARIANT=164 +VARIATION=165 +VERIFICATION=166 +VERIFY=167 +VIA=168 +VIEW=169 +VIEWPOINT=170 +WHEN=171 +WHILE=172 +XOR=173 +BANG_EQ_EQ=174 +COLON_COLON_GT=175 +COLON_GT_GT=176 +EQ_EQ_EQ=177 +BANG_EQ=178 +STAR_STAR=179 +ARROW=180 +DOT_DOT=181 +DOT_QUESTION=182 +COLON_COLON=183 +COLON_EQ=184 +COLON_GT=185 +LE=186 +EQ_EQ=187 +FAT_ARROW=188 +GE=189 +QUESTION_QUESTION=190 +AT_AT=191 +HASH=192 +DOLLAR=193 +PERCENT=194 +AMP=195 +LPAREN=196 +RPAREN=197 +STAR=198 +PLUS=199 +COMMA=200 +MINUS=201 +DOT=202 +SLASH=203 +COLON=204 +SEMI=205 +LT=206 +EQ=207 +GT=208 +QUESTION=209 +AT_SIGN=210 +LBRACK=211 +RBRACK=212 +CARET=213 +LBRACE=214 +PIPE=215 +RBRACE=216 +TILDE=217 +IDENTIFIER=218 +STRING=219 +DOUBLE_STRING=220 +INTEGER=221 +REAL=222 +REGULAR_COMMENT=223 +SINGLE_LINE_NOTE=224 +BARE_LINE_COMMENT=225 +WS=226 +'about'=1 +'abstract'=2 +'accept'=3 +'action'=4 +'actor'=5 +'after'=6 +'alias'=7 +'all'=8 +'allocate'=9 +'allocation'=10 +'analysis'=11 +'and'=12 +'as'=13 +'assert'=14 +'assign'=15 +'assoc'=16 +'assume'=17 +'at'=18 +'attribute'=19 +'behavior'=20 +'bind'=21 +'binding'=22 +'bool'=23 +'by'=24 +'calc'=25 +'case'=26 +'chains'=27 +'class'=28 +'classifier'=29 +'comment'=30 +'composite'=31 +'concern'=32 +'conjugate'=33 +'conjugates'=34 +'conjugation'=35 +'connect'=36 +'connection'=37 +'connector'=38 +'const'=39 +'constant'=40 +'constraint'=41 +'crosses'=42 +'datatype'=43 +'decide'=44 +'def'=45 +'default'=46 +'defined'=47 +'dependency'=48 +'derived'=49 +'differences'=50 +'disjoining'=51 +'disjoint'=52 +'do'=53 +'doc'=54 +'else'=55 +'end'=56 +'entry'=57 +'enum'=58 +'event'=59 +'exhibit'=60 +'exit'=61 +'expose'=62 +'expr'=63 +'false'=64 +'feature'=65 +'featured'=66 +'featuring'=67 +'filter'=68 +'first'=69 +'flow'=70 +'for'=71 +'fork'=72 +'frame'=73 +'from'=74 +'function'=75 +'hastype'=76 +'if'=77 +'implies'=78 +'import'=79 +'in'=80 +'include'=81 +'individual'=82 +'inout'=83 +'interaction'=84 +'interface'=85 +'intersects'=86 +'inv'=87 +'inverse'=88 +'inverting'=89 +'istype'=90 +'item'=91 +'join'=92 +'language'=93 +'library'=94 +'locale'=95 +'loop'=96 +'member'=97 +'merge'=98 +'message'=99 +'meta'=100 +'metaclass'=101 +'metadata'=102 +'multiplicity'=103 +'namespace'=104 +'new'=105 +'nonunique'=106 +'not'=107 +'null'=108 +'objective'=109 +'occurrence'=110 +'of'=111 +'or'=112 +'ordered'=113 +'out'=114 +'package'=115 +'parallel'=116 +'part'=117 +'perform'=118 +'port'=119 +'portion'=120 +'predicate'=121 +'private'=122 +'protected'=123 +'public'=124 +'redefines'=125 +'redefinition'=126 +'ref'=127 +'references'=128 +'render'=129 +'rendering'=130 +'rep'=131 +'require'=132 +'requirement'=133 +'return'=134 +'satisfy'=135 +'send'=136 +'snapshot'=137 +'specialization'=138 +'specializes'=139 +'stakeholder'=140 +'standard'=141 +'state'=142 +'step'=143 +'struct'=144 +'subclassifier'=145 +'subject'=146 +'subset'=147 +'subsets'=148 +'subtype'=149 +'succession'=150 +'terminate'=151 +'then'=152 +'timeslice'=153 +'to'=154 +'transition'=155 +'true'=156 +'type'=157 +'typed'=158 +'typing'=159 +'unions'=160 +'until'=161 +'use'=162 +'var'=163 +'variant'=164 +'variation'=165 +'verification'=166 +'verify'=167 +'via'=168 +'view'=169 +'viewpoint'=170 +'when'=171 +'while'=172 +'xor'=173 +'!=='=174 +'::>'=175 +':>>'=176 +'==='=177 +'!='=178 +'**'=179 +'->'=180 +'..'=181 +'.?'=182 +'::'=183 +':='=184 +':>'=185 +'<='=186 +'=='=187 +'=>'=188 +'>='=189 +'??'=190 +'@@'=191 +'#'=192 +'$'=193 +'%'=194 +'&'=195 +'('=196 +')'=197 +'*'=198 +'+'=199 +','=200 +'-'=201 +'.'=202 +'/'=203 +':'=204 +';'=205 +'<'=206 +'='=207 +'>'=208 +'?'=209 +'@'=210 +'['=211 +']'=212 +'^'=213 +'{'=214 +'|'=215 +'}'=216 +'~'=217 +'//'=225 diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.cs b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.cs new file mode 100644 index 00000000..31fad2c7 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.cs @@ -0,0 +1,37758 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/work/DemaConsulting/BuildTools/SysML2Tools/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace DemaConsulting.SysML2Tools.Parser.Antlr { +using System; +using System.IO; +using System.Text; +using System.Diagnostics; +using System.Collections.Generic; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public partial class SysMLv2Parser : Parser { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + ABOUT=1, ABSTRACT=2, ACCEPT=3, ACTION=4, ACTOR=5, AFTER=6, ALIAS=7, ALL=8, + ALLOCATE=9, ALLOCATION=10, ANALYSIS=11, AND=12, AS=13, ASSERT=14, ASSIGN=15, + ASSOC=16, ASSUME=17, AT=18, ATTRIBUTE=19, BEHAVIOR=20, BIND=21, BINDING=22, + BOOL=23, BY=24, CALC=25, CASE=26, CHAINS=27, CLASS=28, CLASSIFIER=29, + COMMENT=30, COMPOSITE=31, CONCERN=32, CONJUGATE=33, CONJUGATES=34, CONJUGATION=35, + CONNECT=36, CONNECTION=37, CONNECTOR=38, CONST=39, CONSTANT=40, CONSTRAINT=41, + CROSSES=42, DATATYPE=43, DECIDE=44, DEF=45, DEFAULT=46, DEFINED=47, DEPENDENCY=48, + DERIVED=49, DIFFERENCES=50, DISJOINING=51, DISJOINT=52, DO=53, DOC=54, + ELSE=55, END=56, ENTRY=57, ENUM=58, EVENT=59, EXHIBIT=60, EXIT=61, EXPOSE=62, + EXPR=63, FALSE=64, FEATURE=65, FEATURED=66, FEATURING=67, FILTER=68, FIRST=69, + FLOW=70, FOR=71, FORK=72, FRAME=73, FROM=74, FUNCTION=75, HASTYPE=76, + IF=77, IMPLIES=78, IMPORT=79, IN=80, INCLUDE=81, INDIVIDUAL=82, INOUT=83, + INTERACTION=84, INTERFACE=85, INTERSECTS=86, INV=87, INVERSE=88, INVERTING=89, + ISTYPE=90, ITEM=91, JOIN=92, LANGUAGE=93, LIBRARY=94, LOCALE=95, LOOP=96, + MEMBER=97, MERGE=98, MESSAGE=99, META=100, METACLASS=101, METADATA=102, + MULTIPLICITY=103, NAMESPACE=104, NEW=105, NONUNIQUE=106, NOT=107, NULL=108, + OBJECTIVE=109, OCCURRENCE=110, OF=111, OR=112, ORDERED=113, OUT=114, PACKAGE=115, + PARALLEL=116, PART=117, PERFORM=118, PORT=119, PORTION=120, PREDICATE=121, + PRIVATE=122, PROTECTED=123, PUBLIC=124, REDEFINES=125, REDEFINITION=126, + REF=127, REFERENCES=128, RENDER=129, RENDERING=130, REP=131, REQUIRE=132, + REQUIREMENT=133, RETURN=134, SATISFY=135, SEND=136, SNAPSHOT=137, SPECIALIZATION=138, + SPECIALIZES=139, STAKEHOLDER=140, STANDARD=141, STATE=142, STEP=143, STRUCT=144, + SUBCLASSIFIER=145, SUBJECT=146, SUBSET=147, SUBSETS=148, SUBTYPE=149, + SUCCESSION=150, TERMINATE=151, THEN=152, TIMESLICE=153, TO=154, TRANSITION=155, + TRUE=156, TYPE=157, TYPED=158, TYPING=159, UNIONS=160, UNTIL=161, USE=162, + VAR=163, VARIANT=164, VARIATION=165, VERIFICATION=166, VERIFY=167, VIA=168, + VIEW=169, VIEWPOINT=170, WHEN=171, WHILE=172, XOR=173, BANG_EQ_EQ=174, + COLON_COLON_GT=175, COLON_GT_GT=176, EQ_EQ_EQ=177, BANG_EQ=178, STAR_STAR=179, + ARROW=180, DOT_DOT=181, DOT_QUESTION=182, COLON_COLON=183, COLON_EQ=184, + COLON_GT=185, LE=186, EQ_EQ=187, FAT_ARROW=188, GE=189, QUESTION_QUESTION=190, + AT_AT=191, HASH=192, DOLLAR=193, PERCENT=194, AMP=195, LPAREN=196, RPAREN=197, + STAR=198, PLUS=199, COMMA=200, MINUS=201, DOT=202, SLASH=203, COLON=204, + SEMI=205, LT=206, EQ=207, GT=208, QUESTION=209, AT_SIGN=210, LBRACK=211, + RBRACK=212, CARET=213, LBRACE=214, PIPE=215, RBRACE=216, TILDE=217, IDENTIFIER=218, + STRING=219, DOUBLE_STRING=220, INTEGER=221, REAL=222, REGULAR_COMMENT=223, + SINGLE_LINE_NOTE=224, BARE_LINE_COMMENT=225, WS=226; + public const int + RULE_ownedExpression = 0, RULE_typeReference = 1, RULE_sequenceExpressionList = 2, + RULE_baseExpression = 3, RULE_nullExpression = 4, RULE_featureReferenceExpression = 5, + RULE_constructorExpression = 6, RULE_bodyExpression = 7, RULE_argumentList = 8, + RULE_positionalArgumentList = 9, RULE_namedArgumentList = 10, RULE_namedArgument = 11, + RULE_literalExpression = 12, RULE_literalBoolean = 13, RULE_literalString = 14, + RULE_literalInteger = 15, RULE_literalReal = 16, RULE_literalInfinity = 17, + RULE_argumentMember = 18, RULE_argumentExpressionMember = 19, RULE_name = 20, + RULE_unreservedKeyword = 21, RULE_identification = 22, RULE_relationshipBody = 23, + RULE_relationshipOwnedElement = 24, RULE_ownedRelatedElement = 25, RULE_dependency = 26, + RULE_annotation = 27, RULE_ownedAnnotation = 28, RULE_annotatingElement = 29, + RULE_comment = 30, RULE_documentation = 31, RULE_textualRepresentation = 32, + RULE_rootNamespace = 33, RULE_namespace = 34, RULE_namespaceDeclaration = 35, + RULE_namespaceBody = 36, RULE_namespaceBodyElement = 37, RULE_memberPrefix = 38, + RULE_visibilityIndicator = 39, RULE_namespaceMember = 40, RULE_nonFeatureMember = 41, + RULE_namespaceFeatureMember = 42, RULE_aliasMember = 43, RULE_qualifiedName = 44, + RULE_importRule = 45, RULE_importDeclaration = 46, RULE_membershipImport = 47, + RULE_namespaceImport = 48, RULE_filterPackage = 49, RULE_filterPackageMember = 50, + RULE_memberElement = 51, RULE_nonFeatureElement = 52, RULE_featureElement = 53, + RULE_type = 54, RULE_typePrefix = 55, RULE_typeDeclaration = 56, RULE_specializationPart = 57, + RULE_conjugationPart = 58, RULE_typeRelationshipPart = 59, RULE_disjoiningPart = 60, + RULE_unioningPart = 61, RULE_intersectingPart = 62, RULE_differencingPart = 63, + RULE_typeBody = 64, RULE_typeBodyElement = 65, RULE_specialization = 66, + RULE_ownedSpecialization = 67, RULE_specificType = 68, RULE_generalType = 69, + RULE_conjugation = 70, RULE_ownedConjugation = 71, RULE_disjoining = 72, + RULE_ownedDisjoining = 73, RULE_unioning = 74, RULE_intersecting = 75, + RULE_differencing = 76, RULE_featureMember = 77, RULE_typeFeatureMember = 78, + RULE_ownedFeatureMember = 79, RULE_classifier = 80, RULE_classifierDeclaration = 81, + RULE_superclassingPart = 82, RULE_subclassification = 83, RULE_ownedSubclassification = 84, + RULE_feature = 85, RULE_endFeaturePrefix = 86, RULE_basicFeaturePrefix = 87, + RULE_featurePrefix = 88, RULE_ownedCrossFeatureMember = 89, RULE_ownedCrossFeature = 90, + RULE_featureDirection = 91, RULE_featureDeclaration = 92, RULE_featureIdentification = 93, + RULE_featureRelationshipPart = 94, RULE_chainingPart = 95, RULE_invertingPart = 96, + RULE_typeFeaturingPart = 97, RULE_featureSpecializationPart = 98, RULE_multiplicityPart = 99, + RULE_featureSpecialization = 100, RULE_typings = 101, RULE_typedBy = 102, + RULE_subsettings = 103, RULE_subsets = 104, RULE_references = 105, RULE_crosses = 106, + RULE_redefinitions = 107, RULE_redefines = 108, RULE_featureTyping = 109, + RULE_ownedFeatureTyping = 110, RULE_subsetting = 111, RULE_ownedSubsetting = 112, + RULE_ownedReferenceSubsetting = 113, RULE_ownedCrossSubsetting = 114, + RULE_redefinition = 115, RULE_ownedRedefinition = 116, RULE_featureInverting = 117, + RULE_ownedFeatureInverting = 118, RULE_typeFeaturing = 119, RULE_ownedTypeFeaturing = 120, + RULE_dataType = 121, RULE_class = 122, RULE_structure = 123, RULE_association = 124, + RULE_associationStructure = 125, RULE_connector = 126, RULE_connectorDeclaration = 127, + RULE_binaryConnectorDeclaration = 128, RULE_naryConnectorDeclaration = 129, + RULE_connectorEndMember = 130, RULE_connectorEnd = 131, RULE_ownedCrossMultiplicityMember = 132, + RULE_ownedCrossMultiplicity = 133, RULE_bindingConnector = 134, RULE_bindingConnectorDeclaration = 135, + RULE_succession = 136, RULE_successionDeclaration = 137, RULE_behavior = 138, + RULE_step = 139, RULE_function = 140, RULE_functionBody = 141, RULE_functionBodyPart = 142, + RULE_returnFeatureMember = 143, RULE_resultExpressionMember = 144, RULE_expression = 145, + RULE_predicate = 146, RULE_booleanExpression = 147, RULE_invariant = 148, + RULE_featureChainMember = 149, RULE_interaction = 150, RULE_flow = 151, + RULE_successionFlow = 152, RULE_flowDeclaration = 153, RULE_payloadFeatureMember = 154, + RULE_payloadFeature = 155, RULE_payloadFeatureSpecializationPart = 156, + RULE_flowEndMember = 157, RULE_flowEnd = 158, RULE_valuePart = 159, RULE_featureValue = 160, + RULE_multiplicity = 161, RULE_multiplicitySubset = 162, RULE_multiplicityRange = 163, + RULE_ownedMultiplicity = 164, RULE_ownedMultiplicityRange = 165, RULE_multiplicityBounds = 166, + RULE_multiplicityExpressionMember = 167, RULE_metaclass = 168, RULE_prefixMetadataAnnotation = 169, + RULE_prefixMetadataMember = 170, RULE_prefixMetadataFeature = 171, RULE_metadataFeature = 172, + RULE_metadataFeatureDeclaration = 173, RULE_metadataBody = 174, RULE_metadataBodyElement = 175, + RULE_metadataBodyFeatureMember = 176, RULE_metadataBodyFeature = 177, + RULE_package = 178, RULE_libraryPackage = 179, RULE_packageDeclaration = 180, + RULE_packageBody = 181, RULE_elementFilterMember = 182, RULE_dependencyDeclaration = 183, + RULE_annotatingMember = 184, RULE_packageBodyElement = 185, RULE_packageMember = 186, + RULE_definitionElement = 187, RULE_usageElement = 188, RULE_basicDefinitionPrefix = 189, + RULE_definitionExtensionKeyword = 190, RULE_definitionPrefix = 191, RULE_definition = 192, + RULE_definitionDeclaration = 193, RULE_definitionBody = 194, RULE_definitionBodyItem = 195, + RULE_definitionBodyItemContent = 196, RULE_definitionMember = 197, RULE_variantUsageMember = 198, + RULE_nonOccurrenceUsageMember = 199, RULE_structureUsageMember = 200, + RULE_behaviorUsageMember = 201, RULE_refPrefix = 202, RULE_basicUsagePrefix = 203, + RULE_endUsagePrefix = 204, RULE_usageExtensionKeyword = 205, RULE_unextendedUsagePrefix = 206, + RULE_usagePrefix = 207, RULE_usage = 208, RULE_usageDeclaration = 209, + RULE_usageCompletion = 210, RULE_usageBody = 211, RULE_defaultReferenceUsage = 212, + RULE_referenceUsage = 213, RULE_endFeatureUsage = 214, RULE_variantReference = 215, + RULE_nonOccurrenceUsageElement = 216, RULE_endOccurrenceUsageElement = 217, + RULE_occurrenceUsageElement = 218, RULE_structureUsageElement = 219, RULE_behaviorUsageElement = 220, + RULE_variantUsageElement = 221, RULE_subclassificationPart = 222, RULE_attributeDefinition = 223, + RULE_attributeUsage = 224, RULE_enumerationDefinition = 225, RULE_enumerationBody = 226, + RULE_enumerationUsageMember = 227, RULE_enumeratedValue = 228, RULE_enumerationUsage = 229, + RULE_occurrenceDefinitionPrefix = 230, RULE_occurrenceDefinition = 231, + RULE_individualDefinition = 232, RULE_emptyMultiplicityMember = 233, RULE_occurrenceUsagePrefix = 234, + RULE_occurrenceUsage = 235, RULE_individualUsage = 236, RULE_portionUsage = 237, + RULE_portionKind = 238, RULE_eventOccurrenceUsage = 239, RULE_sourceSuccessionMember = 240, + RULE_sourceSuccession = 241, RULE_sourceEndMember = 242, RULE_sourceEnd = 243, + RULE_itemDefinition = 244, RULE_itemUsage = 245, RULE_partDefinition = 246, + RULE_partUsage = 247, RULE_portDefinition = 248, RULE_conjugatedPortDefinitionMember = 249, + RULE_conjugatedPortDefinition = 250, RULE_portUsage = 251, RULE_conjugatedPortTyping = 252, + RULE_connectionDefinition = 253, RULE_connectionUsage = 254, RULE_connectorPart = 255, + RULE_binaryConnectorPart = 256, RULE_naryConnectorPart = 257, RULE_bindingConnectorAsUsage = 258, + RULE_successionAsUsage = 259, RULE_interfaceDefinition = 260, RULE_interfaceBody = 261, + RULE_interfaceBodyItem = 262, RULE_interfaceNonOccurrenceUsageMember = 263, + RULE_interfaceNonOccurrenceUsageElement = 264, RULE_interfaceOccurrenceUsageMember = 265, + RULE_interfaceOccurrenceUsageElement = 266, RULE_defaultInterfaceEnd = 267, + RULE_interfaceUsage = 268, RULE_interfaceUsageDeclaration = 269, RULE_interfacePart = 270, + RULE_binaryInterfacePart = 271, RULE_naryInterfacePart = 272, RULE_interfaceEndMember = 273, + RULE_interfaceEnd = 274, RULE_allocationDefinition = 275, RULE_allocationUsage = 276, + RULE_allocationUsageDeclaration = 277, RULE_flowDefinition = 278, RULE_message = 279, + RULE_messageDeclaration = 280, RULE_messageEventMember = 281, RULE_messageEvent = 282, + RULE_flowUsage = 283, RULE_successionFlowUsage = 284, RULE_flowPayloadFeatureMember = 285, + RULE_flowPayloadFeature = 286, RULE_actionDefinition = 287, RULE_actionBody = 288, + RULE_actionBodyItem = 289, RULE_nonBehaviorBodyItem = 290, RULE_actionBehaviorMember = 291, + RULE_initialNodeMember = 292, RULE_actionNodeMember = 293, RULE_actionTargetSuccessionMember = 294, + RULE_guardedSuccessionMember = 295, RULE_actionUsage = 296, RULE_actionUsageDeclaration = 297, + RULE_performActionUsage = 298, RULE_performActionUsageDeclaration = 299, + RULE_actionNode = 300, RULE_actionNodeUsageDeclaration = 301, RULE_actionNodePrefix = 302, + RULE_controlNode = 303, RULE_controlNodePrefix = 304, RULE_mergeNode = 305, + RULE_decisionNode = 306, RULE_joinNode = 307, RULE_forkNode = 308, RULE_acceptNode = 309, + RULE_acceptNodeDeclaration = 310, RULE_acceptParameterPart = 311, RULE_payloadParameterMember = 312, + RULE_payloadParameter = 313, RULE_triggerValuePart = 314, RULE_triggerFeatureValue = 315, + RULE_triggerExpression = 316, RULE_sendNode = 317, RULE_sendNodeDeclaration = 318, + RULE_senderReceiverPart = 319, RULE_nodeParameterMember = 320, RULE_nodeParameter = 321, + RULE_featureBinding = 322, RULE_emptyParameterMember = 323, RULE_assignmentNode = 324, + RULE_assignmentNodeDeclaration = 325, RULE_assignmentTargetMember = 326, + RULE_assignmentTargetParameter = 327, RULE_assignmentTargetBinding = 328, + RULE_terminateNode = 329, RULE_ifNode = 330, RULE_expressionParameterMember = 331, + RULE_actionBodyParameterMember = 332, RULE_actionBodyParameter = 333, + RULE_ifNodeParameterMember = 334, RULE_whileLoopNode = 335, RULE_forLoopNode = 336, + RULE_forVariableDeclarationMember = 337, RULE_actionTargetSuccession = 338, + RULE_targetSuccession = 339, RULE_guardedTargetSuccession = 340, RULE_defaultTargetSuccession = 341, + RULE_guardedSuccession = 342, RULE_stateDefinition = 343, RULE_stateDefBody = 344, + RULE_stateBodyItem = 345, RULE_entryActionMember = 346, RULE_doActionMember = 347, + RULE_exitActionMember = 348, RULE_entryTransitionMember = 349, RULE_stateActionUsage = 350, + RULE_statePerformActionUsage = 351, RULE_stateAcceptActionUsage = 352, + RULE_stateSendActionUsage = 353, RULE_stateAssignmentActionUsage = 354, + RULE_transitionUsageMember = 355, RULE_targetTransitionUsageMember = 356, + RULE_stateUsage = 357, RULE_stateUsageBody = 358, RULE_exhibitStateUsage = 359, + RULE_transitionUsage = 360, RULE_targetTransitionUsage = 361, RULE_triggerActionMember = 362, + RULE_triggerAction = 363, RULE_guardExpressionMember = 364, RULE_effectBehaviorMember = 365, + RULE_effectBehaviorUsage = 366, RULE_transitionPerformActionUsage = 367, + RULE_transitionAcceptActionUsage = 368, RULE_transitionSendActionUsage = 369, + RULE_transitionAssignmentActionUsage = 370, RULE_transitionSuccessionMember = 371, + RULE_transitionSuccession = 372, RULE_emptyEndMember = 373, RULE_calculationDefinition = 374, + RULE_calculationUsage = 375, RULE_calculationBody = 376, RULE_calculationBodyPart = 377, + RULE_calculationBodyItem = 378, RULE_returnParameterMember = 379, RULE_constraintDefinition = 380, + RULE_constraintUsage = 381, RULE_assertConstraintUsage = 382, RULE_constraintUsageDeclaration = 383, + RULE_requirementDefinition = 384, RULE_requirementBody = 385, RULE_requirementBodyItem = 386, + RULE_subjectMember = 387, RULE_subjectUsage = 388, RULE_requirementConstraintMember = 389, + RULE_requirementKind = 390, RULE_requirementConstraintUsage = 391, RULE_framedConcernMember = 392, + RULE_framedConcernUsage = 393, RULE_actorMember = 394, RULE_actorUsage = 395, + RULE_stakeholderMember = 396, RULE_stakeholderUsage = 397, RULE_requirementUsage = 398, + RULE_satisfyRequirementUsage = 399, RULE_satisfactionSubjectMember = 400, + RULE_satisfactionParameter = 401, RULE_satisfactionFeatureValue = 402, + RULE_satisfactionReferenceExpression = 403, RULE_concernDefinition = 404, + RULE_concernUsage = 405, RULE_caseDefinition = 406, RULE_caseUsage = 407, + RULE_caseBody = 408, RULE_caseBodyItem = 409, RULE_objectiveMember = 410, + RULE_objectiveRequirementUsage = 411, RULE_analysisCaseDefinition = 412, + RULE_analysisCaseUsage = 413, RULE_verificationCaseDefinition = 414, RULE_verificationCaseUsage = 415, + RULE_requirementVerificationMember = 416, RULE_requirementVerificationUsage = 417, + RULE_useCaseDefinition = 418, RULE_useCaseUsage = 419, RULE_includeUseCaseUsage = 420, + RULE_viewDefinition = 421, RULE_viewDefinitionBody = 422, RULE_viewDefinitionBodyItem = 423, + RULE_viewRenderingMember = 424, RULE_viewRenderingUsage = 425, RULE_viewUsage = 426, + RULE_viewBody = 427, RULE_viewBodyItem = 428, RULE_expose = 429, RULE_membershipExpose = 430, + RULE_namespaceExpose = 431, RULE_viewpointDefinition = 432, RULE_viewpointUsage = 433, + RULE_renderingDefinition = 434, RULE_renderingUsage = 435, RULE_metadataDefinition = 436, + RULE_prefixMetadataUsage = 437, RULE_metadataBodyUsageMember = 438, RULE_metadataBodyUsage = 439, + RULE_extendedDefinition = 440, RULE_extendedUsage = 441, RULE_filterPackageImportDeclaration = 442, + RULE_namespaceImportDirect = 443, RULE_calculationUsageDeclaration = 444, + RULE_emptyActionUsage_ = 445, RULE_emptyFeature_ = 446, RULE_emptyMultiplicity_ = 447, + RULE_emptyUsage_ = 448, RULE_filterPackageImport = 449, RULE_nonFeatureChainPrimaryExpression = 450, + RULE_portConjugation = 451; + public static readonly string[] ruleNames = { + "ownedExpression", "typeReference", "sequenceExpressionList", "baseExpression", + "nullExpression", "featureReferenceExpression", "constructorExpression", + "bodyExpression", "argumentList", "positionalArgumentList", "namedArgumentList", + "namedArgument", "literalExpression", "literalBoolean", "literalString", + "literalInteger", "literalReal", "literalInfinity", "argumentMember", + "argumentExpressionMember", "name", "unreservedKeyword", "identification", + "relationshipBody", "relationshipOwnedElement", "ownedRelatedElement", + "dependency", "annotation", "ownedAnnotation", "annotatingElement", "comment", + "documentation", "textualRepresentation", "rootNamespace", "namespace", + "namespaceDeclaration", "namespaceBody", "namespaceBodyElement", "memberPrefix", + "visibilityIndicator", "namespaceMember", "nonFeatureMember", "namespaceFeatureMember", + "aliasMember", "qualifiedName", "importRule", "importDeclaration", "membershipImport", + "namespaceImport", "filterPackage", "filterPackageMember", "memberElement", + "nonFeatureElement", "featureElement", "type", "typePrefix", "typeDeclaration", + "specializationPart", "conjugationPart", "typeRelationshipPart", "disjoiningPart", + "unioningPart", "intersectingPart", "differencingPart", "typeBody", "typeBodyElement", + "specialization", "ownedSpecialization", "specificType", "generalType", + "conjugation", "ownedConjugation", "disjoining", "ownedDisjoining", "unioning", + "intersecting", "differencing", "featureMember", "typeFeatureMember", + "ownedFeatureMember", "classifier", "classifierDeclaration", "superclassingPart", + "subclassification", "ownedSubclassification", "feature", "endFeaturePrefix", + "basicFeaturePrefix", "featurePrefix", "ownedCrossFeatureMember", "ownedCrossFeature", + "featureDirection", "featureDeclaration", "featureIdentification", "featureRelationshipPart", + "chainingPart", "invertingPart", "typeFeaturingPart", "featureSpecializationPart", + "multiplicityPart", "featureSpecialization", "typings", "typedBy", "subsettings", + "subsets", "references", "crosses", "redefinitions", "redefines", "featureTyping", + "ownedFeatureTyping", "subsetting", "ownedSubsetting", "ownedReferenceSubsetting", + "ownedCrossSubsetting", "redefinition", "ownedRedefinition", "featureInverting", + "ownedFeatureInverting", "typeFeaturing", "ownedTypeFeaturing", "dataType", + "class", "structure", "association", "associationStructure", "connector", + "connectorDeclaration", "binaryConnectorDeclaration", "naryConnectorDeclaration", + "connectorEndMember", "connectorEnd", "ownedCrossMultiplicityMember", + "ownedCrossMultiplicity", "bindingConnector", "bindingConnectorDeclaration", + "succession", "successionDeclaration", "behavior", "step", "function", + "functionBody", "functionBodyPart", "returnFeatureMember", "resultExpressionMember", + "expression", "predicate", "booleanExpression", "invariant", "featureChainMember", + "interaction", "flow", "successionFlow", "flowDeclaration", "payloadFeatureMember", + "payloadFeature", "payloadFeatureSpecializationPart", "flowEndMember", + "flowEnd", "valuePart", "featureValue", "multiplicity", "multiplicitySubset", + "multiplicityRange", "ownedMultiplicity", "ownedMultiplicityRange", "multiplicityBounds", + "multiplicityExpressionMember", "metaclass", "prefixMetadataAnnotation", + "prefixMetadataMember", "prefixMetadataFeature", "metadataFeature", "metadataFeatureDeclaration", + "metadataBody", "metadataBodyElement", "metadataBodyFeatureMember", "metadataBodyFeature", + "package", "libraryPackage", "packageDeclaration", "packageBody", "elementFilterMember", + "dependencyDeclaration", "annotatingMember", "packageBodyElement", "packageMember", + "definitionElement", "usageElement", "basicDefinitionPrefix", "definitionExtensionKeyword", + "definitionPrefix", "definition", "definitionDeclaration", "definitionBody", + "definitionBodyItem", "definitionBodyItemContent", "definitionMember", + "variantUsageMember", "nonOccurrenceUsageMember", "structureUsageMember", + "behaviorUsageMember", "refPrefix", "basicUsagePrefix", "endUsagePrefix", + "usageExtensionKeyword", "unextendedUsagePrefix", "usagePrefix", "usage", + "usageDeclaration", "usageCompletion", "usageBody", "defaultReferenceUsage", + "referenceUsage", "endFeatureUsage", "variantReference", "nonOccurrenceUsageElement", + "endOccurrenceUsageElement", "occurrenceUsageElement", "structureUsageElement", + "behaviorUsageElement", "variantUsageElement", "subclassificationPart", + "attributeDefinition", "attributeUsage", "enumerationDefinition", "enumerationBody", + "enumerationUsageMember", "enumeratedValue", "enumerationUsage", "occurrenceDefinitionPrefix", + "occurrenceDefinition", "individualDefinition", "emptyMultiplicityMember", + "occurrenceUsagePrefix", "occurrenceUsage", "individualUsage", "portionUsage", + "portionKind", "eventOccurrenceUsage", "sourceSuccessionMember", "sourceSuccession", + "sourceEndMember", "sourceEnd", "itemDefinition", "itemUsage", "partDefinition", + "partUsage", "portDefinition", "conjugatedPortDefinitionMember", "conjugatedPortDefinition", + "portUsage", "conjugatedPortTyping", "connectionDefinition", "connectionUsage", + "connectorPart", "binaryConnectorPart", "naryConnectorPart", "bindingConnectorAsUsage", + "successionAsUsage", "interfaceDefinition", "interfaceBody", "interfaceBodyItem", + "interfaceNonOccurrenceUsageMember", "interfaceNonOccurrenceUsageElement", + "interfaceOccurrenceUsageMember", "interfaceOccurrenceUsageElement", "defaultInterfaceEnd", + "interfaceUsage", "interfaceUsageDeclaration", "interfacePart", "binaryInterfacePart", + "naryInterfacePart", "interfaceEndMember", "interfaceEnd", "allocationDefinition", + "allocationUsage", "allocationUsageDeclaration", "flowDefinition", "message", + "messageDeclaration", "messageEventMember", "messageEvent", "flowUsage", + "successionFlowUsage", "flowPayloadFeatureMember", "flowPayloadFeature", + "actionDefinition", "actionBody", "actionBodyItem", "nonBehaviorBodyItem", + "actionBehaviorMember", "initialNodeMember", "actionNodeMember", "actionTargetSuccessionMember", + "guardedSuccessionMember", "actionUsage", "actionUsageDeclaration", "performActionUsage", + "performActionUsageDeclaration", "actionNode", "actionNodeUsageDeclaration", + "actionNodePrefix", "controlNode", "controlNodePrefix", "mergeNode", "decisionNode", + "joinNode", "forkNode", "acceptNode", "acceptNodeDeclaration", "acceptParameterPart", + "payloadParameterMember", "payloadParameter", "triggerValuePart", "triggerFeatureValue", + "triggerExpression", "sendNode", "sendNodeDeclaration", "senderReceiverPart", + "nodeParameterMember", "nodeParameter", "featureBinding", "emptyParameterMember", + "assignmentNode", "assignmentNodeDeclaration", "assignmentTargetMember", + "assignmentTargetParameter", "assignmentTargetBinding", "terminateNode", + "ifNode", "expressionParameterMember", "actionBodyParameterMember", "actionBodyParameter", + "ifNodeParameterMember", "whileLoopNode", "forLoopNode", "forVariableDeclarationMember", + "actionTargetSuccession", "targetSuccession", "guardedTargetSuccession", + "defaultTargetSuccession", "guardedSuccession", "stateDefinition", "stateDefBody", + "stateBodyItem", "entryActionMember", "doActionMember", "exitActionMember", + "entryTransitionMember", "stateActionUsage", "statePerformActionUsage", + "stateAcceptActionUsage", "stateSendActionUsage", "stateAssignmentActionUsage", + "transitionUsageMember", "targetTransitionUsageMember", "stateUsage", + "stateUsageBody", "exhibitStateUsage", "transitionUsage", "targetTransitionUsage", + "triggerActionMember", "triggerAction", "guardExpressionMember", "effectBehaviorMember", + "effectBehaviorUsage", "transitionPerformActionUsage", "transitionAcceptActionUsage", + "transitionSendActionUsage", "transitionAssignmentActionUsage", "transitionSuccessionMember", + "transitionSuccession", "emptyEndMember", "calculationDefinition", "calculationUsage", + "calculationBody", "calculationBodyPart", "calculationBodyItem", "returnParameterMember", + "constraintDefinition", "constraintUsage", "assertConstraintUsage", "constraintUsageDeclaration", + "requirementDefinition", "requirementBody", "requirementBodyItem", "subjectMember", + "subjectUsage", "requirementConstraintMember", "requirementKind", "requirementConstraintUsage", + "framedConcernMember", "framedConcernUsage", "actorMember", "actorUsage", + "stakeholderMember", "stakeholderUsage", "requirementUsage", "satisfyRequirementUsage", + "satisfactionSubjectMember", "satisfactionParameter", "satisfactionFeatureValue", + "satisfactionReferenceExpression", "concernDefinition", "concernUsage", + "caseDefinition", "caseUsage", "caseBody", "caseBodyItem", "objectiveMember", + "objectiveRequirementUsage", "analysisCaseDefinition", "analysisCaseUsage", + "verificationCaseDefinition", "verificationCaseUsage", "requirementVerificationMember", + "requirementVerificationUsage", "useCaseDefinition", "useCaseUsage", "includeUseCaseUsage", + "viewDefinition", "viewDefinitionBody", "viewDefinitionBodyItem", "viewRenderingMember", + "viewRenderingUsage", "viewUsage", "viewBody", "viewBodyItem", "expose", + "membershipExpose", "namespaceExpose", "viewpointDefinition", "viewpointUsage", + "renderingDefinition", "renderingUsage", "metadataDefinition", "prefixMetadataUsage", + "metadataBodyUsageMember", "metadataBodyUsage", "extendedDefinition", + "extendedUsage", "filterPackageImportDeclaration", "namespaceImportDirect", + "calculationUsageDeclaration", "emptyActionUsage_", "emptyFeature_", "emptyMultiplicity_", + "emptyUsage_", "filterPackageImport", "nonFeatureChainPrimaryExpression", + "portConjugation" + }; + + private static readonly string[] _LiteralNames = { + null, "'about'", "'abstract'", "'accept'", "'action'", "'actor'", "'after'", + "'alias'", "'all'", "'allocate'", "'allocation'", "'analysis'", "'and'", + "'as'", "'assert'", "'assign'", "'assoc'", "'assume'", "'at'", "'attribute'", + "'behavior'", "'bind'", "'binding'", "'bool'", "'by'", "'calc'", "'case'", + "'chains'", "'class'", "'classifier'", "'comment'", "'composite'", "'concern'", + "'conjugate'", "'conjugates'", "'conjugation'", "'connect'", "'connection'", + "'connector'", "'const'", "'constant'", "'constraint'", "'crosses'", "'datatype'", + "'decide'", "'def'", "'default'", "'defined'", "'dependency'", "'derived'", + "'differences'", "'disjoining'", "'disjoint'", "'do'", "'doc'", "'else'", + "'end'", "'entry'", "'enum'", "'event'", "'exhibit'", "'exit'", "'expose'", + "'expr'", "'false'", "'feature'", "'featured'", "'featuring'", "'filter'", + "'first'", "'flow'", "'for'", "'fork'", "'frame'", "'from'", "'function'", + "'hastype'", "'if'", "'implies'", "'import'", "'in'", "'include'", "'individual'", + "'inout'", "'interaction'", "'interface'", "'intersects'", "'inv'", "'inverse'", + "'inverting'", "'istype'", "'item'", "'join'", "'language'", "'library'", + "'locale'", "'loop'", "'member'", "'merge'", "'message'", "'meta'", "'metaclass'", + "'metadata'", "'multiplicity'", "'namespace'", "'new'", "'nonunique'", + "'not'", "'null'", "'objective'", "'occurrence'", "'of'", "'or'", "'ordered'", + "'out'", "'package'", "'parallel'", "'part'", "'perform'", "'port'", "'portion'", + "'predicate'", "'private'", "'protected'", "'public'", "'redefines'", + "'redefinition'", "'ref'", "'references'", "'render'", "'rendering'", + "'rep'", "'require'", "'requirement'", "'return'", "'satisfy'", "'send'", + "'snapshot'", "'specialization'", "'specializes'", "'stakeholder'", "'standard'", + "'state'", "'step'", "'struct'", "'subclassifier'", "'subject'", "'subset'", + "'subsets'", "'subtype'", "'succession'", "'terminate'", "'then'", "'timeslice'", + "'to'", "'transition'", "'true'", "'type'", "'typed'", "'typing'", "'unions'", + "'until'", "'use'", "'var'", "'variant'", "'variation'", "'verification'", + "'verify'", "'via'", "'view'", "'viewpoint'", "'when'", "'while'", "'xor'", + "'!=='", "'::>'", "':>>'", "'==='", "'!='", "'**'", "'->'", "'..'", "'.?'", + "'::'", "':='", "':>'", "'<='", "'=='", "'=>'", "'>='", "'??'", "'@@'", + "'#'", "'$'", "'%'", "'&'", "'('", "')'", "'*'", "'+'", "','", "'-'", + "'.'", "'/'", "':'", "';'", "'<'", "'='", "'>'", "'?'", "'@'", "'['", + "']'", "'^'", "'{'", "'|'", "'}'", "'~'", null, null, null, null, null, + null, null, "'//'" + }; + private static readonly string[] _SymbolicNames = { + null, "ABOUT", "ABSTRACT", "ACCEPT", "ACTION", "ACTOR", "AFTER", "ALIAS", + "ALL", "ALLOCATE", "ALLOCATION", "ANALYSIS", "AND", "AS", "ASSERT", "ASSIGN", + "ASSOC", "ASSUME", "AT", "ATTRIBUTE", "BEHAVIOR", "BIND", "BINDING", "BOOL", + "BY", "CALC", "CASE", "CHAINS", "CLASS", "CLASSIFIER", "COMMENT", "COMPOSITE", + "CONCERN", "CONJUGATE", "CONJUGATES", "CONJUGATION", "CONNECT", "CONNECTION", + "CONNECTOR", "CONST", "CONSTANT", "CONSTRAINT", "CROSSES", "DATATYPE", + "DECIDE", "DEF", "DEFAULT", "DEFINED", "DEPENDENCY", "DERIVED", "DIFFERENCES", + "DISJOINING", "DISJOINT", "DO", "DOC", "ELSE", "END", "ENTRY", "ENUM", + "EVENT", "EXHIBIT", "EXIT", "EXPOSE", "EXPR", "FALSE", "FEATURE", "FEATURED", + "FEATURING", "FILTER", "FIRST", "FLOW", "FOR", "FORK", "FRAME", "FROM", + "FUNCTION", "HASTYPE", "IF", "IMPLIES", "IMPORT", "IN", "INCLUDE", "INDIVIDUAL", + "INOUT", "INTERACTION", "INTERFACE", "INTERSECTS", "INV", "INVERSE", "INVERTING", + "ISTYPE", "ITEM", "JOIN", "LANGUAGE", "LIBRARY", "LOCALE", "LOOP", "MEMBER", + "MERGE", "MESSAGE", "META", "METACLASS", "METADATA", "MULTIPLICITY", "NAMESPACE", + "NEW", "NONUNIQUE", "NOT", "NULL", "OBJECTIVE", "OCCURRENCE", "OF", "OR", + "ORDERED", "OUT", "PACKAGE", "PARALLEL", "PART", "PERFORM", "PORT", "PORTION", + "PREDICATE", "PRIVATE", "PROTECTED", "PUBLIC", "REDEFINES", "REDEFINITION", + "REF", "REFERENCES", "RENDER", "RENDERING", "REP", "REQUIRE", "REQUIREMENT", + "RETURN", "SATISFY", "SEND", "SNAPSHOT", "SPECIALIZATION", "SPECIALIZES", + "STAKEHOLDER", "STANDARD", "STATE", "STEP", "STRUCT", "SUBCLASSIFIER", + "SUBJECT", "SUBSET", "SUBSETS", "SUBTYPE", "SUCCESSION", "TERMINATE", + "THEN", "TIMESLICE", "TO", "TRANSITION", "TRUE", "TYPE", "TYPED", "TYPING", + "UNIONS", "UNTIL", "USE", "VAR", "VARIANT", "VARIATION", "VERIFICATION", + "VERIFY", "VIA", "VIEW", "VIEWPOINT", "WHEN", "WHILE", "XOR", "BANG_EQ_EQ", + "COLON_COLON_GT", "COLON_GT_GT", "EQ_EQ_EQ", "BANG_EQ", "STAR_STAR", "ARROW", + "DOT_DOT", "DOT_QUESTION", "COLON_COLON", "COLON_EQ", "COLON_GT", "LE", + "EQ_EQ", "FAT_ARROW", "GE", "QUESTION_QUESTION", "AT_AT", "HASH", "DOLLAR", + "PERCENT", "AMP", "LPAREN", "RPAREN", "STAR", "PLUS", "COMMA", "MINUS", + "DOT", "SLASH", "COLON", "SEMI", "LT", "EQ", "GT", "QUESTION", "AT_SIGN", + "LBRACK", "RBRACK", "CARET", "LBRACE", "PIPE", "RBRACE", "TILDE", "IDENTIFIER", + "STRING", "DOUBLE_STRING", "INTEGER", "REAL", "REGULAR_COMMENT", "SINGLE_LINE_NOTE", + "BARE_LINE_COMMENT", "WS" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "SysMLv2Parser.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static SysMLv2Parser() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + + public SysMLv2Parser(ITokenStream input) : this(input, Console.Out, Console.Error) { } + + public SysMLv2Parser(ITokenStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + public partial class OwnedExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IF() { return GetToken(SysMLv2Parser.IF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext[] ownedExpression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION() { return GetToken(SysMLv2Parser.QUESTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(SysMLv2Parser.ELSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PLUS() { return GetToken(SysMLv2Parser.PLUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MINUS() { return GetToken(SysMLv2Parser.MINUS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(SysMLv2Parser.TILDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NOT() { return GetToken(SysMLv2Parser.NOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TypeReferenceContext typeReference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AT_SIGN() { return GetToken(SysMLv2Parser.AT_SIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AT_AT() { return GetToken(SysMLv2Parser.AT_AT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public BaseExpressionContext baseExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode QUESTION_QUESTION() { return GetToken(SysMLv2Parser.QUESTION_QUESTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IMPLIES() { return GetToken(SysMLv2Parser.IMPLIES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OR() { return GetToken(SysMLv2Parser.OR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AND() { return GetToken(SysMLv2Parser.AND, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode XOR() { return GetToken(SysMLv2Parser.XOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PIPE() { return GetToken(SysMLv2Parser.PIPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AMP() { return GetToken(SysMLv2Parser.AMP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ_EQ() { return GetToken(SysMLv2Parser.EQ_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BANG_EQ() { return GetToken(SysMLv2Parser.BANG_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ_EQ_EQ() { return GetToken(SysMLv2Parser.EQ_EQ_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BANG_EQ_EQ() { return GetToken(SysMLv2Parser.BANG_EQ_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LT() { return GetToken(SysMLv2Parser.LT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GT() { return GetToken(SysMLv2Parser.GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LE() { return GetToken(SysMLv2Parser.LE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GE() { return GetToken(SysMLv2Parser.GE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT_DOT() { return GetToken(SysMLv2Parser.DOT_DOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR() { return GetToken(SysMLv2Parser.STAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SLASH() { return GetToken(SysMLv2Parser.SLASH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PERCENT() { return GetToken(SysMLv2Parser.PERCENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR_STAR() { return GetToken(SysMLv2Parser.STAR_STAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CARET() { return GetToken(SysMLv2Parser.CARET, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ISTYPE() { return GetToken(SysMLv2Parser.ISTYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode HASTYPE() { return GetToken(SysMLv2Parser.HASTYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AS() { return GetToken(SysMLv2Parser.AS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode META() { return GetToken(SysMLv2Parser.META, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACK() { return GetToken(SysMLv2Parser.LBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACK() { return GetToken(SysMLv2Parser.RBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SequenceExpressionListContext sequenceExpressionList() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode HASH() { return GetToken(SysMLv2Parser.HASH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ArgumentListContext argumentList() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT() { return GetToken(SysMLv2Parser.DOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT_QUESTION() { return GetToken(SysMLv2Parser.DOT_QUESTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public BodyExpressionContext bodyExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ARROW() { return GetToken(SysMLv2Parser.ARROW, 0); } + public OwnedExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedExpressionContext ownedExpression() { + return ownedExpression(0); + } + + private OwnedExpressionContext ownedExpression(int _p) { + ParserRuleContext _parentctx = Context; + int _parentState = State; + OwnedExpressionContext _localctx = new OwnedExpressionContext(Context, _parentState); + OwnedExpressionContext _prevctx = _localctx; + int _startState = 0; + EnterRecursionRule(_localctx, 0, RULE_ownedExpression, _p); + int _la; + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 919; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case IF: + { + State = 905; + Match(IF); + State = 906; + ownedExpression(0); + State = 907; + Match(QUESTION); + State = 908; + ownedExpression(0); + State = 909; + Match(ELSE); + State = 910; + ownedExpression(28); + } + break; + case NOT: + case PLUS: + case MINUS: + case TILDE: + { + State = 912; + _la = TokenStream.LA(1); + if ( !(_la==NOT || ((((_la - 199)) & ~0x3f) == 0 && ((1L << (_la - 199)) & 262149L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 913; + ownedExpression(14); + } + break; + case AT_AT: + case AT_SIGN: + { + State = 914; + _la = TokenStream.LA(1); + if ( !(_la==AT_AT || _la==AT_SIGN) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 915; + typeReference(); + } + break; + case ALL: + { + State = 916; + Match(ALL); + State = 917; + typeReference(); + } + break; + case BEHAVIOR: + case CROSSES: + case FALSE: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case NEW: + case NULL: + case PREDICATE: + case STEP: + case TRUE: + case TYPE: + case VAR: + case DOLLAR: + case LPAREN: + case STAR: + case LBRACE: + case IDENTIFIER: + case STRING: + case DOUBLE_STRING: + case INTEGER: + case REAL: + case REGULAR_COMMENT: + { + State = 918; + baseExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + Context.Stop = TokenStream.LT(-1); + State = 1002; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,5,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( ParseListeners!=null ) + TriggerExitRuleEvent(); + _prevctx = _localctx; + { + State = 1000; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) { + case 1: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 921; + if (!(Precpred(Context, 27))) throw new FailedPredicateException(this, "Precpred(Context, 27)"); + State = 922; + Match(QUESTION_QUESTION); + State = 923; + ownedExpression(28); + } + break; + case 2: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 924; + if (!(Precpred(Context, 26))) throw new FailedPredicateException(this, "Precpred(Context, 26)"); + State = 925; + Match(IMPLIES); + State = 926; + ownedExpression(27); + } + break; + case 3: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 927; + if (!(Precpred(Context, 25))) throw new FailedPredicateException(this, "Precpred(Context, 25)"); + State = 928; + Match(OR); + State = 929; + ownedExpression(26); + } + break; + case 4: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 930; + if (!(Precpred(Context, 24))) throw new FailedPredicateException(this, "Precpred(Context, 24)"); + State = 931; + Match(AND); + State = 932; + ownedExpression(25); + } + break; + case 5: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 933; + if (!(Precpred(Context, 23))) throw new FailedPredicateException(this, "Precpred(Context, 23)"); + State = 934; + Match(XOR); + State = 935; + ownedExpression(24); + } + break; + case 6: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 936; + if (!(Precpred(Context, 22))) throw new FailedPredicateException(this, "Precpred(Context, 22)"); + State = 937; + Match(PIPE); + State = 938; + ownedExpression(23); + } + break; + case 7: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 939; + if (!(Precpred(Context, 21))) throw new FailedPredicateException(this, "Precpred(Context, 21)"); + State = 940; + Match(AMP); + State = 941; + ownedExpression(22); + } + break; + case 8: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 942; + if (!(Precpred(Context, 20))) throw new FailedPredicateException(this, "Precpred(Context, 20)"); + State = 943; + _la = TokenStream.LA(1); + if ( !(((((_la - 174)) & ~0x3f) == 0 && ((1L << (_la - 174)) & 8217L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 944; + ownedExpression(21); + } + break; + case 9: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 945; + if (!(Precpred(Context, 19))) throw new FailedPredicateException(this, "Precpred(Context, 19)"); + State = 946; + _la = TokenStream.LA(1); + if ( !(((((_la - 186)) & ~0x3f) == 0 && ((1L << (_la - 186)) & 5242889L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 947; + ownedExpression(20); + } + break; + case 10: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 948; + if (!(Precpred(Context, 18))) throw new FailedPredicateException(this, "Precpred(Context, 18)"); + State = 949; + Match(DOT_DOT); + State = 950; + ownedExpression(19); + } + break; + case 11: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 951; + if (!(Precpred(Context, 17))) throw new FailedPredicateException(this, "Precpred(Context, 17)"); + State = 952; + _la = TokenStream.LA(1); + if ( !(_la==PLUS || _la==MINUS) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 953; + ownedExpression(18); + } + break; + case 12: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 954; + if (!(Precpred(Context, 16))) throw new FailedPredicateException(this, "Precpred(Context, 16)"); + State = 955; + _la = TokenStream.LA(1); + if ( !(((((_la - 194)) & ~0x3f) == 0 && ((1L << (_la - 194)) & 529L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 956; + ownedExpression(17); + } + break; + case 13: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 957; + if (!(Precpred(Context, 15))) throw new FailedPredicateException(this, "Precpred(Context, 15)"); + State = 958; + _la = TokenStream.LA(1); + if ( !(_la==STAR_STAR || _la==CARET) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 959; + ownedExpression(15); + } + break; + case 14: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 960; + if (!(Precpred(Context, 12))) throw new FailedPredicateException(this, "Precpred(Context, 12)"); + State = 961; + _la = TokenStream.LA(1); + if ( !(_la==HASTYPE || _la==ISTYPE || _la==AT_SIGN) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 962; + typeReference(); + } + break; + case 15: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 963; + if (!(Precpred(Context, 11))) throw new FailedPredicateException(this, "Precpred(Context, 11)"); + State = 964; + Match(AS); + State = 965; + typeReference(); + } + break; + case 16: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 966; + if (!(Precpred(Context, 10))) throw new FailedPredicateException(this, "Precpred(Context, 10)"); + State = 967; + Match(AT_AT); + State = 968; + typeReference(); + } + break; + case 17: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 969; + if (!(Precpred(Context, 9))) throw new FailedPredicateException(this, "Precpred(Context, 9)"); + State = 970; + Match(META); + State = 971; + typeReference(); + } + break; + case 18: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 972; + if (!(Precpred(Context, 8))) throw new FailedPredicateException(this, "Precpred(Context, 8)"); + State = 973; + Match(LBRACK); + State = 975; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4398047559936L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 144144473848293379L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 406731341347971073L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 16273L) != 0)) { + { + State = 974; + sequenceExpressionList(); + } + } + + State = 977; + Match(RBRACK); + } + break; + case 19: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 978; + if (!(Precpred(Context, 7))) throw new FailedPredicateException(this, "Precpred(Context, 7)"); + State = 979; + Match(HASH); + State = 980; + Match(LPAREN); + State = 982; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4398047559936L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 144144473848293379L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 406731341347971073L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 16273L) != 0)) { + { + State = 981; + sequenceExpressionList(); + } + } + + State = 984; + Match(RPAREN); + } + break; + case 20: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 985; + if (!(Precpred(Context, 6))) throw new FailedPredicateException(this, "Precpred(Context, 6)"); + State = 986; + argumentList(); + } + break; + case 21: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 987; + if (!(Precpred(Context, 5))) throw new FailedPredicateException(this, "Precpred(Context, 5)"); + State = 988; + Match(DOT); + State = 989; + qualifiedName(); + } + break; + case 22: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 990; + if (!(Precpred(Context, 4))) throw new FailedPredicateException(this, "Precpred(Context, 4)"); + State = 991; + Match(DOT_QUESTION); + State = 992; + bodyExpression(); + } + break; + case 23: + { + _localctx = new OwnedExpressionContext(_parentctx, _parentState); + PushNewRecursionContext(_localctx, _startState, RULE_ownedExpression); + State = 993; + if (!(Precpred(Context, 3))) throw new FailedPredicateException(this, "Precpred(Context, 3)"); + State = 994; + Match(ARROW); + State = 995; + qualifiedName(); + State = 998; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case LBRACE: + { + State = 996; + bodyExpression(); + } + break; + case LPAREN: + { + State = 997; + argumentList(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + } + State = 1004; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,5,Context); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + UnrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public partial class TypeReferenceContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + public TypeReferenceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeReference; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeReference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeReference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeReference(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeReferenceContext typeReference() { + TypeReferenceContext _localctx = new TypeReferenceContext(Context, State); + EnterRule(_localctx, 2, RULE_typeReference); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1005; + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SequenceExpressionListContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext[] ownedExpression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public SequenceExpressionListContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sequenceExpressionList; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSequenceExpressionList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSequenceExpressionList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSequenceExpressionList(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SequenceExpressionListContext sequenceExpressionList() { + SequenceExpressionListContext _localctx = new SequenceExpressionListContext(Context, State); + EnterRule(_localctx, 4, RULE_sequenceExpressionList); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1007; + ownedExpression(0); + State = 1012; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1008; + Match(COMMA); + State = 1009; + ownedExpression(0); + } + } + State = 1014; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BaseExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NullExpressionContext nullExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REGULAR_COMMENT() { return GetToken(SysMLv2Parser.REGULAR_COMMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public LiteralExpressionContext literalExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ArgumentListContext argumentList() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT() { return GetToken(SysMLv2Parser.DOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode METADATA() { return GetToken(SysMLv2Parser.METADATA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstructorExpressionContext constructorExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BodyExpressionContext bodyExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AS() { return GetToken(SysMLv2Parser.AS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TypeReferenceContext typeReference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SequenceExpressionListContext sequenceExpressionList() { + return GetRuleContext(0); + } + public BaseExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_baseExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBaseExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBaseExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBaseExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BaseExpressionContext baseExpression() { + BaseExpressionContext _localctx = new BaseExpressionContext(Context, State); + EnterRule(_localctx, 6, RULE_baseExpression); + int _la; + try { + State = 1036; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,9,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1015; + nullExpression(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1016; + Match(REGULAR_COMMENT); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1017; + literalExpression(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1018; + qualifiedName(); + State = 1022; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) { + case 1: + { + State = 1019; + argumentList(); + } + break; + case 2: + { + State = 1020; + Match(DOT); + State = 1021; + Match(METADATA); + } + break; + } + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1024; + constructorExpression(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1025; + bodyExpression(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1026; + Match(LPAREN); + State = 1027; + Match(AS); + State = 1028; + typeReference(); + State = 1029; + Match(RPAREN); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 1031; + Match(LPAREN); + State = 1033; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4398047559936L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 144144473848293379L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 406731341347971073L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 16273L) != 0)) { + { + State = 1032; + sequenceExpressionList(); + } + } + + State = 1035; + Match(RPAREN); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NullExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NULL() { return GetToken(SysMLv2Parser.NULL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + public NullExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nullExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNullExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNullExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNullExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NullExpressionContext nullExpression() { + NullExpressionContext _localctx = new NullExpressionContext(Context, State); + EnterRule(_localctx, 8, RULE_nullExpression); + try { + State = 1041; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case NULL: + EnterOuterAlt(_localctx, 1); + { + State = 1038; + Match(NULL); + } + break; + case LPAREN: + EnterOuterAlt(_localctx, 2); + { + State = 1039; + Match(LPAREN); + State = 1040; + Match(RPAREN); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureReferenceExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + public FeatureReferenceExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureReferenceExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureReferenceExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureReferenceExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureReferenceExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureReferenceExpressionContext featureReferenceExpression() { + FeatureReferenceExpressionContext _localctx = new FeatureReferenceExpressionContext(Context, State); + EnterRule(_localctx, 10, RULE_featureReferenceExpression); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1043; + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConstructorExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NEW() { return GetToken(SysMLv2Parser.NEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ArgumentListContext argumentList() { + return GetRuleContext(0); + } + public ConstructorExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constructorExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConstructorExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConstructorExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConstructorExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConstructorExpressionContext constructorExpression() { + ConstructorExpressionContext _localctx = new ConstructorExpressionContext(Context, State); + EnterRule(_localctx, 12, RULE_constructorExpression); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1045; + Match(NEW); + State = 1046; + qualifiedName(); + State = 1047; + argumentList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BodyExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyPartContext functionBodyPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + public BodyExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_bodyExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBodyExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBodyExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBodyExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BodyExpressionContext bodyExpression() { + BodyExpressionContext _localctx = new BodyExpressionContext(Context, State); + EnterRule(_localctx, 14, RULE_bodyExpression); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1049; + Match(LBRACE); + State = 1050; + functionBodyPart(); + State = 1051; + Match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ArgumentListContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PositionalArgumentListContext positionalArgumentList() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamedArgumentListContext namedArgumentList() { + return GetRuleContext(0); + } + public ArgumentListContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_argumentList; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterArgumentList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitArgumentList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitArgumentList(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ArgumentListContext argumentList() { + ArgumentListContext _localctx = new ArgumentListContext(Context, State); + EnterRule(_localctx, 16, RULE_argumentList); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1053; + Match(LPAREN); + State = 1056; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { + case 1: + { + State = 1054; + positionalArgumentList(); + } + break; + case 2: + { + State = 1055; + namedArgumentList(); + } + break; + } + State = 1058; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PositionalArgumentListContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext[] ownedExpression() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public PositionalArgumentListContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_positionalArgumentList; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPositionalArgumentList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPositionalArgumentList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPositionalArgumentList(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PositionalArgumentListContext positionalArgumentList() { + PositionalArgumentListContext _localctx = new PositionalArgumentListContext(Context, State); + EnterRule(_localctx, 18, RULE_positionalArgumentList); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1060; + ownedExpression(0); + State = 1065; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1061; + Match(COMMA); + State = 1062; + ownedExpression(0); + } + } + State = 1067; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamedArgumentListContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NamedArgumentContext[] namedArgument() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NamedArgumentContext namedArgument(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public NamedArgumentListContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namedArgumentList; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamedArgumentList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamedArgumentList(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamedArgumentList(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamedArgumentListContext namedArgumentList() { + NamedArgumentListContext _localctx = new NamedArgumentListContext(Context, State); + EnterRule(_localctx, 20, RULE_namedArgumentList); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1068; + namedArgument(); + State = 1073; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1069; + Match(COMMA); + State = 1070; + namedArgument(); + } + } + State = 1075; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamedArgumentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(SysMLv2Parser.EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public NamedArgumentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namedArgument; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamedArgument(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamedArgument(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamedArgument(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamedArgumentContext namedArgument() { + NamedArgumentContext _localctx = new NamedArgumentContext(Context, State); + EnterRule(_localctx, 22, RULE_namedArgument); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1076; + qualifiedName(); + State = 1077; + Match(EQ); + State = 1078; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public LiteralBooleanContext literalBoolean() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LiteralStringContext literalString() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LiteralIntegerContext literalInteger() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LiteralRealContext literalReal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LiteralInfinityContext literalInfinity() { + return GetRuleContext(0); + } + public LiteralExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literalExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLiteralExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLiteralExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLiteralExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralExpressionContext literalExpression() { + LiteralExpressionContext _localctx = new LiteralExpressionContext(Context, State); + EnterRule(_localctx, 24, RULE_literalExpression); + try { + State = 1085; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case FALSE: + case TRUE: + EnterOuterAlt(_localctx, 1); + { + State = 1080; + literalBoolean(); + } + break; + case DOUBLE_STRING: + EnterOuterAlt(_localctx, 2); + { + State = 1081; + literalString(); + } + break; + case INTEGER: + EnterOuterAlt(_localctx, 3); + { + State = 1082; + literalInteger(); + } + break; + case REAL: + EnterOuterAlt(_localctx, 4); + { + State = 1083; + literalReal(); + } + break; + case STAR: + EnterOuterAlt(_localctx, 5); + { + State = 1084; + literalInfinity(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralBooleanContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TRUE() { return GetToken(SysMLv2Parser.TRUE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FALSE() { return GetToken(SysMLv2Parser.FALSE, 0); } + public LiteralBooleanContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literalBoolean; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLiteralBoolean(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLiteralBoolean(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLiteralBoolean(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralBooleanContext literalBoolean() { + LiteralBooleanContext _localctx = new LiteralBooleanContext(Context, State); + EnterRule(_localctx, 26, RULE_literalBoolean); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1087; + _la = TokenStream.LA(1); + if ( !(_la==FALSE || _la==TRUE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralStringContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOUBLE_STRING() { return GetToken(SysMLv2Parser.DOUBLE_STRING, 0); } + public LiteralStringContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literalString; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLiteralString(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLiteralString(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLiteralString(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralStringContext literalString() { + LiteralStringContext _localctx = new LiteralStringContext(Context, State); + EnterRule(_localctx, 28, RULE_literalString); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1089; + Match(DOUBLE_STRING); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralIntegerContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTEGER() { return GetToken(SysMLv2Parser.INTEGER, 0); } + public LiteralIntegerContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literalInteger; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLiteralInteger(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLiteralInteger(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLiteralInteger(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralIntegerContext literalInteger() { + LiteralIntegerContext _localctx = new LiteralIntegerContext(Context, State); + EnterRule(_localctx, 30, RULE_literalInteger); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1091; + Match(INTEGER); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralRealContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REAL() { return GetToken(SysMLv2Parser.REAL, 0); } + public LiteralRealContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literalReal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLiteralReal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLiteralReal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLiteralReal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralRealContext literalReal() { + LiteralRealContext _localctx = new LiteralRealContext(Context, State); + EnterRule(_localctx, 32, RULE_literalReal); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1093; + Match(REAL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LiteralInfinityContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR() { return GetToken(SysMLv2Parser.STAR, 0); } + public LiteralInfinityContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_literalInfinity; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLiteralInfinity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLiteralInfinity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLiteralInfinity(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LiteralInfinityContext literalInfinity() { + LiteralInfinityContext _localctx = new LiteralInfinityContext(Context, State); + EnterRule(_localctx, 34, RULE_literalInfinity); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1095; + Match(STAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ArgumentMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public ArgumentMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_argumentMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterArgumentMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitArgumentMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitArgumentMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ArgumentMemberContext argumentMember() { + ArgumentMemberContext _localctx = new ArgumentMemberContext(Context, State); + EnterRule(_localctx, 36, RULE_argumentMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1097; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ArgumentExpressionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public ArgumentExpressionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_argumentExpressionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterArgumentExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitArgumentExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitArgumentExpressionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ArgumentExpressionMemberContext argumentExpressionMember() { + ArgumentExpressionMemberContext _localctx = new ArgumentExpressionMemberContext(Context, State); + EnterRule(_localctx, 38, RULE_argumentExpressionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1099; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IDENTIFIER() { return GetToken(SysMLv2Parser.IDENTIFIER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING() { return GetToken(SysMLv2Parser.STRING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UnreservedKeywordContext unreservedKeyword() { + return GetRuleContext(0); + } + public NameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_name; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterName(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitName(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitName(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NameContext name() { + NameContext _localctx = new NameContext(Context, State); + EnterRule(_localctx, 40, RULE_name); + try { + State = 1104; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 1101; + Match(IDENTIFIER); + } + break; + case STRING: + EnterOuterAlt(_localctx, 2); + { + State = 1102; + Match(STRING); + } + break; + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + EnterOuterAlt(_localctx, 3); + { + State = 1103; + unreservedKeyword(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UnreservedKeywordContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPE() { return GetToken(SysMLv2Parser.TYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MULTIPLICITY() { return GetToken(SysMLv2Parser.MULTIPLICITY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VAR() { return GetToken(SysMLv2Parser.VAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LANGUAGE() { return GetToken(SysMLv2Parser.LANGUAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LOCALE() { return GetToken(SysMLv2Parser.LOCALE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CROSSES() { return GetToken(SysMLv2Parser.CROSSES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STEP() { return GetToken(SysMLv2Parser.STEP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FEATURE() { return GetToken(SysMLv2Parser.FEATURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEHAVIOR() { return GetToken(SysMLv2Parser.BEHAVIOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FUNCTION() { return GetToken(SysMLv2Parser.FUNCTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MEMBER() { return GetToken(SysMLv2Parser.MEMBER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PREDICATE() { return GetToken(SysMLv2Parser.PREDICATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTERACTION() { return GetToken(SysMLv2Parser.INTERACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode METACLASS() { return GetToken(SysMLv2Parser.METACLASS, 0); } + public UnreservedKeywordContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_unreservedKeyword; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUnreservedKeyword(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUnreservedKeyword(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUnreservedKeyword(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UnreservedKeywordContext unreservedKeyword() { + UnreservedKeywordContext _localctx = new UnreservedKeywordContext(Context, State); + EnterRule(_localctx, 42, RULE_unreservedKeyword); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1106; + _la = TokenStream.LA(1); + if ( !(_la==BEHAVIOR || _la==CROSSES || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 72057943272981505L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 1064961L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IdentificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LT() { return GetToken(SysMLv2Parser.LT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GT() { return GetToken(SysMLv2Parser.GT, 0); } + public IdentificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_identification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIdentification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIdentification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIdentification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IdentificationContext identification() { + IdentificationContext _localctx = new IdentificationContext(Context, State); + EnterRule(_localctx, 44, RULE_identification); + try { + State = 1118; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1108; + Match(LT); + State = 1109; + name(); + State = 1110; + Match(GT); + State = 1111; + name(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1113; + Match(LT); + State = 1114; + name(); + State = 1115; + Match(GT); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1117; + name(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RelationshipBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipOwnedElementContext[] relationshipOwnedElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipOwnedElementContext relationshipOwnedElement(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedAnnotationContext[] ownedAnnotation() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedAnnotationContext ownedAnnotation(int i) { + return GetRuleContext(i); + } + public RelationshipBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_relationshipBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRelationshipBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRelationshipBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRelationshipBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RelationshipBodyContext relationshipBody() { + RelationshipBodyContext _localctx = new RelationshipBodyContext(Context, State); + EnterRule(_localctx, 46, RULE_relationshipBody); + int _la; + try { + State = 1137; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,19,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1120; + Match(SEMI); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1121; + Match(LBRACE); + State = 1125; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -9125545399504797436L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -1042861552693378011L) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & 7079711395550295169L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 581829L) != 0)) { + { + { + State = 1122; + relationshipOwnedElement(); + } + } + State = 1127; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1128; + Match(RBRACE); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1129; + Match(LBRACE); + State = 1133; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMENT || _la==DOC || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & 274877907461L) != 0) || ((((_la - 192)) & ~0x3f) == 0 && ((1L << (_la - 192)) & 2147745793L) != 0)) { + { + { + State = 1130; + ownedAnnotation(); + } + } + State = 1135; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1136; + Match(RBRACE); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RelationshipOwnedElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedRelatedElementContext ownedRelatedElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedAnnotationContext ownedAnnotation() { + return GetRuleContext(0); + } + public RelationshipOwnedElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_relationshipOwnedElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRelationshipOwnedElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRelationshipOwnedElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRelationshipOwnedElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RelationshipOwnedElementContext relationshipOwnedElement() { + RelationshipOwnedElementContext _localctx = new RelationshipOwnedElementContext(Context, State); + EnterRule(_localctx, 48, RULE_relationshipOwnedElement); + try { + State = 1141; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,20,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1139; + ownedRelatedElement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1140; + ownedAnnotation(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedRelatedElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonFeatureElementContext nonFeatureElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureElementContext featureElement() { + return GetRuleContext(0); + } + public OwnedRelatedElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedRelatedElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedRelatedElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedRelatedElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedRelatedElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedRelatedElementContext ownedRelatedElement() { + OwnedRelatedElementContext _localctx = new OwnedRelatedElementContext(Context, State); + EnterRule(_localctx, 50, RULE_ownedRelatedElement); + try { + State = 1145; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,21,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1143; + nonFeatureElement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1144; + featureElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DependencyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEPENDENCY() { return GetToken(SysMLv2Parser.DEPENDENCY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataAnnotationContext[] prefixMetadataAnnotation() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataAnnotationContext prefixMetadataAnnotation(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DependencyDeclarationContext dependencyDeclaration() { + return GetRuleContext(0); + } + public DependencyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_dependency; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDependency(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDependency(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDependency(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DependencyContext dependency() { + DependencyContext _localctx = new DependencyContext(Context, State); + EnterRule(_localctx, 52, RULE_dependency); + int _la; + try { + State = 1189; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,28,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1150; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 1147; + prefixMetadataAnnotation(); + } + } + State = 1152; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1153; + Match(DEPENDENCY); + State = 1158; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,24,Context) ) { + case 1: + { + State = 1155; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1154; + identification(); + } + } + + State = 1157; + Match(FROM); + } + break; + } + State = 1160; + qualifiedName(); + State = 1165; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1161; + Match(COMMA); + State = 1162; + qualifiedName(); + } + } + State = 1167; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1168; + Match(TO); + State = 1169; + qualifiedName(); + State = 1174; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1170; + Match(COMMA); + State = 1171; + qualifiedName(); + } + } + State = 1176; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1177; + relationshipBody(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1182; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 1179; + prefixMetadataAnnotation(); + } + } + State = 1184; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1185; + Match(DEPENDENCY); + State = 1186; + dependencyDeclaration(); + State = 1187; + relationshipBody(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AnnotationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_annotation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAnnotation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAnnotation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAnnotation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AnnotationContext annotation() { + AnnotationContext _localctx = new AnnotationContext(Context, State); + EnterRule(_localctx, 54, RULE_annotation); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1191; + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedAnnotationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AnnotatingElementContext annotatingElement() { + return GetRuleContext(0); + } + public OwnedAnnotationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedAnnotation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedAnnotation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedAnnotation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedAnnotation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedAnnotationContext ownedAnnotation() { + OwnedAnnotationContext _localctx = new OwnedAnnotationContext(Context, State); + EnterRule(_localctx, 56, RULE_ownedAnnotation); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1193; + annotatingElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AnnotatingElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public CommentContext comment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DocumentationContext documentation() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TextualRepresentationContext textualRepresentation() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataFeatureContext metadataFeature() { + return GetRuleContext(0); + } + public AnnotatingElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_annotatingElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAnnotatingElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAnnotatingElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAnnotatingElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AnnotatingElementContext annotatingElement() { + AnnotatingElementContext _localctx = new AnnotatingElementContext(Context, State); + EnterRule(_localctx, 58, RULE_annotatingElement); + try { + State = 1199; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case COMMENT: + case LOCALE: + case REGULAR_COMMENT: + EnterOuterAlt(_localctx, 1); + { + State = 1195; + comment(); + } + break; + case DOC: + EnterOuterAlt(_localctx, 2); + { + State = 1196; + documentation(); + } + break; + case LANGUAGE: + case REP: + EnterOuterAlt(_localctx, 3); + { + State = 1197; + textualRepresentation(); + } + break; + case METADATA: + case HASH: + case AT_SIGN: + EnterOuterAlt(_localctx, 4); + { + State = 1198; + metadataFeature(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CommentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REGULAR_COMMENT() { return GetToken(SysMLv2Parser.REGULAR_COMMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMENT() { return GetToken(SysMLv2Parser.COMMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LOCALE() { return GetToken(SysMLv2Parser.LOCALE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOUBLE_STRING() { return GetToken(SysMLv2Parser.DOUBLE_STRING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABOUT() { return GetToken(SysMLv2Parser.ABOUT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AnnotationContext[] annotation() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public AnnotationContext annotation(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public CommentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_comment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterComment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitComment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitComment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CommentContext comment() { + CommentContext _localctx = new CommentContext(Context, State); + EnterRule(_localctx, 60, RULE_comment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1216; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COMMENT) { + { + State = 1201; + Match(COMMENT); + State = 1203; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,30,Context) ) { + case 1: + { + State = 1202; + identification(); + } + break; + } + State = 1214; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABOUT) { + { + State = 1205; + Match(ABOUT); + State = 1206; + annotation(); + State = 1211; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1207; + Match(COMMA); + State = 1208; + annotation(); + } + } + State = 1213; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + + } + } + + State = 1220; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LOCALE) { + { + State = 1218; + Match(LOCALE); + State = 1219; + Match(DOUBLE_STRING); + } + } + + State = 1222; + Match(REGULAR_COMMENT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DocumentationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOC() { return GetToken(SysMLv2Parser.DOC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REGULAR_COMMENT() { return GetToken(SysMLv2Parser.REGULAR_COMMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LOCALE() { return GetToken(SysMLv2Parser.LOCALE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOUBLE_STRING() { return GetToken(SysMLv2Parser.DOUBLE_STRING, 0); } + public DocumentationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_documentation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDocumentation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDocumentation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDocumentation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DocumentationContext documentation() { + DocumentationContext _localctx = new DocumentationContext(Context, State); + EnterRule(_localctx, 62, RULE_documentation); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1224; + Match(DOC); + State = 1226; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,35,Context) ) { + case 1: + { + State = 1225; + identification(); + } + break; + } + State = 1230; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LOCALE) { + { + State = 1228; + Match(LOCALE); + State = 1229; + Match(DOUBLE_STRING); + } + } + + State = 1232; + Match(REGULAR_COMMENT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TextualRepresentationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LANGUAGE() { return GetToken(SysMLv2Parser.LANGUAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOUBLE_STRING() { return GetToken(SysMLv2Parser.DOUBLE_STRING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REGULAR_COMMENT() { return GetToken(SysMLv2Parser.REGULAR_COMMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REP() { return GetToken(SysMLv2Parser.REP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public TextualRepresentationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_textualRepresentation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTextualRepresentation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTextualRepresentation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTextualRepresentation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TextualRepresentationContext textualRepresentation() { + TextualRepresentationContext _localctx = new TextualRepresentationContext(Context, State); + EnterRule(_localctx, 64, RULE_textualRepresentation); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1238; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REP) { + { + State = 1234; + Match(REP); + State = 1236; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,37,Context) ) { + case 1: + { + State = 1235; + identification(); + } + break; + } + } + } + + State = 1240; + Match(LANGUAGE); + State = 1241; + Match(DOUBLE_STRING); + State = 1242; + Match(REGULAR_COMMENT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RootNamespaceContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Eof() { return GetToken(SysMLv2Parser.Eof, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PackageBodyElementContext[] packageBodyElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PackageBodyElementContext packageBodyElement(int i) { + return GetRuleContext(i); + } + public RootNamespaceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_rootNamespace; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRootNamespace(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRootNamespace(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRootNamespace(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RootNamespaceContext rootNamespace() { + RootNamespaceContext _localctx = new RootNamespaceContext(Context, State); + EnterRule(_localctx, 66, RULE_rootNamespace); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1247; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108748064989138580L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785799L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954066908867737771L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 1244; + packageBodyElement(); + } + } + State = 1249; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1250; + Match(Eof); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NamespaceDeclarationContext namespaceDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceBodyContext namespaceBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + public NamespaceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespace; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespace(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespace(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespace(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceContext @namespace() { + NamespaceContext _localctx = new NamespaceContext(Context, State); + EnterRule(_localctx, 68, RULE_namespace); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1255; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 1252; + prefixMetadataMember(); + } + } + State = 1257; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1258; + namespaceDeclaration(); + State = 1259; + namespaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NAMESPACE() { return GetToken(SysMLv2Parser.NAMESPACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public NamespaceDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceDeclarationContext namespaceDeclaration() { + NamespaceDeclarationContext _localctx = new NamespaceDeclarationContext(Context, State); + EnterRule(_localctx, 70, RULE_namespaceDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1261; + Match(NAMESPACE); + State = 1263; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1262; + identification(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceBodyElementContext[] namespaceBodyElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceBodyElementContext namespaceBodyElement(int i) { + return GetRuleContext(i); + } + public NamespaceBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceBodyContext namespaceBody() { + NamespaceBodyContext _localctx = new NamespaceBodyContext(Context, State); + EnterRule(_localctx, 72, RULE_namespaceBody); + int _la; + try { + State = 1274; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 1265; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 1266; + Match(LBRACE); + State = 1270; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -9125545399504797308L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -34055236162370523L) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & 7079711395550295169L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 581829L) != 0)) { + { + { + State = 1267; + namespaceBodyElement(); + } + } + State = 1272; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1273; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceBodyElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NamespaceMemberContext namespaceMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + public NamespaceBodyElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceBodyElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceBodyElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceBodyElementContext namespaceBodyElement() { + NamespaceBodyElementContext _localctx = new NamespaceBodyElementContext(Context, State); + EnterRule(_localctx, 74, RULE_namespaceBodyElement); + try { + State = 1279; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,44,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1276; + namespaceMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1277; + aliasMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1278; + importRule(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MemberPrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public VisibilityIndicatorContext visibilityIndicator() { + return GetRuleContext(0); + } + public MemberPrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_memberPrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMemberPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMemberPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMemberPrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MemberPrefixContext memberPrefix() { + MemberPrefixContext _localctx = new MemberPrefixContext(Context, State); + EnterRule(_localctx, 76, RULE_memberPrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1282; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & 7L) != 0)) { + { + State = 1281; + visibilityIndicator(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class VisibilityIndicatorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PUBLIC() { return GetToken(SysMLv2Parser.PUBLIC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PRIVATE() { return GetToken(SysMLv2Parser.PRIVATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PROTECTED() { return GetToken(SysMLv2Parser.PROTECTED, 0); } + public VisibilityIndicatorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_visibilityIndicator; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterVisibilityIndicator(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitVisibilityIndicator(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitVisibilityIndicator(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public VisibilityIndicatorContext visibilityIndicator() { + VisibilityIndicatorContext _localctx = new VisibilityIndicatorContext(Context, State); + EnterRule(_localctx, 78, RULE_visibilityIndicator); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1284; + _la = TokenStream.LA(1); + if ( !(((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & 7L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonFeatureMemberContext nonFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceFeatureMemberContext namespaceFeatureMember() { + return GetRuleContext(0); + } + public NamespaceMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceMemberContext namespaceMember() { + NamespaceMemberContext _localctx = new NamespaceMemberContext(Context, State); + EnterRule(_localctx, 80, RULE_namespaceMember); + try { + State = 1288; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,46,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1286; + nonFeatureMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1287; + namespaceFeatureMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NonFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MemberElementContext memberElement() { + return GetRuleContext(0); + } + public NonFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nonFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNonFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNonFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNonFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NonFeatureMemberContext nonFeatureMember() { + NonFeatureMemberContext _localctx = new NonFeatureMemberContext(Context, State); + EnterRule(_localctx, 82, RULE_nonFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1290; + memberPrefix(); + State = 1291; + memberElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureElementContext featureElement() { + return GetRuleContext(0); + } + public NamespaceFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceFeatureMemberContext namespaceFeatureMember() { + NamespaceFeatureMemberContext _localctx = new NamespaceFeatureMemberContext(Context, State); + EnterRule(_localctx, 84, RULE_namespaceFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1293; + memberPrefix(); + State = 1294; + featureElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AliasMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALIAS() { return GetToken(SysMLv2Parser.ALIAS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(SysMLv2Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LT() { return GetToken(SysMLv2Parser.LT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GT() { return GetToken(SysMLv2Parser.GT, 0); } + public AliasMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_aliasMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAliasMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAliasMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAliasMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AliasMemberContext aliasMember() { + AliasMemberContext _localctx = new AliasMemberContext(Context, State); + EnterRule(_localctx, 86, RULE_aliasMember); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1296; + memberPrefix(); + State = 1297; + Match(ALIAS); + State = 1302; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LT) { + { + State = 1298; + Match(LT); + State = 1299; + name(); + State = 1300; + Match(GT); + } + } + + State = 1305; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6917529027641081921L) != 0)) { + { + State = 1304; + name(); + } + } + + State = 1307; + Match(FOR); + State = 1308; + qualifiedName(); + State = 1309; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class QualifiedNameContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOLLAR() { return GetToken(SysMLv2Parser.DOLLAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COLON_COLON() { return GetTokens(SysMLv2Parser.COLON_COLON); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON(int i) { + return GetToken(SysMLv2Parser.COLON_COLON, i); + } + public QualifiedNameContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_qualifiedName; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterQualifiedName(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitQualifiedName(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitQualifiedName(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public QualifiedNameContext qualifiedName() { + QualifiedNameContext _localctx = new QualifiedNameContext(Context, State); + EnterRule(_localctx, 88, RULE_qualifiedName); + int _la; + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 1313; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DOLLAR) { + { + State = 1311; + Match(DOLLAR); + State = 1312; + Match(COLON_COLON); + } + } + + State = 1320; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,50,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1315; + name(); + State = 1316; + Match(COLON_COLON); + } + } + } + State = 1322; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,50,Context); + } + State = 1323; + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ImportRuleContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IMPORT() { return GetToken(SysMLv2Parser.IMPORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ImportDeclarationContext importDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public VisibilityIndicatorContext visibilityIndicator() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + public ImportRuleContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_importRule; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterImportRule(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitImportRule(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitImportRule(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ImportRuleContext importRule() { + ImportRuleContext _localctx = new ImportRuleContext(Context, State); + EnterRule(_localctx, 90, RULE_importRule); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1326; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & 7L) != 0)) { + { + State = 1325; + visibilityIndicator(); + } + } + + State = 1328; + Match(IMPORT); + State = 1330; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 1329; + Match(ALL); + } + } + + State = 1332; + importDeclaration(); + State = 1333; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ImportDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MembershipImportContext membershipImport() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceImportContext namespaceImport() { + return GetRuleContext(0); + } + public ImportDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_importDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterImportDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitImportDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitImportDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ImportDeclarationContext importDeclaration() { + ImportDeclarationContext _localctx = new ImportDeclarationContext(Context, State); + EnterRule(_localctx, 92, RULE_importDeclaration); + try { + State = 1337; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,53,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1335; + membershipImport(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1336; + namespaceImport(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MembershipImportContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON() { return GetToken(SysMLv2Parser.COLON_COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR_STAR() { return GetToken(SysMLv2Parser.STAR_STAR, 0); } + public MembershipImportContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_membershipImport; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMembershipImport(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMembershipImport(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMembershipImport(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MembershipImportContext membershipImport() { + MembershipImportContext _localctx = new MembershipImportContext(Context, State); + EnterRule(_localctx, 94, RULE_membershipImport); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1339; + qualifiedName(); + State = 1342; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON_COLON) { + { + State = 1340; + Match(COLON_COLON); + State = 1341; + Match(STAR_STAR); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceImportContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COLON_COLON() { return GetTokens(SysMLv2Parser.COLON_COLON); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON(int i) { + return GetToken(SysMLv2Parser.COLON_COLON, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR() { return GetToken(SysMLv2Parser.STAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR_STAR() { return GetToken(SysMLv2Parser.STAR_STAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FilterPackageContext filterPackage() { + return GetRuleContext(0); + } + public NamespaceImportContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceImport; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceImport(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceImport(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceImport(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceImportContext namespaceImport() { + NamespaceImportContext _localctx = new NamespaceImportContext(Context, State); + EnterRule(_localctx, 96, RULE_namespaceImport); + int _la; + try { + State = 1352; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,56,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1344; + qualifiedName(); + State = 1345; + Match(COLON_COLON); + State = 1346; + Match(STAR); + State = 1349; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON_COLON) { + { + State = 1347; + Match(COLON_COLON); + State = 1348; + Match(STAR_STAR); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1351; + filterPackage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FilterPackageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FilterPackageImportDeclarationContext filterPackageImportDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FilterPackageMemberContext[] filterPackageMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FilterPackageMemberContext filterPackageMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public FilterPackageImportContext filterPackageImport() { + return GetRuleContext(0); + } + public FilterPackageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_filterPackage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFilterPackage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFilterPackage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFilterPackage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FilterPackageContext filterPackage() { + FilterPackageContext _localctx = new FilterPackageContext(Context, State); + EnterRule(_localctx, 98, RULE_filterPackage); + int _la; + try { + State = 1366; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,59,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1354; + filterPackageImportDeclaration(); + State = 1356; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 1355; + filterPackageMember(); + } + } + State = 1358; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==LBRACK ); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1360; + filterPackageImport(); + State = 1362; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 1361; + filterPackageMember(); + } + } + State = 1364; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==LBRACK ); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FilterPackageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACK() { return GetToken(SysMLv2Parser.LBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACK() { return GetToken(SysMLv2Parser.RBRACK, 0); } + public FilterPackageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_filterPackageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFilterPackageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFilterPackageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFilterPackageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FilterPackageMemberContext filterPackageMember() { + FilterPackageMemberContext _localctx = new FilterPackageMemberContext(Context, State); + EnterRule(_localctx, 100, RULE_filterPackageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1368; + Match(LBRACK); + State = 1369; + ownedExpression(0); + State = 1370; + Match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MemberElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AnnotatingElementContext annotatingElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NonFeatureElementContext nonFeatureElement() { + return GetRuleContext(0); + } + public MemberElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_memberElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMemberElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMemberElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMemberElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MemberElementContext memberElement() { + MemberElementContext _localctx = new MemberElementContext(Context, State); + EnterRule(_localctx, 102, RULE_memberElement); + try { + State = 1374; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,60,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1372; + annotatingElement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1373; + nonFeatureElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NonFeatureElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DependencyContext dependency() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceContext @namespace() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeContext type() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierContext classifier() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DataTypeContext dataType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ClassContext @class() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StructureContext structure() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetaclassContext metaclass() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AssociationContext association() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AssociationStructureContext associationStructure() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InteractionContext interaction() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorContext behavior() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionContext function() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PredicateContext predicate() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityContext multiplicity() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PackageContext package() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LibraryPackageContext libraryPackage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SpecializationContext specialization() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugationContext conjugation() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubclassificationContext subclassification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DisjoiningContext disjoining() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureInvertingContext featureInverting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureTypingContext featureTyping() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubsettingContext subsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RedefinitionContext redefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeFeaturingContext typeFeaturing() { + return GetRuleContext(0); + } + public NonFeatureElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nonFeatureElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNonFeatureElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNonFeatureElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNonFeatureElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NonFeatureElementContext nonFeatureElement() { + NonFeatureElementContext _localctx = new NonFeatureElementContext(Context, State); + EnterRule(_localctx, 104, RULE_nonFeatureElement); + try { + State = 1402; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,61,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1376; + dependency(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1377; + @namespace(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1378; + type(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1379; + classifier(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1380; + dataType(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1381; + @class(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1382; + structure(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 1383; + metaclass(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 1384; + association(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 1385; + associationStructure(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 1386; + interaction(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 1387; + behavior(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 1388; + function(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 1389; + predicate(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 1390; + multiplicity(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 1391; + package(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 1392; + libraryPackage(); + } + break; + case 18: + EnterOuterAlt(_localctx, 18); + { + State = 1393; + specialization(); + } + break; + case 19: + EnterOuterAlt(_localctx, 19); + { + State = 1394; + conjugation(); + } + break; + case 20: + EnterOuterAlt(_localctx, 20); + { + State = 1395; + subclassification(); + } + break; + case 21: + EnterOuterAlt(_localctx, 21); + { + State = 1396; + disjoining(); + } + break; + case 22: + EnterOuterAlt(_localctx, 22); + { + State = 1397; + featureInverting(); + } + break; + case 23: + EnterOuterAlt(_localctx, 23); + { + State = 1398; + featureTyping(); + } + break; + case 24: + EnterOuterAlt(_localctx, 24); + { + State = 1399; + subsetting(); + } + break; + case 25: + EnterOuterAlt(_localctx, 25); + { + State = 1400; + redefinition(); + } + break; + case 26: + EnterOuterAlt(_localctx, 26); + { + State = 1401; + typeFeaturing(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureContext feature() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StepContext step() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionContext expression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BooleanExpressionContext booleanExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InvariantContext invariant() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorContext connector() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BindingConnectorContext bindingConnector() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionContext succession() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FlowContext flow() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionFlowContext successionFlow() { + return GetRuleContext(0); + } + public FeatureElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureElementContext featureElement() { + FeatureElementContext _localctx = new FeatureElementContext(Context, State); + EnterRule(_localctx, 106, RULE_featureElement); + try { + State = 1414; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,62,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1404; + feature(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1405; + step(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1406; + expression(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1407; + booleanExpression(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 1408; + invariant(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 1409; + connector(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 1410; + bindingConnector(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 1411; + succession(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 1412; + flow(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 1413; + successionFlow(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPE() { return GetToken(SysMLv2Parser.TYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TypeDeclarationContext typeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public TypeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_type; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitType(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeContext type() { + TypeContext _localctx = new TypeContext(Context, State); + EnterRule(_localctx, 108, RULE_type); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1416; + typePrefix(); + State = 1417; + Match(TYPE); + State = 1418; + typeDeclaration(); + State = 1419; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABSTRACT() { return GetToken(SysMLv2Parser.ABSTRACT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + public TypePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypePrefixContext typePrefix() { + TypePrefixContext _localctx = new TypePrefixContext(Context, State); + EnterRule(_localctx, 110, RULE_typePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1422; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT) { + { + State = 1421; + Match(ABSTRACT); + } + } + + State = 1427; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 1424; + prefixMetadataMember(); + } + } + State = 1429; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityContext ownedMultiplicity() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SpecializationPartContext[] specializationPart() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public SpecializationPartContext specializationPart(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugationPartContext[] conjugationPart() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugationPartContext conjugationPart(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeRelationshipPartContext[] typeRelationshipPart() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeRelationshipPartContext typeRelationshipPart(int i) { + return GetRuleContext(i); + } + public TypeDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeDeclarationContext typeDeclaration() { + TypeDeclarationContext _localctx = new TypeDeclarationContext(Context, State); + EnterRule(_localctx, 112, RULE_typeDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1431; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 1430; + Match(ALL); + } + } + + State = 1434; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1433; + identification(); + } + } + + State = 1437; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACK) { + { + State = 1436; + ownedMultiplicity(); + } + } + + State = 1441; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + State = 1441; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SPECIALIZES: + case COLON_GT: + { + State = 1439; + specializationPart(); + } + break; + case CONJUGATES: + case TILDE: + { + State = 1440; + conjugationPart(); + } + break; + default: + throw new NoViableAltException(this); + } + } + State = 1443; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==CONJUGATES || _la==SPECIALIZES || _la==COLON_GT || _la==TILDE ); + State = 1448; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 50)) & ~0x3f) == 0 && ((1L << (_la - 50)) & 68719476741L) != 0) || _la==UNIONS) { + { + { + State = 1445; + typeRelationshipPart(); + } + } + State = 1450; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SpecializationPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedSpecializationContext[] ownedSpecialization() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedSpecializationContext ownedSpecialization(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZES() { return GetToken(SysMLv2Parser.SPECIALIZES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public SpecializationPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_specializationPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSpecializationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSpecializationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSpecializationPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SpecializationPartContext specializationPart() { + SpecializationPartContext _localctx = new SpecializationPartContext(Context, State); + EnterRule(_localctx, 114, RULE_specializationPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1451; + _la = TokenStream.LA(1); + if ( !(_la==SPECIALIZES || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1452; + ownedSpecialization(); + State = 1457; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1453; + Match(COMMA); + State = 1454; + ownedSpecialization(); + } + } + State = 1459; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConjugationPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedConjugationContext ownedConjugation() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(SysMLv2Parser.TILDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONJUGATES() { return GetToken(SysMLv2Parser.CONJUGATES, 0); } + public ConjugationPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conjugationPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConjugationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConjugationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConjugationPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConjugationPartContext conjugationPart() { + ConjugationPartContext _localctx = new ConjugationPartContext(Context, State); + EnterRule(_localctx, 116, RULE_conjugationPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1460; + _la = TokenStream.LA(1); + if ( !(_la==CONJUGATES || _la==TILDE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1461; + ownedConjugation(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeRelationshipPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DisjoiningPartContext disjoiningPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UnioningPartContext unioningPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IntersectingPartContext intersectingPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DifferencingPartContext differencingPart() { + return GetRuleContext(0); + } + public TypeRelationshipPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeRelationshipPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeRelationshipPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeRelationshipPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeRelationshipPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeRelationshipPartContext typeRelationshipPart() { + TypeRelationshipPartContext _localctx = new TypeRelationshipPartContext(Context, State); + EnterRule(_localctx, 118, RULE_typeRelationshipPart); + try { + State = 1467; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case DISJOINT: + EnterOuterAlt(_localctx, 1); + { + State = 1463; + disjoiningPart(); + } + break; + case UNIONS: + EnterOuterAlt(_localctx, 2); + { + State = 1464; + unioningPart(); + } + break; + case INTERSECTS: + EnterOuterAlt(_localctx, 3); + { + State = 1465; + intersectingPart(); + } + break; + case DIFFERENCES: + EnterOuterAlt(_localctx, 4); + { + State = 1466; + differencingPart(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DisjoiningPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DISJOINT() { return GetToken(SysMLv2Parser.DISJOINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedDisjoiningContext[] ownedDisjoining() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedDisjoiningContext ownedDisjoining(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public DisjoiningPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_disjoiningPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDisjoiningPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDisjoiningPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDisjoiningPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DisjoiningPartContext disjoiningPart() { + DisjoiningPartContext _localctx = new DisjoiningPartContext(Context, State); + EnterRule(_localctx, 120, RULE_disjoiningPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1469; + Match(DISJOINT); + State = 1470; + Match(FROM); + State = 1471; + ownedDisjoining(); + State = 1476; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1472; + Match(COMMA); + State = 1473; + ownedDisjoining(); + } + } + State = 1478; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UnioningPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UNIONS() { return GetToken(SysMLv2Parser.UNIONS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UnioningContext[] unioning() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UnioningContext unioning(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public UnioningPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_unioningPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUnioningPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUnioningPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUnioningPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UnioningPartContext unioningPart() { + UnioningPartContext _localctx = new UnioningPartContext(Context, State); + EnterRule(_localctx, 122, RULE_unioningPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1479; + Match(UNIONS); + State = 1480; + unioning(); + State = 1485; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1481; + Match(COMMA); + State = 1482; + unioning(); + } + } + State = 1487; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IntersectingPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTERSECTS() { return GetToken(SysMLv2Parser.INTERSECTS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IntersectingContext[] intersecting() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public IntersectingContext intersecting(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public IntersectingPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_intersectingPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIntersectingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIntersectingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIntersectingPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IntersectingPartContext intersectingPart() { + IntersectingPartContext _localctx = new IntersectingPartContext(Context, State); + EnterRule(_localctx, 124, RULE_intersectingPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1488; + Match(INTERSECTS); + State = 1489; + intersecting(); + State = 1494; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1490; + Match(COMMA); + State = 1491; + intersecting(); + } + } + State = 1496; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DifferencingPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DIFFERENCES() { return GetToken(SysMLv2Parser.DIFFERENCES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DifferencingContext[] differencing() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DifferencingContext differencing(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public DifferencingPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_differencingPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDifferencingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDifferencingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDifferencingPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DifferencingPartContext differencingPart() { + DifferencingPartContext _localctx = new DifferencingPartContext(Context, State); + EnterRule(_localctx, 126, RULE_differencingPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1497; + Match(DIFFERENCES); + State = 1498; + differencing(); + State = 1503; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1499; + Match(COMMA); + State = 1500; + differencing(); + } + } + State = 1505; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyElementContext[] typeBodyElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyElementContext typeBodyElement(int i) { + return GetRuleContext(i); + } + public TypeBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeBodyContext typeBody() { + TypeBodyContext _localctx = new TypeBodyContext(Context, State); + EnterRule(_localctx, 128, RULE_typeBody); + int _la; + try { + State = 1515; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 1506; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 1507; + Match(LBRACE); + State = 1511; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -9125545399504797308L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -34055236162370523L) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & 7079711395550295169L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 581829L) != 0)) { + { + { + State = 1508; + typeBodyElement(); + } + } + State = 1513; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1514; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeBodyElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonFeatureMemberContext nonFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureMemberContext featureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + public TypeBodyElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeBodyElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeBodyElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeBodyElementContext typeBodyElement() { + TypeBodyElementContext _localctx = new TypeBodyElementContext(Context, State); + EnterRule(_localctx, 130, RULE_typeBodyElement); + try { + State = 1521; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,79,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1517; + nonFeatureMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1518; + featureMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 1519; + aliasMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 1520; + importRule(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SpecializationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBTYPE() { return GetToken(SysMLv2Parser.SUBTYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SpecificTypeContext specificType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GeneralTypeContext generalType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZES() { return GetToken(SysMLv2Parser.SPECIALIZES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZATION() { return GetToken(SysMLv2Parser.SPECIALIZATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public SpecializationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_specialization; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSpecialization(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSpecialization(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSpecialization(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SpecializationContext specialization() { + SpecializationContext _localctx = new SpecializationContext(Context, State); + EnterRule(_localctx, 132, RULE_specialization); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1527; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SPECIALIZATION) { + { + State = 1523; + Match(SPECIALIZATION); + State = 1525; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1524; + identification(); + } + } + + } + } + + State = 1529; + Match(SUBTYPE); + State = 1530; + specificType(); + State = 1531; + _la = TokenStream.LA(1); + if ( !(_la==SPECIALIZES || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1532; + generalType(); + State = 1533; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedSpecializationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public GeneralTypeContext generalType() { + return GetRuleContext(0); + } + public OwnedSpecializationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedSpecialization; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedSpecialization(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedSpecialization(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedSpecialization(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedSpecializationContext ownedSpecialization() { + OwnedSpecializationContext _localctx = new OwnedSpecializationContext(Context, State); + EnterRule(_localctx, 134, RULE_ownedSpecialization); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1535; + generalType(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SpecificTypeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public SpecificTypeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_specificType; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSpecificType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSpecificType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSpecificType(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SpecificTypeContext specificType() { + SpecificTypeContext _localctx = new SpecificTypeContext(Context, State); + EnterRule(_localctx, 136, RULE_specificType); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1537; + qualifiedName(); + State = 1542; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1538; + Match(DOT); + State = 1539; + qualifiedName(); + } + } + State = 1544; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GeneralTypeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public GeneralTypeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_generalType; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterGeneralType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitGeneralType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitGeneralType(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GeneralTypeContext generalType() { + GeneralTypeContext _localctx = new GeneralTypeContext(Context, State); + EnterRule(_localctx, 138, RULE_generalType); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1545; + qualifiedName(); + State = 1550; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1546; + Match(DOT); + State = 1547; + qualifiedName(); + } + } + State = 1552; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConjugationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONJUGATE() { return GetToken(SysMLv2Parser.CONJUGATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(SysMLv2Parser.TILDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONJUGATES() { return GetToken(SysMLv2Parser.CONJUGATES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONJUGATION() { return GetToken(SysMLv2Parser.CONJUGATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public ConjugationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conjugation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConjugation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConjugation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConjugation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConjugationContext conjugation() { + ConjugationContext _localctx = new ConjugationContext(Context, State); + EnterRule(_localctx, 140, RULE_conjugation); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1557; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONJUGATION) { + { + State = 1553; + Match(CONJUGATION); + State = 1555; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1554; + identification(); + } + } + + } + } + + State = 1559; + Match(CONJUGATE); + State = 1560; + qualifiedName(); + State = 1565; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1561; + Match(DOT); + State = 1562; + qualifiedName(); + } + } + State = 1567; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1568; + _la = TokenStream.LA(1); + if ( !(_la==CONJUGATES || _la==TILDE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1569; + qualifiedName(); + State = 1574; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1570; + Match(DOT); + State = 1571; + qualifiedName(); + } + } + State = 1576; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1577; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedConjugationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedConjugationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedConjugation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedConjugation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedConjugation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedConjugation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedConjugationContext ownedConjugation() { + OwnedConjugationContext _localctx = new OwnedConjugationContext(Context, State); + EnterRule(_localctx, 142, RULE_ownedConjugation); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1579; + qualifiedName(); + State = 1584; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1580; + Match(DOT); + State = 1581; + qualifiedName(); + } + } + State = 1586; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DisjoiningContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DISJOINT() { return GetToken(SysMLv2Parser.DISJOINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DISJOINING() { return GetToken(SysMLv2Parser.DISJOINING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public DisjoiningContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_disjoining; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDisjoining(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDisjoining(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDisjoining(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DisjoiningContext disjoining() { + DisjoiningContext _localctx = new DisjoiningContext(Context, State); + EnterRule(_localctx, 144, RULE_disjoining); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1591; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DISJOINING) { + { + State = 1587; + Match(DISJOINING); + State = 1589; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1588; + identification(); + } + } + + } + } + + State = 1593; + Match(DISJOINT); + State = 1594; + qualifiedName(); + State = 1599; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1595; + Match(DOT); + State = 1596; + qualifiedName(); + } + } + State = 1601; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1602; + Match(FROM); + State = 1603; + qualifiedName(); + State = 1608; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1604; + Match(DOT); + State = 1605; + qualifiedName(); + } + } + State = 1610; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 1611; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedDisjoiningContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedDisjoiningContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedDisjoining; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedDisjoining(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedDisjoining(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedDisjoining(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedDisjoiningContext ownedDisjoining() { + OwnedDisjoiningContext _localctx = new OwnedDisjoiningContext(Context, State); + EnterRule(_localctx, 146, RULE_ownedDisjoining); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1613; + qualifiedName(); + State = 1618; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1614; + Match(DOT); + State = 1615; + qualifiedName(); + } + } + State = 1620; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UnioningContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public UnioningContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_unioning; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUnioning(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUnioning(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUnioning(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UnioningContext unioning() { + UnioningContext _localctx = new UnioningContext(Context, State); + EnterRule(_localctx, 148, RULE_unioning); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1621; + qualifiedName(); + State = 1626; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1622; + Match(DOT); + State = 1623; + qualifiedName(); + } + } + State = 1628; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IntersectingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public IntersectingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_intersecting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIntersecting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIntersecting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIntersecting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IntersectingContext intersecting() { + IntersectingContext _localctx = new IntersectingContext(Context, State); + EnterRule(_localctx, 150, RULE_intersecting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1629; + qualifiedName(); + State = 1634; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1630; + Match(DOT); + State = 1631; + qualifiedName(); + } + } + State = 1636; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DifferencingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public DifferencingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_differencing; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDifferencing(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDifferencing(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDifferencing(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DifferencingContext differencing() { + DifferencingContext _localctx = new DifferencingContext(Context, State); + EnterRule(_localctx, 152, RULE_differencing); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1637; + qualifiedName(); + State = 1642; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1638; + Match(DOT); + State = 1639; + qualifiedName(); + } + } + State = 1644; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypeFeatureMemberContext typeFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureMemberContext ownedFeatureMember() { + return GetRuleContext(0); + } + public FeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureMemberContext featureMember() { + FeatureMemberContext _localctx = new FeatureMemberContext(Context, State); + EnterRule(_localctx, 154, RULE_featureMember); + try { + State = 1647; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,97,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1645; + typeFeatureMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1646; + ownedFeatureMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MEMBER() { return GetToken(SysMLv2Parser.MEMBER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureElementContext featureElement() { + return GetRuleContext(0); + } + public TypeFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeFeatureMemberContext typeFeatureMember() { + TypeFeatureMemberContext _localctx = new TypeFeatureMemberContext(Context, State); + EnterRule(_localctx, 156, RULE_typeFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1649; + memberPrefix(); + State = 1650; + Match(MEMBER); + State = 1651; + featureElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureElementContext featureElement() { + return GetRuleContext(0); + } + public OwnedFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedFeatureMemberContext ownedFeatureMember() { + OwnedFeatureMemberContext _localctx = new OwnedFeatureMemberContext(Context, State); + EnterRule(_localctx, 158, RULE_ownedFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1653; + memberPrefix(); + State = 1654; + featureElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ClassifierContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CLASSIFIER() { return GetToken(SysMLv2Parser.CLASSIFIER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public ClassifierContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_classifier; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterClassifier(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitClassifier(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitClassifier(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ClassifierContext classifier() { + ClassifierContext _localctx = new ClassifierContext(Context, State); + EnterRule(_localctx, 160, RULE_classifier); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1656; + typePrefix(); + State = 1657; + Match(CLASSIFIER); + State = 1658; + classifierDeclaration(); + State = 1659; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ClassifierDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityContext ownedMultiplicity() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuperclassingPartContext superclassingPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugationPartContext conjugationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeRelationshipPartContext[] typeRelationshipPart() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeRelationshipPartContext typeRelationshipPart(int i) { + return GetRuleContext(i); + } + public ClassifierDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_classifierDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterClassifierDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitClassifierDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitClassifierDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ClassifierDeclarationContext classifierDeclaration() { + ClassifierDeclarationContext _localctx = new ClassifierDeclarationContext(Context, State); + EnterRule(_localctx, 162, RULE_classifierDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1662; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 1661; + Match(ALL); + } + } + + State = 1665; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1664; + identification(); + } + } + + State = 1668; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACK) { + { + State = 1667; + ownedMultiplicity(); + } + } + + State = 1672; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SPECIALIZES: + case COLON_GT: + { + State = 1670; + superclassingPart(); + } + break; + case CONJUGATES: + case TILDE: + { + State = 1671; + conjugationPart(); + } + break; + case DIFFERENCES: + case DISJOINT: + case INTERSECTS: + case UNIONS: + case SEMI: + case LBRACE: + break; + default: + break; + } + State = 1677; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 50)) & ~0x3f) == 0 && ((1L << (_la - 50)) & 68719476741L) != 0) || _la==UNIONS) { + { + { + State = 1674; + typeRelationshipPart(); + } + } + State = 1679; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuperclassingPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubclassificationContext[] ownedSubclassification() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubclassificationContext ownedSubclassification(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZES() { return GetToken(SysMLv2Parser.SPECIALIZES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public SuperclassingPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_superclassingPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSuperclassingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSuperclassingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuperclassingPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuperclassingPartContext superclassingPart() { + SuperclassingPartContext _localctx = new SuperclassingPartContext(Context, State); + EnterRule(_localctx, 164, RULE_superclassingPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1680; + _la = TokenStream.LA(1); + if ( !(_la==SPECIALIZES || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1681; + ownedSubclassification(); + State = 1686; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1682; + Match(COMMA); + State = 1683; + ownedSubclassification(); + } + } + State = 1688; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubclassificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBCLASSIFIER() { return GetToken(SysMLv2Parser.SUBCLASSIFIER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZES() { return GetToken(SysMLv2Parser.SPECIALIZES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZATION() { return GetToken(SysMLv2Parser.SPECIALIZATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public SubclassificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subclassification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubclassification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubclassification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubclassification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubclassificationContext subclassification() { + SubclassificationContext _localctx = new SubclassificationContext(Context, State); + EnterRule(_localctx, 166, RULE_subclassification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1693; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SPECIALIZATION) { + { + State = 1689; + Match(SPECIALIZATION); + State = 1691; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1690; + identification(); + } + } + + } + } + + State = 1695; + Match(SUBCLASSIFIER); + State = 1696; + qualifiedName(); + State = 1697; + _la = TokenStream.LA(1); + if ( !(_la==SPECIALIZES || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1698; + qualifiedName(); + State = 1699; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedSubclassificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + public OwnedSubclassificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedSubclassification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedSubclassification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedSubclassification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedSubclassification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedSubclassificationContext ownedSubclassification() { + OwnedSubclassificationContext _localctx = new OwnedSubclassificationContext(Context, State); + EnterRule(_localctx, 168, RULE_ownedSubclassification); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1701; + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FEATURE() { return GetToken(SysMLv2Parser.FEATURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EndFeaturePrefixContext endFeaturePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BasicFeaturePrefixContext basicFeaturePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REF() { return GetToken(SysMLv2Parser.REF, 0); } + public FeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_feature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureContext feature() { + FeatureContext _localctx = new FeatureContext(Context, State); + EnterRule(_localctx, 170, RULE_feature); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1720; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,110,Context) ) { + case 1: + { + State = 1703; + featurePrefix(); + State = 1706; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case FEATURE: + { + State = 1704; + Match(FEATURE); + } + break; + case HASH: + { + State = 1705; + prefixMetadataMember(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 1709; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145152715784448L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 449L) != 0)) { + { + State = 1708; + featureDeclaration(); + } + } + + } + break; + case 2: + { + State = 1713; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,108,Context) ) { + case 1: + { + State = 1711; + endFeaturePrefix(); + } + break; + case 2: + { + State = 1712; + basicFeaturePrefix(); + } + break; + } + State = 1716; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REF) { + { + State = 1715; + Match(REF); + } + } + + State = 1718; + featureDeclaration(); + } + break; + } + State = 1723; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 1722; + valuePart(); + } + } + + State = 1725; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EndFeaturePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(SysMLv2Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONST() { return GetToken(SysMLv2Parser.CONST, 0); } + public EndFeaturePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_endFeaturePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEndFeaturePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEndFeaturePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEndFeaturePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EndFeaturePrefixContext endFeaturePrefix() { + EndFeaturePrefixContext _localctx = new EndFeaturePrefixContext(Context, State); + EnterRule(_localctx, 172, RULE_endFeaturePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1728; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONST) { + { + State = 1727; + Match(CONST); + } + } + + State = 1730; + Match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BasicFeaturePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureDirectionContext featureDirection() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DERIVED() { return GetToken(SysMLv2Parser.DERIVED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABSTRACT() { return GetToken(SysMLv2Parser.ABSTRACT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMPOSITE() { return GetToken(SysMLv2Parser.COMPOSITE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PORTION() { return GetToken(SysMLv2Parser.PORTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VAR() { return GetToken(SysMLv2Parser.VAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONST() { return GetToken(SysMLv2Parser.CONST, 0); } + public BasicFeaturePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_basicFeaturePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBasicFeaturePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBasicFeaturePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBasicFeaturePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BasicFeaturePrefixContext basicFeaturePrefix() { + BasicFeaturePrefixContext _localctx = new BasicFeaturePrefixContext(Context, State); + EnterRule(_localctx, 174, RULE_basicFeaturePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1733; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & 17179869193L) != 0)) { + { + State = 1732; + featureDirection(); + } + } + + State = 1736; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DERIVED) { + { + State = 1735; + Match(DERIVED); + } + } + + State = 1739; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT) { + { + State = 1738; + Match(ABSTRACT); + } + } + + State = 1742; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COMPOSITE || _la==PORTION) { + { + State = 1741; + _la = TokenStream.LA(1); + if ( !(_la==COMPOSITE || _la==PORTION) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 1745; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,117,Context) ) { + case 1: + { + State = 1744; + _la = TokenStream.LA(1); + if ( !(_la==CONST || _la==VAR) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeaturePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EndFeaturePrefixContext endFeaturePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossFeatureMemberContext ownedCrossFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BasicFeaturePrefixContext basicFeaturePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + public FeaturePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featurePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeaturePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeaturePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeaturePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeaturePrefixContext featurePrefix() { + FeaturePrefixContext _localctx = new FeaturePrefixContext(Context, State); + EnterRule(_localctx, 176, RULE_featurePrefix); + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 1751; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,118,Context) ) { + case 1: + { + State = 1747; + endFeaturePrefix(); + State = 1748; + ownedCrossFeatureMember(); + } + break; + case 2: + { + State = 1750; + basicFeaturePrefix(); + } + break; + } + State = 1756; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,119,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1753; + prefixMetadataMember(); + } + } + } + State = 1758; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,119,Context); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedCrossFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossFeatureContext ownedCrossFeature() { + return GetRuleContext(0); + } + public OwnedCrossFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedCrossFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedCrossFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedCrossFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedCrossFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedCrossFeatureMemberContext ownedCrossFeatureMember() { + OwnedCrossFeatureMemberContext _localctx = new OwnedCrossFeatureMemberContext(Context, State); + EnterRule(_localctx, 178, RULE_ownedCrossFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1759; + ownedCrossFeature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedCrossFeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicFeaturePrefixContext basicFeaturePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BasicUsagePrefixContext basicUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public OwnedCrossFeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedCrossFeature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedCrossFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedCrossFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedCrossFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedCrossFeatureContext ownedCrossFeature() { + OwnedCrossFeatureContext _localctx = new OwnedCrossFeatureContext(Context, State); + EnterRule(_localctx, 180, RULE_ownedCrossFeature); + try { + State = 1768; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,121,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 1761; + basicFeaturePrefix(); + State = 1762; + featureDeclaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 1764; + basicUsagePrefix(); + State = 1766; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,120,Context) ) { + case 1: + { + State = 1765; + usageDeclaration(); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureDirectionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IN() { return GetToken(SysMLv2Parser.IN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OUT() { return GetToken(SysMLv2Parser.OUT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INOUT() { return GetToken(SysMLv2Parser.INOUT, 0); } + public FeatureDirectionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureDirection; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureDirection(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureDirection(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureDirection(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureDirectionContext featureDirection() { + FeatureDirectionContext _localctx = new FeatureDirectionContext(Context, State); + EnterRule(_localctx, 182, RULE_featureDirection); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1770; + _la = TokenStream.LA(1); + if ( !(((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & 17179869193L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureIdentificationContext featureIdentification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugationPartContext conjugationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureRelationshipPartContext[] featureRelationshipPart() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureRelationshipPartContext featureRelationshipPart(int i) { + return GetRuleContext(i); + } + public FeatureDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureDeclarationContext featureDeclaration() { + FeatureDeclarationContext _localctx = new FeatureDeclarationContext(Context, State); + EnterRule(_localctx, 184, RULE_featureDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1773; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 1772; + Match(ALL); + } + } + + State = 1782; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,124,Context) ) { + case 1: + { + State = 1775; + featureIdentification(); + State = 1778; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,123,Context) ) { + case 1: + { + State = 1776; + featureSpecializationPart(); + } + break; + case 2: + { + State = 1777; + conjugationPart(); + } + break; + } + } + break; + case 2: + { + State = 1780; + featureSpecializationPart(); + } + break; + case 3: + { + State = 1781; + conjugationPart(); + } + break; + } + State = 1787; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (((((_la - 27)) & ~0x3f) == 0 && ((1L << (_la - 27)) & 2882304311314874369L) != 0) || _la==UNIONS) { + { + { + State = 1784; + featureRelationshipPart(); + } + } + State = 1789; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureIdentificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LT() { return GetToken(SysMLv2Parser.LT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GT() { return GetToken(SysMLv2Parser.GT, 0); } + public FeatureIdentificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureIdentification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureIdentification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureIdentification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureIdentification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureIdentificationContext featureIdentification() { + FeatureIdentificationContext _localctx = new FeatureIdentificationContext(Context, State); + EnterRule(_localctx, 186, RULE_featureIdentification); + try { + State = 1797; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case LT: + EnterOuterAlt(_localctx, 1); + { + State = 1790; + Match(LT); + State = 1791; + name(); + State = 1792; + Match(GT); + State = 1794; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,126,Context) ) { + case 1: + { + State = 1793; + name(); + } + break; + } + } + break; + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 2); + { + State = 1796; + name(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureRelationshipPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypeRelationshipPartContext typeRelationshipPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ChainingPartContext chainingPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InvertingPartContext invertingPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeFeaturingPartContext typeFeaturingPart() { + return GetRuleContext(0); + } + public FeatureRelationshipPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureRelationshipPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureRelationshipPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureRelationshipPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureRelationshipPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureRelationshipPartContext featureRelationshipPart() { + FeatureRelationshipPartContext _localctx = new FeatureRelationshipPartContext(Context, State); + EnterRule(_localctx, 188, RULE_featureRelationshipPart); + try { + State = 1803; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case DIFFERENCES: + case DISJOINT: + case INTERSECTS: + case UNIONS: + EnterOuterAlt(_localctx, 1); + { + State = 1799; + typeRelationshipPart(); + } + break; + case CHAINS: + EnterOuterAlt(_localctx, 2); + { + State = 1800; + chainingPart(); + } + break; + case INVERSE: + EnterOuterAlt(_localctx, 3); + { + State = 1801; + invertingPart(); + } + break; + case FEATURED: + EnterOuterAlt(_localctx, 4); + { + State = 1802; + typeFeaturingPart(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ChainingPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CHAINS() { return GetToken(SysMLv2Parser.CHAINS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public ChainingPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_chainingPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterChainingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitChainingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitChainingPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ChainingPartContext chainingPart() { + ChainingPartContext _localctx = new ChainingPartContext(Context, State); + EnterRule(_localctx, 190, RULE_chainingPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1805; + Match(CHAINS); + State = 1806; + qualifiedName(); + State = 1811; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1807; + Match(DOT); + State = 1808; + qualifiedName(); + } + } + State = 1813; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InvertingPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INVERSE() { return GetToken(SysMLv2Parser.INVERSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(SysMLv2Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureInvertingContext ownedFeatureInverting() { + return GetRuleContext(0); + } + public InvertingPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_invertingPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInvertingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInvertingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInvertingPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InvertingPartContext invertingPart() { + InvertingPartContext _localctx = new InvertingPartContext(Context, State); + EnterRule(_localctx, 192, RULE_invertingPart); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1814; + Match(INVERSE); + State = 1815; + Match(OF); + State = 1816; + ownedFeatureInverting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeFeaturingPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FEATURED() { return GetToken(SysMLv2Parser.FEATURED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BY() { return GetToken(SysMLv2Parser.BY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedTypeFeaturingContext[] ownedTypeFeaturing() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedTypeFeaturingContext ownedTypeFeaturing(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public TypeFeaturingPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeFeaturingPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeFeaturingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeFeaturingPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeFeaturingPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeFeaturingPartContext typeFeaturingPart() { + TypeFeaturingPartContext _localctx = new TypeFeaturingPartContext(Context, State); + EnterRule(_localctx, 194, RULE_typeFeaturingPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1818; + Match(FEATURED); + State = 1819; + Match(BY); + State = 1820; + ownedTypeFeaturing(); + State = 1825; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1821; + Match(COMMA); + State = 1822; + ownedTypeFeaturing(); + } + } + State = 1827; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureSpecializationPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext[] featureSpecialization() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext featureSpecialization(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityPartContext multiplicityPart() { + return GetRuleContext(0); + } + public FeatureSpecializationPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureSpecializationPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureSpecializationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureSpecializationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureSpecializationPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureSpecializationPartContext featureSpecializationPart() { + FeatureSpecializationPartContext _localctx = new FeatureSpecializationPartContext(Context, State); + EnterRule(_localctx, 196, RULE_featureSpecializationPart); + try { + int _alt; + State = 1849; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case CROSSES: + case DEFINED: + case REDEFINES: + case REFERENCES: + case SUBSETS: + case TYPED: + case COLON_COLON_GT: + case COLON_GT_GT: + case COLON_GT: + case FAT_ARROW: + case COLON: + EnterOuterAlt(_localctx, 1); + { + State = 1829; + ErrorHandler.Sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + State = 1828; + featureSpecialization(); + } + } + break; + default: + throw new NoViableAltException(this); + } + State = 1831; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,131,Context); + } while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ); + State = 1834; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,132,Context) ) { + case 1: + { + State = 1833; + multiplicityPart(); + } + break; + } + State = 1839; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,133,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1836; + featureSpecialization(); + } + } + } + State = 1841; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,133,Context); + } + } + break; + case NONUNIQUE: + case ORDERED: + case LBRACK: + EnterOuterAlt(_localctx, 2); + { + State = 1842; + multiplicityPart(); + State = 1846; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,134,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 1843; + featureSpecialization(); + } + } + } + State = 1848; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,134,Context); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MultiplicityPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityContext ownedMultiplicity() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ORDERED() { return GetToken(SysMLv2Parser.ORDERED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NONUNIQUE() { return GetToken(SysMLv2Parser.NONUNIQUE, 0); } + public MultiplicityPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplicityPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMultiplicityPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMultiplicityPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplicityPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MultiplicityPartContext multiplicityPart() { + MultiplicityPartContext _localctx = new MultiplicityPartContext(Context, State); + EnterRule(_localctx, 198, RULE_multiplicityPart); + try { + State = 1872; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case LBRACK: + EnterOuterAlt(_localctx, 1); + { + State = 1851; + ownedMultiplicity(); + State = 1860; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,138,Context) ) { + case 1: + { + State = 1852; + Match(ORDERED); + State = 1854; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,136,Context) ) { + case 1: + { + State = 1853; + Match(NONUNIQUE); + } + break; + } + } + break; + case 2: + { + State = 1856; + Match(NONUNIQUE); + State = 1858; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,137,Context) ) { + case 1: + { + State = 1857; + Match(ORDERED); + } + break; + } + } + break; + } + } + break; + case NONUNIQUE: + case ORDERED: + EnterOuterAlt(_localctx, 2); + { + State = 1870; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ORDERED: + { + State = 1862; + Match(ORDERED); + State = 1864; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,139,Context) ) { + case 1: + { + State = 1863; + Match(NONUNIQUE); + } + break; + } + } + break; + case NONUNIQUE: + { + State = 1866; + Match(NONUNIQUE); + State = 1868; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,140,Context) ) { + case 1: + { + State = 1867; + Match(ORDERED); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureSpecializationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypingsContext typings() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubsettingsContext subsettings() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ReferencesContext references() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CrossesContext crosses() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RedefinitionsContext redefinitions() { + return GetRuleContext(0); + } + public FeatureSpecializationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureSpecialization; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureSpecialization(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureSpecialization(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureSpecialization(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureSpecializationContext featureSpecialization() { + FeatureSpecializationContext _localctx = new FeatureSpecializationContext(Context, State); + EnterRule(_localctx, 200, RULE_featureSpecialization); + try { + State = 1879; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case DEFINED: + case TYPED: + case COLON: + EnterOuterAlt(_localctx, 1); + { + State = 1874; + typings(); + } + break; + case SUBSETS: + case COLON_GT: + EnterOuterAlt(_localctx, 2); + { + State = 1875; + subsettings(); + } + break; + case REFERENCES: + case COLON_COLON_GT: + EnterOuterAlt(_localctx, 3); + { + State = 1876; + references(); + } + break; + case CROSSES: + case FAT_ARROW: + EnterOuterAlt(_localctx, 4); + { + State = 1877; + crosses(); + } + break; + case REDEFINES: + case COLON_GT_GT: + EnterOuterAlt(_localctx, 5); + { + State = 1878; + redefinitions(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypingsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypedByContext typedBy() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureTypingContext[] featureTyping() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureTypingContext featureTyping(int i) { + return GetRuleContext(i); + } + public TypingsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typings; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypings(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypings(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypings(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypingsContext typings() { + TypingsContext _localctx = new TypingsContext(Context, State); + EnterRule(_localctx, 202, RULE_typings); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1881; + typedBy(); + State = 1886; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1882; + Match(COMMA); + State = 1883; + featureTyping(); + } + } + State = 1888; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypedByContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureTypingContext featureTyping() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(SysMLv2Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPED() { return GetToken(SysMLv2Parser.TYPED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BY() { return GetToken(SysMLv2Parser.BY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEFINED() { return GetToken(SysMLv2Parser.DEFINED, 0); } + public TypedByContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typedBy; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypedBy(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypedBy(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypedBy(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypedByContext typedBy() { + TypedByContext _localctx = new TypedByContext(Context, State); + EnterRule(_localctx, 204, RULE_typedBy); + try { + EnterOuterAlt(_localctx, 1); + { + State = 1894; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case COLON: + { + State = 1889; + Match(COLON); + } + break; + case TYPED: + { + State = 1890; + Match(TYPED); + State = 1891; + Match(BY); + } + break; + case DEFINED: + { + State = 1892; + Match(DEFINED); + State = 1893; + Match(BY); + } + break; + default: + throw new NoViableAltException(this); + } + State = 1896; + featureTyping(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubsettingsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SubsetsContext subsets() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubsettingContext[] ownedSubsetting() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubsettingContext ownedSubsetting(int i) { + return GetRuleContext(i); + } + public SubsettingsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subsettings; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubsettings(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubsettings(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubsettings(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubsettingsContext subsettings() { + SubsettingsContext _localctx = new SubsettingsContext(Context, State); + EnterRule(_localctx, 206, RULE_subsettings); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1898; + subsets(); + State = 1903; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1899; + Match(COMMA); + State = 1900; + ownedSubsetting(); + } + } + State = 1905; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubsetsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubsettingContext ownedSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBSETS() { return GetToken(SysMLv2Parser.SUBSETS, 0); } + public SubsetsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subsets; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubsets(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubsets(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubsets(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubsetsContext subsets() { + SubsetsContext _localctx = new SubsetsContext(Context, State); + EnterRule(_localctx, 208, RULE_subsets); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1906; + _la = TokenStream.LA(1); + if ( !(_la==SUBSETS || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1907; + ownedSubsetting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ReferencesContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON_GT() { return GetToken(SysMLv2Parser.COLON_COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REFERENCES() { return GetToken(SysMLv2Parser.REFERENCES, 0); } + public ReferencesContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_references; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterReferences(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitReferences(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitReferences(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ReferencesContext references() { + ReferencesContext _localctx = new ReferencesContext(Context, State); + EnterRule(_localctx, 210, RULE_references); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1909; + _la = TokenStream.LA(1); + if ( !(_la==REFERENCES || _la==COLON_COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1910; + ownedReferenceSubsetting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CrossesContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossSubsettingContext ownedCrossSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FAT_ARROW() { return GetToken(SysMLv2Parser.FAT_ARROW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CROSSES() { return GetToken(SysMLv2Parser.CROSSES, 0); } + public CrossesContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_crosses; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCrosses(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCrosses(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCrosses(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CrossesContext crosses() { + CrossesContext _localctx = new CrossesContext(Context, State); + EnterRule(_localctx, 212, RULE_crosses); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1912; + _la = TokenStream.LA(1); + if ( !(_la==CROSSES || _la==FAT_ARROW) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1913; + ownedCrossSubsetting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RedefinitionsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public RedefinesContext redefines() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedRedefinitionContext[] ownedRedefinition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedRedefinitionContext ownedRedefinition(int i) { + return GetRuleContext(i); + } + public RedefinitionsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_redefinitions; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRedefinitions(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRedefinitions(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRedefinitions(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RedefinitionsContext redefinitions() { + RedefinitionsContext _localctx = new RedefinitionsContext(Context, State); + EnterRule(_localctx, 214, RULE_redefinitions); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1915; + redefines(); + State = 1920; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 1916; + Match(COMMA); + State = 1917; + ownedRedefinition(); + } + } + State = 1922; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RedefinesContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedRedefinitionContext ownedRedefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT_GT() { return GetToken(SysMLv2Parser.COLON_GT_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REDEFINES() { return GetToken(SysMLv2Parser.REDEFINES, 0); } + public RedefinesContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_redefines; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRedefines(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRedefines(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRedefines(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RedefinesContext redefines() { + RedefinesContext _localctx = new RedefinesContext(Context, State); + EnterRule(_localctx, 216, RULE_redefines); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1923; + _la = TokenStream.LA(1); + if ( !(_la==REDEFINES || _la==COLON_GT_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1924; + ownedRedefinition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureTypingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPING() { return GetToken(SysMLv2Parser.TYPING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GeneralTypeContext generalType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(SysMLv2Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPED() { return GetToken(SysMLv2Parser.TYPED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BY() { return GetToken(SysMLv2Parser.BY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZATION() { return GetToken(SysMLv2Parser.SPECIALIZATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureTypingContext ownedFeatureTyping() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugatedPortTypingContext conjugatedPortTyping() { + return GetRuleContext(0); + } + public FeatureTypingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureTyping; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureTyping(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureTyping(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureTyping(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureTypingContext featureTyping() { + FeatureTypingContext _localctx = new FeatureTypingContext(Context, State); + EnterRule(_localctx, 218, RULE_featureTyping); + int _la; + try { + State = 1944; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SPECIALIZATION: + case TYPING: + EnterOuterAlt(_localctx, 1); + { + State = 1930; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SPECIALIZATION) { + { + State = 1926; + Match(SPECIALIZATION); + State = 1928; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1927; + identification(); + } + } + + } + } + + State = 1932; + Match(TYPING); + State = 1933; + qualifiedName(); + State = 1937; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case COLON: + { + State = 1934; + Match(COLON); + } + break; + case TYPED: + { + State = 1935; + Match(TYPED); + State = 1936; + Match(BY); + } + break; + default: + throw new NoViableAltException(this); + } + State = 1939; + generalType(); + State = 1940; + relationshipBody(); + } + break; + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 2); + { + State = 1942; + ownedFeatureTyping(); + } + break; + case TILDE: + EnterOuterAlt(_localctx, 3); + { + State = 1943; + conjugatedPortTyping(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedFeatureTypingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedFeatureTypingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedFeatureTyping; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedFeatureTyping(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedFeatureTyping(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedFeatureTyping(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedFeatureTypingContext ownedFeatureTyping() { + OwnedFeatureTypingContext _localctx = new OwnedFeatureTypingContext(Context, State); + EnterRule(_localctx, 220, RULE_ownedFeatureTyping); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1946; + qualifiedName(); + State = 1951; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1947; + Match(DOT); + State = 1948; + qualifiedName(); + } + } + State = 1953; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubsettingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBSET() { return GetToken(SysMLv2Parser.SUBSET, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SpecificTypeContext specificType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GeneralTypeContext generalType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBSETS() { return GetToken(SysMLv2Parser.SUBSETS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZATION() { return GetToken(SysMLv2Parser.SPECIALIZATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public SubsettingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subsetting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubsetting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubsettingContext subsetting() { + SubsettingContext _localctx = new SubsettingContext(Context, State); + EnterRule(_localctx, 222, RULE_subsetting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1958; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SPECIALIZATION) { + { + State = 1954; + Match(SPECIALIZATION); + State = 1956; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1955; + identification(); + } + } + + } + } + + State = 1960; + Match(SUBSET); + State = 1961; + specificType(); + State = 1962; + _la = TokenStream.LA(1); + if ( !(_la==SUBSETS || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1963; + generalType(); + State = 1964; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedSubsettingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedSubsettingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedSubsetting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedSubsetting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedSubsettingContext ownedSubsetting() { + OwnedSubsettingContext _localctx = new OwnedSubsettingContext(Context, State); + EnterRule(_localctx, 224, RULE_ownedSubsetting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1966; + qualifiedName(); + State = 1971; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1967; + Match(DOT); + State = 1968; + qualifiedName(); + } + } + State = 1973; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedReferenceSubsettingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedReferenceSubsettingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedReferenceSubsetting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedReferenceSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedReferenceSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedReferenceSubsetting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + OwnedReferenceSubsettingContext _localctx = new OwnedReferenceSubsettingContext(Context, State); + EnterRule(_localctx, 226, RULE_ownedReferenceSubsetting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1974; + qualifiedName(); + State = 1979; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1975; + Match(DOT); + State = 1976; + qualifiedName(); + } + } + State = 1981; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedCrossSubsettingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedCrossSubsettingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedCrossSubsetting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedCrossSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedCrossSubsetting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedCrossSubsetting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedCrossSubsettingContext ownedCrossSubsetting() { + OwnedCrossSubsettingContext _localctx = new OwnedCrossSubsettingContext(Context, State); + EnterRule(_localctx, 228, RULE_ownedCrossSubsetting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1982; + qualifiedName(); + State = 1987; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 1983; + Match(DOT); + State = 1984; + qualifiedName(); + } + } + State = 1989; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RedefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REDEFINITION() { return GetToken(SysMLv2Parser.REDEFINITION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SpecificTypeContext specificType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GeneralTypeContext generalType() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT_GT() { return GetToken(SysMLv2Parser.COLON_GT_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REDEFINES() { return GetToken(SysMLv2Parser.REDEFINES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZATION() { return GetToken(SysMLv2Parser.SPECIALIZATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public RedefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_redefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRedefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRedefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRedefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RedefinitionContext redefinition() { + RedefinitionContext _localctx = new RedefinitionContext(Context, State); + EnterRule(_localctx, 230, RULE_redefinition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 1994; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SPECIALIZATION) { + { + State = 1990; + Match(SPECIALIZATION); + State = 1992; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 1991; + identification(); + } + } + + } + } + + State = 1996; + Match(REDEFINITION); + State = 1997; + specificType(); + State = 1998; + _la = TokenStream.LA(1); + if ( !(_la==REDEFINES || _la==COLON_GT_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 1999; + generalType(); + State = 2000; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedRedefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedRedefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedRedefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedRedefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedRedefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedRedefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedRedefinitionContext ownedRedefinition() { + OwnedRedefinitionContext _localctx = new OwnedRedefinitionContext(Context, State); + EnterRule(_localctx, 232, RULE_ownedRedefinition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2002; + qualifiedName(); + State = 2007; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 2003; + Match(DOT); + State = 2004; + qualifiedName(); + } + } + State = 2009; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureInvertingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INVERSE() { return GetToken(SysMLv2Parser.INVERSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(SysMLv2Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INVERTING() { return GetToken(SysMLv2Parser.INVERTING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public FeatureInvertingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureInverting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureInverting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureInverting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureInverting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureInvertingContext featureInverting() { + FeatureInvertingContext _localctx = new FeatureInvertingContext(Context, State); + EnterRule(_localctx, 234, RULE_featureInverting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2014; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==INVERTING) { + { + State = 2010; + Match(INVERTING); + State = 2012; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2011; + identification(); + } + } + + } + } + + State = 2016; + Match(INVERSE); + State = 2017; + qualifiedName(); + State = 2022; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 2018; + Match(DOT); + State = 2019; + qualifiedName(); + } + } + State = 2024; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2025; + Match(OF); + State = 2026; + qualifiedName(); + State = 2031; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 2027; + Match(DOT); + State = 2028; + qualifiedName(); + } + } + State = 2033; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2034; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedFeatureInvertingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public OwnedFeatureInvertingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedFeatureInverting; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedFeatureInverting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedFeatureInverting(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedFeatureInverting(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedFeatureInvertingContext ownedFeatureInverting() { + OwnedFeatureInvertingContext _localctx = new OwnedFeatureInvertingContext(Context, State); + EnterRule(_localctx, 236, RULE_ownedFeatureInverting); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2036; + qualifiedName(); + State = 2041; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 2037; + Match(DOT); + State = 2038; + qualifiedName(); + } + } + State = 2043; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TypeFeaturingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FEATURING() { return GetToken(SysMLv2Parser.FEATURING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BY() { return GetToken(SysMLv2Parser.BY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(SysMLv2Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public TypeFeaturingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_typeFeaturing; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTypeFeaturing(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTypeFeaturing(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTypeFeaturing(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TypeFeaturingContext typeFeaturing() { + TypeFeaturingContext _localctx = new TypeFeaturingContext(Context, State); + EnterRule(_localctx, 238, RULE_typeFeaturing); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2044; + Match(FEATURING); + State = 2049; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,167,Context) ) { + case 1: + { + State = 2046; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2045; + identification(); + } + } + + State = 2048; + Match(OF); + } + break; + } + State = 2051; + qualifiedName(); + State = 2052; + Match(BY); + State = 2053; + qualifiedName(); + State = 2054; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedTypeFeaturingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + public OwnedTypeFeaturingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedTypeFeaturing; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedTypeFeaturing(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedTypeFeaturing(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedTypeFeaturing(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedTypeFeaturingContext ownedTypeFeaturing() { + OwnedTypeFeaturingContext _localctx = new OwnedTypeFeaturingContext(Context, State); + EnterRule(_localctx, 240, RULE_ownedTypeFeaturing); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2056; + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DataTypeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DATATYPE() { return GetToken(SysMLv2Parser.DATATYPE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public DataTypeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_dataType; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDataType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDataType(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDataType(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DataTypeContext dataType() { + DataTypeContext _localctx = new DataTypeContext(Context, State); + EnterRule(_localctx, 242, RULE_dataType); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2058; + typePrefix(); + State = 2059; + Match(DATATYPE); + State = 2060; + classifierDeclaration(); + State = 2061; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ClassContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CLASS() { return GetToken(SysMLv2Parser.CLASS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public ClassContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_class; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterClass(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitClass(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitClass(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ClassContext @class() { + ClassContext _localctx = new ClassContext(Context, State); + EnterRule(_localctx, 244, RULE_class); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2063; + typePrefix(); + State = 2064; + Match(CLASS); + State = 2065; + classifierDeclaration(); + State = 2066; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StructureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRUCT() { return GetToken(SysMLv2Parser.STRUCT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public StructureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_structure; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStructure(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStructure(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStructure(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StructureContext structure() { + StructureContext _localctx = new StructureContext(Context, State); + EnterRule(_localctx, 246, RULE_structure); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2068; + typePrefix(); + State = 2069; + Match(STRUCT); + State = 2070; + classifierDeclaration(); + State = 2071; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssociationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSOC() { return GetToken(SysMLv2Parser.ASSOC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public AssociationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_association; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssociation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssociation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssociation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssociationContext association() { + AssociationContext _localctx = new AssociationContext(Context, State); + EnterRule(_localctx, 248, RULE_association); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2073; + typePrefix(); + State = 2074; + Match(ASSOC); + State = 2075; + classifierDeclaration(); + State = 2076; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssociationStructureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSOC() { return GetToken(SysMLv2Parser.ASSOC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRUCT() { return GetToken(SysMLv2Parser.STRUCT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public AssociationStructureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_associationStructure; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssociationStructure(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssociationStructure(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssociationStructure(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssociationStructureContext associationStructure() { + AssociationStructureContext _localctx = new AssociationStructureContext(Context, State); + EnterRule(_localctx, 250, RULE_associationStructure); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2078; + typePrefix(); + State = 2079; + Match(ASSOC); + State = 2080; + Match(STRUCT); + State = 2081; + classifierDeclaration(); + State = 2082; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONNECTOR() { return GetToken(SysMLv2Parser.CONNECTOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorDeclarationContext connectorDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public ConnectorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connector; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnector(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnector(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnector(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectorContext connector() { + ConnectorContext _localctx = new ConnectorContext(Context, State); + EnterRule(_localctx, 252, RULE_connector); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2084; + featurePrefix(); + State = 2085; + Match(CONNECTOR); + State = 2093; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,170,Context) ) { + case 1: + { + State = 2087; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145152715784448L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 449L) != 0)) { + { + State = 2086; + featureDeclaration(); + } + } + + State = 2090; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2089; + valuePart(); + } + } + + } + break; + case 2: + { + State = 2092; + connectorDeclaration(); + } + break; + } + State = 2095; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectorDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BinaryConnectorDeclarationContext binaryConnectorDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NaryConnectorDeclarationContext naryConnectorDeclaration() { + return GetRuleContext(0); + } + public ConnectorDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connectorDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnectorDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectorDeclarationContext connectorDeclaration() { + ConnectorDeclarationContext _localctx = new ConnectorDeclarationContext(Context, State); + EnterRule(_localctx, 254, RULE_connectorDeclaration); + try { + State = 2099; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,171,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2097; + binaryConnectorDeclaration(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2098; + naryConnectorDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BinaryConnectorDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + public BinaryConnectorDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_binaryConnectorDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBinaryConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBinaryConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBinaryConnectorDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BinaryConnectorDeclarationContext binaryConnectorDeclaration() { + BinaryConnectorDeclarationContext _localctx = new BinaryConnectorDeclarationContext(Context, State); + EnterRule(_localctx, 256, RULE_binaryConnectorDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2109; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,174,Context) ) { + case 1: + { + State = 2102; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145152715784448L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 449L) != 0)) { + { + State = 2101; + featureDeclaration(); + } + } + + State = 2104; + Match(FROM); + } + break; + case 2: + { + State = 2105; + Match(ALL); + State = 2107; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FROM) { + { + State = 2106; + Match(FROM); + } + } + + } + break; + } + State = 2111; + connectorEndMember(); + State = 2112; + Match(TO); + State = 2113; + connectorEndMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NaryConnectorDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + public NaryConnectorDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_naryConnectorDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNaryConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNaryConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNaryConnectorDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NaryConnectorDeclarationContext naryConnectorDeclaration() { + NaryConnectorDeclarationContext _localctx = new NaryConnectorDeclarationContext(Context, State); + EnterRule(_localctx, 258, RULE_naryConnectorDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2116; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145152715784448L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 449L) != 0)) { + { + State = 2115; + featureDeclaration(); + } + } + + State = 2118; + Match(LPAREN); + State = 2119; + connectorEndMember(); + State = 2120; + Match(COMMA); + State = 2121; + connectorEndMember(); + State = 2126; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2122; + Match(COMMA); + State = 2123; + connectorEndMember(); + } + } + State = 2128; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2129; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectorEndMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndContext connectorEnd() { + return GetRuleContext(0); + } + public ConnectorEndMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connectorEndMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnectorEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnectorEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnectorEndMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectorEndMemberContext connectorEndMember() { + ConnectorEndMemberContext _localctx = new ConnectorEndMemberContext(Context, State); + EnterRule(_localctx, 260, RULE_connectorEndMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2131; + connectorEnd(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectorEndContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossMultiplicityMemberContext ownedCrossMultiplicityMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON_GT() { return GetToken(SysMLv2Parser.COLON_COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REFERENCES() { return GetToken(SysMLv2Parser.REFERENCES, 0); } + public ConnectorEndContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connectorEnd; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnectorEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnectorEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnectorEnd(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectorEndContext connectorEnd() { + ConnectorEndContext _localctx = new ConnectorEndContext(Context, State); + EnterRule(_localctx, 262, RULE_connectorEnd); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2134; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACK) { + { + State = 2133; + ownedCrossMultiplicityMember(); + } + } + + State = 2139; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,178,Context) ) { + case 1: + { + State = 2136; + name(); + State = 2137; + _la = TokenStream.LA(1); + if ( !(_la==REFERENCES || _la==COLON_COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + break; + } + State = 2141; + ownedReferenceSubsetting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedCrossMultiplicityMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossMultiplicityContext ownedCrossMultiplicity() { + return GetRuleContext(0); + } + public OwnedCrossMultiplicityMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedCrossMultiplicityMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedCrossMultiplicityMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedCrossMultiplicityMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedCrossMultiplicityMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedCrossMultiplicityMemberContext ownedCrossMultiplicityMember() { + OwnedCrossMultiplicityMemberContext _localctx = new OwnedCrossMultiplicityMemberContext(Context, State); + EnterRule(_localctx, 264, RULE_ownedCrossMultiplicityMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2143; + ownedCrossMultiplicity(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedCrossMultiplicityContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityContext ownedMultiplicity() { + return GetRuleContext(0); + } + public OwnedCrossMultiplicityContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedCrossMultiplicity; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedCrossMultiplicity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedCrossMultiplicity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedCrossMultiplicity(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedCrossMultiplicityContext ownedCrossMultiplicity() { + OwnedCrossMultiplicityContext _localctx = new OwnedCrossMultiplicityContext(Context, State); + EnterRule(_localctx, 266, RULE_ownedCrossMultiplicity); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2145; + ownedMultiplicity(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BindingConnectorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BINDING() { return GetToken(SysMLv2Parser.BINDING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public BindingConnectorDeclarationContext bindingConnectorDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public BindingConnectorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_bindingConnector; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBindingConnector(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBindingConnector(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBindingConnector(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BindingConnectorContext bindingConnector() { + BindingConnectorContext _localctx = new BindingConnectorContext(Context, State); + EnterRule(_localctx, 268, RULE_bindingConnector); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2147; + featurePrefix(); + State = 2148; + Match(BINDING); + State = 2149; + bindingConnectorDeclaration(); + State = 2150; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BindingConnectorDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(SysMLv2Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(SysMLv2Parser.EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + public BindingConnectorDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_bindingConnectorDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBindingConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBindingConnectorDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBindingConnectorDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BindingConnectorDeclarationContext bindingConnectorDeclaration() { + BindingConnectorDeclarationContext _localctx = new BindingConnectorDeclarationContext(Context, State); + EnterRule(_localctx, 270, RULE_bindingConnectorDeclaration); + int _la; + try { + State = 2172; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,183,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2152; + featureDeclaration(); + State = 2158; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OF) { + { + State = 2153; + Match(OF); + State = 2154; + connectorEndMember(); + State = 2155; + Match(EQ); + State = 2156; + connectorEndMember(); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2161; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 2160; + Match(ALL); + } + } + + State = 2170; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889877260801L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6935543494870040641L) != 0)) { + { + State = 2164; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OF) { + { + State = 2163; + Match(OF); + } + } + + State = 2166; + connectorEndMember(); + State = 2167; + Match(EQ); + State = 2168; + connectorEndMember(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUCCESSION() { return GetToken(SysMLv2Parser.SUCCESSION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionDeclarationContext successionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public SuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_succession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuccessionContext succession() { + SuccessionContext _localctx = new SuccessionContext(Context, State); + EnterRule(_localctx, 272, RULE_succession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2174; + featurePrefix(); + State = 2175; + Match(SUCCESSION); + State = 2176; + successionDeclaration(); + State = 2177; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuccessionDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FIRST() { return GetToken(SysMLv2Parser.FIRST, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + public SuccessionDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_successionDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSuccessionDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSuccessionDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuccessionDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuccessionDeclarationContext successionDeclaration() { + SuccessionDeclarationContext _localctx = new SuccessionDeclarationContext(Context, State); + EnterRule(_localctx, 274, RULE_successionDeclaration); + int _la; + try { + State = 2199; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,188,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2179; + featureDeclaration(); + State = 2185; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FIRST) { + { + State = 2180; + Match(FIRST); + State = 2181; + connectorEndMember(); + State = 2182; + Match(THEN); + State = 2183; + connectorEndMember(); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2188; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 2187; + Match(ALL); + } + } + + State = 2197; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36626931348668417L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6935543494870040641L) != 0)) { + { + State = 2191; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FIRST) { + { + State = 2190; + Match(FIRST); + } + } + + State = 2193; + connectorEndMember(); + State = 2194; + Match(THEN); + State = 2195; + connectorEndMember(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BehaviorContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BEHAVIOR() { return GetToken(SysMLv2Parser.BEHAVIOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public BehaviorContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_behavior; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBehavior(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBehavior(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBehavior(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BehaviorContext behavior() { + BehaviorContext _localctx = new BehaviorContext(Context, State); + EnterRule(_localctx, 276, RULE_behavior); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2201; + typePrefix(); + State = 2202; + Match(BEHAVIOR); + State = 2203; + classifierDeclaration(); + State = 2204; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StepContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STEP() { return GetToken(SysMLv2Parser.STEP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public StepContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_step; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStep(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStep(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStep(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StepContext step() { + StepContext _localctx = new StepContext(Context, State); + EnterRule(_localctx, 278, RULE_step); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2206; + featurePrefix(); + State = 2207; + Match(STEP); + State = 2208; + featureDeclaration(); + State = 2210; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2209; + valuePart(); + } + } + + State = 2212; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FunctionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FUNCTION() { return GetToken(SysMLv2Parser.FUNCTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() { + return GetRuleContext(0); + } + public FunctionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_function; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFunction(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFunction(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunction(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FunctionContext function() { + FunctionContext _localctx = new FunctionContext(Context, State); + EnterRule(_localctx, 280, RULE_function); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2214; + typePrefix(); + State = 2215; + Match(FUNCTION); + State = 2216; + classifierDeclaration(); + State = 2217; + functionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FunctionBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyPartContext functionBodyPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + public FunctionBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_functionBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFunctionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFunctionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunctionBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FunctionBodyContext functionBody() { + FunctionBodyContext _localctx = new FunctionBodyContext(Context, State); + EnterRule(_localctx, 282, RULE_functionBody); + try { + State = 2224; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 2219; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 2220; + Match(LBRACE); + State = 2221; + functionBodyPart(); + State = 2222; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FunctionBodyPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext[] definitionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext definitionBodyItem(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyElementContext[] typeBodyElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyElementContext typeBodyElement(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ReturnFeatureMemberContext[] returnFeatureMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ReturnFeatureMemberContext returnFeatureMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ResultExpressionMemberContext resultExpressionMember() { + return GetRuleContext(0); + } + public FunctionBodyPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_functionBodyPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFunctionBodyPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFunctionBodyPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunctionBodyPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FunctionBodyPartContext functionBodyPart() { + FunctionBodyPartContext _localctx = new FunctionBodyPartContext(Context, State); + EnterRule(_localctx, 284, RULE_functionBodyPart); + int _la; + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 2231; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,192,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + State = 2229; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,191,Context) ) { + case 1: + { + State = 2226; + definitionBodyItem(); + } + break; + case 2: + { + State = 2227; + typeBodyElement(); + } + break; + case 3: + { + State = 2228; + returnFeatureMember(); + } + break; + } + } + } + State = 2233; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,192,Context); + } + State = 2235; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4398047559936L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 2161757106910275587L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 406731341347971073L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 16273L) != 0)) { + { + State = 2234; + resultExpressionMember(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ReturnFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(SysMLv2Parser.RETURN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureElementContext featureElement() { + return GetRuleContext(0); + } + public ReturnFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_returnFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterReturnFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitReturnFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitReturnFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ReturnFeatureMemberContext returnFeatureMember() { + ReturnFeatureMemberContext _localctx = new ReturnFeatureMemberContext(Context, State); + EnterRule(_localctx, 286, RULE_returnFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2237; + memberPrefix(); + State = 2238; + Match(RETURN); + State = 2239; + featureElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ResultExpressionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public ResultExpressionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_resultExpressionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterResultExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitResultExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitResultExpressionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ResultExpressionMemberContext resultExpressionMember() { + ResultExpressionMemberContext _localctx = new ResultExpressionMemberContext(Context, State); + EnterRule(_localctx, 288, RULE_resultExpressionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2241; + memberPrefix(); + State = 2242; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXPR() { return GetToken(SysMLv2Parser.EXPR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_expression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExpressionContext expression() { + ExpressionContext _localctx = new ExpressionContext(Context, State); + EnterRule(_localctx, 290, RULE_expression); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2244; + featurePrefix(); + State = 2245; + Match(EXPR); + State = 2246; + featureDeclaration(); + State = 2248; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2247; + valuePart(); + } + } + + State = 2250; + functionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PredicateContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PREDICATE() { return GetToken(SysMLv2Parser.PREDICATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() { + return GetRuleContext(0); + } + public PredicateContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_predicate; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPredicate(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPredicate(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPredicate(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PredicateContext predicate() { + PredicateContext _localctx = new PredicateContext(Context, State); + EnterRule(_localctx, 292, RULE_predicate); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2252; + typePrefix(); + State = 2253; + Match(PREDICATE); + State = 2254; + classifierDeclaration(); + State = 2255; + functionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BooleanExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOOL() { return GetToken(SysMLv2Parser.BOOL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public BooleanExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_booleanExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBooleanExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBooleanExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBooleanExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BooleanExpressionContext booleanExpression() { + BooleanExpressionContext _localctx = new BooleanExpressionContext(Context, State); + EnterRule(_localctx, 294, RULE_booleanExpression); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2257; + featurePrefix(); + State = 2258; + Match(BOOL); + State = 2259; + featureDeclaration(); + State = 2261; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2260; + valuePart(); + } + } + + State = 2263; + functionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InvariantContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INV() { return GetToken(SysMLv2Parser.INV, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FunctionBodyContext functionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TRUE() { return GetToken(SysMLv2Parser.TRUE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FALSE() { return GetToken(SysMLv2Parser.FALSE, 0); } + public InvariantContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_invariant; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInvariant(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInvariant(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInvariant(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InvariantContext invariant() { + InvariantContext _localctx = new InvariantContext(Context, State); + EnterRule(_localctx, 296, RULE_invariant); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2265; + featurePrefix(); + State = 2266; + Match(INV); + State = 2268; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FALSE || _la==TRUE) { + { + State = 2267; + _la = TokenStream.LA(1); + if ( !(_la==FALSE || _la==TRUE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 2270; + featureDeclaration(); + State = 2272; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2271; + valuePart(); + } + } + + State = 2274; + functionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureChainMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public FeatureChainMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureChainMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureChainMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureChainMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureChainMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureChainMemberContext featureChainMember() { + FeatureChainMemberContext _localctx = new FeatureChainMemberContext(Context, State); + EnterRule(_localctx, 298, RULE_featureChainMember); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2276; + qualifiedName(); + State = 2281; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 2277; + Match(DOT); + State = 2278; + qualifiedName(); + } + } + State = 2283; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InteractionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTERACTION() { return GetToken(SysMLv2Parser.INTERACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public InteractionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interaction; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInteraction(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInteraction(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInteraction(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InteractionContext interaction() { + InteractionContext _localctx = new InteractionContext(Context, State); + EnterRule(_localctx, 300, RULE_interaction); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2284; + typePrefix(); + State = 2285; + Match(INTERACTION); + State = 2286; + classifierDeclaration(); + State = 2287; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FLOW() { return GetToken(SysMLv2Parser.FLOW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FlowDeclarationContext flowDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public FlowContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flow; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlow(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlow(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlow(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowContext flow() { + FlowContext _localctx = new FlowContext(Context, State); + EnterRule(_localctx, 302, RULE_flow); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2289; + featurePrefix(); + State = 2290; + Match(FLOW); + State = 2291; + flowDeclaration(); + State = 2292; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuccessionFlowContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeaturePrefixContext featurePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUCCESSION() { return GetToken(SysMLv2Parser.SUCCESSION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FLOW() { return GetToken(SysMLv2Parser.FLOW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FlowDeclarationContext flowDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public SuccessionFlowContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_successionFlow; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSuccessionFlow(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSuccessionFlow(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuccessionFlow(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuccessionFlowContext successionFlow() { + SuccessionFlowContext _localctx = new SuccessionFlowContext(Context, State); + EnterRule(_localctx, 304, RULE_successionFlow); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2294; + featurePrefix(); + State = 2295; + Match(SUCCESSION); + State = 2296; + Match(FLOW); + State = 2297; + flowDeclaration(); + State = 2298; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(SysMLv2Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PayloadFeatureMemberContext payloadFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FlowEndMemberContext[] flowEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FlowEndMemberContext flowEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALL() { return GetToken(SysMLv2Parser.ALL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FlowPayloadFeatureMemberContext flowPayloadFeatureMember() { + return GetRuleContext(0); + } + public FlowDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowDeclarationContext flowDeclaration() { + FlowDeclarationContext _localctx = new FlowDeclarationContext(Context, State); + EnterRule(_localctx, 306, RULE_flowDeclaration); + int _la; + try { + State = 2339; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,207,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2300; + featureDeclaration(); + State = 2302; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2301; + valuePart(); + } + } + + State = 2306; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OF) { + { + State = 2304; + Match(OF); + State = 2305; + payloadFeatureMember(); + } + } + + State = 2313; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FROM) { + { + State = 2308; + Match(FROM); + State = 2309; + flowEndMember(); + State = 2310; + Match(TO); + State = 2311; + flowEndMember(); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2316; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALL) { + { + State = 2315; + Match(ALL); + } + } + + State = 2318; + flowEndMember(); + State = 2319; + Match(TO); + State = 2320; + flowEndMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2323; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 2322; + usageDeclaration(); + } + } + + State = 2326; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2325; + valuePart(); + } + } + + State = 2330; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OF) { + { + State = 2328; + Match(OF); + State = 2329; + flowPayloadFeatureMember(); + } + } + + State = 2337; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FROM) { + { + State = 2332; + Match(FROM); + State = 2333; + flowEndMember(); + State = 2334; + Match(TO); + State = 2335; + flowEndMember(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PayloadFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PayloadFeatureContext payloadFeature() { + return GetRuleContext(0); + } + public PayloadFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_payloadFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPayloadFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPayloadFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPayloadFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PayloadFeatureMemberContext payloadFeatureMember() { + PayloadFeatureMemberContext _localctx = new PayloadFeatureMemberContext(Context, State); + EnterRule(_localctx, 308, RULE_payloadFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2341; + payloadFeature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PayloadFeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PayloadFeatureSpecializationPartContext payloadFeatureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureTypingContext ownedFeatureTyping() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityContext ownedMultiplicity() { + return GetRuleContext(0); + } + public PayloadFeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_payloadFeature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPayloadFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPayloadFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPayloadFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PayloadFeatureContext payloadFeature() { + PayloadFeatureContext _localctx = new PayloadFeatureContext(Context, State); + EnterRule(_localctx, 310, RULE_payloadFeature); + int _la; + try { + State = 2362; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,213,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2344; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2343; + identification(); + } + } + + State = 2346; + valuePart(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2348; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,209,Context) ) { + case 1: + { + State = 2347; + identification(); + } + break; + } + State = 2350; + payloadFeatureSpecializationPart(); + State = 2352; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2351; + valuePart(); + } + } + + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2354; + ownedFeatureTyping(); + State = 2356; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACK) { + { + State = 2355; + ownedMultiplicity(); + } + } + + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2358; + ownedMultiplicity(); + State = 2360; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6917529096360558657L) != 0)) { + { + State = 2359; + ownedFeatureTyping(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PayloadFeatureSpecializationPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext[] featureSpecialization() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext featureSpecialization(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityPartContext multiplicityPart() { + return GetRuleContext(0); + } + public PayloadFeatureSpecializationPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_payloadFeatureSpecializationPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPayloadFeatureSpecializationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPayloadFeatureSpecializationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPayloadFeatureSpecializationPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PayloadFeatureSpecializationPartContext payloadFeatureSpecializationPart() { + PayloadFeatureSpecializationPartContext _localctx = new PayloadFeatureSpecializationPartContext(Context, State); + EnterRule(_localctx, 312, RULE_payloadFeatureSpecializationPart); + int _la; + try { + int _alt; + State = 2384; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case CROSSES: + case DEFINED: + case REDEFINES: + case REFERENCES: + case SUBSETS: + case TYPED: + case COLON_COLON_GT: + case COLON_GT_GT: + case COLON_GT: + case FAT_ARROW: + case COLON: + EnterOuterAlt(_localctx, 1); + { + State = 2365; + ErrorHandler.Sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + State = 2364; + featureSpecialization(); + } + } + break; + default: + throw new NoViableAltException(this); + } + State = 2367; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,214,Context); + } while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ); + State = 2370; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==NONUNIQUE || _la==ORDERED || _la==LBRACK) { + { + State = 2369; + multiplicityPart(); + } + } + + State = 2375; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==CROSSES || _la==DEFINED || ((((_la - 125)) & ~0x3f) == 0 && ((1L << (_la - 125)) & -8067072823929077751L) != 0) || _la==COLON) { + { + { + State = 2372; + featureSpecialization(); + } + } + State = 2377; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + break; + case NONUNIQUE: + case ORDERED: + case LBRACK: + EnterOuterAlt(_localctx, 2); + { + State = 2378; + multiplicityPart(); + State = 2380; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 2379; + featureSpecialization(); + } + } + State = 2382; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==CROSSES || _la==DEFINED || ((((_la - 125)) & ~0x3f) == 0 && ((1L << (_la - 125)) & -8067072823929077751L) != 0) || _la==COLON ); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowEndMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FlowEndContext flowEnd() { + return GetRuleContext(0); + } + public FlowEndMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowEndMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowEndMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowEndMemberContext flowEndMember() { + FlowEndMemberContext _localctx = new FlowEndMemberContext(Context, State); + EnterRule(_localctx, 314, RULE_flowEndMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2386; + flowEnd(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowEndContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(SysMLv2Parser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(SysMLv2Parser.DOT, i); + } + public FlowEndContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowEnd; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowEnd(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowEndContext flowEnd() { + FlowEndContext _localctx = new FlowEndContext(Context, State); + EnterRule(_localctx, 316, RULE_flowEnd); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2388; + qualifiedName(); + State = 2393; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 2389; + Match(DOT); + State = 2390; + qualifiedName(); + } + } + State = 2395; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ValuePartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureValueContext featureValue() { + return GetRuleContext(0); + } + public ValuePartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_valuePart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterValuePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitValuePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitValuePart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ValuePartContext valuePart() { + ValuePartContext _localctx = new ValuePartContext(Context, State); + EnterRule(_localctx, 318, RULE_valuePart); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2396; + featureValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureValueContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(SysMLv2Parser.EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_EQ() { return GetToken(SysMLv2Parser.COLON_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEFAULT() { return GetToken(SysMLv2Parser.DEFAULT, 0); } + public FeatureValueContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureValue; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureValue(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureValueContext featureValue() { + FeatureValueContext _localctx = new FeatureValueContext(Context, State); + EnterRule(_localctx, 320, RULE_featureValue); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2404; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case EQ: + { + State = 2398; + Match(EQ); + } + break; + case COLON_EQ: + { + State = 2399; + Match(COLON_EQ); + } + break; + case DEFAULT: + { + State = 2400; + Match(DEFAULT); + State = 2402; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON_EQ || _la==EQ) { + { + State = 2401; + _la = TokenStream.LA(1); + if ( !(_la==COLON_EQ || _la==EQ) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + State = 2406; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MultiplicityContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MultiplicitySubsetContext multiplicitySubset() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityRangeContext multiplicityRange() { + return GetRuleContext(0); + } + public MultiplicityContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplicity; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMultiplicity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMultiplicity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplicity(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MultiplicityContext multiplicity() { + MultiplicityContext _localctx = new MultiplicityContext(Context, State); + EnterRule(_localctx, 322, RULE_multiplicity); + try { + State = 2410; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,222,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2408; + multiplicitySubset(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2409; + multiplicityRange(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MultiplicitySubsetContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MULTIPLICITY() { return GetToken(SysMLv2Parser.MULTIPLICITY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SubsetsContext subsets() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public MultiplicitySubsetContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplicitySubset; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMultiplicitySubset(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMultiplicitySubset(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplicitySubset(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MultiplicitySubsetContext multiplicitySubset() { + MultiplicitySubsetContext _localctx = new MultiplicitySubsetContext(Context, State); + EnterRule(_localctx, 324, RULE_multiplicitySubset); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2412; + Match(MULTIPLICITY); + State = 2414; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2413; + identification(); + } + } + + State = 2416; + subsets(); + State = 2417; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MultiplicityRangeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MULTIPLICITY() { return GetToken(SysMLv2Parser.MULTIPLICITY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityBoundsContext multiplicityBounds() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public MultiplicityRangeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplicityRange; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMultiplicityRange(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMultiplicityRange(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplicityRange(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MultiplicityRangeContext multiplicityRange() { + MultiplicityRangeContext _localctx = new MultiplicityRangeContext(Context, State); + EnterRule(_localctx, 326, RULE_multiplicityRange); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2419; + Match(MULTIPLICITY); + State = 2421; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2420; + identification(); + } + } + + State = 2423; + multiplicityBounds(); + State = 2424; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedMultiplicityContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityRangeContext ownedMultiplicityRange() { + return GetRuleContext(0); + } + public OwnedMultiplicityContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedMultiplicity; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedMultiplicity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedMultiplicity(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedMultiplicity(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedMultiplicityContext ownedMultiplicity() { + OwnedMultiplicityContext _localctx = new OwnedMultiplicityContext(Context, State); + EnterRule(_localctx, 328, RULE_ownedMultiplicity); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2426; + ownedMultiplicityRange(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OwnedMultiplicityRangeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityBoundsContext multiplicityBounds() { + return GetRuleContext(0); + } + public OwnedMultiplicityRangeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ownedMultiplicityRange; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOwnedMultiplicityRange(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOwnedMultiplicityRange(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOwnedMultiplicityRange(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OwnedMultiplicityRangeContext ownedMultiplicityRange() { + OwnedMultiplicityRangeContext _localctx = new OwnedMultiplicityRangeContext(Context, State); + EnterRule(_localctx, 330, RULE_ownedMultiplicityRange); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2428; + multiplicityBounds(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MultiplicityBoundsContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACK() { return GetToken(SysMLv2Parser.LBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityExpressionMemberContext[] multiplicityExpressionMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public MultiplicityExpressionMemberContext multiplicityExpressionMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACK() { return GetToken(SysMLv2Parser.RBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT_DOT() { return GetToken(SysMLv2Parser.DOT_DOT, 0); } + public MultiplicityBoundsContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplicityBounds; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMultiplicityBounds(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMultiplicityBounds(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplicityBounds(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MultiplicityBoundsContext multiplicityBounds() { + MultiplicityBoundsContext _localctx = new MultiplicityBoundsContext(Context, State); + EnterRule(_localctx, 332, RULE_multiplicityBounds); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2430; + Match(LBRACK); + State = 2434; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,225,Context) ) { + case 1: + { + State = 2431; + multiplicityExpressionMember(); + State = 2432; + Match(DOT_DOT); + } + break; + } + State = 2436; + multiplicityExpressionMember(); + State = 2437; + Match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MultiplicityExpressionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public LiteralExpressionContext literalExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureReferenceExpressionContext featureReferenceExpression() { + return GetRuleContext(0); + } + public MultiplicityExpressionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_multiplicityExpressionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMultiplicityExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMultiplicityExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMultiplicityExpressionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MultiplicityExpressionMemberContext multiplicityExpressionMember() { + MultiplicityExpressionMemberContext _localctx = new MultiplicityExpressionMemberContext(Context, State); + EnterRule(_localctx, 334, RULE_multiplicityExpressionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2441; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case FALSE: + case TRUE: + case STAR: + case DOUBLE_STRING: + case INTEGER: + case REAL: + { + State = 2439; + literalExpression(); + } + break; + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 2440; + featureReferenceExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetaclassContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TypePrefixContext typePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode METACLASS() { return GetToken(SysMLv2Parser.METACLASS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ClassifierDeclarationContext classifierDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TypeBodyContext typeBody() { + return GetRuleContext(0); + } + public MetaclassContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metaclass; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetaclass(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetaclass(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetaclass(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetaclassContext metaclass() { + MetaclassContext _localctx = new MetaclassContext(Context, State); + EnterRule(_localctx, 336, RULE_metaclass); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2443; + typePrefix(); + State = 2444; + Match(METACLASS); + State = 2445; + classifierDeclaration(); + State = 2446; + typeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PrefixMetadataAnnotationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode HASH() { return GetToken(SysMLv2Parser.HASH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataFeatureContext prefixMetadataFeature() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataUsageContext prefixMetadataUsage() { + return GetRuleContext(0); + } + public PrefixMetadataAnnotationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_prefixMetadataAnnotation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPrefixMetadataAnnotation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPrefixMetadataAnnotation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPrefixMetadataAnnotation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PrefixMetadataAnnotationContext prefixMetadataAnnotation() { + PrefixMetadataAnnotationContext _localctx = new PrefixMetadataAnnotationContext(Context, State); + EnterRule(_localctx, 338, RULE_prefixMetadataAnnotation); + try { + State = 2452; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,227,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2448; + Match(HASH); + State = 2449; + prefixMetadataFeature(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2450; + Match(HASH); + State = 2451; + prefixMetadataUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PrefixMetadataMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode HASH() { return GetToken(SysMLv2Parser.HASH, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataFeatureContext prefixMetadataFeature() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataUsageContext prefixMetadataUsage() { + return GetRuleContext(0); + } + public PrefixMetadataMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_prefixMetadataMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPrefixMetadataMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPrefixMetadataMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPrefixMetadataMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PrefixMetadataMemberContext prefixMetadataMember() { + PrefixMetadataMemberContext _localctx = new PrefixMetadataMemberContext(Context, State); + EnterRule(_localctx, 340, RULE_prefixMetadataMember); + try { + State = 2458; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,228,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2454; + Match(HASH); + State = 2455; + prefixMetadataFeature(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2456; + Match(HASH); + State = 2457; + prefixMetadataUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PrefixMetadataFeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureTypingContext ownedFeatureTyping() { + return GetRuleContext(0); + } + public PrefixMetadataFeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_prefixMetadataFeature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPrefixMetadataFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPrefixMetadataFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPrefixMetadataFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PrefixMetadataFeatureContext prefixMetadataFeature() { + PrefixMetadataFeatureContext _localctx = new PrefixMetadataFeatureContext(Context, State); + EnterRule(_localctx, 342, RULE_prefixMetadataFeature); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2460; + ownedFeatureTyping(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataFeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MetadataFeatureDeclarationContext metadataFeatureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyContext metadataBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AT_SIGN() { return GetToken(SysMLv2Parser.AT_SIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode METADATA() { return GetToken(SysMLv2Parser.METADATA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABOUT() { return GetToken(SysMLv2Parser.ABOUT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AnnotationContext[] annotation() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public AnnotationContext annotation(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public MetadataFeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataFeature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataFeatureContext metadataFeature() { + MetadataFeatureContext _localctx = new MetadataFeatureContext(Context, State); + EnterRule(_localctx, 344, RULE_metadataFeature); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2465; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2462; + prefixMetadataMember(); + } + } + State = 2467; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2468; + _la = TokenStream.LA(1); + if ( !(_la==METADATA || _la==AT_SIGN) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 2469; + metadataFeatureDeclaration(); + State = 2479; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABOUT) { + { + State = 2470; + Match(ABOUT); + State = 2471; + annotation(); + State = 2476; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2472; + Match(COMMA); + State = 2473; + annotation(); + } + } + State = 2478; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + + State = 2481; + metadataBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataFeatureDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureTypingContext ownedFeatureTyping() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(SysMLv2Parser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TYPED() { return GetToken(SysMLv2Parser.TYPED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BY() { return GetToken(SysMLv2Parser.BY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public MetadataFeatureDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataFeatureDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataFeatureDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataFeatureDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataFeatureDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataFeatureDeclarationContext metadataFeatureDeclaration() { + MetadataFeatureDeclarationContext _localctx = new MetadataFeatureDeclarationContext(Context, State); + EnterRule(_localctx, 346, RULE_metadataFeatureDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2491; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,234,Context) ) { + case 1: + { + State = 2484; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2483; + identification(); + } + } + + State = 2489; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case COLON: + { + State = 2486; + Match(COLON); + } + break; + case TYPED: + { + State = 2487; + Match(TYPED); + State = 2488; + Match(BY); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + State = 2493; + ownedFeatureTyping(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyElementContext[] metadataBodyElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyElementContext metadataBodyElement(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionMemberContext[] definitionMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionMemberContext definitionMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyUsageMemberContext[] metadataBodyUsageMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyUsageMemberContext metadataBodyUsageMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext[] aliasMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext[] importRule() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule(int i) { + return GetRuleContext(i); + } + public MetadataBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataBodyContext metadataBody() { + MetadataBodyContext _localctx = new MetadataBodyContext(Context, State); + EnterRule(_localctx, 348, RULE_metadataBody); + int _la; + try { + State = 2515; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,238,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2495; + Match(SEMI); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2496; + Match(LBRACE); + State = 2500; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 25064511896617092L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4540755361288176645L) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & 6917564216644039809L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 9089L) != 0)) { + { + { + State = 2497; + metadataBodyElement(); + } + } + State = 2502; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2503; + Match(RBRACE); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2504; + Match(LBRACE); + State = 2511; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 306532989617573012L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 6869151003298120737L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & -4611613884317419509L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 8961L) != 0)) { + { + State = 2509; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,236,Context) ) { + case 1: + { + State = 2505; + definitionMember(); + } + break; + case 2: + { + State = 2506; + metadataBodyUsageMember(); + } + break; + case 3: + { + State = 2507; + aliasMember(); + } + break; + case 4: + { + State = 2508; + importRule(); + } + break; + } + } + State = 2513; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2514; + Match(RBRACE); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataBodyElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonFeatureMemberContext nonFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyFeatureMemberContext metadataBodyFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + public MetadataBodyElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataBodyElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataBodyElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataBodyElementContext metadataBodyElement() { + MetadataBodyElementContext _localctx = new MetadataBodyElementContext(Context, State); + EnterRule(_localctx, 350, RULE_metadataBodyElement); + try { + State = 2521; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,239,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2517; + nonFeatureMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2518; + metadataBodyFeatureMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2519; + aliasMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2520; + importRule(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataBodyFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyFeatureContext metadataBodyFeature() { + return GetRuleContext(0); + } + public MetadataBodyFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataBodyFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataBodyFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataBodyFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataBodyFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataBodyFeatureMemberContext metadataBodyFeatureMember() { + MetadataBodyFeatureMemberContext _localctx = new MetadataBodyFeatureMemberContext(Context, State); + EnterRule(_localctx, 352, RULE_metadataBodyFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2523; + metadataBodyFeature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataBodyFeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedRedefinitionContext ownedRedefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyContext metadataBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FEATURE() { return GetToken(SysMLv2Parser.FEATURE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT_GT() { return GetToken(SysMLv2Parser.COLON_GT_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REDEFINES() { return GetToken(SysMLv2Parser.REDEFINES, 0); } + public MetadataBodyFeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataBodyFeature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataBodyFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataBodyFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataBodyFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataBodyFeatureContext metadataBodyFeature() { + MetadataBodyFeatureContext _localctx = new MetadataBodyFeatureContext(Context, State); + EnterRule(_localctx, 354, RULE_metadataBodyFeature); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2526; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,240,Context) ) { + case 1: + { + State = 2525; + Match(FEATURE); + } + break; + } + State = 2529; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REDEFINES || _la==COLON_GT_GT) { + { + State = 2528; + _la = TokenStream.LA(1); + if ( !(_la==REDEFINES || _la==COLON_GT_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 2531; + ownedRedefinition(); + State = 2533; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 2532; + featureSpecializationPart(); + } + } + + State = 2536; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2535; + valuePart(); + } + } + + State = 2538; + metadataBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PackageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PackageDeclarationContext packageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PackageBodyContext packageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + public PackageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_package; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPackage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPackage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPackage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PackageContext package() { + PackageContext _localctx = new PackageContext(Context, State); + EnterRule(_localctx, 356, RULE_package); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2543; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2540; + prefixMetadataMember(); + } + } + State = 2545; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2546; + packageDeclaration(); + State = 2547; + packageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class LibraryPackageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LIBRARY() { return GetToken(SysMLv2Parser.LIBRARY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PackageDeclarationContext packageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PackageBodyContext packageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STANDARD() { return GetToken(SysMLv2Parser.STANDARD, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + public LibraryPackageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_libraryPackage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterLibraryPackage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitLibraryPackage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitLibraryPackage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public LibraryPackageContext libraryPackage() { + LibraryPackageContext _localctx = new LibraryPackageContext(Context, State); + EnterRule(_localctx, 358, RULE_libraryPackage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2550; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==STANDARD) { + { + State = 2549; + Match(STANDARD); + } + } + + State = 2552; + Match(LIBRARY); + State = 2556; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2553; + prefixMetadataMember(); + } + } + State = 2558; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2559; + packageDeclaration(); + State = 2560; + packageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PackageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PACKAGE() { return GetToken(SysMLv2Parser.PACKAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public PackageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_packageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPackageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPackageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPackageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PackageDeclarationContext packageDeclaration() { + PackageDeclarationContext _localctx = new PackageDeclarationContext(Context, State); + EnterRule(_localctx, 360, RULE_packageDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2562; + Match(PACKAGE); + State = 2564; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2563; + identification(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PackageBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PackageBodyElementContext[] packageBodyElement() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PackageBodyElementContext packageBodyElement(int i) { + return GetRuleContext(i); + } + public PackageBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_packageBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPackageBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPackageBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPackageBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PackageBodyContext packageBody() { + PackageBodyContext _localctx = new PackageBodyContext(Context, State); + EnterRule(_localctx, 362, RULE_packageBody); + int _la; + try { + State = 2575; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 2566; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 2567; + Match(LBRACE); + State = 2571; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108748064989138580L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785799L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954066908867737771L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 2568; + packageBodyElement(); + } + } + State = 2573; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2574; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ElementFilterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FILTER() { return GetToken(SysMLv2Parser.FILTER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + public ElementFilterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_elementFilterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterElementFilterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitElementFilterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitElementFilterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ElementFilterMemberContext elementFilterMember() { + ElementFilterMemberContext _localctx = new ElementFilterMemberContext(Context, State); + EnterRule(_localctx, 364, RULE_elementFilterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2577; + memberPrefix(); + State = 2578; + Match(FILTER); + State = 2579; + ownedExpression(0); + State = 2580; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DependencyDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext[] qualifiedName() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + public DependencyDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_dependencyDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDependencyDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDependencyDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDependencyDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DependencyDeclarationContext dependencyDeclaration() { + DependencyDeclarationContext _localctx = new DependencyDeclarationContext(Context, State); + EnterRule(_localctx, 366, RULE_dependencyDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2586; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,251,Context) ) { + case 1: + { + State = 2583; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2582; + identification(); + } + } + + State = 2585; + Match(FROM); + } + break; + } + State = 2588; + qualifiedName(); + State = 2593; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2589; + Match(COMMA); + State = 2590; + qualifiedName(); + } + } + State = 2595; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2596; + Match(TO); + State = 2597; + qualifiedName(); + State = 2602; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2598; + Match(COMMA); + State = 2599; + qualifiedName(); + } + } + State = 2604; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AnnotatingMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AnnotatingElementContext annotatingElement() { + return GetRuleContext(0); + } + public AnnotatingMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_annotatingMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAnnotatingMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAnnotatingMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAnnotatingMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AnnotatingMemberContext annotatingMember() { + AnnotatingMemberContext _localctx = new AnnotatingMemberContext(Context, State); + EnterRule(_localctx, 368, RULE_annotatingMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2605; + annotatingElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PackageBodyElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PackageMemberContext packageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ElementFilterMemberContext elementFilterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + public PackageBodyElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_packageBodyElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPackageBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPackageBodyElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPackageBodyElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PackageBodyElementContext packageBodyElement() { + PackageBodyElementContext _localctx = new PackageBodyElementContext(Context, State); + EnterRule(_localctx, 370, RULE_packageBodyElement); + try { + State = 2611; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,254,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2607; + packageMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2608; + elementFilterMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2609; + aliasMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2610; + importRule(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PackageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionElementContext definitionElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageElementContext usageElement() { + return GetRuleContext(0); + } + public PackageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_packageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPackageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPackageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPackageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PackageMemberContext packageMember() { + PackageMemberContext _localctx = new PackageMemberContext(Context, State); + EnterRule(_localctx, 372, RULE_packageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2613; + memberPrefix(); + State = 2616; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,255,Context) ) { + case 1: + { + State = 2614; + definitionElement(); + } + break; + case 2: + { + State = 2615; + usageElement(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PackageContext package() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public LibraryPackageContext libraryPackage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AnnotatingElementContext annotatingElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DependencyContext dependency() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AttributeDefinitionContext attributeDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumerationDefinitionContext enumerationDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionContext occurrenceDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IndividualDefinitionContext individualDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ItemDefinitionContext itemDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PartDefinitionContext partDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectionDefinitionContext connectionDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FlowDefinitionContext flowDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceDefinitionContext interfaceDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PortDefinitionContext portDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionDefinitionContext actionDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationDefinitionContext calculationDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateDefinitionContext stateDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintDefinitionContext constraintDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementDefinitionContext requirementDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConcernDefinitionContext concernDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseDefinitionContext caseDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AnalysisCaseDefinitionContext analysisCaseDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public VerificationCaseDefinitionContext verificationCaseDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UseCaseDefinitionContext useCaseDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewDefinitionContext viewDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewpointDefinitionContext viewpointDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RenderingDefinitionContext renderingDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataDefinitionContext metadataDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AllocationDefinitionContext allocationDefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExtendedDefinitionContext extendedDefinition() { + return GetRuleContext(0); + } + public DefinitionElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionElementContext definitionElement() { + DefinitionElementContext _localctx = new DefinitionElementContext(Context, State); + EnterRule(_localctx, 374, RULE_definitionElement); + try { + State = 2648; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,256,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2618; + package(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2619; + libraryPackage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2620; + annotatingElement(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2621; + dependency(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2622; + attributeDefinition(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2623; + enumerationDefinition(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2624; + occurrenceDefinition(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2625; + individualDefinition(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2626; + itemDefinition(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2627; + partDefinition(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2628; + connectionDefinition(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2629; + flowDefinition(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2630; + interfaceDefinition(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2631; + portDefinition(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2632; + actionDefinition(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 2633; + calculationDefinition(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 2634; + stateDefinition(); + } + break; + case 18: + EnterOuterAlt(_localctx, 18); + { + State = 2635; + constraintDefinition(); + } + break; + case 19: + EnterOuterAlt(_localctx, 19); + { + State = 2636; + requirementDefinition(); + } + break; + case 20: + EnterOuterAlt(_localctx, 20); + { + State = 2637; + concernDefinition(); + } + break; + case 21: + EnterOuterAlt(_localctx, 21); + { + State = 2638; + caseDefinition(); + } + break; + case 22: + EnterOuterAlt(_localctx, 22); + { + State = 2639; + analysisCaseDefinition(); + } + break; + case 23: + EnterOuterAlt(_localctx, 23); + { + State = 2640; + verificationCaseDefinition(); + } + break; + case 24: + EnterOuterAlt(_localctx, 24); + { + State = 2641; + useCaseDefinition(); + } + break; + case 25: + EnterOuterAlt(_localctx, 25); + { + State = 2642; + viewDefinition(); + } + break; + case 26: + EnterOuterAlt(_localctx, 26); + { + State = 2643; + viewpointDefinition(); + } + break; + case 27: + EnterOuterAlt(_localctx, 27); + { + State = 2644; + renderingDefinition(); + } + break; + case 28: + EnterOuterAlt(_localctx, 28); + { + State = 2645; + metadataDefinition(); + } + break; + case 29: + EnterOuterAlt(_localctx, 29); + { + State = 2646; + allocationDefinition(); + } + break; + case 30: + EnterOuterAlt(_localctx, 30); + { + State = 2647; + extendedDefinition(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonOccurrenceUsageElementContext nonOccurrenceUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsageElementContext occurrenceUsageElement() { + return GetRuleContext(0); + } + public UsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsageElementContext usageElement() { + UsageElementContext _localctx = new UsageElementContext(Context, State); + EnterRule(_localctx, 376, RULE_usageElement); + try { + State = 2652; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,257,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2650; + nonOccurrenceUsageElement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2651; + occurrenceUsageElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BasicDefinitionPrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABSTRACT() { return GetToken(SysMLv2Parser.ABSTRACT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIATION() { return GetToken(SysMLv2Parser.VARIATION, 0); } + public BasicDefinitionPrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_basicDefinitionPrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBasicDefinitionPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBasicDefinitionPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBasicDefinitionPrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BasicDefinitionPrefixContext basicDefinitionPrefix() { + BasicDefinitionPrefixContext _localctx = new BasicDefinitionPrefixContext(Context, State); + EnterRule(_localctx, 378, RULE_basicDefinitionPrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2654; + _la = TokenStream.LA(1); + if ( !(_la==ABSTRACT || _la==VARIATION) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionExtensionKeywordContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember() { + return GetRuleContext(0); + } + public DefinitionExtensionKeywordContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionExtensionKeyword; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionExtensionKeyword(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionExtensionKeyword(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionExtensionKeyword(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionExtensionKeywordContext definitionExtensionKeyword() { + DefinitionExtensionKeywordContext _localctx = new DefinitionExtensionKeywordContext(Context, State); + EnterRule(_localctx, 380, RULE_definitionExtensionKeyword); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2656; + prefixMetadataMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionPrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicDefinitionPrefixContext basicDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext[] definitionExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext definitionExtensionKeyword(int i) { + return GetRuleContext(i); + } + public DefinitionPrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionPrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionPrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionPrefixContext definitionPrefix() { + DefinitionPrefixContext _localctx = new DefinitionPrefixContext(Context, State); + EnterRule(_localctx, 382, RULE_definitionPrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2659; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT || _la==VARIATION) { + { + State = 2658; + basicDefinitionPrefix(); + } + } + + State = 2664; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2661; + definitionExtensionKeyword(); + } + } + State = 2666; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyContext definitionBody() { + return GetRuleContext(0); + } + public DefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionContext definition() { + DefinitionContext _localctx = new DefinitionContext(Context, State); + EnterRule(_localctx, 384, RULE_definition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2667; + definitionDeclaration(); + State = 2668; + definitionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubclassificationPartContext subclassificationPart() { + return GetRuleContext(0); + } + public DefinitionDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionDeclarationContext definitionDeclaration() { + DefinitionDeclarationContext _localctx = new DefinitionDeclarationContext(Context, State); + EnterRule(_localctx, 386, RULE_definitionDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2671; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6918091977594503233L) != 0)) { + { + State = 2670; + identification(); + } + } + + State = 2674; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SPECIALIZES || _la==COLON_GT) { + { + State = 2673; + subclassificationPart(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext[] definitionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext definitionBodyItem(int i) { + return GetRuleContext(i); + } + public DefinitionBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionBodyContext definitionBody() { + DefinitionBodyContext _localctx = new DefinitionBodyContext(Context, State); + EnterRule(_localctx, 388, RULE_definitionBody); + int _la; + try { + State = 2685; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 2676; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 2677; + Match(LBRACE); + State = 2681; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108748064989138580L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785807L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954066926051801259L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 2678; + definitionBodyItem(); + } + } + State = 2683; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2684; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContentContext definitionBodyItemContent() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EndOccurrenceUsageElementContext endOccurrenceUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SourceSuccessionMemberContext sourceSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsageElementContext occurrenceUsageElement() { + return GetRuleContext(0); + } + public DefinitionBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionBodyItemContext definitionBodyItem() { + DefinitionBodyItemContext _localctx = new DefinitionBodyItemContext(Context, State); + EnterRule(_localctx, 390, RULE_definitionBodyItem); + int _la; + try { + State = 2703; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,266,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2687; + importRule(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2688; + memberPrefix(); + State = 2689; + definitionBodyItemContent(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2692; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==THEN) { + { + State = 2691; + sourceSuccessionMember(); + } + } + + State = 2694; + memberPrefix(); + State = 2695; + endOccurrenceUsageElement(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2698; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==THEN) { + { + State = 2697; + sourceSuccessionMember(); + } + } + + State = 2700; + memberPrefix(); + State = 2701; + occurrenceUsageElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionBodyItemContentContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALIAS() { return GetToken(SysMLv2Parser.ALIAS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(SysMLv2Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LT() { return GetToken(SysMLv2Parser.LT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NameContext[] name() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode GT() { return GetToken(SysMLv2Parser.GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIANT() { return GetToken(SysMLv2Parser.VARIANT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public VariantUsageElementContext variantUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionElementContext definitionElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NonOccurrenceUsageElementContext nonOccurrenceUsageElement() { + return GetRuleContext(0); + } + public DefinitionBodyItemContentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionBodyItemContent; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionBodyItemContent(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionBodyItemContent(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionBodyItemContent(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionBodyItemContentContext definitionBodyItemContent() { + DefinitionBodyItemContentContext _localctx = new DefinitionBodyItemContentContext(Context, State); + EnterRule(_localctx, 392, RULE_definitionBodyItemContent); + int _la; + try { + State = 2723; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,269,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2705; + Match(ALIAS); + State = 2710; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LT) { + { + State = 2706; + Match(LT); + State = 2707; + name(); + State = 2708; + Match(GT); + } + } + + State = 2713; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6917529027641081921L) != 0)) { + { + State = 2712; + name(); + } + } + + State = 2715; + Match(FOR); + State = 2716; + qualifiedName(); + State = 2717; + relationshipBody(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2719; + Match(VARIANT); + State = 2720; + variantUsageElement(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2721; + definitionElement(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2722; + nonOccurrenceUsageElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefinitionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionElementContext definitionElement() { + return GetRuleContext(0); + } + public DefinitionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_definitionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefinitionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefinitionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefinitionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefinitionMemberContext definitionMember() { + DefinitionMemberContext _localctx = new DefinitionMemberContext(Context, State); + EnterRule(_localctx, 394, RULE_definitionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2725; + memberPrefix(); + State = 2726; + definitionElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class VariantUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIANT() { return GetToken(SysMLv2Parser.VARIANT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public VariantUsageElementContext variantUsageElement() { + return GetRuleContext(0); + } + public VariantUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_variantUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterVariantUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitVariantUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitVariantUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public VariantUsageMemberContext variantUsageMember() { + VariantUsageMemberContext _localctx = new VariantUsageMemberContext(Context, State); + EnterRule(_localctx, 396, RULE_variantUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2728; + memberPrefix(); + State = 2729; + Match(VARIANT); + State = 2730; + variantUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NonOccurrenceUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NonOccurrenceUsageElementContext nonOccurrenceUsageElement() { + return GetRuleContext(0); + } + public NonOccurrenceUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nonOccurrenceUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNonOccurrenceUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNonOccurrenceUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNonOccurrenceUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NonOccurrenceUsageMemberContext nonOccurrenceUsageMember() { + NonOccurrenceUsageMemberContext _localctx = new NonOccurrenceUsageMemberContext(Context, State); + EnterRule(_localctx, 398, RULE_nonOccurrenceUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2732; + memberPrefix(); + State = 2733; + nonOccurrenceUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StructureUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StructureUsageElementContext structureUsageElement() { + return GetRuleContext(0); + } + public StructureUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_structureUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStructureUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStructureUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStructureUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StructureUsageMemberContext structureUsageMember() { + StructureUsageMemberContext _localctx = new StructureUsageMemberContext(Context, State); + EnterRule(_localctx, 400, RULE_structureUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2735; + memberPrefix(); + State = 2736; + structureUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BehaviorUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorUsageElementContext behaviorUsageElement() { + return GetRuleContext(0); + } + public BehaviorUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_behaviorUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBehaviorUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBehaviorUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBehaviorUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BehaviorUsageMemberContext behaviorUsageMember() { + BehaviorUsageMemberContext _localctx = new BehaviorUsageMemberContext(Context, State); + EnterRule(_localctx, 402, RULE_behaviorUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2738; + memberPrefix(); + State = 2739; + behaviorUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RefPrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureDirectionContext featureDirection() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DERIVED() { return GetToken(SysMLv2Parser.DERIVED, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTANT() { return GetToken(SysMLv2Parser.CONSTANT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABSTRACT() { return GetToken(SysMLv2Parser.ABSTRACT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VARIATION() { return GetToken(SysMLv2Parser.VARIATION, 0); } + public RefPrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_refPrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRefPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRefPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRefPrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RefPrefixContext refPrefix() { + RefPrefixContext _localctx = new RefPrefixContext(Context, State); + EnterRule(_localctx, 404, RULE_refPrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2742; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & 17179869193L) != 0)) { + { + State = 2741; + featureDirection(); + } + } + + State = 2745; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DERIVED) { + { + State = 2744; + Match(DERIVED); + } + } + + State = 2748; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT || _la==VARIATION) { + { + State = 2747; + _la = TokenStream.LA(1); + if ( !(_la==ABSTRACT || _la==VARIATION) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 2751; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONSTANT) { + { + State = 2750; + Match(CONSTANT); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BasicUsagePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public RefPrefixContext refPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REF() { return GetToken(SysMLv2Parser.REF, 0); } + public BasicUsagePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_basicUsagePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBasicUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBasicUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBasicUsagePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BasicUsagePrefixContext basicUsagePrefix() { + BasicUsagePrefixContext _localctx = new BasicUsagePrefixContext(Context, State); + EnterRule(_localctx, 406, RULE_basicUsagePrefix); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2753; + refPrefix(); + State = 2755; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,274,Context) ) { + case 1: + { + State = 2754; + Match(REF); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EndUsagePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(SysMLv2Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossFeatureMemberContext ownedCrossFeatureMember() { + return GetRuleContext(0); + } + public EndUsagePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_endUsagePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEndUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEndUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEndUsagePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EndUsagePrefixContext endUsagePrefix() { + EndUsagePrefixContext _localctx = new EndUsagePrefixContext(Context, State); + EnterRule(_localctx, 408, RULE_endUsagePrefix); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2757; + Match(END); + State = 2758; + ownedCrossFeatureMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsageExtensionKeywordContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember() { + return GetRuleContext(0); + } + public UsageExtensionKeywordContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usageExtensionKeyword; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsageExtensionKeyword(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsageExtensionKeyword(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsageExtensionKeyword(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsageExtensionKeywordContext usageExtensionKeyword() { + UsageExtensionKeywordContext _localctx = new UsageExtensionKeywordContext(Context, State); + EnterRule(_localctx, 410, RULE_usageExtensionKeyword); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2760; + prefixMetadataMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UnextendedUsagePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EndUsagePrefixContext endUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BasicUsagePrefixContext basicUsagePrefix() { + return GetRuleContext(0); + } + public UnextendedUsagePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_unextendedUsagePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUnextendedUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUnextendedUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUnextendedUsagePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UnextendedUsagePrefixContext unextendedUsagePrefix() { + UnextendedUsagePrefixContext _localctx = new UnextendedUsagePrefixContext(Context, State); + EnterRule(_localctx, 412, RULE_unextendedUsagePrefix); + try { + State = 2764; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case END: + EnterOuterAlt(_localctx, 1); + { + State = 2762; + endUsagePrefix(); + } + break; + case ABSTRACT: + case ATTRIBUTE: + case BIND: + case BINDING: + case CONSTANT: + case DERIVED: + case ENUM: + case FIRST: + case IN: + case INOUT: + case OUT: + case REF: + case SUCCESSION: + case VARIATION: + case HASH: + EnterOuterAlt(_localctx, 2); + { + State = 2763; + basicUsagePrefix(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsagePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UnextendedUsagePrefixContext unextendedUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public UsagePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usagePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsagePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsagePrefixContext usagePrefix() { + UsagePrefixContext _localctx = new UsagePrefixContext(Context, State); + EnterRule(_localctx, 414, RULE_usagePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2766; + unextendedUsagePrefix(); + State = 2770; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2767; + usageExtensionKeyword(); + } + } + State = 2772; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageCompletionContext usageCompletion() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public UsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsageContext usage() { + UsageContext _localctx = new UsageContext(Context, State); + EnterRule(_localctx, 416, RULE_usage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2774; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 2773; + usageDeclaration(); + } + } + + State = 2776; + usageCompletion(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + public UsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsageDeclarationContext usageDeclaration() { + UsageDeclarationContext _localctx = new UsageDeclarationContext(Context, State); + EnterRule(_localctx, 418, RULE_usageDeclaration); + try { + State = 2783; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,279,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2778; + identification(); + State = 2780; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,278,Context) ) { + case 1: + { + State = 2779; + featureSpecializationPart(); + } + break; + } + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2782; + featureSpecializationPart(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsageCompletionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public UsageCompletionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usageCompletion; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsageCompletion(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsageCompletion(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsageCompletion(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsageCompletionContext usageCompletion() { + UsageCompletionContext _localctx = new UsageCompletionContext(Context, State); + EnterRule(_localctx, 420, RULE_usageCompletion); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2786; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 2785; + valuePart(); + } + } + + State = 2788; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UsageBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyContext definitionBody() { + return GetRuleContext(0); + } + public UsageBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_usageBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUsageBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUsageBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUsageBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UsageBodyContext usageBody() { + UsageBodyContext _localctx = new UsageBodyContext(Context, State); + EnterRule(_localctx, 422, RULE_usageBody); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2790; + definitionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefaultReferenceUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public RefPrefixContext refPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public DefaultReferenceUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_defaultReferenceUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefaultReferenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefaultReferenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefaultReferenceUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefaultReferenceUsageContext defaultReferenceUsage() { + DefaultReferenceUsageContext _localctx = new DefaultReferenceUsageContext(Context, State); + EnterRule(_localctx, 424, RULE_defaultReferenceUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2792; + refPrefix(); + State = 2793; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ReferenceUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REF() { return GetToken(SysMLv2Parser.REF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EndUsagePrefixContext endUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RefPrefixContext refPrefix() { + return GetRuleContext(0); + } + public ReferenceUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_referenceUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterReferenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitReferenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitReferenceUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ReferenceUsageContext referenceUsage() { + ReferenceUsageContext _localctx = new ReferenceUsageContext(Context, State); + EnterRule(_localctx, 426, RULE_referenceUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2797; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case END: + { + State = 2795; + endUsagePrefix(); + } + break; + case ABSTRACT: + case CONSTANT: + case DERIVED: + case IN: + case INOUT: + case OUT: + case REF: + case VARIATION: + { + State = 2796; + refPrefix(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 2799; + Match(REF); + State = 2800; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EndFeatureUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EndUsagePrefixContext endUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureDeclarationContext featureDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageCompletionContext usageCompletion() { + return GetRuleContext(0); + } + public EndFeatureUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_endFeatureUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEndFeatureUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEndFeatureUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEndFeatureUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EndFeatureUsageContext endFeatureUsage() { + EndFeatureUsageContext _localctx = new EndFeatureUsageContext(Context, State); + EnterRule(_localctx, 428, RULE_endFeatureUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2802; + endUsagePrefix(); + State = 2803; + featureDeclaration(); + State = 2804; + usageCompletion(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class VariantReferenceContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext[] featureSpecialization() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext featureSpecialization(int i) { + return GetRuleContext(i); + } + public VariantReferenceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_variantReference; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterVariantReference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitVariantReference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitVariantReference(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public VariantReferenceContext variantReference() { + VariantReferenceContext _localctx = new VariantReferenceContext(Context, State); + EnterRule(_localctx, 430, RULE_variantReference); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2806; + ownedReferenceSubsetting(); + State = 2810; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==CROSSES || _la==DEFINED || ((((_la - 125)) & ~0x3f) == 0 && ((1L << (_la - 125)) & -8067072823929077751L) != 0) || _la==COLON) { + { + { + State = 2807; + featureSpecialization(); + } + } + State = 2812; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2813; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NonOccurrenceUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ReferenceUsageContext referenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EndFeatureUsageContext endFeatureUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AttributeUsageContext attributeUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumerationUsageContext enumerationUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BindingConnectorAsUsageContext bindingConnectorAsUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionAsUsageContext successionAsUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExtendedUsageContext extendedUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefaultReferenceUsageContext defaultReferenceUsage() { + return GetRuleContext(0); + } + public NonOccurrenceUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nonOccurrenceUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNonOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNonOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNonOccurrenceUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NonOccurrenceUsageElementContext nonOccurrenceUsageElement() { + NonOccurrenceUsageElementContext _localctx = new NonOccurrenceUsageElementContext(Context, State); + EnterRule(_localctx, 432, RULE_nonOccurrenceUsageElement); + try { + State = 2823; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,283,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2815; + referenceUsage(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2816; + endFeatureUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2817; + attributeUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2818; + enumerationUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2819; + bindingConnectorAsUsage(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2820; + successionAsUsage(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2821; + extendedUsage(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2822; + defaultReferenceUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EndOccurrenceUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(SysMLv2Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsageElementContext occurrenceUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossMultiplicityMemberContext ownedCrossMultiplicityMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NONUNIQUE() { return GetToken(SysMLv2Parser.NONUNIQUE, 0); } + public EndOccurrenceUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_endOccurrenceUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEndOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEndOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEndOccurrenceUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EndOccurrenceUsageElementContext endOccurrenceUsageElement() { + EndOccurrenceUsageElementContext _localctx = new EndOccurrenceUsageElementContext(Context, State); + EnterRule(_localctx, 434, RULE_endOccurrenceUsageElement); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2825; + Match(END); + State = 2827; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 20)) & ~0x3f) == 0 && ((1L << (_la - 20)) & 36063981395247105L) != 0) || ((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & 576460889743043073L) != 0) || ((((_la - 157)) & ~0x3f) == 0 && ((1L << (_la - 157)) & 6917529027641081921L) != 0)) { + { + State = 2826; + name(); + } + } + + State = 2830; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACK) { + { + State = 2829; + ownedCrossMultiplicityMember(); + } + } + + State = 2833; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==NONUNIQUE) { + { + State = 2832; + Match(NONUNIQUE); + } + } + + State = 2835; + occurrenceUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OccurrenceUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public StructureUsageElementContext structureUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorUsageElementContext behaviorUsageElement() { + return GetRuleContext(0); + } + public OccurrenceUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_occurrenceUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOccurrenceUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OccurrenceUsageElementContext occurrenceUsageElement() { + OccurrenceUsageElementContext _localctx = new OccurrenceUsageElementContext(Context, State); + EnterRule(_localctx, 436, RULE_occurrenceUsageElement); + try { + State = 2839; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,287,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2837; + structureUsageElement(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2838; + behaviorUsageElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StructureUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsageContext occurrenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IndividualUsageContext individualUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PortionUsageContext portionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EventOccurrenceUsageContext eventOccurrenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ItemUsageContext itemUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PartUsageContext partUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewUsageContext viewUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RenderingUsageContext renderingUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PortUsageContext portUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectionUsageContext connectionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceUsageContext interfaceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AllocationUsageContext allocationUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MessageContext message() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FlowUsageContext flowUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionFlowUsageContext successionFlowUsage() { + return GetRuleContext(0); + } + public StructureUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_structureUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStructureUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStructureUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStructureUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StructureUsageElementContext structureUsageElement() { + StructureUsageElementContext _localctx = new StructureUsageElementContext(Context, State); + EnterRule(_localctx, 438, RULE_structureUsageElement); + try { + State = 2856; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,288,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2841; + occurrenceUsage(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2842; + individualUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2843; + portionUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2844; + eventOccurrenceUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2845; + itemUsage(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2846; + partUsage(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2847; + viewUsage(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2848; + renderingUsage(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2849; + portUsage(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2850; + connectionUsage(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2851; + interfaceUsage(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2852; + allocationUsage(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2853; + message(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2854; + flowUsage(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2855; + successionFlowUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BehaviorUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionUsageContext actionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationUsageContext calculationUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateUsageContext stateUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageContext constraintUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementUsageContext requirementUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConcernUsageContext concernUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseUsageContext caseUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AnalysisCaseUsageContext analysisCaseUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public VerificationCaseUsageContext verificationCaseUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UseCaseUsageContext useCaseUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewpointUsageContext viewpointUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PerformActionUsageContext performActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExhibitStateUsageContext exhibitStateUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IncludeUseCaseUsageContext includeUseCaseUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AssertConstraintUsageContext assertConstraintUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SatisfyRequirementUsageContext satisfyRequirementUsage() { + return GetRuleContext(0); + } + public BehaviorUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_behaviorUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBehaviorUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBehaviorUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBehaviorUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BehaviorUsageElementContext behaviorUsageElement() { + BehaviorUsageElementContext _localctx = new BehaviorUsageElementContext(Context, State); + EnterRule(_localctx, 440, RULE_behaviorUsageElement); + try { + State = 2874; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,289,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2858; + actionUsage(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2859; + calculationUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2860; + stateUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2861; + constraintUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2862; + requirementUsage(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2863; + concernUsage(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2864; + caseUsage(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2865; + analysisCaseUsage(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2866; + verificationCaseUsage(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2867; + useCaseUsage(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2868; + viewpointUsage(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2869; + performActionUsage(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2870; + exhibitStateUsage(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2871; + includeUseCaseUsage(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2872; + assertConstraintUsage(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 2873; + satisfyRequirementUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class VariantUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public VariantReferenceContext variantReference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ReferenceUsageContext referenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AttributeUsageContext attributeUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BindingConnectorAsUsageContext bindingConnectorAsUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionAsUsageContext successionAsUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsageContext occurrenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IndividualUsageContext individualUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PortionUsageContext portionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EventOccurrenceUsageContext eventOccurrenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ItemUsageContext itemUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PartUsageContext partUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewUsageContext viewUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RenderingUsageContext renderingUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PortUsageContext portUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectionUsageContext connectionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceUsageContext interfaceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AllocationUsageContext allocationUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MessageContext message() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FlowUsageContext flowUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionFlowUsageContext successionFlowUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorUsageElementContext behaviorUsageElement() { + return GetRuleContext(0); + } + public VariantUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_variantUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterVariantUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitVariantUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitVariantUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public VariantUsageElementContext variantUsageElement() { + VariantUsageElementContext _localctx = new VariantUsageElementContext(Context, State); + EnterRule(_localctx, 442, RULE_variantUsageElement); + try { + State = 2897; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,290,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 2876; + variantReference(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 2877; + referenceUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 2878; + attributeUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 2879; + bindingConnectorAsUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 2880; + successionAsUsage(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 2881; + occurrenceUsage(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 2882; + individualUsage(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 2883; + portionUsage(); + } + break; + case 9: + EnterOuterAlt(_localctx, 9); + { + State = 2884; + eventOccurrenceUsage(); + } + break; + case 10: + EnterOuterAlt(_localctx, 10); + { + State = 2885; + itemUsage(); + } + break; + case 11: + EnterOuterAlt(_localctx, 11); + { + State = 2886; + partUsage(); + } + break; + case 12: + EnterOuterAlt(_localctx, 12); + { + State = 2887; + viewUsage(); + } + break; + case 13: + EnterOuterAlt(_localctx, 13); + { + State = 2888; + renderingUsage(); + } + break; + case 14: + EnterOuterAlt(_localctx, 14); + { + State = 2889; + portUsage(); + } + break; + case 15: + EnterOuterAlt(_localctx, 15); + { + State = 2890; + connectionUsage(); + } + break; + case 16: + EnterOuterAlt(_localctx, 16); + { + State = 2891; + interfaceUsage(); + } + break; + case 17: + EnterOuterAlt(_localctx, 17); + { + State = 2892; + allocationUsage(); + } + break; + case 18: + EnterOuterAlt(_localctx, 18); + { + State = 2893; + message(); + } + break; + case 19: + EnterOuterAlt(_localctx, 19); + { + State = 2894; + flowUsage(); + } + break; + case 20: + EnterOuterAlt(_localctx, 20); + { + State = 2895; + successionFlowUsage(); + } + break; + case 21: + EnterOuterAlt(_localctx, 21); + { + State = 2896; + behaviorUsageElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubclassificationPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubclassificationContext[] ownedSubclassification() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedSubclassificationContext ownedSubclassification(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT() { return GetToken(SysMLv2Parser.COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SPECIALIZES() { return GetToken(SysMLv2Parser.SPECIALIZES, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + public SubclassificationPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subclassificationPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubclassificationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubclassificationPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubclassificationPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubclassificationPartContext subclassificationPart() { + SubclassificationPartContext _localctx = new SubclassificationPartContext(Context, State); + EnterRule(_localctx, 444, RULE_subclassificationPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2899; + _la = TokenStream.LA(1); + if ( !(_la==SPECIALIZES || _la==COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 2900; + ownedSubclassification(); + State = 2905; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 2901; + Match(COMMA); + State = 2902; + ownedSubclassification(); + } + } + State = 2907; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AttributeDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionPrefixContext definitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ATTRIBUTE() { return GetToken(SysMLv2Parser.ATTRIBUTE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public AttributeDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_attributeDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAttributeDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAttributeDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAttributeDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AttributeDefinitionContext attributeDefinition() { + AttributeDefinitionContext _localctx = new AttributeDefinitionContext(Context, State); + EnterRule(_localctx, 446, RULE_attributeDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2908; + definitionPrefix(); + State = 2909; + Match(ATTRIBUTE); + State = 2910; + Match(DEF); + State = 2911; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AttributeUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsagePrefixContext usagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ATTRIBUTE() { return GetToken(SysMLv2Parser.ATTRIBUTE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public AttributeUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_attributeUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAttributeUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAttributeUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAttributeUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AttributeUsageContext attributeUsage() { + AttributeUsageContext _localctx = new AttributeUsageContext(Context, State); + EnterRule(_localctx, 448, RULE_attributeUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2913; + usagePrefix(); + State = 2914; + Match(ATTRIBUTE); + State = 2915; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EnumerationDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENUM() { return GetToken(SysMLv2Parser.ENUM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumerationBodyContext enumerationBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext[] definitionExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext definitionExtensionKeyword(int i) { + return GetRuleContext(i); + } + public EnumerationDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumerationDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEnumerationDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEnumerationDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEnumerationDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EnumerationDefinitionContext enumerationDefinition() { + EnumerationDefinitionContext _localctx = new EnumerationDefinitionContext(Context, State); + EnterRule(_localctx, 450, RULE_enumerationDefinition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2920; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2917; + definitionExtensionKeyword(); + } + } + State = 2922; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2923; + Match(ENUM); + State = 2924; + Match(DEF); + State = 2925; + definitionDeclaration(); + State = 2926; + enumerationBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EnumerationBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AnnotatingMemberContext[] annotatingMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public AnnotatingMemberContext annotatingMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumerationUsageMemberContext[] enumerationUsageMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumerationUsageMemberContext enumerationUsageMember(int i) { + return GetRuleContext(i); + } + public EnumerationBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumerationBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEnumerationBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEnumerationBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEnumerationBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EnumerationBodyContext enumerationBody() { + EnumerationBodyContext _localctx = new EnumerationBodyContext(Context, State); + EnterRule(_localctx, 452, RULE_enumerationBody); + int _la; + try { + State = 2938; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 2928; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 2929; + Match(LBRACE); + State = 2934; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 306460280015028224L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -6989302461005036543L) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & 2477032576108335105L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + State = 2932; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,293,Context) ) { + case 1: + { + State = 2930; + annotatingMember(); + } + break; + case 2: + { + State = 2931; + enumerationUsageMember(); + } + break; + } + } + State = 2936; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2937; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EnumerationUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumeratedValueContext enumeratedValue() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext[] prefixMetadataMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public PrefixMetadataMemberContext prefixMetadataMember(int i) { + return GetRuleContext(i); + } + public EnumerationUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumerationUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEnumerationUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEnumerationUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEnumerationUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EnumerationUsageMemberContext enumerationUsageMember() { + EnumerationUsageMemberContext _localctx = new EnumerationUsageMemberContext(Context, State); + EnterRule(_localctx, 454, RULE_enumerationUsageMember); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2943; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2940; + prefixMetadataMember(); + } + } + State = 2945; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2946; + memberPrefix(); + State = 2947; + enumeratedValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EnumeratedValueContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENUM() { return GetToken(SysMLv2Parser.ENUM, 0); } + public EnumeratedValueContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumeratedValue; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEnumeratedValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEnumeratedValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEnumeratedValue(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EnumeratedValueContext enumeratedValue() { + EnumeratedValueContext _localctx = new EnumeratedValueContext(Context, State); + EnterRule(_localctx, 456, RULE_enumeratedValue); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2950; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ENUM) { + { + State = 2949; + Match(ENUM); + } + } + + State = 2952; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EnumerationUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsagePrefixContext usagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENUM() { return GetToken(SysMLv2Parser.ENUM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public EnumerationUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_enumerationUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEnumerationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEnumerationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEnumerationUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EnumerationUsageContext enumerationUsage() { + EnumerationUsageContext _localctx = new EnumerationUsageContext(Context, State); + EnterRule(_localctx, 458, RULE_enumerationUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2954; + usagePrefix(); + State = 2955; + Match(ENUM); + State = 2956; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OccurrenceDefinitionPrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicDefinitionPrefixContext basicDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INDIVIDUAL() { return GetToken(SysMLv2Parser.INDIVIDUAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public EmptyMultiplicityMemberContext emptyMultiplicityMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext[] definitionExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext definitionExtensionKeyword(int i) { + return GetRuleContext(i); + } + public OccurrenceDefinitionPrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_occurrenceDefinitionPrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOccurrenceDefinitionPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOccurrenceDefinitionPrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOccurrenceDefinitionPrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + OccurrenceDefinitionPrefixContext _localctx = new OccurrenceDefinitionPrefixContext(Context, State); + EnterRule(_localctx, 460, RULE_occurrenceDefinitionPrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2959; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT || _la==VARIATION) { + { + State = 2958; + basicDefinitionPrefix(); + } + } + + State = 2963; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==INDIVIDUAL) { + { + State = 2961; + Match(INDIVIDUAL); + State = 2962; + emptyMultiplicityMember(); + } + } + + State = 2968; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2965; + definitionExtensionKeyword(); + } + } + State = 2970; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OccurrenceDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OCCURRENCE() { return GetToken(SysMLv2Parser.OCCURRENCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public OccurrenceDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_occurrenceDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOccurrenceDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOccurrenceDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOccurrenceDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OccurrenceDefinitionContext occurrenceDefinition() { + OccurrenceDefinitionContext _localctx = new OccurrenceDefinitionContext(Context, State); + EnterRule(_localctx, 462, RULE_occurrenceDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2971; + occurrenceDefinitionPrefix(); + State = 2972; + Match(OCCURRENCE); + State = 2973; + Match(DEF); + State = 2974; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IndividualDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INDIVIDUAL() { return GetToken(SysMLv2Parser.INDIVIDUAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EmptyMultiplicityMemberContext emptyMultiplicityMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BasicDefinitionPrefixContext basicDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext[] definitionExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext definitionExtensionKeyword(int i) { + return GetRuleContext(i); + } + public IndividualDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_individualDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIndividualDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIndividualDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIndividualDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IndividualDefinitionContext individualDefinition() { + IndividualDefinitionContext _localctx = new IndividualDefinitionContext(Context, State); + EnterRule(_localctx, 464, RULE_individualDefinition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2977; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT || _la==VARIATION) { + { + State = 2976; + basicDefinitionPrefix(); + } + } + + State = 2979; + Match(INDIVIDUAL); + State = 2983; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2980; + definitionExtensionKeyword(); + } + } + State = 2985; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 2986; + Match(DEF); + State = 2987; + definition(); + State = 2988; + emptyMultiplicityMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyMultiplicityMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyMultiplicity_Context emptyMultiplicity_() { + return GetRuleContext(0); + } + public EmptyMultiplicityMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyMultiplicityMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyMultiplicityMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyMultiplicityMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyMultiplicityMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyMultiplicityMemberContext emptyMultiplicityMember() { + EmptyMultiplicityMemberContext _localctx = new EmptyMultiplicityMemberContext(Context, State); + EnterRule(_localctx, 466, RULE_emptyMultiplicityMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 2990; + emptyMultiplicity_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OccurrenceUsagePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicUsagePrefixContext basicUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INDIVIDUAL() { return GetToken(SysMLv2Parser.INDIVIDUAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PortionKindContext portionKind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public OccurrenceUsagePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_occurrenceUsagePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOccurrenceUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOccurrenceUsagePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOccurrenceUsagePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + OccurrenceUsagePrefixContext _localctx = new OccurrenceUsagePrefixContext(Context, State); + EnterRule(_localctx, 468, RULE_occurrenceUsagePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 2992; + basicUsagePrefix(); + State = 2994; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==INDIVIDUAL) { + { + State = 2993; + Match(INDIVIDUAL); + } + } + + State = 2997; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SNAPSHOT || _la==TIMESLICE) { + { + State = 2996; + portionKind(); + } + } + + State = 3002; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 2999; + usageExtensionKeyword(); + } + } + State = 3004; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class OccurrenceUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OCCURRENCE() { return GetToken(SysMLv2Parser.OCCURRENCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public OccurrenceUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_occurrenceUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterOccurrenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitOccurrenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitOccurrenceUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public OccurrenceUsageContext occurrenceUsage() { + OccurrenceUsageContext _localctx = new OccurrenceUsageContext(Context, State); + EnterRule(_localctx, 470, RULE_occurrenceUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3005; + occurrenceUsagePrefix(); + State = 3006; + Match(OCCURRENCE); + State = 3007; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IndividualUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicUsagePrefixContext basicUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INDIVIDUAL() { return GetToken(SysMLv2Parser.INDIVIDUAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public IndividualUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_individualUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIndividualUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIndividualUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIndividualUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IndividualUsageContext individualUsage() { + IndividualUsageContext _localctx = new IndividualUsageContext(Context, State); + EnterRule(_localctx, 472, RULE_individualUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3009; + basicUsagePrefix(); + State = 3010; + Match(INDIVIDUAL); + State = 3014; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 3011; + usageExtensionKeyword(); + } + } + State = 3016; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3017; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PortionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BasicUsagePrefixContext basicUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PortionKindContext portionKind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INDIVIDUAL() { return GetToken(SysMLv2Parser.INDIVIDUAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public PortionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_portionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPortionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPortionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPortionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PortionUsageContext portionUsage() { + PortionUsageContext _localctx = new PortionUsageContext(Context, State); + EnterRule(_localctx, 474, RULE_portionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3019; + basicUsagePrefix(); + State = 3021; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==INDIVIDUAL) { + { + State = 3020; + Match(INDIVIDUAL); + } + } + + State = 3023; + portionKind(); + State = 3027; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 3024; + usageExtensionKeyword(); + } + } + State = 3029; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3030; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PortionKindContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SNAPSHOT() { return GetToken(SysMLv2Parser.SNAPSHOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TIMESLICE() { return GetToken(SysMLv2Parser.TIMESLICE, 0); } + public PortionKindContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_portionKind; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPortionKind(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPortionKind(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPortionKind(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PortionKindContext portionKind() { + PortionKindContext _localctx = new PortionKindContext(Context, State); + EnterRule(_localctx, 476, RULE_portionKind); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3032; + _la = TokenStream.LA(1); + if ( !(_la==SNAPSHOT || _la==TIMESLICE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EventOccurrenceUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EVENT() { return GetToken(SysMLv2Parser.EVENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageCompletionContext usageCompletion() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OCCURRENCE() { return GetToken(SysMLv2Parser.OCCURRENCE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public EventOccurrenceUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_eventOccurrenceUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEventOccurrenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEventOccurrenceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEventOccurrenceUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EventOccurrenceUsageContext eventOccurrenceUsage() { + EventOccurrenceUsageContext _localctx = new EventOccurrenceUsageContext(Context, State); + EnterRule(_localctx, 478, RULE_eventOccurrenceUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3034; + occurrenceUsagePrefix(); + State = 3035; + Match(EVENT); + State = 3044; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 3036; + ownedReferenceSubsetting(); + State = 3038; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 3037; + featureSpecializationPart(); + } + } + + } + break; + case OCCURRENCE: + { + State = 3040; + Match(OCCURRENCE); + State = 3042; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3041; + usageDeclaration(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + State = 3046; + usageCompletion(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SourceSuccessionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SourceSuccessionContext sourceSuccession() { + return GetRuleContext(0); + } + public SourceSuccessionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sourceSuccessionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSourceSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSourceSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSourceSuccessionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SourceSuccessionMemberContext sourceSuccessionMember() { + SourceSuccessionMemberContext _localctx = new SourceSuccessionMemberContext(Context, State); + EnterRule(_localctx, 480, RULE_sourceSuccessionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3048; + Match(THEN); + State = 3049; + sourceSuccession(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SourceSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SourceEndMemberContext sourceEndMember() { + return GetRuleContext(0); + } + public SourceSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sourceSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSourceSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSourceSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSourceSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SourceSuccessionContext sourceSuccession() { + SourceSuccessionContext _localctx = new SourceSuccessionContext(Context, State); + EnterRule(_localctx, 482, RULE_sourceSuccession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3051; + sourceEndMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SourceEndMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SourceEndContext sourceEnd() { + return GetRuleContext(0); + } + public SourceEndMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sourceEndMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSourceEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSourceEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSourceEndMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SourceEndMemberContext sourceEndMember() { + SourceEndMemberContext _localctx = new SourceEndMemberContext(Context, State); + EnterRule(_localctx, 484, RULE_sourceEndMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3053; + sourceEnd(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SourceEndContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedMultiplicityContext ownedMultiplicity() { + return GetRuleContext(0); + } + public SourceEndContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sourceEnd; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSourceEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSourceEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSourceEnd(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SourceEndContext sourceEnd() { + SourceEndContext _localctx = new SourceEndContext(Context, State); + EnterRule(_localctx, 486, RULE_sourceEnd); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3056; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,312,Context) ) { + case 1: + { + State = 3055; + ownedMultiplicity(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ItemDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ITEM() { return GetToken(SysMLv2Parser.ITEM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public ItemDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_itemDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterItemDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitItemDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitItemDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ItemDefinitionContext itemDefinition() { + ItemDefinitionContext _localctx = new ItemDefinitionContext(Context, State); + EnterRule(_localctx, 488, RULE_itemDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3058; + occurrenceDefinitionPrefix(); + State = 3059; + Match(ITEM); + State = 3060; + Match(DEF); + State = 3061; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ItemUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ITEM() { return GetToken(SysMLv2Parser.ITEM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public ItemUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_itemUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterItemUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitItemUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitItemUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ItemUsageContext itemUsage() { + ItemUsageContext _localctx = new ItemUsageContext(Context, State); + EnterRule(_localctx, 490, RULE_itemUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3063; + occurrenceUsagePrefix(); + State = 3064; + Match(ITEM); + State = 3065; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PartDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PART() { return GetToken(SysMLv2Parser.PART, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public PartDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_partDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPartDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPartDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPartDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PartDefinitionContext partDefinition() { + PartDefinitionContext _localctx = new PartDefinitionContext(Context, State); + EnterRule(_localctx, 492, RULE_partDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3067; + occurrenceDefinitionPrefix(); + State = 3068; + Match(PART); + State = 3069; + Match(DEF); + State = 3070; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PartUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PART() { return GetToken(SysMLv2Parser.PART, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public PartUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_partUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPartUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPartUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPartUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PartUsageContext partUsage() { + PartUsageContext _localctx = new PartUsageContext(Context, State); + EnterRule(_localctx, 494, RULE_partUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3072; + occurrenceUsagePrefix(); + State = 3073; + Match(PART); + State = 3074; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PortDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionPrefixContext definitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PORT() { return GetToken(SysMLv2Parser.PORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConjugatedPortDefinitionMemberContext conjugatedPortDefinitionMember() { + return GetRuleContext(0); + } + public PortDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_portDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPortDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPortDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPortDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PortDefinitionContext portDefinition() { + PortDefinitionContext _localctx = new PortDefinitionContext(Context, State); + EnterRule(_localctx, 496, RULE_portDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3076; + definitionPrefix(); + State = 3077; + Match(PORT); + State = 3078; + Match(DEF); + State = 3079; + definition(); + State = 3080; + conjugatedPortDefinitionMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConjugatedPortDefinitionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ConjugatedPortDefinitionContext conjugatedPortDefinition() { + return GetRuleContext(0); + } + public ConjugatedPortDefinitionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conjugatedPortDefinitionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConjugatedPortDefinitionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConjugatedPortDefinitionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConjugatedPortDefinitionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConjugatedPortDefinitionMemberContext conjugatedPortDefinitionMember() { + ConjugatedPortDefinitionMemberContext _localctx = new ConjugatedPortDefinitionMemberContext(Context, State); + EnterRule(_localctx, 498, RULE_conjugatedPortDefinitionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3082; + conjugatedPortDefinition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConjugatedPortDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PortConjugationContext portConjugation() { + return GetRuleContext(0); + } + public ConjugatedPortDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conjugatedPortDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConjugatedPortDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConjugatedPortDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConjugatedPortDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConjugatedPortDefinitionContext conjugatedPortDefinition() { + ConjugatedPortDefinitionContext _localctx = new ConjugatedPortDefinitionContext(Context, State); + EnterRule(_localctx, 500, RULE_conjugatedPortDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3084; + portConjugation(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PortUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PORT() { return GetToken(SysMLv2Parser.PORT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public PortUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_portUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPortUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPortUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPortUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PortUsageContext portUsage() { + PortUsageContext _localctx = new PortUsageContext(Context, State); + EnterRule(_localctx, 502, RULE_portUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3086; + occurrenceUsagePrefix(); + State = 3087; + Match(PORT); + State = 3088; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConjugatedPortTypingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(SysMLv2Parser.TILDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + public ConjugatedPortTypingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_conjugatedPortTyping; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConjugatedPortTyping(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConjugatedPortTyping(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConjugatedPortTyping(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConjugatedPortTypingContext conjugatedPortTyping() { + ConjugatedPortTypingContext _localctx = new ConjugatedPortTypingContext(Context, State); + EnterRule(_localctx, 504, RULE_conjugatedPortTyping); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3090; + Match(TILDE); + State = 3091; + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectionDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONNECTION() { return GetToken(SysMLv2Parser.CONNECTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public ConnectionDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connectionDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnectionDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnectionDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnectionDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectionDefinitionContext connectionDefinition() { + ConnectionDefinitionContext _localctx = new ConnectionDefinitionContext(Context, State); + EnterRule(_localctx, 506, RULE_connectionDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3093; + occurrenceDefinitionPrefix(); + State = 3094; + Match(CONNECTION); + State = 3095; + Match(DEF); + State = 3096; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONNECTION() { return GetToken(SysMLv2Parser.CONNECTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONNECT() { return GetToken(SysMLv2Parser.CONNECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorPartContext connectorPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public ConnectionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connectionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnectionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnectionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnectionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectionUsageContext connectionUsage() { + ConnectionUsageContext _localctx = new ConnectionUsageContext(Context, State); + EnterRule(_localctx, 508, RULE_connectionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3098; + occurrenceUsagePrefix(); + State = 3112; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case CONNECTION: + { + State = 3099; + Match(CONNECTION); + State = 3101; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3100; + usageDeclaration(); + } + } + + State = 3104; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 3103; + valuePart(); + } + } + + State = 3108; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONNECT) { + { + State = 3106; + Match(CONNECT); + State = 3107; + connectorPart(); + } + } + + } + break; + case CONNECT: + { + State = 3110; + Match(CONNECT); + State = 3111; + connectorPart(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 3114; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConnectorPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BinaryConnectorPartContext binaryConnectorPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NaryConnectorPartContext naryConnectorPart() { + return GetRuleContext(0); + } + public ConnectorPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_connectorPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConnectorPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConnectorPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConnectorPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConnectorPartContext connectorPart() { + ConnectorPartContext _localctx = new ConnectorPartContext(Context, State); + EnterRule(_localctx, 510, RULE_connectorPart); + try { + State = 3118; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case LBRACK: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 1); + { + State = 3116; + binaryConnectorPart(); + } + break; + case LPAREN: + EnterOuterAlt(_localctx, 2); + { + State = 3117; + naryConnectorPart(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BinaryConnectorPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + public BinaryConnectorPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_binaryConnectorPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBinaryConnectorPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBinaryConnectorPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBinaryConnectorPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BinaryConnectorPartContext binaryConnectorPart() { + BinaryConnectorPartContext _localctx = new BinaryConnectorPartContext(Context, State); + EnterRule(_localctx, 512, RULE_binaryConnectorPart); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3120; + connectorEndMember(); + State = 3121; + Match(TO); + State = 3122; + connectorEndMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NaryConnectorPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + public NaryConnectorPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_naryConnectorPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNaryConnectorPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNaryConnectorPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNaryConnectorPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NaryConnectorPartContext naryConnectorPart() { + NaryConnectorPartContext _localctx = new NaryConnectorPartContext(Context, State); + EnterRule(_localctx, 514, RULE_naryConnectorPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3124; + Match(LPAREN); + State = 3125; + connectorEndMember(); + State = 3126; + Match(COMMA); + State = 3127; + connectorEndMember(); + State = 3132; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 3128; + Match(COMMA); + State = 3129; + connectorEndMember(); + } + } + State = 3134; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3135; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BindingConnectorAsUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsagePrefixContext usagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BIND() { return GetToken(SysMLv2Parser.BIND, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EQ() { return GetToken(SysMLv2Parser.EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BINDING() { return GetToken(SysMLv2Parser.BINDING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public BindingConnectorAsUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_bindingConnectorAsUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBindingConnectorAsUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBindingConnectorAsUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBindingConnectorAsUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BindingConnectorAsUsageContext bindingConnectorAsUsage() { + BindingConnectorAsUsageContext _localctx = new BindingConnectorAsUsageContext(Context, State); + EnterRule(_localctx, 516, RULE_bindingConnectorAsUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3137; + usagePrefix(); + State = 3142; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BINDING) { + { + State = 3138; + Match(BINDING); + State = 3140; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3139; + usageDeclaration(); + } + } + + } + } + + State = 3144; + Match(BIND); + State = 3145; + connectorEndMember(); + State = 3146; + Match(EQ); + State = 3147; + connectorEndMember(); + State = 3148; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuccessionAsUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsagePrefixContext usagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FIRST() { return GetToken(SysMLv2Parser.FIRST, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext[] connectorEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUCCESSION() { return GetToken(SysMLv2Parser.SUCCESSION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public SuccessionAsUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_successionAsUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSuccessionAsUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSuccessionAsUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuccessionAsUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuccessionAsUsageContext successionAsUsage() { + SuccessionAsUsageContext _localctx = new SuccessionAsUsageContext(Context, State); + EnterRule(_localctx, 518, RULE_successionAsUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3150; + usagePrefix(); + State = 3155; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SUCCESSION) { + { + State = 3151; + Match(SUCCESSION); + State = 3153; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3152; + usageDeclaration(); + } + } + + } + } + + State = 3157; + Match(FIRST); + State = 3158; + connectorEndMember(); + State = 3159; + Match(THEN); + State = 3160; + connectorEndMember(); + State = 3161; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTERFACE() { return GetToken(SysMLv2Parser.INTERFACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceBodyContext interfaceBody() { + return GetRuleContext(0); + } + public InterfaceDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceDefinitionContext interfaceDefinition() { + InterfaceDefinitionContext _localctx = new InterfaceDefinitionContext(Context, State); + EnterRule(_localctx, 520, RULE_interfaceDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3163; + occurrenceDefinitionPrefix(); + State = 3164; + Match(INTERFACE); + State = 3165; + Match(DEF); + State = 3166; + definitionDeclaration(); + State = 3167; + interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceBodyItemContext[] interfaceBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceBodyItemContext interfaceBodyItem(int i) { + return GetRuleContext(i); + } + public InterfaceBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceBodyContext interfaceBody() { + InterfaceBodyContext _localctx = new InterfaceBodyContext(Context, State); + EnterRule(_localctx, 522, RULE_interfaceBody); + int _la; + try { + State = 3178; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 3169; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 3170; + Match(LBRACE); + State = 3174; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108532560709045908L) != 0) || ((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & 7270888160215792643L) != 0) || ((((_la - 133)) & ~0x3f) == 0 && ((1L << (_la - 133)) & 576460974032814869L) != 0) || _la==AT_SIGN || _la==REGULAR_COMMENT) { + { + { + State = 3171; + interfaceBodyItem(); + } + } + State = 3176; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3177; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionMemberContext definitionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public VariantUsageMemberContext variantUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceNonOccurrenceUsageMemberContext interfaceNonOccurrenceUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceOccurrenceUsageMemberContext interfaceOccurrenceUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SourceSuccessionMemberContext sourceSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + public InterfaceBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceBodyItemContext interfaceBodyItem() { + InterfaceBodyItemContext _localctx = new InterfaceBodyItemContext(Context, State); + EnterRule(_localctx, 524, RULE_interfaceBodyItem); + int _la; + try { + State = 3189; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,326,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3180; + definitionMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3181; + variantUsageMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3182; + interfaceNonOccurrenceUsageMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3184; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==THEN) { + { + State = 3183; + sourceSuccessionMember(); + } + } + + State = 3186; + interfaceOccurrenceUsageMember(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3187; + aliasMember(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 3188; + importRule(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceNonOccurrenceUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceNonOccurrenceUsageElementContext interfaceNonOccurrenceUsageElement() { + return GetRuleContext(0); + } + public InterfaceNonOccurrenceUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceNonOccurrenceUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceNonOccurrenceUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceNonOccurrenceUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceNonOccurrenceUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceNonOccurrenceUsageMemberContext interfaceNonOccurrenceUsageMember() { + InterfaceNonOccurrenceUsageMemberContext _localctx = new InterfaceNonOccurrenceUsageMemberContext(Context, State); + EnterRule(_localctx, 526, RULE_interfaceNonOccurrenceUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3191; + memberPrefix(); + State = 3192; + interfaceNonOccurrenceUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceNonOccurrenceUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ReferenceUsageContext referenceUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AttributeUsageContext attributeUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EnumerationUsageContext enumerationUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BindingConnectorAsUsageContext bindingConnectorAsUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SuccessionAsUsageContext successionAsUsage() { + return GetRuleContext(0); + } + public InterfaceNonOccurrenceUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceNonOccurrenceUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceNonOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceNonOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceNonOccurrenceUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceNonOccurrenceUsageElementContext interfaceNonOccurrenceUsageElement() { + InterfaceNonOccurrenceUsageElementContext _localctx = new InterfaceNonOccurrenceUsageElementContext(Context, State); + EnterRule(_localctx, 528, RULE_interfaceNonOccurrenceUsageElement); + try { + State = 3199; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,327,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3194; + referenceUsage(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3195; + attributeUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3196; + enumerationUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3197; + bindingConnectorAsUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3198; + successionAsUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceOccurrenceUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceOccurrenceUsageElementContext interfaceOccurrenceUsageElement() { + return GetRuleContext(0); + } + public InterfaceOccurrenceUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceOccurrenceUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceOccurrenceUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceOccurrenceUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceOccurrenceUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceOccurrenceUsageMemberContext interfaceOccurrenceUsageMember() { + InterfaceOccurrenceUsageMemberContext _localctx = new InterfaceOccurrenceUsageMemberContext(Context, State); + EnterRule(_localctx, 530, RULE_interfaceOccurrenceUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3201; + memberPrefix(); + State = 3202; + interfaceOccurrenceUsageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceOccurrenceUsageElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefaultInterfaceEndContext defaultInterfaceEnd() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EndOccurrenceUsageElementContext endOccurrenceUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StructureUsageElementContext structureUsageElement() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorUsageElementContext behaviorUsageElement() { + return GetRuleContext(0); + } + public InterfaceOccurrenceUsageElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceOccurrenceUsageElement; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceOccurrenceUsageElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceOccurrenceUsageElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceOccurrenceUsageElementContext interfaceOccurrenceUsageElement() { + InterfaceOccurrenceUsageElementContext _localctx = new InterfaceOccurrenceUsageElementContext(Context, State); + EnterRule(_localctx, 532, RULE_interfaceOccurrenceUsageElement); + try { + State = 3208; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,328,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3204; + defaultInterfaceEnd(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3205; + endOccurrenceUsageElement(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3206; + structureUsageElement(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3207; + behaviorUsageElement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefaultInterfaceEndContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode END() { return GetToken(SysMLv2Parser.END, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public DefaultInterfaceEndContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_defaultInterfaceEnd; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefaultInterfaceEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefaultInterfaceEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefaultInterfaceEnd(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefaultInterfaceEndContext defaultInterfaceEnd() { + DefaultInterfaceEndContext _localctx = new DefaultInterfaceEndContext(Context, State); + EnterRule(_localctx, 534, RULE_defaultInterfaceEnd); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3210; + Match(END); + State = 3211; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INTERFACE() { return GetToken(SysMLv2Parser.INTERFACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceUsageDeclarationContext interfaceUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceBodyContext interfaceBody() { + return GetRuleContext(0); + } + public InterfaceUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceUsageContext interfaceUsage() { + InterfaceUsageContext _localctx = new InterfaceUsageContext(Context, State); + EnterRule(_localctx, 536, RULE_interfaceUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3213; + occurrenceUsagePrefix(); + State = 3214; + Match(INTERFACE); + State = 3215; + interfaceUsageDeclaration(); + State = 3216; + interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONNECT() { return GetToken(SysMLv2Parser.CONNECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public InterfacePartContext interfacePart() { + return GetRuleContext(0); + } + public InterfaceUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceUsageDeclarationContext interfaceUsageDeclaration() { + InterfaceUsageDeclarationContext _localctx = new InterfaceUsageDeclarationContext(Context, State); + EnterRule(_localctx, 538, RULE_interfaceUsageDeclaration); + int _la; + try { + State = 3229; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,332,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3219; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3218; + usageDeclaration(); + } + } + + State = 3222; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 3221; + valuePart(); + } + } + + State = 3226; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CONNECT) { + { + State = 3224; + Match(CONNECT); + State = 3225; + interfacePart(); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3228; + interfacePart(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfacePartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public BinaryInterfacePartContext binaryInterfacePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NaryInterfacePartContext naryInterfacePart() { + return GetRuleContext(0); + } + public InterfacePartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfacePart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfacePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfacePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfacePart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfacePartContext interfacePart() { + InterfacePartContext _localctx = new InterfacePartContext(Context, State); + EnterRule(_localctx, 540, RULE_interfacePart); + try { + State = 3233; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case LBRACK: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 1); + { + State = 3231; + binaryInterfacePart(); + } + break; + case LPAREN: + EnterOuterAlt(_localctx, 2); + { + State = 3232; + naryInterfacePart(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class BinaryInterfacePartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public InterfaceEndMemberContext[] interfaceEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceEndMemberContext interfaceEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + public BinaryInterfacePartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_binaryInterfacePart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterBinaryInterfacePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitBinaryInterfacePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitBinaryInterfacePart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public BinaryInterfacePartContext binaryInterfacePart() { + BinaryInterfacePartContext _localctx = new BinaryInterfacePartContext(Context, State); + EnterRule(_localctx, 542, RULE_binaryInterfacePart); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3235; + interfaceEndMember(); + State = 3236; + Match(TO); + State = 3237; + interfaceEndMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NaryInterfacePartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(SysMLv2Parser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceEndMemberContext[] interfaceEndMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public InterfaceEndMemberContext interfaceEndMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COMMA() { return GetTokens(SysMLv2Parser.COMMA); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COMMA(int i) { + return GetToken(SysMLv2Parser.COMMA, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(SysMLv2Parser.RPAREN, 0); } + public NaryInterfacePartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_naryInterfacePart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNaryInterfacePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNaryInterfacePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNaryInterfacePart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NaryInterfacePartContext naryInterfacePart() { + NaryInterfacePartContext _localctx = new NaryInterfacePartContext(Context, State); + EnterRule(_localctx, 544, RULE_naryInterfacePart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3239; + Match(LPAREN); + State = 3240; + interfaceEndMember(); + State = 3241; + Match(COMMA); + State = 3242; + interfaceEndMember(); + State = 3247; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==COMMA) { + { + { + State = 3243; + Match(COMMA); + State = 3244; + interfaceEndMember(); + } + } + State = 3249; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3250; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceEndMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public InterfaceEndContext interfaceEnd() { + return GetRuleContext(0); + } + public InterfaceEndMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceEndMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceEndMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceEndMemberContext interfaceEndMember() { + InterfaceEndMemberContext _localctx = new InterfaceEndMemberContext(Context, State); + EnterRule(_localctx, 546, RULE_interfaceEndMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3252; + interfaceEnd(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InterfaceEndContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedCrossMultiplicityMemberContext ownedCrossMultiplicityMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NameContext name() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON_GT() { return GetToken(SysMLv2Parser.COLON_COLON_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REFERENCES() { return GetToken(SysMLv2Parser.REFERENCES, 0); } + public InterfaceEndContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_interfaceEnd; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInterfaceEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInterfaceEnd(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInterfaceEnd(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InterfaceEndContext interfaceEnd() { + InterfaceEndContext _localctx = new InterfaceEndContext(Context, State); + EnterRule(_localctx, 548, RULE_interfaceEnd); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3255; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACK) { + { + State = 3254; + ownedCrossMultiplicityMember(); + } + } + + State = 3260; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,336,Context) ) { + case 1: + { + State = 3257; + name(); + State = 3258; + _la = TokenStream.LA(1); + if ( !(_la==REFERENCES || _la==COLON_COLON_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + break; + } + State = 3262; + ownedReferenceSubsetting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AllocationDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALLOCATION() { return GetToken(SysMLv2Parser.ALLOCATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public AllocationDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_allocationDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAllocationDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAllocationDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAllocationDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AllocationDefinitionContext allocationDefinition() { + AllocationDefinitionContext _localctx = new AllocationDefinitionContext(Context, State); + EnterRule(_localctx, 550, RULE_allocationDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3264; + occurrenceDefinitionPrefix(); + State = 3265; + Match(ALLOCATION); + State = 3266; + Match(DEF); + State = 3267; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AllocationUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AllocationUsageDeclarationContext allocationUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + public AllocationUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_allocationUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAllocationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAllocationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAllocationUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AllocationUsageContext allocationUsage() { + AllocationUsageContext _localctx = new AllocationUsageContext(Context, State); + EnterRule(_localctx, 552, RULE_allocationUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3269; + occurrenceUsagePrefix(); + State = 3270; + allocationUsageDeclaration(); + State = 3271; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AllocationUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALLOCATION() { return GetToken(SysMLv2Parser.ALLOCATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ALLOCATE() { return GetToken(SysMLv2Parser.ALLOCATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorPartContext connectorPart() { + return GetRuleContext(0); + } + public AllocationUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_allocationUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAllocationUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAllocationUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAllocationUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AllocationUsageDeclarationContext allocationUsageDeclaration() { + AllocationUsageDeclarationContext _localctx = new AllocationUsageDeclarationContext(Context, State); + EnterRule(_localctx, 554, RULE_allocationUsageDeclaration); + int _la; + try { + State = 3283; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ALLOCATION: + EnterOuterAlt(_localctx, 1); + { + State = 3273; + Match(ALLOCATION); + State = 3275; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3274; + usageDeclaration(); + } + } + + State = 3279; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ALLOCATE) { + { + State = 3277; + Match(ALLOCATE); + State = 3278; + connectorPart(); + } + } + + } + break; + case ALLOCATE: + EnterOuterAlt(_localctx, 2); + { + State = 3281; + Match(ALLOCATE); + State = 3282; + connectorPart(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FLOW() { return GetToken(SysMLv2Parser.FLOW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public FlowDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowDefinitionContext flowDefinition() { + FlowDefinitionContext _localctx = new FlowDefinitionContext(Context, State); + EnterRule(_localctx, 556, RULE_flowDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3285; + occurrenceDefinitionPrefix(); + State = 3286; + Match(FLOW); + State = 3287; + Match(DEF); + State = 3288; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MessageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MESSAGE() { return GetToken(SysMLv2Parser.MESSAGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public MessageDeclarationContext messageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyContext definitionBody() { + return GetRuleContext(0); + } + public MessageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_message; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMessage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMessage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMessage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MessageContext message() { + MessageContext _localctx = new MessageContext(Context, State); + EnterRule(_localctx, 558, RULE_message); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3290; + occurrenceUsagePrefix(); + State = 3291; + Match(MESSAGE); + State = 3292; + messageDeclaration(); + State = 3293; + definitionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MessageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OF() { return GetToken(SysMLv2Parser.OF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FlowPayloadFeatureMemberContext flowPayloadFeatureMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FROM() { return GetToken(SysMLv2Parser.FROM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public MessageEventMemberContext[] messageEventMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public MessageEventMemberContext messageEventMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + public MessageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_messageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMessageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMessageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMessageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MessageDeclarationContext messageDeclaration() { + MessageDeclarationContext _localctx = new MessageDeclarationContext(Context, State); + EnterRule(_localctx, 560, RULE_messageDeclaration); + int _la; + try { + State = 3316; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,344,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3296; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3295; + usageDeclaration(); + } + } + + State = 3299; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 3298; + valuePart(); + } + } + + State = 3303; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==OF) { + { + State = 3301; + Match(OF); + State = 3302; + flowPayloadFeatureMember(); + } + } + + State = 3310; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==FROM) { + { + State = 3305; + Match(FROM); + State = 3306; + messageEventMember(); + State = 3307; + Match(TO); + State = 3308; + messageEventMember(); + } + } + + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3312; + messageEventMember(); + State = 3313; + Match(TO); + State = 3314; + messageEventMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MessageEventMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MessageEventContext messageEvent() { + return GetRuleContext(0); + } + public MessageEventMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_messageEventMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMessageEventMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMessageEventMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMessageEventMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MessageEventMemberContext messageEventMember() { + MessageEventMemberContext _localctx = new MessageEventMemberContext(Context, State); + EnterRule(_localctx, 562, RULE_messageEventMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3318; + messageEvent(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MessageEventContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + public MessageEventContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_messageEvent; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMessageEvent(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMessageEvent(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMessageEvent(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MessageEventContext messageEvent() { + MessageEventContext _localctx = new MessageEventContext(Context, State); + EnterRule(_localctx, 564, RULE_messageEvent); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3320; + ownedReferenceSubsetting(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FLOW() { return GetToken(SysMLv2Parser.FLOW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FlowDeclarationContext flowDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyContext definitionBody() { + return GetRuleContext(0); + } + public FlowUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowUsageContext flowUsage() { + FlowUsageContext _localctx = new FlowUsageContext(Context, State); + EnterRule(_localctx, 566, RULE_flowUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3322; + occurrenceUsagePrefix(); + State = 3323; + Match(FLOW); + State = 3324; + flowDeclaration(); + State = 3325; + definitionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SuccessionFlowUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUCCESSION() { return GetToken(SysMLv2Parser.SUCCESSION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FLOW() { return GetToken(SysMLv2Parser.FLOW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FlowDeclarationContext flowDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyContext definitionBody() { + return GetRuleContext(0); + } + public SuccessionFlowUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_successionFlowUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSuccessionFlowUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSuccessionFlowUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuccessionFlowUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SuccessionFlowUsageContext successionFlowUsage() { + SuccessionFlowUsageContext _localctx = new SuccessionFlowUsageContext(Context, State); + EnterRule(_localctx, 568, RULE_successionFlowUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3327; + occurrenceUsagePrefix(); + State = 3328; + Match(SUCCESSION); + State = 3329; + Match(FLOW); + State = 3330; + flowDeclaration(); + State = 3331; + definitionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowPayloadFeatureMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FlowPayloadFeatureContext flowPayloadFeature() { + return GetRuleContext(0); + } + public FlowPayloadFeatureMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowPayloadFeatureMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowPayloadFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowPayloadFeatureMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowPayloadFeatureMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowPayloadFeatureMemberContext flowPayloadFeatureMember() { + FlowPayloadFeatureMemberContext _localctx = new FlowPayloadFeatureMemberContext(Context, State); + EnterRule(_localctx, 570, RULE_flowPayloadFeatureMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3333; + flowPayloadFeature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FlowPayloadFeatureContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PayloadFeatureContext payloadFeature() { + return GetRuleContext(0); + } + public FlowPayloadFeatureContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_flowPayloadFeature; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFlowPayloadFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFlowPayloadFeature(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFlowPayloadFeature(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FlowPayloadFeatureContext flowPayloadFeature() { + FlowPayloadFeatureContext _localctx = new FlowPayloadFeatureContext(Context, State); + EnterRule(_localctx, 572, RULE_flowPayloadFeature); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3335; + payloadFeature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACTION() { return GetToken(SysMLv2Parser.ACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public ActionDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionDefinitionContext actionDefinition() { + ActionDefinitionContext _localctx = new ActionDefinitionContext(Context, State); + EnterRule(_localctx, 574, RULE_actionDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3337; + occurrenceDefinitionPrefix(); + State = 3338; + Match(ACTION); + State = 3339; + Match(DEF); + State = 3340; + definitionDeclaration(); + State = 3341; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext[] actionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem(int i) { + return GetRuleContext(i); + } + public ActionBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionBodyContext actionBody() { + ActionBodyContext _localctx = new ActionBodyContext(Context, State); + EnterRule(_localctx, 576, RULE_actionBody); + int _la; + try { + State = 3352; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 3343; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 3344; + Match(LBRACE); + State = 3348; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108765657175215772L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362784250145551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954071324100409579L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3345; + actionBodyItem(); + } + } + State = 3350; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3351; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonBehaviorBodyItemContext nonBehaviorBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public InitialNodeMemberContext initialNodeMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionTargetSuccessionMemberContext[] actionTargetSuccessionMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionTargetSuccessionMemberContext actionTargetSuccessionMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBehaviorMemberContext actionBehaviorMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SourceSuccessionMemberContext sourceSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GuardedSuccessionMemberContext guardedSuccessionMember() { + return GetRuleContext(0); + } + public ActionBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionBodyItemContext actionBodyItem() { + ActionBodyItemContext _localctx = new ActionBodyItemContext(Context, State); + EnterRule(_localctx, 578, RULE_actionBodyItem); + int _la; + try { + int _alt; + State = 3373; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,350,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3354; + nonBehaviorBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3355; + initialNodeMember(); + State = 3359; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,347,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 3356; + actionTargetSuccessionMember(); + } + } + } + State = 3361; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,347,Context); + } + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3363; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==THEN) { + { + State = 3362; + sourceSuccessionMember(); + } + } + + State = 3365; + actionBehaviorMember(); + State = 3369; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,349,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 3366; + actionTargetSuccessionMember(); + } + } + } + State = 3371; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,349,Context); + } + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3372; + guardedSuccessionMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NonBehaviorBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ImportRuleContext importRule() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AliasMemberContext aliasMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionMemberContext definitionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public VariantUsageMemberContext variantUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NonOccurrenceUsageMemberContext nonOccurrenceUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StructureUsageMemberContext structureUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SourceSuccessionMemberContext sourceSuccessionMember() { + return GetRuleContext(0); + } + public NonBehaviorBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nonBehaviorBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNonBehaviorBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNonBehaviorBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNonBehaviorBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NonBehaviorBodyItemContext nonBehaviorBodyItem() { + NonBehaviorBodyItemContext _localctx = new NonBehaviorBodyItemContext(Context, State); + EnterRule(_localctx, 580, RULE_nonBehaviorBodyItem); + int _la; + try { + State = 3384; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,352,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3375; + importRule(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3376; + aliasMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3377; + definitionMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3378; + variantUsageMember(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3379; + nonOccurrenceUsageMember(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 3381; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==THEN) { + { + State = 3380; + sourceSuccessionMember(); + } + } + + State = 3383; + structureUsageMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionBehaviorMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeMemberContext actionNodeMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorUsageMemberContext behaviorUsageMember() { + return GetRuleContext(0); + } + public ActionBehaviorMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionBehaviorMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionBehaviorMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionBehaviorMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionBehaviorMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionBehaviorMemberContext actionBehaviorMember() { + ActionBehaviorMemberContext _localctx = new ActionBehaviorMemberContext(Context, State); + EnterRule(_localctx, 582, RULE_actionBehaviorMember); + try { + State = 3388; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,353,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3386; + actionNodeMember(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3387; + behaviorUsageMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class InitialNodeMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FIRST() { return GetToken(SysMLv2Parser.FIRST, 0); } + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + public InitialNodeMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_initialNodeMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterInitialNodeMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitInitialNodeMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitInitialNodeMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public InitialNodeMemberContext initialNodeMember() { + InitialNodeMemberContext _localctx = new InitialNodeMemberContext(Context, State); + EnterRule(_localctx, 584, RULE_initialNodeMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3390; + memberPrefix(); + State = 3391; + Match(FIRST); + State = 3392; + qualifiedName(); + State = 3393; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionNodeMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeContext actionNode() { + return GetRuleContext(0); + } + public ActionNodeMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionNodeMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionNodeMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionNodeMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionNodeMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionNodeMemberContext actionNodeMember() { + ActionNodeMemberContext _localctx = new ActionNodeMemberContext(Context, State); + EnterRule(_localctx, 586, RULE_actionNodeMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3395; + memberPrefix(); + State = 3396; + actionNode(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionTargetSuccessionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionTargetSuccessionContext actionTargetSuccession() { + return GetRuleContext(0); + } + public ActionTargetSuccessionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionTargetSuccessionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionTargetSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionTargetSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionTargetSuccessionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionTargetSuccessionMemberContext actionTargetSuccessionMember() { + ActionTargetSuccessionMemberContext _localctx = new ActionTargetSuccessionMemberContext(Context, State); + EnterRule(_localctx, 588, RULE_actionTargetSuccessionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3398; + memberPrefix(); + State = 3399; + actionTargetSuccession(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GuardedSuccessionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GuardedSuccessionContext guardedSuccession() { + return GetRuleContext(0); + } + public GuardedSuccessionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_guardedSuccessionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterGuardedSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitGuardedSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitGuardedSuccessionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GuardedSuccessionMemberContext guardedSuccessionMember() { + GuardedSuccessionMemberContext _localctx = new GuardedSuccessionMemberContext(Context, State); + EnterRule(_localctx, 590, RULE_guardedSuccessionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3401; + memberPrefix(); + State = 3402; + guardedSuccession(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACTION() { return GetToken(SysMLv2Parser.ACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionUsageDeclarationContext actionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public ActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionUsageContext actionUsage() { + ActionUsageContext _localctx = new ActionUsageContext(Context, State); + EnterRule(_localctx, 592, RULE_actionUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3404; + occurrenceUsagePrefix(); + State = 3405; + Match(ACTION); + State = 3406; + actionUsageDeclaration(); + State = 3407; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public ActionUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionUsageDeclarationContext actionUsageDeclaration() { + ActionUsageDeclarationContext _localctx = new ActionUsageDeclarationContext(Context, State); + EnterRule(_localctx, 594, RULE_actionUsageDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3410; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3409; + usageDeclaration(); + } + } + + State = 3413; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 3412; + valuePart(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PerformActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PERFORM() { return GetToken(SysMLv2Parser.PERFORM, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PerformActionUsageDeclarationContext performActionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public PerformActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_performActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPerformActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPerformActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPerformActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PerformActionUsageContext performActionUsage() { + PerformActionUsageContext _localctx = new PerformActionUsageContext(Context, State); + EnterRule(_localctx, 596, RULE_performActionUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3415; + occurrenceUsagePrefix(); + State = 3416; + Match(PERFORM); + State = 3417; + performActionUsageDeclaration(); + State = 3418; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PerformActionUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACTION() { return GetToken(SysMLv2Parser.ACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public PerformActionUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_performActionUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPerformActionUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPerformActionUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPerformActionUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PerformActionUsageDeclarationContext performActionUsageDeclaration() { + PerformActionUsageDeclarationContext _localctx = new PerformActionUsageDeclarationContext(Context, State); + EnterRule(_localctx, 598, RULE_performActionUsageDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3428; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 3420; + ownedReferenceSubsetting(); + State = 3422; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 3421; + featureSpecializationPart(); + } + } + + } + break; + case ACTION: + { + State = 3424; + Match(ACTION); + State = 3426; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3425; + usageDeclaration(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + State = 3431; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 3430; + valuePart(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ControlNodeContext controlNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SendNodeContext sendNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AcceptNodeContext acceptNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AssignmentNodeContext assignmentNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TerminateNodeContext terminateNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IfNodeContext ifNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public WhileLoopNodeContext whileLoopNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ForLoopNodeContext forLoopNode() { + return GetRuleContext(0); + } + public ActionNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionNodeContext actionNode() { + ActionNodeContext _localctx = new ActionNodeContext(Context, State); + EnterRule(_localctx, 600, RULE_actionNode); + try { + State = 3441; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,360,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3433; + controlNode(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3434; + sendNode(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3435; + acceptNode(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3436; + assignmentNode(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3437; + terminateNode(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 3438; + ifNode(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 3439; + whileLoopNode(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 3440; + forLoopNode(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionNodeUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACTION() { return GetToken(SysMLv2Parser.ACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public ActionNodeUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionNodeUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionNodeUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionNodeUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionNodeUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + ActionNodeUsageDeclarationContext _localctx = new ActionNodeUsageDeclarationContext(Context, State); + EnterRule(_localctx, 602, RULE_actionNodeUsageDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3443; + Match(ACTION); + State = 3445; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3444; + usageDeclaration(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionNodePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + return GetRuleContext(0); + } + public ActionNodePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionNodePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionNodePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionNodePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionNodePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionNodePrefixContext actionNodePrefix() { + ActionNodePrefixContext _localctx = new ActionNodePrefixContext(Context, State); + EnterRule(_localctx, 604, RULE_actionNodePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3447; + occurrenceUsagePrefix(); + State = 3449; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACTION) { + { + State = 3448; + actionNodeUsageDeclaration(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ControlNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MergeNodeContext mergeNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DecisionNodeContext decisionNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public JoinNodeContext joinNode() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ForkNodeContext forkNode() { + return GetRuleContext(0); + } + public ControlNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_controlNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterControlNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitControlNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitControlNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ControlNodeContext controlNode() { + ControlNodeContext _localctx = new ControlNodeContext(Context, State); + EnterRule(_localctx, 606, RULE_controlNode); + try { + State = 3455; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,363,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3451; + mergeNode(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3452; + decisionNode(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3453; + joinNode(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3454; + forkNode(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ControlNodePrefixContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public RefPrefixContext refPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INDIVIDUAL() { return GetToken(SysMLv2Parser.INDIVIDUAL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public PortionKindContext portionKind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public ControlNodePrefixContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_controlNodePrefix; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterControlNodePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitControlNodePrefix(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitControlNodePrefix(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ControlNodePrefixContext controlNodePrefix() { + ControlNodePrefixContext _localctx = new ControlNodePrefixContext(Context, State); + EnterRule(_localctx, 608, RULE_controlNodePrefix); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3457; + refPrefix(); + State = 3459; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==INDIVIDUAL) { + { + State = 3458; + Match(INDIVIDUAL); + } + } + + State = 3462; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SNAPSHOT || _la==TIMESLICE) { + { + State = 3461; + portionKind(); + } + } + + State = 3467; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 3464; + usageExtensionKeyword(); + } + } + State = 3469; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MergeNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ControlNodePrefixContext controlNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode MERGE() { return GetToken(SysMLv2Parser.MERGE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public MergeNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_mergeNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMergeNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMergeNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMergeNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MergeNodeContext mergeNode() { + MergeNodeContext _localctx = new MergeNodeContext(Context, State); + EnterRule(_localctx, 610, RULE_mergeNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3470; + controlNodePrefix(); + State = 3471; + Match(MERGE); + State = 3473; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3472; + usageDeclaration(); + } + } + + State = 3475; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DecisionNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ControlNodePrefixContext controlNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DECIDE() { return GetToken(SysMLv2Parser.DECIDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public DecisionNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_decisionNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDecisionNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDecisionNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDecisionNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DecisionNodeContext decisionNode() { + DecisionNodeContext _localctx = new DecisionNodeContext(Context, State); + EnterRule(_localctx, 612, RULE_decisionNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3477; + controlNodePrefix(); + State = 3478; + Match(DECIDE); + State = 3480; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3479; + usageDeclaration(); + } + } + + State = 3482; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class JoinNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ControlNodePrefixContext controlNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode JOIN() { return GetToken(SysMLv2Parser.JOIN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public JoinNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_joinNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterJoinNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitJoinNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitJoinNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public JoinNodeContext joinNode() { + JoinNodeContext _localctx = new JoinNodeContext(Context, State); + EnterRule(_localctx, 614, RULE_joinNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3484; + controlNodePrefix(); + State = 3485; + Match(JOIN); + State = 3487; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3486; + usageDeclaration(); + } + } + + State = 3489; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ForkNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ControlNodePrefixContext controlNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FORK() { return GetToken(SysMLv2Parser.FORK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public ForkNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_forkNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterForkNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitForkNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitForkNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ForkNodeContext forkNode() { + ForkNodeContext _localctx = new ForkNodeContext(Context, State); + EnterRule(_localctx, 616, RULE_forkNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3491; + controlNodePrefix(); + State = 3492; + Match(FORK); + State = 3494; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3493; + usageDeclaration(); + } + } + + State = 3496; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AcceptNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AcceptNodeDeclarationContext acceptNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public AcceptNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_acceptNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAcceptNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAcceptNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAcceptNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AcceptNodeContext acceptNode() { + AcceptNodeContext _localctx = new AcceptNodeContext(Context, State); + EnterRule(_localctx, 618, RULE_acceptNode); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3498; + occurrenceUsagePrefix(); + State = 3499; + acceptNodeDeclaration(); + State = 3500; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AcceptNodeDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACCEPT() { return GetToken(SysMLv2Parser.ACCEPT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AcceptParameterPartContext acceptParameterPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + return GetRuleContext(0); + } + public AcceptNodeDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_acceptNodeDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAcceptNodeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAcceptNodeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAcceptNodeDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AcceptNodeDeclarationContext acceptNodeDeclaration() { + AcceptNodeDeclarationContext _localctx = new AcceptNodeDeclarationContext(Context, State); + EnterRule(_localctx, 620, RULE_acceptNodeDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3503; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACTION) { + { + State = 3502; + actionNodeUsageDeclaration(); + } + } + + State = 3505; + Match(ACCEPT); + State = 3506; + acceptParameterPart(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AcceptParameterPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PayloadParameterMemberContext payloadParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VIA() { return GetToken(SysMLv2Parser.VIA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember() { + return GetRuleContext(0); + } + public AcceptParameterPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_acceptParameterPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAcceptParameterPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAcceptParameterPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAcceptParameterPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AcceptParameterPartContext acceptParameterPart() { + AcceptParameterPartContext _localctx = new AcceptParameterPartContext(Context, State); + EnterRule(_localctx, 622, RULE_acceptParameterPart); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3508; + payloadParameterMember(); + State = 3511; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==VIA) { + { + State = 3509; + Match(VIA); + State = 3510; + nodeParameterMember(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PayloadParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PayloadParameterContext payloadParameter() { + return GetRuleContext(0); + } + public PayloadParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_payloadParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPayloadParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPayloadParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPayloadParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PayloadParameterMemberContext payloadParameterMember() { + PayloadParameterMemberContext _localctx = new PayloadParameterMemberContext(Context, State); + EnterRule(_localctx, 624, RULE_payloadParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3513; + payloadParameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PayloadParameterContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PayloadFeatureContext payloadFeature() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TriggerValuePartContext triggerValuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public IdentificationContext identification() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public PayloadFeatureSpecializationPartContext payloadFeatureSpecializationPart() { + return GetRuleContext(0); + } + public PayloadParameterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_payloadParameter; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPayloadParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPayloadParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPayloadParameter(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PayloadParameterContext payloadParameter() { + PayloadParameterContext _localctx = new PayloadParameterContext(Context, State); + EnterRule(_localctx, 626, RULE_payloadParameter); + int _la; + try { + State = 3523; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,375,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3515; + payloadFeature(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3517; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,373,Context) ) { + case 1: + { + State = 3516; + identification(); + } + break; + } + State = 3520; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 3519; + payloadFeatureSpecializationPart(); + } + } + + State = 3522; + triggerValuePart(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TriggerValuePartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TriggerFeatureValueContext triggerFeatureValue() { + return GetRuleContext(0); + } + public TriggerValuePartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_triggerValuePart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTriggerValuePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTriggerValuePart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTriggerValuePart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TriggerValuePartContext triggerValuePart() { + TriggerValuePartContext _localctx = new TriggerValuePartContext(Context, State); + EnterRule(_localctx, 628, RULE_triggerValuePart); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3525; + triggerFeatureValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TriggerFeatureValueContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TriggerExpressionContext triggerExpression() { + return GetRuleContext(0); + } + public TriggerFeatureValueContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_triggerFeatureValue; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTriggerFeatureValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTriggerFeatureValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTriggerFeatureValue(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TriggerFeatureValueContext triggerFeatureValue() { + TriggerFeatureValueContext _localctx = new TriggerFeatureValueContext(Context, State); + EnterRule(_localctx, 630, RULE_triggerFeatureValue); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3527; + triggerExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TriggerExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ArgumentMemberContext argumentMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AT() { return GetToken(SysMLv2Parser.AT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode AFTER() { return GetToken(SysMLv2Parser.AFTER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHEN() { return GetToken(SysMLv2Parser.WHEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ArgumentExpressionMemberContext argumentExpressionMember() { + return GetRuleContext(0); + } + public TriggerExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_triggerExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTriggerExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTriggerExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTriggerExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TriggerExpressionContext triggerExpression() { + TriggerExpressionContext _localctx = new TriggerExpressionContext(Context, State); + EnterRule(_localctx, 632, RULE_triggerExpression); + int _la; + try { + State = 3533; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case AFTER: + case AT: + EnterOuterAlt(_localctx, 1); + { + State = 3529; + _la = TokenStream.LA(1); + if ( !(_la==AFTER || _la==AT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 3530; + argumentMember(); + } + break; + case WHEN: + EnterOuterAlt(_localctx, 2); + { + State = 3531; + Match(WHEN); + State = 3532; + argumentExpressionMember(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SendNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEND() { return GetToken(SysMLv2Parser.SEND, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionUsageDeclarationContext actionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext emptyParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SenderReceiverPartContext senderReceiverPart() { + return GetRuleContext(0); + } + public SendNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sendNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSendNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSendNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSendNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SendNodeContext sendNode() { + SendNodeContext _localctx = new SendNodeContext(Context, State); + EnterRule(_localctx, 634, RULE_sendNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3535; + occurrenceUsagePrefix(); + State = 3538; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ACTION: + { + State = 3536; + actionNodeUsageDeclaration(); + } + break; + case BEHAVIOR: + case CROSSES: + case DEFAULT: + case DEFINED: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case NONUNIQUE: + case ORDERED: + case PREDICATE: + case REDEFINES: + case REFERENCES: + case SEND: + case STEP: + case SUBSETS: + case TYPE: + case TYPED: + case VAR: + case COLON_COLON_GT: + case COLON_GT_GT: + case COLON_EQ: + case COLON_GT: + case FAT_ARROW: + case COLON: + case LT: + case EQ: + case LBRACK: + case IDENTIFIER: + case STRING: + { + State = 3537; + actionUsageDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 3540; + Match(SEND); + State = 3549; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,380,Context) ) { + case 1: + { + State = 3541; + nodeParameterMember(); + State = 3543; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==TO || _la==VIA) { + { + State = 3542; + senderReceiverPart(); + } + } + + } + break; + case 2: + { + State = 3545; + emptyParameterMember(); + State = 3547; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==TO || _la==VIA) { + { + State = 3546; + senderReceiverPart(); + } + } + + } + break; + } + State = 3551; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SendNodeDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEND() { return GetToken(SysMLv2Parser.SEND, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SenderReceiverPartContext senderReceiverPart() { + return GetRuleContext(0); + } + public SendNodeDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_sendNodeDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSendNodeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSendNodeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSendNodeDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SendNodeDeclarationContext sendNodeDeclaration() { + SendNodeDeclarationContext _localctx = new SendNodeDeclarationContext(Context, State); + EnterRule(_localctx, 636, RULE_sendNodeDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3554; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACTION) { + { + State = 3553; + actionNodeUsageDeclaration(); + } + } + + State = 3556; + Match(SEND); + State = 3557; + nodeParameterMember(); + State = 3559; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==TO || _la==VIA) { + { + State = 3558; + senderReceiverPart(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SenderReceiverPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VIA() { return GetToken(SysMLv2Parser.VIA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext[] nodeParameterMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TO() { return GetToken(SysMLv2Parser.TO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext emptyParameterMember() { + return GetRuleContext(0); + } + public SenderReceiverPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_senderReceiverPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSenderReceiverPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSenderReceiverPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSenderReceiverPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SenderReceiverPartContext senderReceiverPart() { + SenderReceiverPartContext _localctx = new SenderReceiverPartContext(Context, State); + EnterRule(_localctx, 638, RULE_senderReceiverPart); + int _la; + try { + State = 3571; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case VIA: + EnterOuterAlt(_localctx, 1); + { + State = 3561; + Match(VIA); + State = 3562; + nodeParameterMember(); + State = 3565; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==TO) { + { + State = 3563; + Match(TO); + State = 3564; + nodeParameterMember(); + } + } + + } + break; + case TO: + EnterOuterAlt(_localctx, 2); + { + State = 3567; + emptyParameterMember(); + State = 3568; + Match(TO); + State = 3569; + nodeParameterMember(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NodeParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterContext nodeParameter() { + return GetRuleContext(0); + } + public NodeParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nodeParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNodeParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNodeParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNodeParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NodeParameterMemberContext nodeParameterMember() { + NodeParameterMemberContext _localctx = new NodeParameterMemberContext(Context, State); + EnterRule(_localctx, 640, RULE_nodeParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3573; + nodeParameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NodeParameterContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureBindingContext featureBinding() { + return GetRuleContext(0); + } + public NodeParameterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nodeParameter; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNodeParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNodeParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNodeParameter(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NodeParameterContext nodeParameter() { + NodeParameterContext _localctx = new NodeParameterContext(Context, State); + EnterRule(_localctx, 642, RULE_nodeParameter); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3575; + featureBinding(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FeatureBindingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public FeatureBindingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_featureBinding; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFeatureBinding(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFeatureBinding(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFeatureBinding(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FeatureBindingContext featureBinding() { + FeatureBindingContext _localctx = new FeatureBindingContext(Context, State); + EnterRule(_localctx, 644, RULE_featureBinding); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3577; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyUsage_Context emptyUsage_() { + return GetRuleContext(0); + } + public EmptyParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyParameterMemberContext emptyParameterMember() { + EmptyParameterMemberContext _localctx = new EmptyParameterMemberContext(Context, State); + EnterRule(_localctx, 646, RULE_emptyParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3579; + emptyUsage_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public AssignmentNodeDeclarationContext assignmentNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public AssignmentNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignmentNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssignmentNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssignmentNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignmentNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentNodeContext assignmentNode() { + AssignmentNodeContext _localctx = new AssignmentNodeContext(Context, State); + EnterRule(_localctx, 648, RULE_assignmentNode); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3581; + occurrenceUsagePrefix(); + State = 3582; + assignmentNodeDeclaration(); + State = 3583; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentNodeDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(SysMLv2Parser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AssignmentTargetMemberContext assignmentTargetMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureChainMemberContext featureChainMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_EQ() { return GetToken(SysMLv2Parser.COLON_EQ, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + return GetRuleContext(0); + } + public AssignmentNodeDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignmentNodeDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssignmentNodeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssignmentNodeDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignmentNodeDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentNodeDeclarationContext assignmentNodeDeclaration() { + AssignmentNodeDeclarationContext _localctx = new AssignmentNodeDeclarationContext(Context, State); + EnterRule(_localctx, 650, RULE_assignmentNodeDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3586; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACTION) { + { + State = 3585; + actionNodeUsageDeclaration(); + } + } + + State = 3588; + Match(ASSIGN); + State = 3589; + assignmentTargetMember(); + State = 3590; + featureChainMember(); + State = 3591; + Match(COLON_EQ); + State = 3592; + nodeParameterMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentTargetMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignmentTargetParameterContext assignmentTargetParameter() { + return GetRuleContext(0); + } + public AssignmentTargetMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignmentTargetMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssignmentTargetMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssignmentTargetMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignmentTargetMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentTargetMemberContext assignmentTargetMember() { + AssignmentTargetMemberContext _localctx = new AssignmentTargetMemberContext(Context, State); + EnterRule(_localctx, 652, RULE_assignmentTargetMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3594; + assignmentTargetParameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentTargetParameterContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignmentTargetBindingContext assignmentTargetBinding() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT() { return GetToken(SysMLv2Parser.DOT, 0); } + public AssignmentTargetParameterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignmentTargetParameter; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssignmentTargetParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssignmentTargetParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignmentTargetParameter(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentTargetParameterContext assignmentTargetParameter() { + AssignmentTargetParameterContext _localctx = new AssignmentTargetParameterContext(Context, State); + EnterRule(_localctx, 654, RULE_assignmentTargetParameter); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3599; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,386,Context) ) { + case 1: + { + State = 3596; + assignmentTargetBinding(); + State = 3597; + Match(DOT); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentTargetBindingContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonFeatureChainPrimaryExpressionContext nonFeatureChainPrimaryExpression() { + return GetRuleContext(0); + } + public AssignmentTargetBindingContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignmentTargetBinding; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssignmentTargetBinding(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssignmentTargetBinding(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignmentTargetBinding(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentTargetBindingContext assignmentTargetBinding() { + AssignmentTargetBindingContext _localctx = new AssignmentTargetBindingContext(Context, State); + EnterRule(_localctx, 656, RULE_assignmentTargetBinding); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3601; + nonFeatureChainPrimaryExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TerminateNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TERMINATE() { return GetToken(SysMLv2Parser.TERMINATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionNodeUsageDeclarationContext actionNodeUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember() { + return GetRuleContext(0); + } + public TerminateNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_terminateNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTerminateNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTerminateNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTerminateNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TerminateNodeContext terminateNode() { + TerminateNodeContext _localctx = new TerminateNodeContext(Context, State); + EnterRule(_localctx, 658, RULE_terminateNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3603; + occurrenceUsagePrefix(); + State = 3605; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACTION) { + { + State = 3604; + actionNodeUsageDeclaration(); + } + } + + State = 3607; + Match(TERMINATE); + State = 3609; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,388,Context) ) { + case 1: + { + State = 3608; + nodeParameterMember(); + } + break; + } + State = 3611; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IfNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionNodePrefixContext actionNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IF() { return GetToken(SysMLv2Parser.IF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionParameterMemberContext expressionParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyParameterMemberContext[] actionBodyParameterMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyParameterMemberContext actionBodyParameterMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(SysMLv2Parser.ELSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public IfNodeParameterMemberContext ifNodeParameterMember() { + return GetRuleContext(0); + } + public IfNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ifNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIfNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIfNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIfNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IfNodeContext ifNode() { + IfNodeContext _localctx = new IfNodeContext(Context, State); + EnterRule(_localctx, 660, RULE_ifNode); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3613; + actionNodePrefix(); + State = 3614; + Match(IF); + State = 3615; + expressionParameterMember(); + State = 3616; + actionBodyParameterMember(); + State = 3622; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,390,Context) ) { + case 1: + { + State = 3617; + Match(ELSE); + State = 3620; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,389,Context) ) { + case 1: + { + State = 3618; + actionBodyParameterMember(); + } + break; + case 2: + { + State = 3619; + ifNodeParameterMember(); + } + break; + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExpressionParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public ExpressionParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_expressionParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExpressionParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExpressionParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExpressionParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExpressionParameterMemberContext expressionParameterMember() { + ExpressionParameterMemberContext _localctx = new ExpressionParameterMemberContext(Context, State); + EnterRule(_localctx, 662, RULE_expressionParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3624; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionBodyParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyParameterContext actionBodyParameter() { + return GetRuleContext(0); + } + public ActionBodyParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionBodyParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionBodyParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionBodyParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionBodyParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionBodyParameterMemberContext actionBodyParameterMember() { + ActionBodyParameterMemberContext _localctx = new ActionBodyParameterMemberContext(Context, State); + EnterRule(_localctx, 664, RULE_actionBodyParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3626; + actionBodyParameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionBodyParameterContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACTION() { return GetToken(SysMLv2Parser.ACTION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext[] actionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public ActionBodyParameterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionBodyParameter; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionBodyParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionBodyParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionBodyParameter(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionBodyParameterContext actionBodyParameter() { + ActionBodyParameterContext _localctx = new ActionBodyParameterContext(Context, State); + EnterRule(_localctx, 666, RULE_actionBodyParameter); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3632; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACTION) { + { + State = 3628; + Match(ACTION); + State = 3630; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3629; + usageDeclaration(); + } + } + + } + } + + State = 3634; + Match(LBRACE); + State = 3638; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108765657175215772L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362784250145551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954071324100409579L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3635; + actionBodyItem(); + } + } + State = 3640; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3641; + Match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IfNodeParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public IfNodeContext ifNode() { + return GetRuleContext(0); + } + public IfNodeParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_ifNodeParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIfNodeParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIfNodeParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIfNodeParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IfNodeParameterMemberContext ifNodeParameterMember() { + IfNodeParameterMemberContext _localctx = new IfNodeParameterMemberContext(Context, State); + EnterRule(_localctx, 668, RULE_ifNodeParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3643; + ifNode(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class WhileLoopNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionNodePrefixContext actionNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyParameterMemberContext actionBodyParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode WHILE() { return GetToken(SysMLv2Parser.WHILE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionParameterMemberContext[] expressionParameterMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ExpressionParameterMemberContext expressionParameterMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LOOP() { return GetToken(SysMLv2Parser.LOOP, 0); } + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext emptyParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UNTIL() { return GetToken(SysMLv2Parser.UNTIL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + public WhileLoopNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_whileLoopNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterWhileLoopNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitWhileLoopNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitWhileLoopNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public WhileLoopNodeContext whileLoopNode() { + WhileLoopNodeContext _localctx = new WhileLoopNodeContext(Context, State); + EnterRule(_localctx, 670, RULE_whileLoopNode); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3645; + actionNodePrefix(); + State = 3650; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case WHILE: + { + State = 3646; + Match(WHILE); + State = 3647; + expressionParameterMember(); + } + break; + case LOOP: + { + State = 3648; + Match(LOOP); + State = 3649; + emptyParameterMember(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 3652; + actionBodyParameterMember(); + State = 3657; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==UNTIL) { + { + State = 3653; + Match(UNTIL); + State = 3654; + expressionParameterMember(); + State = 3655; + Match(SEMI); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ForLoopNodeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionNodePrefixContext actionNodePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FOR() { return GetToken(SysMLv2Parser.FOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ForVariableDeclarationMemberContext forVariableDeclarationMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IN() { return GetToken(SysMLv2Parser.IN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public NodeParameterMemberContext nodeParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyParameterMemberContext actionBodyParameterMember() { + return GetRuleContext(0); + } + public ForLoopNodeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_forLoopNode; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterForLoopNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitForLoopNode(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitForLoopNode(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ForLoopNodeContext forLoopNode() { + ForLoopNodeContext _localctx = new ForLoopNodeContext(Context, State); + EnterRule(_localctx, 672, RULE_forLoopNode); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3659; + actionNodePrefix(); + State = 3660; + Match(FOR); + State = 3661; + forVariableDeclarationMember(); + State = 3662; + Match(IN); + State = 3663; + nodeParameterMember(); + State = 3664; + actionBodyParameterMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ForVariableDeclarationMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public ForVariableDeclarationMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_forVariableDeclarationMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterForVariableDeclarationMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitForVariableDeclarationMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitForVariableDeclarationMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ForVariableDeclarationMemberContext forVariableDeclarationMember() { + ForVariableDeclarationMemberContext _localctx = new ForVariableDeclarationMemberContext(Context, State); + EnterRule(_localctx, 674, RULE_forVariableDeclarationMember); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3667; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3666; + usageDeclaration(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActionTargetSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TargetSuccessionContext targetSuccession() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GuardedTargetSuccessionContext guardedTargetSuccession() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefaultTargetSuccessionContext defaultTargetSuccession() { + return GetRuleContext(0); + } + public ActionTargetSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actionTargetSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActionTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActionTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActionTargetSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActionTargetSuccessionContext actionTargetSuccession() { + ActionTargetSuccessionContext _localctx = new ActionTargetSuccessionContext(Context, State); + EnterRule(_localctx, 676, RULE_actionTargetSuccession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3672; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case THEN: + case LBRACK: + { + State = 3669; + targetSuccession(); + } + break; + case IF: + { + State = 3670; + guardedTargetSuccession(); + } + break; + case ELSE: + { + State = 3671; + defaultTargetSuccession(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 3674; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TargetSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SourceEndMemberContext sourceEndMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember() { + return GetRuleContext(0); + } + public TargetSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_targetSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTargetSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TargetSuccessionContext targetSuccession() { + TargetSuccessionContext _localctx = new TargetSuccessionContext(Context, State); + EnterRule(_localctx, 678, RULE_targetSuccession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3676; + sourceEndMember(); + State = 3677; + Match(THEN); + State = 3678; + connectorEndMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GuardedTargetSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public GuardExpressionMemberContext guardExpressionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionMemberContext transitionSuccessionMember() { + return GetRuleContext(0); + } + public GuardedTargetSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_guardedTargetSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterGuardedTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitGuardedTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitGuardedTargetSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GuardedTargetSuccessionContext guardedTargetSuccession() { + GuardedTargetSuccessionContext _localctx = new GuardedTargetSuccessionContext(Context, State); + EnterRule(_localctx, 680, RULE_guardedTargetSuccession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3680; + guardExpressionMember(); + State = 3681; + Match(THEN); + State = 3682; + transitionSuccessionMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DefaultTargetSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ELSE() { return GetToken(SysMLv2Parser.ELSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionMemberContext transitionSuccessionMember() { + return GetRuleContext(0); + } + public DefaultTargetSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_defaultTargetSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDefaultTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDefaultTargetSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDefaultTargetSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DefaultTargetSuccessionContext defaultTargetSuccession() { + DefaultTargetSuccessionContext _localctx = new DefaultTargetSuccessionContext(Context, State); + EnterRule(_localctx, 682, RULE_defaultTargetSuccession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3684; + Match(ELSE); + State = 3685; + transitionSuccessionMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GuardedSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FIRST() { return GetToken(SysMLv2Parser.FIRST, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureChainMemberContext featureChainMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GuardExpressionMemberContext guardExpressionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionMemberContext transitionSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUCCESSION() { return GetToken(SysMLv2Parser.SUCCESSION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public GuardedSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_guardedSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterGuardedSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitGuardedSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitGuardedSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GuardedSuccessionContext guardedSuccession() { + GuardedSuccessionContext _localctx = new GuardedSuccessionContext(Context, State); + EnterRule(_localctx, 684, RULE_guardedSuccession); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3691; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SUCCESSION) { + { + State = 3687; + Match(SUCCESSION); + State = 3689; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3688; + usageDeclaration(); + } + } + + } + } + + State = 3693; + Match(FIRST); + State = 3694; + featureChainMember(); + State = 3695; + guardExpressionMember(); + State = 3696; + Match(THEN); + State = 3697; + transitionSuccessionMember(); + State = 3698; + usageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STATE() { return GetToken(SysMLv2Parser.STATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateDefBodyContext stateDefBody() { + return GetRuleContext(0); + } + public StateDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateDefinitionContext stateDefinition() { + StateDefinitionContext _localctx = new StateDefinitionContext(Context, State); + EnterRule(_localctx, 686, RULE_stateDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3700; + occurrenceDefinitionPrefix(); + State = 3701; + Match(STATE); + State = 3702; + Match(DEF); + State = 3703; + definitionDeclaration(); + State = 3704; + stateDefBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateDefBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARALLEL() { return GetToken(SysMLv2Parser.PARALLEL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StateBodyItemContext[] stateBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public StateBodyItemContext stateBodyItem(int i) { + return GetRuleContext(i); + } + public StateDefBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateDefBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateDefBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateDefBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateDefBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateDefBodyContext stateDefBody() { + StateDefBodyContext _localctx = new StateDefBodyContext(Context, State); + EnterRule(_localctx, 688, RULE_stateDefBody); + int _la; + try { + State = 3718; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 3706; + Match(SEMI); + } + break; + case PARALLEL: + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 3708; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARALLEL) { + { + State = 3707; + Match(PARALLEL); + } + } + + State = 3710; + Match(LBRACE); + State = 3714; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4567713461533429396L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785807L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954066926085355691L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3711; + stateBodyItem(); + } + } + State = 3716; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3717; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NonBehaviorBodyItemContext nonBehaviorBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BehaviorUsageMemberContext behaviorUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SourceSuccessionMemberContext sourceSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TargetTransitionUsageMemberContext[] targetTransitionUsageMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public TargetTransitionUsageMemberContext targetTransitionUsageMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public TransitionUsageMemberContext transitionUsageMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EntryActionMemberContext entryActionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EntryTransitionMemberContext[] entryTransitionMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public EntryTransitionMemberContext entryTransitionMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public DoActionMemberContext doActionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExitActionMemberContext exitActionMember() { + return GetRuleContext(0); + } + public StateBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateBodyItemContext stateBodyItem() { + StateBodyItemContext _localctx = new StateBodyItemContext(Context, State); + EnterRule(_localctx, 690, RULE_stateBodyItem); + int _la; + try { + int _alt; + State = 3741; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,406,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3720; + nonBehaviorBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3722; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==THEN) { + { + State = 3721; + sourceSuccessionMember(); + } + } + + State = 3724; + behaviorUsageMember(); + State = 3728; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,404,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 3725; + targetTransitionUsageMember(); + } + } + } + State = 3730; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,404,Context); + } + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3731; + transitionUsageMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3732; + entryActionMember(); + State = 3736; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,405,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 3733; + entryTransitionMember(); + } + } + } + State = 3738; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,405,Context); + } + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3739; + doActionMember(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 3740; + exitActionMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EntryActionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ENTRY() { return GetToken(SysMLv2Parser.ENTRY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StateActionUsageContext stateActionUsage() { + return GetRuleContext(0); + } + public EntryActionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entryActionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEntryActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEntryActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEntryActionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EntryActionMemberContext entryActionMember() { + EntryActionMemberContext _localctx = new EntryActionMemberContext(Context, State); + EnterRule(_localctx, 692, RULE_entryActionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3743; + memberPrefix(); + State = 3744; + Match(ENTRY); + State = 3745; + stateActionUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class DoActionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DO() { return GetToken(SysMLv2Parser.DO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StateActionUsageContext stateActionUsage() { + return GetRuleContext(0); + } + public DoActionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_doActionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterDoActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitDoActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitDoActionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public DoActionMemberContext doActionMember() { + DoActionMemberContext _localctx = new DoActionMemberContext(Context, State); + EnterRule(_localctx, 694, RULE_doActionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3747; + memberPrefix(); + State = 3748; + Match(DO); + State = 3749; + stateActionUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExitActionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXIT() { return GetToken(SysMLv2Parser.EXIT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StateActionUsageContext stateActionUsage() { + return GetRuleContext(0); + } + public ExitActionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_exitActionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExitActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExitActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExitActionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExitActionMemberContext exitActionMember() { + ExitActionMemberContext _localctx = new ExitActionMemberContext(Context, State); + EnterRule(_localctx, 696, RULE_exitActionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3751; + memberPrefix(); + State = 3752; + Match(EXIT); + State = 3753; + stateActionUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EntryTransitionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public GuardedTargetSuccessionContext guardedTargetSuccession() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionMemberContext transitionSuccessionMember() { + return GetRuleContext(0); + } + public EntryTransitionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_entryTransitionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEntryTransitionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEntryTransitionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEntryTransitionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EntryTransitionMemberContext entryTransitionMember() { + EntryTransitionMemberContext _localctx = new EntryTransitionMemberContext(Context, State); + EnterRule(_localctx, 698, RULE_entryTransitionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3755; + memberPrefix(); + State = 3759; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case IF: + { + State = 3756; + guardedTargetSuccession(); + } + break; + case THEN: + { + State = 3757; + Match(THEN); + State = 3758; + transitionSuccessionMember(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 3761; + Match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyActionUsage_Context emptyActionUsage_() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StatePerformActionUsageContext statePerformActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateAcceptActionUsageContext stateAcceptActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateSendActionUsageContext stateSendActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateAssignmentActionUsageContext stateAssignmentActionUsage() { + return GetRuleContext(0); + } + public StateActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateActionUsageContext stateActionUsage() { + StateActionUsageContext _localctx = new StateActionUsageContext(Context, State); + EnterRule(_localctx, 700, RULE_stateActionUsage); + try { + State = 3770; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,408,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3763; + emptyActionUsage_(); + State = 3764; + Match(SEMI); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3766; + statePerformActionUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3767; + stateAcceptActionUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3768; + stateSendActionUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3769; + stateAssignmentActionUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StatePerformActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PerformActionUsageDeclarationContext performActionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public StatePerformActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_statePerformActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStatePerformActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStatePerformActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStatePerformActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StatePerformActionUsageContext statePerformActionUsage() { + StatePerformActionUsageContext _localctx = new StatePerformActionUsageContext(Context, State); + EnterRule(_localctx, 702, RULE_statePerformActionUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3772; + performActionUsageDeclaration(); + State = 3773; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateAcceptActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AcceptNodeDeclarationContext acceptNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public StateAcceptActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateAcceptActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateAcceptActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateAcceptActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateAcceptActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateAcceptActionUsageContext stateAcceptActionUsage() { + StateAcceptActionUsageContext _localctx = new StateAcceptActionUsageContext(Context, State); + EnterRule(_localctx, 704, RULE_stateAcceptActionUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3775; + acceptNodeDeclaration(); + State = 3776; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateSendActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SendNodeDeclarationContext sendNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public StateSendActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateSendActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateSendActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateSendActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateSendActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateSendActionUsageContext stateSendActionUsage() { + StateSendActionUsageContext _localctx = new StateSendActionUsageContext(Context, State); + EnterRule(_localctx, 706, RULE_stateSendActionUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3778; + sendNodeDeclaration(); + State = 3779; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateAssignmentActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignmentNodeDeclarationContext assignmentNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + public StateAssignmentActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateAssignmentActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateAssignmentActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateAssignmentActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateAssignmentActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateAssignmentActionUsageContext stateAssignmentActionUsage() { + StateAssignmentActionUsageContext _localctx = new StateAssignmentActionUsageContext(Context, State); + EnterRule(_localctx, 708, RULE_stateAssignmentActionUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3781; + assignmentNodeDeclaration(); + State = 3782; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TransitionUsageContext transitionUsage() { + return GetRuleContext(0); + } + public TransitionUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionUsageMemberContext transitionUsageMember() { + TransitionUsageMemberContext _localctx = new TransitionUsageMemberContext(Context, State); + EnterRule(_localctx, 710, RULE_transitionUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3784; + memberPrefix(); + State = 3785; + transitionUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TargetTransitionUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TargetTransitionUsageContext targetTransitionUsage() { + return GetRuleContext(0); + } + public TargetTransitionUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_targetTransitionUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTargetTransitionUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTargetTransitionUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTargetTransitionUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TargetTransitionUsageMemberContext targetTransitionUsageMember() { + TargetTransitionUsageMemberContext _localctx = new TargetTransitionUsageMemberContext(Context, State); + EnterRule(_localctx, 712, RULE_targetTransitionUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3787; + memberPrefix(); + State = 3788; + targetTransitionUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STATE() { return GetToken(SysMLv2Parser.STATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionUsageDeclarationContext actionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StateUsageBodyContext stateUsageBody() { + return GetRuleContext(0); + } + public StateUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateUsageContext stateUsage() { + StateUsageContext _localctx = new StateUsageContext(Context, State); + EnterRule(_localctx, 714, RULE_stateUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3790; + occurrenceUsagePrefix(); + State = 3791; + Match(STATE); + State = 3792; + actionUsageDeclaration(); + State = 3793; + stateUsageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StateUsageBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PARALLEL() { return GetToken(SysMLv2Parser.PARALLEL, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StateBodyItemContext[] stateBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public StateBodyItemContext stateBodyItem(int i) { + return GetRuleContext(i); + } + public StateUsageBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stateUsageBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStateUsageBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStateUsageBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStateUsageBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StateUsageBodyContext stateUsageBody() { + StateUsageBodyContext _localctx = new StateUsageBodyContext(Context, State); + EnterRule(_localctx, 716, RULE_stateUsageBody); + int _la; + try { + State = 3807; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 3795; + Match(SEMI); + } + break; + case PARALLEL: + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 3797; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==PARALLEL) { + { + State = 3796; + Match(PARALLEL); + } + } + + State = 3799; + Match(LBRACE); + State = 3803; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4567713461533429396L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785807L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954066926085355691L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3800; + stateBodyItem(); + } + } + State = 3805; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3806; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExhibitStateUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXHIBIT() { return GetToken(SysMLv2Parser.EXHIBIT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public StateUsageBodyContext stateUsageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STATE() { return GetToken(SysMLv2Parser.STATE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public ExhibitStateUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_exhibitStateUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExhibitStateUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExhibitStateUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExhibitStateUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExhibitStateUsageContext exhibitStateUsage() { + ExhibitStateUsageContext _localctx = new ExhibitStateUsageContext(Context, State); + EnterRule(_localctx, 718, RULE_exhibitStateUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3809; + occurrenceUsagePrefix(); + State = 3810; + Match(EXHIBIT); + State = 3819; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 3811; + ownedReferenceSubsetting(); + State = 3813; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 3812; + featureSpecializationPart(); + } + } + + } + break; + case STATE: + { + State = 3815; + Match(STATE); + State = 3817; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3816; + usageDeclaration(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + State = 3822; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 3821; + valuePart(); + } + } + + State = 3824; + stateUsageBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TRANSITION() { return GetToken(SysMLv2Parser.TRANSITION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureChainMemberContext featureChainMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext[] emptyParameterMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext emptyParameterMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionMemberContext transitionSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FIRST() { return GetToken(SysMLv2Parser.FIRST, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TriggerActionMemberContext triggerActionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GuardExpressionMemberContext guardExpressionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EffectBehaviorMemberContext effectBehaviorMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public TransitionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionUsageContext transitionUsage() { + TransitionUsageContext _localctx = new TransitionUsageContext(Context, State); + EnterRule(_localctx, 720, RULE_transitionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3826; + Match(TRANSITION); + State = 3831; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,417,Context) ) { + case 1: + { + State = 3828; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 3827; + usageDeclaration(); + } + } + + State = 3830; + Match(FIRST); + } + break; + } + State = 3833; + featureChainMember(); + State = 3834; + emptyParameterMember(); + State = 3838; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACCEPT) { + { + State = 3835; + emptyParameterMember(); + State = 3836; + triggerActionMember(); + } + } + + State = 3841; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IF) { + { + State = 3840; + guardExpressionMember(); + } + } + + State = 3844; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DO) { + { + State = 3843; + effectBehaviorMember(); + } + } + + State = 3846; + Match(THEN); + State = 3847; + transitionSuccessionMember(); + State = 3848; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TargetTransitionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext[] emptyParameterMember() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public EmptyParameterMemberContext emptyParameterMember(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode THEN() { return GetToken(SysMLv2Parser.THEN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionMemberContext transitionSuccessionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyContext actionBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TRANSITION() { return GetToken(SysMLv2Parser.TRANSITION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TriggerActionMemberContext triggerActionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GuardExpressionMemberContext guardExpressionMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public EffectBehaviorMemberContext effectBehaviorMember() { + return GetRuleContext(0); + } + public TargetTransitionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_targetTransitionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTargetTransitionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTargetTransitionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTargetTransitionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TargetTransitionUsageContext targetTransitionUsage() { + TargetTransitionUsageContext _localctx = new TargetTransitionUsageContext(Context, State); + EnterRule(_localctx, 722, RULE_targetTransitionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3850; + emptyParameterMember(); + State = 3875; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case TRANSITION: + { + State = 3851; + Match(TRANSITION); + State = 3855; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ACCEPT) { + { + State = 3852; + emptyParameterMember(); + State = 3853; + triggerActionMember(); + } + } + + State = 3858; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IF) { + { + State = 3857; + guardExpressionMember(); + } + } + + State = 3861; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DO) { + { + State = 3860; + effectBehaviorMember(); + } + } + + } + break; + case ACCEPT: + { + State = 3863; + emptyParameterMember(); + State = 3864; + triggerActionMember(); + State = 3866; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==IF) { + { + State = 3865; + guardExpressionMember(); + } + } + + State = 3869; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DO) { + { + State = 3868; + effectBehaviorMember(); + } + } + + } + break; + case IF: + { + State = 3871; + guardExpressionMember(); + State = 3873; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DO) { + { + State = 3872; + effectBehaviorMember(); + } + } + + } + break; + case THEN: + break; + default: + break; + } + State = 3877; + Match(THEN); + State = 3878; + transitionSuccessionMember(); + State = 3879; + actionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TriggerActionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACCEPT() { return GetToken(SysMLv2Parser.ACCEPT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public TriggerActionContext triggerAction() { + return GetRuleContext(0); + } + public TriggerActionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_triggerActionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTriggerActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTriggerActionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTriggerActionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TriggerActionMemberContext triggerActionMember() { + TriggerActionMemberContext _localctx = new TriggerActionMemberContext(Context, State); + EnterRule(_localctx, 724, RULE_triggerActionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3881; + Match(ACCEPT); + State = 3882; + triggerAction(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TriggerActionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AcceptParameterPartContext acceptParameterPart() { + return GetRuleContext(0); + } + public TriggerActionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_triggerAction; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTriggerAction(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTriggerAction(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTriggerAction(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TriggerActionContext triggerAction() { + TriggerActionContext _localctx = new TriggerActionContext(Context, State); + EnterRule(_localctx, 726, RULE_triggerAction); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3884; + acceptParameterPart(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GuardExpressionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IF() { return GetToken(SysMLv2Parser.IF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public OwnedExpressionContext ownedExpression() { + return GetRuleContext(0); + } + public GuardExpressionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_guardExpressionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterGuardExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitGuardExpressionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitGuardExpressionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GuardExpressionMemberContext guardExpressionMember() { + GuardExpressionMemberContext _localctx = new GuardExpressionMemberContext(Context, State); + EnterRule(_localctx, 728, RULE_guardExpressionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3886; + Match(IF); + State = 3887; + ownedExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EffectBehaviorMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DO() { return GetToken(SysMLv2Parser.DO, 0); } + [System.Diagnostics.DebuggerNonUserCode] public EffectBehaviorUsageContext effectBehaviorUsage() { + return GetRuleContext(0); + } + public EffectBehaviorMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_effectBehaviorMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEffectBehaviorMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEffectBehaviorMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEffectBehaviorMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EffectBehaviorMemberContext effectBehaviorMember() { + EffectBehaviorMemberContext _localctx = new EffectBehaviorMemberContext(Context, State); + EnterRule(_localctx, 730, RULE_effectBehaviorMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3889; + Match(DO); + State = 3890; + effectBehaviorUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EffectBehaviorUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyActionUsage_Context emptyActionUsage_() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TransitionPerformActionUsageContext transitionPerformActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TransitionAcceptActionUsageContext transitionAcceptActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TransitionSendActionUsageContext transitionSendActionUsage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TransitionAssignmentActionUsageContext transitionAssignmentActionUsage() { + return GetRuleContext(0); + } + public EffectBehaviorUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_effectBehaviorUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEffectBehaviorUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEffectBehaviorUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEffectBehaviorUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EffectBehaviorUsageContext effectBehaviorUsage() { + EffectBehaviorUsageContext _localctx = new EffectBehaviorUsageContext(Context, State); + EnterRule(_localctx, 732, RULE_effectBehaviorUsage); + try { + State = 3897; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,428,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3892; + emptyActionUsage_(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3893; + transitionPerformActionUsage(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 3894; + transitionAcceptActionUsage(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 3895; + transitionSendActionUsage(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 3896; + transitionAssignmentActionUsage(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionPerformActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public PerformActionUsageDeclarationContext performActionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext[] actionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem(int i) { + return GetRuleContext(i); + } + public TransitionPerformActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionPerformActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionPerformActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionPerformActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionPerformActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionPerformActionUsageContext transitionPerformActionUsage() { + TransitionPerformActionUsageContext _localctx = new TransitionPerformActionUsageContext(Context, State); + EnterRule(_localctx, 734, RULE_transitionPerformActionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3899; + performActionUsageDeclaration(); + State = 3908; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACE) { + { + State = 3900; + Match(LBRACE); + State = 3904; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108765657175215772L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362784250145551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954071324100409579L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3901; + actionBodyItem(); + } + } + State = 3906; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3907; + Match(RBRACE); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionAcceptActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AcceptNodeDeclarationContext acceptNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext[] actionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem(int i) { + return GetRuleContext(i); + } + public TransitionAcceptActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionAcceptActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionAcceptActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionAcceptActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionAcceptActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionAcceptActionUsageContext transitionAcceptActionUsage() { + TransitionAcceptActionUsageContext _localctx = new TransitionAcceptActionUsageContext(Context, State); + EnterRule(_localctx, 736, RULE_transitionAcceptActionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3910; + acceptNodeDeclaration(); + State = 3919; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACE) { + { + State = 3911; + Match(LBRACE); + State = 3915; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108765657175215772L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362784250145551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954071324100409579L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3912; + actionBodyItem(); + } + } + State = 3917; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3918; + Match(RBRACE); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionSendActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SendNodeDeclarationContext sendNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext[] actionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem(int i) { + return GetRuleContext(i); + } + public TransitionSendActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionSendActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionSendActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionSendActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionSendActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionSendActionUsageContext transitionSendActionUsage() { + TransitionSendActionUsageContext _localctx = new TransitionSendActionUsageContext(Context, State); + EnterRule(_localctx, 738, RULE_transitionSendActionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3921; + sendNodeDeclaration(); + State = 3930; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACE) { + { + State = 3922; + Match(LBRACE); + State = 3926; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108765657175215772L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362784250145551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954071324100409579L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3923; + actionBodyItem(); + } + } + State = 3928; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3929; + Match(RBRACE); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionAssignmentActionUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignmentNodeDeclarationContext assignmentNodeDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext[] actionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem(int i) { + return GetRuleContext(i); + } + public TransitionAssignmentActionUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionAssignmentActionUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionAssignmentActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionAssignmentActionUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionAssignmentActionUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionAssignmentActionUsageContext transitionAssignmentActionUsage() { + TransitionAssignmentActionUsageContext _localctx = new TransitionAssignmentActionUsageContext(Context, State); + EnterRule(_localctx, 740, RULE_transitionAssignmentActionUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3932; + assignmentNodeDeclaration(); + State = 3941; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LBRACE) { + { + State = 3933; + Match(LBRACE); + State = 3937; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108765657175215772L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362784250145551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954071324100409579L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 3934; + actionBodyItem(); + } + } + State = 3939; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 3940; + Match(RBRACE); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionSuccessionMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public TransitionSuccessionContext transitionSuccession() { + return GetRuleContext(0); + } + public TransitionSuccessionMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionSuccessionMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionSuccessionMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionSuccessionMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionSuccessionMemberContext transitionSuccessionMember() { + TransitionSuccessionMemberContext _localctx = new TransitionSuccessionMemberContext(Context, State); + EnterRule(_localctx, 742, RULE_transitionSuccessionMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3943; + transitionSuccession(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TransitionSuccessionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyEndMemberContext emptyEndMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConnectorEndMemberContext connectorEndMember() { + return GetRuleContext(0); + } + public TransitionSuccessionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_transitionSuccession; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterTransitionSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitTransitionSuccession(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitTransitionSuccession(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TransitionSuccessionContext transitionSuccession() { + TransitionSuccessionContext _localctx = new TransitionSuccessionContext(Context, State); + EnterRule(_localctx, 744, RULE_transitionSuccession); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3945; + emptyEndMember(); + State = 3946; + connectorEndMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyEndMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public EmptyFeature_Context emptyFeature_() { + return GetRuleContext(0); + } + public EmptyEndMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyEndMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyEndMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyEndMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyEndMemberContext emptyEndMember() { + EmptyEndMemberContext _localctx = new EmptyEndMemberContext(Context, State); + EnterRule(_localctx, 746, RULE_emptyEndMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3948; + emptyFeature_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CalculationDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CALC() { return GetToken(SysMLv2Parser.CALC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + public CalculationDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_calculationDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCalculationDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCalculationDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCalculationDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CalculationDefinitionContext calculationDefinition() { + CalculationDefinitionContext _localctx = new CalculationDefinitionContext(Context, State); + EnterRule(_localctx, 748, RULE_calculationDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3950; + occurrenceDefinitionPrefix(); + State = 3951; + Match(CALC); + State = 3952; + Match(DEF); + State = 3953; + definitionDeclaration(); + State = 3954; + calculationBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CalculationUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CALC() { return GetToken(SysMLv2Parser.CALC, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ActionUsageDeclarationContext actionUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + public CalculationUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_calculationUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCalculationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCalculationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCalculationUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CalculationUsageContext calculationUsage() { + CalculationUsageContext _localctx = new CalculationUsageContext(Context, State); + EnterRule(_localctx, 750, RULE_calculationUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3956; + occurrenceUsagePrefix(); + State = 3957; + Match(CALC); + State = 3958; + actionUsageDeclaration(); + State = 3959; + calculationBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CalculationBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyPartContext calculationBodyPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + public CalculationBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_calculationBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCalculationBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCalculationBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCalculationBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CalculationBodyContext calculationBody() { + CalculationBodyContext _localctx = new CalculationBodyContext(Context, State); + EnterRule(_localctx, 752, RULE_calculationBody); + try { + State = 3966; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 3961; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 3962; + Match(LBRACE); + State = 3963; + calculationBodyPart(); + State = 3964; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CalculationBodyPartContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyItemContext[] calculationBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyItemContext calculationBodyItem(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ResultExpressionMemberContext resultExpressionMember() { + return GetRuleContext(0); + } + public CalculationBodyPartContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_calculationBodyPart; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCalculationBodyPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCalculationBodyPart(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCalculationBodyPart(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CalculationBodyPartContext calculationBodyPart() { + CalculationBodyPartContext _localctx = new CalculationBodyPartContext(Context, State); + EnterRule(_localctx, 754, RULE_calculationBodyPart); + int _la; + try { + int _alt; + EnterOuterAlt(_localctx, 1); + { + State = 3971; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,438,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 3968; + calculationBodyItem(); + } + } + } + State = 3973; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,438,Context); + } + State = 3975; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4398047559936L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 2161757106910275587L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 406731341347971073L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 16273L) != 0)) { + { + State = 3974; + resultExpressionMember(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CalculationBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ReturnParameterMemberContext returnParameterMember() { + return GetRuleContext(0); + } + public CalculationBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_calculationBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCalculationBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCalculationBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCalculationBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CalculationBodyItemContext calculationBodyItem() { + CalculationBodyItemContext _localctx = new CalculationBodyItemContext(Context, State); + EnterRule(_localctx, 756, RULE_calculationBodyItem); + try { + State = 3979; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,440,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 3977; + actionBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 3978; + returnParameterMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ReturnParameterMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RETURN() { return GetToken(SysMLv2Parser.RETURN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageElementContext usageElement() { + return GetRuleContext(0); + } + public ReturnParameterMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_returnParameterMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterReturnParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitReturnParameterMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitReturnParameterMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ReturnParameterMemberContext returnParameterMember() { + ReturnParameterMemberContext _localctx = new ReturnParameterMemberContext(Context, State); + EnterRule(_localctx, 758, RULE_returnParameterMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3981; + memberPrefix(); + State = 3982; + Match(RETURN); + State = 3983; + usageElement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConstraintDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTRAINT() { return GetToken(SysMLv2Parser.CONSTRAINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + public ConstraintDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constraintDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConstraintDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConstraintDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConstraintDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConstraintDefinitionContext constraintDefinition() { + ConstraintDefinitionContext _localctx = new ConstraintDefinitionContext(Context, State); + EnterRule(_localctx, 760, RULE_constraintDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3985; + occurrenceDefinitionPrefix(); + State = 3986; + Match(CONSTRAINT); + State = 3987; + Match(DEF); + State = 3988; + definitionDeclaration(); + State = 3989; + calculationBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConstraintUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTRAINT() { return GetToken(SysMLv2Parser.CONSTRAINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + public ConstraintUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constraintUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConstraintUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConstraintUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConstraintUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConstraintUsageContext constraintUsage() { + ConstraintUsageContext _localctx = new ConstraintUsageContext(Context, State); + EnterRule(_localctx, 762, RULE_constraintUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 3991; + occurrenceUsagePrefix(); + State = 3992; + Match(CONSTRAINT); + State = 3993; + constraintUsageDeclaration(); + State = 3994; + calculationBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssertConstraintUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSERT() { return GetToken(SysMLv2Parser.ASSERT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTRAINT() { return GetToken(SysMLv2Parser.CONSTRAINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NOT() { return GetToken(SysMLv2Parser.NOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + public AssertConstraintUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assertConstraintUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAssertConstraintUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAssertConstraintUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssertConstraintUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssertConstraintUsageContext assertConstraintUsage() { + AssertConstraintUsageContext _localctx = new AssertConstraintUsageContext(Context, State); + EnterRule(_localctx, 764, RULE_assertConstraintUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 3996; + occurrenceUsagePrefix(); + State = 3997; + Match(ASSERT); + State = 3999; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==NOT) { + { + State = 3998; + Match(NOT); + } + } + + State = 4007; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 4001; + ownedReferenceSubsetting(); + State = 4003; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4002; + featureSpecializationPart(); + } + } + + } + break; + case CONSTRAINT: + { + State = 4005; + Match(CONSTRAINT); + State = 4006; + constraintUsageDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + State = 4009; + calculationBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConstraintUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public ConstraintUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_constraintUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConstraintUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConstraintUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConstraintUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + ConstraintUsageDeclarationContext _localctx = new ConstraintUsageDeclarationContext(Context, State); + EnterRule(_localctx, 766, RULE_constraintUsageDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4012; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 4011; + usageDeclaration(); + } + } + + State = 4015; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 4014; + valuePart(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REQUIREMENT() { return GetToken(SysMLv2Parser.REQUIREMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + public RequirementDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementDefinitionContext requirementDefinition() { + RequirementDefinitionContext _localctx = new RequirementDefinitionContext(Context, State); + EnterRule(_localctx, 768, RULE_requirementDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4017; + occurrenceDefinitionPrefix(); + State = 4018; + Match(REQUIREMENT); + State = 4019; + Match(DEF); + State = 4020; + definitionDeclaration(); + State = 4021; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyItemContext[] requirementBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyItemContext requirementBodyItem(int i) { + return GetRuleContext(i); + } + public RequirementBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementBodyContext requirementBody() { + RequirementBodyContext _localctx = new RequirementBodyContext(Context, State); + EnterRule(_localctx, 770, RULE_requirementBody); + int _la; + try { + State = 4032; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 4023; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 4024; + Match(LBRACE); + State = 4028; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108748064989269684L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785551L) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & 4954067063490821295L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 4025; + requirementBodyItem(); + } + } + State = 4030; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4031; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext definitionBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubjectMemberContext subjectMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementConstraintMemberContext requirementConstraintMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FramedConcernMemberContext framedConcernMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementVerificationMemberContext requirementVerificationMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActorMemberContext actorMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StakeholderMemberContext stakeholderMember() { + return GetRuleContext(0); + } + public RequirementBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementBodyItemContext requirementBodyItem() { + RequirementBodyItemContext _localctx = new RequirementBodyItemContext(Context, State); + EnterRule(_localctx, 772, RULE_requirementBodyItem); + try { + State = 4041; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,448,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 4034; + definitionBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 4035; + subjectMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 4036; + requirementConstraintMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 4037; + framedConcernMember(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 4038; + requirementVerificationMember(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 4039; + actorMember(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 4040; + stakeholderMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubjectMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubjectUsageContext subjectUsage() { + return GetRuleContext(0); + } + public SubjectMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subjectMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubjectMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubjectMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubjectMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubjectMemberContext subjectMember() { + SubjectMemberContext _localctx = new SubjectMemberContext(Context, State); + EnterRule(_localctx, 774, RULE_subjectMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4043; + memberPrefix(); + State = 4044; + subjectUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SubjectUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SUBJECT() { return GetToken(SysMLv2Parser.SUBJECT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public SubjectUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_subjectUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSubjectUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSubjectUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSubjectUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SubjectUsageContext subjectUsage() { + SubjectUsageContext _localctx = new SubjectUsageContext(Context, State); + EnterRule(_localctx, 776, RULE_subjectUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4046; + Match(SUBJECT); + State = 4050; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4047; + usageExtensionKeyword(); + } + } + State = 4052; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4053; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementConstraintMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementKindContext requirementKind() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementConstraintUsageContext requirementConstraintUsage() { + return GetRuleContext(0); + } + public RequirementConstraintMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementConstraintMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementConstraintMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementConstraintMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementConstraintMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementConstraintMemberContext requirementConstraintMember() { + RequirementConstraintMemberContext _localctx = new RequirementConstraintMemberContext(Context, State); + EnterRule(_localctx, 778, RULE_requirementConstraintMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4055; + memberPrefix(); + State = 4056; + requirementKind(); + State = 4057; + requirementConstraintUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementKindContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSUME() { return GetToken(SysMLv2Parser.ASSUME, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REQUIRE() { return GetToken(SysMLv2Parser.REQUIRE, 0); } + public RequirementKindContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementKind; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementKind(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementKind(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementKind(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementKindContext requirementKind() { + RequirementKindContext _localctx = new RequirementKindContext(Context, State); + EnterRule(_localctx, 780, RULE_requirementKind); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4059; + _la = TokenStream.LA(1); + if ( !(_la==ASSUME || _la==REQUIRE) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementConstraintUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONSTRAINT() { return GetToken(SysMLv2Parser.CONSTRAINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public RequirementConstraintUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementConstraintUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementConstraintUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementConstraintUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementConstraintUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementConstraintUsageContext requirementConstraintUsage() { + RequirementConstraintUsageContext _localctx = new RequirementConstraintUsageContext(Context, State); + EnterRule(_localctx, 782, RULE_requirementConstraintUsage); + int _la; + try { + State = 4084; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 1); + { + State = 4061; + ownedReferenceSubsetting(); + State = 4063; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4062; + featureSpecializationPart(); + } + } + + State = 4065; + requirementBody(); + } + break; + case CONSTRAINT: + case HASH: + EnterOuterAlt(_localctx, 2); + { + State = 4079; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,453,Context) ) { + case 1: + { + State = 4070; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4067; + usageExtensionKeyword(); + } + } + State = 4072; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4073; + Match(CONSTRAINT); + } + break; + case 2: + { + State = 4075; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 4074; + usageExtensionKeyword(); + } + } + State = 4077; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==HASH ); + } + break; + } + State = 4081; + constraintUsageDeclaration(); + State = 4082; + calculationBody(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FramedConcernMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode FRAME() { return GetToken(SysMLv2Parser.FRAME, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FramedConcernUsageContext framedConcernUsage() { + return GetRuleContext(0); + } + public FramedConcernMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_framedConcernMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFramedConcernMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFramedConcernMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFramedConcernMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FramedConcernMemberContext framedConcernMember() { + FramedConcernMemberContext _localctx = new FramedConcernMemberContext(Context, State); + EnterRule(_localctx, 784, RULE_framedConcernMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4086; + memberPrefix(); + State = 4087; + Match(FRAME); + State = 4088; + framedConcernUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FramedConcernUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationBodyContext calculationBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CalculationUsageDeclarationContext calculationUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONCERN() { return GetToken(SysMLv2Parser.CONCERN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public FramedConcernUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_framedConcernUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFramedConcernUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFramedConcernUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFramedConcernUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FramedConcernUsageContext framedConcernUsage() { + FramedConcernUsageContext _localctx = new FramedConcernUsageContext(Context, State); + EnterRule(_localctx, 786, RULE_framedConcernUsage); + int _la; + try { + State = 4113; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 1); + { + State = 4090; + ownedReferenceSubsetting(); + State = 4092; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4091; + featureSpecializationPart(); + } + } + + State = 4094; + calculationBody(); + } + break; + case CONCERN: + case HASH: + EnterOuterAlt(_localctx, 2); + { + State = 4108; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,458,Context) ) { + case 1: + { + State = 4099; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4096; + usageExtensionKeyword(); + } + } + State = 4101; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4102; + Match(CONCERN); + } + break; + case 2: + { + State = 4104; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 4103; + usageExtensionKeyword(); + } + } + State = 4106; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==HASH ); + } + break; + } + State = 4110; + calculationUsageDeclaration(); + State = 4111; + calculationBody(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActorMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActorUsageContext actorUsage() { + return GetRuleContext(0); + } + public ActorMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actorMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActorMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActorMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActorMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActorMemberContext actorMember() { + ActorMemberContext _localctx = new ActorMemberContext(Context, State); + EnterRule(_localctx, 788, RULE_actorMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4115; + memberPrefix(); + State = 4116; + actorUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ActorUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ACTOR() { return GetToken(SysMLv2Parser.ACTOR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public ActorUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_actorUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterActorUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitActorUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitActorUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ActorUsageContext actorUsage() { + ActorUsageContext _localctx = new ActorUsageContext(Context, State); + EnterRule(_localctx, 790, RULE_actorUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4118; + Match(ACTOR); + State = 4122; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4119; + usageExtensionKeyword(); + } + } + State = 4124; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4125; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StakeholderMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public StakeholderUsageContext stakeholderUsage() { + return GetRuleContext(0); + } + public StakeholderMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stakeholderMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStakeholderMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStakeholderMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStakeholderMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StakeholderMemberContext stakeholderMember() { + StakeholderMemberContext _localctx = new StakeholderMemberContext(Context, State); + EnterRule(_localctx, 792, RULE_stakeholderMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4127; + memberPrefix(); + State = 4128; + stakeholderUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class StakeholderUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAKEHOLDER() { return GetToken(SysMLv2Parser.STAKEHOLDER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public StakeholderUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_stakeholderUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterStakeholderUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitStakeholderUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitStakeholderUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public StakeholderUsageContext stakeholderUsage() { + StakeholderUsageContext _localctx = new StakeholderUsageContext(Context, State); + EnterRule(_localctx, 794, RULE_stakeholderUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4130; + Match(STAKEHOLDER); + State = 4134; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4131; + usageExtensionKeyword(); + } + } + State = 4136; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4137; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REQUIREMENT() { return GetToken(SysMLv2Parser.REQUIREMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + public RequirementUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementUsageContext requirementUsage() { + RequirementUsageContext _localctx = new RequirementUsageContext(Context, State); + EnterRule(_localctx, 796, RULE_requirementUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4139; + occurrenceUsagePrefix(); + State = 4140; + Match(REQUIREMENT); + State = 4141; + constraintUsageDeclaration(); + State = 4142; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SatisfyRequirementUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SATISFY() { return GetToken(SysMLv2Parser.SATISFY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REQUIREMENT() { return GetToken(SysMLv2Parser.REQUIREMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSERT() { return GetToken(SysMLv2Parser.ASSERT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NOT() { return GetToken(SysMLv2Parser.NOT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BY() { return GetToken(SysMLv2Parser.BY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public SatisfactionSubjectMemberContext satisfactionSubjectMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public SatisfyRequirementUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_satisfyRequirementUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSatisfyRequirementUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSatisfyRequirementUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSatisfyRequirementUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SatisfyRequirementUsageContext satisfyRequirementUsage() { + SatisfyRequirementUsageContext _localctx = new SatisfyRequirementUsageContext(Context, State); + EnterRule(_localctx, 798, RULE_satisfyRequirementUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4144; + occurrenceUsagePrefix(); + State = 4150; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case ASSERT: + { + State = 4145; + Match(ASSERT); + State = 4147; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==NOT) { + { + State = 4146; + Match(NOT); + } + } + + } + break; + case NOT: + { + State = 4149; + Match(NOT); + } + break; + case SATISFY: + break; + default: + break; + } + State = 4152; + Match(SATISFY); + State = 4161; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 4153; + ownedReferenceSubsetting(); + State = 4155; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4154; + featureSpecializationPart(); + } + } + + } + break; + case REQUIREMENT: + { + State = 4157; + Match(REQUIREMENT); + State = 4159; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 4158; + usageDeclaration(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + State = 4164; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 4163; + valuePart(); + } + } + + State = 4168; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==BY) { + { + State = 4166; + Match(BY); + State = 4167; + satisfactionSubjectMember(); + } + } + + State = 4170; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SatisfactionSubjectMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SatisfactionParameterContext satisfactionParameter() { + return GetRuleContext(0); + } + public SatisfactionSubjectMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_satisfactionSubjectMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSatisfactionSubjectMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSatisfactionSubjectMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSatisfactionSubjectMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SatisfactionSubjectMemberContext satisfactionSubjectMember() { + SatisfactionSubjectMemberContext _localctx = new SatisfactionSubjectMemberContext(Context, State); + EnterRule(_localctx, 800, RULE_satisfactionSubjectMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4172; + satisfactionParameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SatisfactionParameterContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SatisfactionFeatureValueContext satisfactionFeatureValue() { + return GetRuleContext(0); + } + public SatisfactionParameterContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_satisfactionParameter; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSatisfactionParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSatisfactionParameter(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSatisfactionParameter(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SatisfactionParameterContext satisfactionParameter() { + SatisfactionParameterContext _localctx = new SatisfactionParameterContext(Context, State); + EnterRule(_localctx, 802, RULE_satisfactionParameter); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4174; + satisfactionFeatureValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SatisfactionFeatureValueContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public SatisfactionReferenceExpressionContext satisfactionReferenceExpression() { + return GetRuleContext(0); + } + public SatisfactionFeatureValueContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_satisfactionFeatureValue; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSatisfactionFeatureValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSatisfactionFeatureValue(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSatisfactionFeatureValue(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SatisfactionFeatureValueContext satisfactionFeatureValue() { + SatisfactionFeatureValueContext _localctx = new SatisfactionFeatureValueContext(Context, State); + EnterRule(_localctx, 804, RULE_satisfactionFeatureValue); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4176; + satisfactionReferenceExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class SatisfactionReferenceExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public FeatureChainMemberContext featureChainMember() { + return GetRuleContext(0); + } + public SatisfactionReferenceExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_satisfactionReferenceExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterSatisfactionReferenceExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitSatisfactionReferenceExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitSatisfactionReferenceExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SatisfactionReferenceExpressionContext satisfactionReferenceExpression() { + SatisfactionReferenceExpressionContext _localctx = new SatisfactionReferenceExpressionContext(Context, State); + EnterRule(_localctx, 806, RULE_satisfactionReferenceExpression); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4178; + featureChainMember(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConcernDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONCERN() { return GetToken(SysMLv2Parser.CONCERN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + public ConcernDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concernDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConcernDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConcernDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConcernDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConcernDefinitionContext concernDefinition() { + ConcernDefinitionContext _localctx = new ConcernDefinitionContext(Context, State); + EnterRule(_localctx, 808, RULE_concernDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4180; + occurrenceDefinitionPrefix(); + State = 4181; + Match(CONCERN); + State = 4182; + Match(DEF); + State = 4183; + definitionDeclaration(); + State = 4184; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ConcernUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CONCERN() { return GetToken(SysMLv2Parser.CONCERN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + public ConcernUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_concernUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterConcernUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitConcernUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitConcernUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ConcernUsageContext concernUsage() { + ConcernUsageContext _localctx = new ConcernUsageContext(Context, State); + EnterRule(_localctx, 810, RULE_concernUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4186; + occurrenceUsagePrefix(); + State = 4187; + Match(CONCERN); + State = 4188; + constraintUsageDeclaration(); + State = 4189; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CaseDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE() { return GetToken(SysMLv2Parser.CASE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public CaseDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_caseDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCaseDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CaseDefinitionContext caseDefinition() { + CaseDefinitionContext _localctx = new CaseDefinitionContext(Context, State); + EnterRule(_localctx, 812, RULE_caseDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4191; + occurrenceDefinitionPrefix(); + State = 4192; + Match(CASE); + State = 4193; + Match(DEF); + State = 4194; + definitionDeclaration(); + State = 4195; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CaseUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE() { return GetToken(SysMLv2Parser.CASE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public CaseUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_caseUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCaseUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CaseUsageContext caseUsage() { + CaseUsageContext _localctx = new CaseUsageContext(Context, State); + EnterRule(_localctx, 814, RULE_caseUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4197; + occurrenceUsagePrefix(); + State = 4198; + Match(CASE); + State = 4199; + constraintUsageDeclaration(); + State = 4200; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CaseBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyItemContext[] caseBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyItemContext caseBodyItem(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ResultExpressionMemberContext resultExpressionMember() { + return GetRuleContext(0); + } + public CaseBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_caseBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCaseBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCaseBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCaseBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CaseBodyContext caseBody() { + CaseBodyContext _localctx = new CaseBodyContext(Context, State); + EnterRule(_localctx, 816, RULE_caseBody); + int _la; + try { + int _alt; + State = 4214; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 4202; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 4203; + Match(LBRACE); + State = 4207; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,469,Context); + while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + State = 4204; + caseBodyItem(); + } + } + } + State = 4209; + ErrorHandler.Sync(this); + _alt = Interpreter.AdaptivePredict(TokenStream,469,Context); + } + State = 4211; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4398047559936L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & 2161757106910275587L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & 406731341347971073L) != 0) || ((((_la - 210)) & ~0x3f) == 0 && ((1L << (_la - 210)) & 16273L) != 0)) { + { + State = 4210; + resultExpressionMember(); + } + } + + State = 4213; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CaseBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ActionBodyItemContext actionBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ReturnParameterMemberContext returnParameterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public SubjectMemberContext subjectMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ActorMemberContext actorMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ObjectiveMemberContext objectiveMember() { + return GetRuleContext(0); + } + public CaseBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_caseBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCaseBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCaseBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCaseBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CaseBodyItemContext caseBodyItem() { + CaseBodyItemContext _localctx = new CaseBodyItemContext(Context, State); + EnterRule(_localctx, 818, RULE_caseBodyItem); + try { + State = 4221; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,472,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 4216; + actionBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 4217; + returnParameterMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 4218; + subjectMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 4219; + actorMember(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 4220; + objectiveMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ObjectiveMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode OBJECTIVE() { return GetToken(SysMLv2Parser.OBJECTIVE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ObjectiveRequirementUsageContext objectiveRequirementUsage() { + return GetRuleContext(0); + } + public ObjectiveMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_objectiveMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterObjectiveMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitObjectiveMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitObjectiveMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ObjectiveMemberContext objectiveMember() { + ObjectiveMemberContext _localctx = new ObjectiveMemberContext(Context, State); + EnterRule(_localctx, 820, RULE_objectiveMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4223; + memberPrefix(); + State = 4224; + Match(OBJECTIVE); + State = 4225; + objectiveRequirementUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ObjectiveRequirementUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public ObjectiveRequirementUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_objectiveRequirementUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterObjectiveRequirementUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitObjectiveRequirementUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitObjectiveRequirementUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ObjectiveRequirementUsageContext objectiveRequirementUsage() { + ObjectiveRequirementUsageContext _localctx = new ObjectiveRequirementUsageContext(Context, State); + EnterRule(_localctx, 822, RULE_objectiveRequirementUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4230; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4227; + usageExtensionKeyword(); + } + } + State = 4232; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4233; + constraintUsageDeclaration(); + State = 4234; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AnalysisCaseDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ANALYSIS() { return GetToken(SysMLv2Parser.ANALYSIS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public AnalysisCaseDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_analysisCaseDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAnalysisCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAnalysisCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAnalysisCaseDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AnalysisCaseDefinitionContext analysisCaseDefinition() { + AnalysisCaseDefinitionContext _localctx = new AnalysisCaseDefinitionContext(Context, State); + EnterRule(_localctx, 824, RULE_analysisCaseDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4236; + occurrenceDefinitionPrefix(); + State = 4237; + Match(ANALYSIS); + State = 4238; + Match(DEF); + State = 4239; + definitionDeclaration(); + State = 4240; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AnalysisCaseUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ANALYSIS() { return GetToken(SysMLv2Parser.ANALYSIS, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public AnalysisCaseUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_analysisCaseUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterAnalysisCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitAnalysisCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitAnalysisCaseUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AnalysisCaseUsageContext analysisCaseUsage() { + AnalysisCaseUsageContext _localctx = new AnalysisCaseUsageContext(Context, State); + EnterRule(_localctx, 826, RULE_analysisCaseUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4242; + occurrenceUsagePrefix(); + State = 4243; + Match(ANALYSIS); + State = 4244; + constraintUsageDeclaration(); + State = 4245; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class VerificationCaseDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VERIFICATION() { return GetToken(SysMLv2Parser.VERIFICATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public VerificationCaseDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_verificationCaseDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterVerificationCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitVerificationCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitVerificationCaseDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public VerificationCaseDefinitionContext verificationCaseDefinition() { + VerificationCaseDefinitionContext _localctx = new VerificationCaseDefinitionContext(Context, State); + EnterRule(_localctx, 828, RULE_verificationCaseDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4247; + occurrenceDefinitionPrefix(); + State = 4248; + Match(VERIFICATION); + State = 4249; + Match(DEF); + State = 4250; + definitionDeclaration(); + State = 4251; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class VerificationCaseUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VERIFICATION() { return GetToken(SysMLv2Parser.VERIFICATION, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public VerificationCaseUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_verificationCaseUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterVerificationCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitVerificationCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitVerificationCaseUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public VerificationCaseUsageContext verificationCaseUsage() { + VerificationCaseUsageContext _localctx = new VerificationCaseUsageContext(Context, State); + EnterRule(_localctx, 830, RULE_verificationCaseUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4253; + occurrenceUsagePrefix(); + State = 4254; + Match(VERIFICATION); + State = 4255; + constraintUsageDeclaration(); + State = 4256; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementVerificationMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VERIFY() { return GetToken(SysMLv2Parser.VERIFY, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RequirementVerificationUsageContext requirementVerificationUsage() { + return GetRuleContext(0); + } + public RequirementVerificationMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementVerificationMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementVerificationMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementVerificationMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementVerificationMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementVerificationMemberContext requirementVerificationMember() { + RequirementVerificationMemberContext _localctx = new RequirementVerificationMemberContext(Context, State); + EnterRule(_localctx, 832, RULE_requirementVerificationMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4258; + memberPrefix(); + State = 4259; + Match(VERIFY); + State = 4260; + requirementVerificationUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RequirementVerificationUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext[] featureSpecialization() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationContext featureSpecialization(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REQUIREMENT() { return GetToken(SysMLv2Parser.REQUIREMENT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public RequirementVerificationUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_requirementVerificationUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRequirementVerificationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRequirementVerificationUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRequirementVerificationUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RequirementVerificationUsageContext requirementVerificationUsage() { + RequirementVerificationUsageContext _localctx = new RequirementVerificationUsageContext(Context, State); + EnterRule(_localctx, 834, RULE_requirementVerificationUsage); + int _la; + try { + State = 4288; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 1); + { + State = 4262; + ownedReferenceSubsetting(); + State = 4266; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==CROSSES || _la==DEFINED || ((((_la - 125)) & ~0x3f) == 0 && ((1L << (_la - 125)) & -8067072823929077751L) != 0) || _la==COLON) { + { + { + State = 4263; + featureSpecialization(); + } + } + State = 4268; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4269; + requirementBody(); + } + break; + case REQUIREMENT: + case HASH: + EnterOuterAlt(_localctx, 2); + { + State = 4283; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,477,Context) ) { + case 1: + { + State = 4274; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4271; + usageExtensionKeyword(); + } + } + State = 4276; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4277; + Match(REQUIREMENT); + } + break; + case 2: + { + State = 4279; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 4278; + usageExtensionKeyword(); + } + } + State = 4281; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==HASH ); + } + break; + } + State = 4285; + constraintUsageDeclaration(); + State = 4286; + requirementBody(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UseCaseDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode USE() { return GetToken(SysMLv2Parser.USE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE() { return GetToken(SysMLv2Parser.CASE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public UseCaseDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_useCaseDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUseCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUseCaseDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUseCaseDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UseCaseDefinitionContext useCaseDefinition() { + UseCaseDefinitionContext _localctx = new UseCaseDefinitionContext(Context, State); + EnterRule(_localctx, 836, RULE_useCaseDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4290; + occurrenceDefinitionPrefix(); + State = 4291; + Match(USE); + State = 4292; + Match(CASE); + State = 4293; + Match(DEF); + State = 4294; + definitionDeclaration(); + State = 4295; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class UseCaseUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode USE() { return GetToken(SysMLv2Parser.USE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE() { return GetToken(SysMLv2Parser.CASE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + public UseCaseUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_useCaseUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterUseCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitUseCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitUseCaseUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public UseCaseUsageContext useCaseUsage() { + UseCaseUsageContext _localctx = new UseCaseUsageContext(Context, State); + EnterRule(_localctx, 838, RULE_useCaseUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4297; + occurrenceUsagePrefix(); + State = 4298; + Match(USE); + State = 4299; + Match(CASE); + State = 4300; + constraintUsageDeclaration(); + State = 4301; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IncludeUseCaseUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INCLUDE() { return GetToken(SysMLv2Parser.INCLUDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public CaseBodyContext caseBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode USE() { return GetToken(SysMLv2Parser.USE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode CASE() { return GetToken(SysMLv2Parser.CASE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + public IncludeUseCaseUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_includeUseCaseUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterIncludeUseCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitIncludeUseCaseUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitIncludeUseCaseUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IncludeUseCaseUsageContext includeUseCaseUsage() { + IncludeUseCaseUsageContext _localctx = new IncludeUseCaseUsageContext(Context, State); + EnterRule(_localctx, 840, RULE_includeUseCaseUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4303; + occurrenceUsagePrefix(); + State = 4304; + Match(INCLUDE); + State = 4314; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + { + State = 4305; + ownedReferenceSubsetting(); + State = 4307; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4306; + featureSpecializationPart(); + } + } + + } + break; + case USE: + { + State = 4309; + Match(USE); + State = 4310; + Match(CASE); + State = 4312; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 4311; + usageDeclaration(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + State = 4317; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 4316; + valuePart(); + } + } + + State = 4319; + caseBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VIEW() { return GetToken(SysMLv2Parser.VIEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewDefinitionBodyContext viewDefinitionBody() { + return GetRuleContext(0); + } + public ViewDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewDefinitionContext viewDefinition() { + ViewDefinitionContext _localctx = new ViewDefinitionContext(Context, State); + EnterRule(_localctx, 842, RULE_viewDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4321; + occurrenceDefinitionPrefix(); + State = 4322; + Match(VIEW); + State = 4323; + Match(DEF); + State = 4324; + definitionDeclaration(); + State = 4325; + viewDefinitionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewDefinitionBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ViewDefinitionBodyItemContext[] viewDefinitionBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewDefinitionBodyItemContext viewDefinitionBodyItem(int i) { + return GetRuleContext(i); + } + public ViewDefinitionBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewDefinitionBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewDefinitionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewDefinitionBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewDefinitionBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewDefinitionBodyContext viewDefinitionBody() { + ViewDefinitionBodyContext _localctx = new ViewDefinitionBodyContext(Context, State); + EnterRule(_localctx, 844, RULE_viewDefinitionBody); + int _la; + try { + State = 4336; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 4327; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 4328; + Match(LBRACE); + State = 4332; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2108748064989138580L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785799L) != 0) || ((((_la - 129)) & ~0x3f) == 0 && ((1L << (_la - 129)) & -8538610221605949097L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 4329; + viewDefinitionBodyItem(); + } + } + State = 4334; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4335; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewDefinitionBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext definitionBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ElementFilterMemberContext elementFilterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewRenderingMemberContext viewRenderingMember() { + return GetRuleContext(0); + } + public ViewDefinitionBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewDefinitionBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewDefinitionBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewDefinitionBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewDefinitionBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewDefinitionBodyItemContext viewDefinitionBodyItem() { + ViewDefinitionBodyItemContext _localctx = new ViewDefinitionBodyItemContext(Context, State); + EnterRule(_localctx, 846, RULE_viewDefinitionBodyItem); + try { + State = 4341; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,485,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 4338; + definitionBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 4339; + elementFilterMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 4340; + viewRenderingMember(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewRenderingMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MemberPrefixContext memberPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RENDER() { return GetToken(SysMLv2Parser.RENDER, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ViewRenderingUsageContext viewRenderingUsage() { + return GetRuleContext(0); + } + public ViewRenderingMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewRenderingMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewRenderingMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewRenderingMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewRenderingMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewRenderingMemberContext viewRenderingMember() { + ViewRenderingMemberContext _localctx = new ViewRenderingMemberContext(Context, State); + EnterRule(_localctx, 848, RULE_viewRenderingMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4343; + memberPrefix(); + State = 4344; + Match(RENDER); + State = 4345; + viewRenderingUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewRenderingUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedReferenceSubsettingContext ownedReferenceSubsetting() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageBodyContext usageBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RENDERING() { return GetToken(SysMLv2Parser.RENDERING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public ViewRenderingUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewRenderingUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewRenderingUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewRenderingUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewRenderingUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewRenderingUsageContext viewRenderingUsage() { + ViewRenderingUsageContext _localctx = new ViewRenderingUsageContext(Context, State); + EnterRule(_localctx, 850, RULE_viewRenderingUsage); + int _la; + try { + State = 4368; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case BEHAVIOR: + case CROSSES: + case FEATURE: + case FUNCTION: + case INTERACTION: + case LANGUAGE: + case LOCALE: + case MEMBER: + case METACLASS: + case MULTIPLICITY: + case PREDICATE: + case STEP: + case TYPE: + case VAR: + case DOLLAR: + case IDENTIFIER: + case STRING: + EnterOuterAlt(_localctx, 1); + { + State = 4347; + ownedReferenceSubsetting(); + State = 4349; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4348; + featureSpecializationPart(); + } + } + + State = 4351; + usageBody(); + } + break; + case RENDERING: + case HASH: + EnterOuterAlt(_localctx, 2); + { + State = 4365; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,489,Context) ) { + case 1: + { + State = 4356; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4353; + usageExtensionKeyword(); + } + } + State = 4358; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4359; + Match(RENDERING); + } + break; + case 2: + { + State = 4361; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 4360; + usageExtensionKeyword(); + } + } + State = 4363; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==HASH ); + } + break; + } + State = 4367; + usage(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VIEW() { return GetToken(SysMLv2Parser.VIEW, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ViewBodyContext viewBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public ViewUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewUsageContext viewUsage() { + ViewUsageContext _localctx = new ViewUsageContext(Context, State); + EnterRule(_localctx, 852, RULE_viewUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4370; + occurrenceUsagePrefix(); + State = 4371; + Match(VIEW); + State = 4373; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 4372; + usageDeclaration(); + } + } + + State = 4376; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 4375; + valuePart(); + } + } + + State = 4378; + viewBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewBodyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMI() { return GetToken(SysMLv2Parser.SEMI, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(SysMLv2Parser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(SysMLv2Parser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ViewBodyItemContext[] viewBodyItem() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewBodyItemContext viewBodyItem(int i) { + return GetRuleContext(i); + } + public ViewBodyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewBody; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewBody(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewBody(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewBodyContext viewBody() { + ViewBodyContext _localctx = new ViewBodyContext(Context, State); + EnterRule(_localctx, 854, RULE_viewBody); + int _la; + try { + State = 4389; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case SEMI: + EnterOuterAlt(_localctx, 1); + { + State = 4380; + Match(SEMI); + } + break; + case LBRACE: + EnterOuterAlt(_localctx, 2); + { + State = 4381; + Match(LBRACE); + State = 4385; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 6720434083416526484L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -2344362795121785799L) != 0) || ((((_la - 129)) & ~0x3f) == 0 && ((1L << (_la - 129)) & -8538610221605949097L) != 0) || ((((_la - 204)) & ~0x3f) == 0 && ((1L << (_la - 204)) & 574671L) != 0)) { + { + { + State = 4382; + viewBodyItem(); + } + } + State = 4387; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4388; + Match(RBRACE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewBodyItemContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public DefinitionBodyItemContext definitionBodyItem() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ElementFilterMemberContext elementFilterMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ViewRenderingMemberContext viewRenderingMember() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ExposeContext expose() { + return GetRuleContext(0); + } + public ViewBodyItemContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewBodyItem; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewBodyItem(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewBodyItem(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewBodyItemContext viewBodyItem() { + ViewBodyItemContext _localctx = new ViewBodyItemContext(Context, State); + EnterRule(_localctx, 856, RULE_viewBodyItem); + try { + State = 4395; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,495,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 4391; + definitionBodyItem(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 4392; + elementFilterMember(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 4393; + viewRenderingMember(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 4394; + expose(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExposeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode EXPOSE() { return GetToken(SysMLv2Parser.EXPOSE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public RelationshipBodyContext relationshipBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MembershipExposeContext membershipExpose() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceExposeContext namespaceExpose() { + return GetRuleContext(0); + } + public ExposeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_expose; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExpose(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExpose(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExpose(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExposeContext expose() { + ExposeContext _localctx = new ExposeContext(Context, State); + EnterRule(_localctx, 858, RULE_expose); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4397; + Match(EXPOSE); + State = 4400; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,496,Context) ) { + case 1: + { + State = 4398; + membershipExpose(); + } + break; + case 2: + { + State = 4399; + namespaceExpose(); + } + break; + } + State = 4402; + relationshipBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MembershipExposeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MembershipImportContext membershipImport() { + return GetRuleContext(0); + } + public MembershipExposeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_membershipExpose; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMembershipExpose(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMembershipExpose(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMembershipExpose(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MembershipExposeContext membershipExpose() { + MembershipExposeContext _localctx = new MembershipExposeContext(Context, State); + EnterRule(_localctx, 860, RULE_membershipExpose); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4404; + membershipImport(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceExposeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public NamespaceImportContext namespaceImport() { + return GetRuleContext(0); + } + public NamespaceExposeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceExpose; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceExpose(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceExpose(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceExpose(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceExposeContext namespaceExpose() { + NamespaceExposeContext _localctx = new NamespaceExposeContext(Context, State); + EnterRule(_localctx, 862, RULE_namespaceExpose); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4406; + namespaceImport(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewpointDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VIEWPOINT() { return GetToken(SysMLv2Parser.VIEWPOINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionDeclarationContext definitionDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + public ViewpointDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewpointDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewpointDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewpointDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewpointDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewpointDefinitionContext viewpointDefinition() { + ViewpointDefinitionContext _localctx = new ViewpointDefinitionContext(Context, State); + EnterRule(_localctx, 864, RULE_viewpointDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4408; + occurrenceDefinitionPrefix(); + State = 4409; + Match(VIEWPOINT); + State = 4410; + Match(DEF); + State = 4411; + definitionDeclaration(); + State = 4412; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ViewpointUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode VIEWPOINT() { return GetToken(SysMLv2Parser.VIEWPOINT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ConstraintUsageDeclarationContext constraintUsageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public RequirementBodyContext requirementBody() { + return GetRuleContext(0); + } + public ViewpointUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_viewpointUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterViewpointUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitViewpointUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitViewpointUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ViewpointUsageContext viewpointUsage() { + ViewpointUsageContext _localctx = new ViewpointUsageContext(Context, State); + EnterRule(_localctx, 866, RULE_viewpointUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4414; + occurrenceUsagePrefix(); + State = 4415; + Match(VIEWPOINT); + State = 4416; + constraintUsageDeclaration(); + State = 4417; + requirementBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RenderingDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceDefinitionPrefixContext occurrenceDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RENDERING() { return GetToken(SysMLv2Parser.RENDERING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + public RenderingDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_renderingDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRenderingDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRenderingDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRenderingDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RenderingDefinitionContext renderingDefinition() { + RenderingDefinitionContext _localctx = new RenderingDefinitionContext(Context, State); + EnterRule(_localctx, 868, RULE_renderingDefinition); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4419; + occurrenceDefinitionPrefix(); + State = 4420; + Match(RENDERING); + State = 4421; + Match(DEF); + State = 4422; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class RenderingUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OccurrenceUsagePrefixContext occurrenceUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RENDERING() { return GetToken(SysMLv2Parser.RENDERING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + public RenderingUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_renderingUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterRenderingUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitRenderingUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitRenderingUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public RenderingUsageContext renderingUsage() { + RenderingUsageContext _localctx = new RenderingUsageContext(Context, State); + EnterRule(_localctx, 870, RULE_renderingUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4424; + occurrenceUsagePrefix(); + State = 4425; + Match(RENDERING); + State = 4426; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode METADATA() { return GetToken(SysMLv2Parser.METADATA, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ABSTRACT() { return GetToken(SysMLv2Parser.ABSTRACT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext[] definitionExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext definitionExtensionKeyword(int i) { + return GetRuleContext(i); + } + public MetadataDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataDefinitionContext metadataDefinition() { + MetadataDefinitionContext _localctx = new MetadataDefinitionContext(Context, State); + EnterRule(_localctx, 872, RULE_metadataDefinition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4429; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT) { + { + State = 4428; + Match(ABSTRACT); + } + } + + State = 4434; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==HASH) { + { + { + State = 4431; + definitionExtensionKeyword(); + } + } + State = 4436; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 4437; + Match(METADATA); + State = 4438; + Match(DEF); + State = 4439; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PrefixMetadataUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedFeatureTypingContext ownedFeatureTyping() { + return GetRuleContext(0); + } + public PrefixMetadataUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_prefixMetadataUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPrefixMetadataUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPrefixMetadataUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPrefixMetadataUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PrefixMetadataUsageContext prefixMetadataUsage() { + PrefixMetadataUsageContext _localctx = new PrefixMetadataUsageContext(Context, State); + EnterRule(_localctx, 874, RULE_prefixMetadataUsage); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4441; + ownedFeatureTyping(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataBodyUsageMemberContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyUsageContext metadataBodyUsage() { + return GetRuleContext(0); + } + public MetadataBodyUsageMemberContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataBodyUsageMember; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataBodyUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataBodyUsageMember(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataBodyUsageMember(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataBodyUsageMemberContext metadataBodyUsageMember() { + MetadataBodyUsageMemberContext _localctx = new MetadataBodyUsageMemberContext(Context, State); + EnterRule(_localctx, 876, RULE_metadataBodyUsageMember); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4443; + metadataBodyUsage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class MetadataBodyUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public OwnedRedefinitionContext ownedRedefinition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public MetadataBodyContext metadataBody() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REF() { return GetToken(SysMLv2Parser.REF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public FeatureSpecializationPartContext featureSpecializationPart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_GT_GT() { return GetToken(SysMLv2Parser.COLON_GT_GT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode REDEFINES() { return GetToken(SysMLv2Parser.REDEFINES, 0); } + public MetadataBodyUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_metadataBodyUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterMetadataBodyUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitMetadataBodyUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitMetadataBodyUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public MetadataBodyUsageContext metadataBodyUsage() { + MetadataBodyUsageContext _localctx = new MetadataBodyUsageContext(Context, State); + EnterRule(_localctx, 878, RULE_metadataBodyUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4446; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REF) { + { + State = 4445; + Match(REF); + } + } + + State = 4449; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==REDEFINES || _la==COLON_GT_GT) { + { + State = 4448; + _la = TokenStream.LA(1); + if ( !(_la==REDEFINES || _la==COLON_GT_GT) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + + State = 4451; + ownedRedefinition(); + State = 4453; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==CROSSES || _la==DEFINED || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & 4507997678600321L) != 0) || ((((_la - 175)) & ~0x3f) == 0 && ((1L << (_la - 175)) & 69256356867L) != 0)) { + { + State = 4452; + featureSpecializationPart(); + } + } + + State = 4456; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 4455; + valuePart(); + } + } + + State = 4458; + metadataBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExtendedDefinitionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DEF() { return GetToken(SysMLv2Parser.DEF, 0); } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionContext definition() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public BasicDefinitionPrefixContext basicDefinitionPrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext[] definitionExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public DefinitionExtensionKeywordContext definitionExtensionKeyword(int i) { + return GetRuleContext(i); + } + public ExtendedDefinitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_extendedDefinition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExtendedDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExtendedDefinition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExtendedDefinition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExtendedDefinitionContext extendedDefinition() { + ExtendedDefinitionContext _localctx = new ExtendedDefinitionContext(Context, State); + EnterRule(_localctx, 880, RULE_extendedDefinition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4461; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==ABSTRACT || _la==VARIATION) { + { + State = 4460; + basicDefinitionPrefix(); + } + } + + State = 4464; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 4463; + definitionExtensionKeyword(); + } + } + State = 4466; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==HASH ); + State = 4468; + Match(DEF); + State = 4469; + definition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ExtendedUsageContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UnextendedUsagePrefixContext unextendedUsagePrefix() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageContext usage() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext[] usageExtensionKeyword() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public UsageExtensionKeywordContext usageExtensionKeyword(int i) { + return GetRuleContext(i); + } + public ExtendedUsageContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_extendedUsage; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterExtendedUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitExtendedUsage(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitExtendedUsage(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ExtendedUsageContext extendedUsage() { + ExtendedUsageContext _localctx = new ExtendedUsageContext(Context, State); + EnterRule(_localctx, 882, RULE_extendedUsage); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4471; + unextendedUsagePrefix(); + State = 4473; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 4472; + usageExtensionKeyword(); + } + } + State = 4475; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==HASH ); + State = 4477; + usage(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FilterPackageImportDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public MembershipImportContext membershipImport() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public NamespaceImportDirectContext namespaceImportDirect() { + return GetRuleContext(0); + } + public FilterPackageImportDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_filterPackageImportDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFilterPackageImportDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFilterPackageImportDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFilterPackageImportDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FilterPackageImportDeclarationContext filterPackageImportDeclaration() { + FilterPackageImportDeclarationContext _localctx = new FilterPackageImportDeclarationContext(Context, State); + EnterRule(_localctx, 884, RULE_filterPackageImportDeclaration); + try { + State = 4481; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,506,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 4479; + membershipImport(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 4480; + namespaceImportDirect(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NamespaceImportDirectContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public QualifiedNameContext qualifiedName() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] COLON_COLON() { return GetTokens(SysMLv2Parser.COLON_COLON); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON_COLON(int i) { + return GetToken(SysMLv2Parser.COLON_COLON, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR() { return GetToken(SysMLv2Parser.STAR, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STAR_STAR() { return GetToken(SysMLv2Parser.STAR_STAR, 0); } + public NamespaceImportDirectContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_namespaceImportDirect; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNamespaceImportDirect(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNamespaceImportDirect(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNamespaceImportDirect(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NamespaceImportDirectContext namespaceImportDirect() { + NamespaceImportDirectContext _localctx = new NamespaceImportDirectContext(Context, State); + EnterRule(_localctx, 886, RULE_namespaceImportDirect); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4483; + qualifiedName(); + State = 4484; + Match(COLON_COLON); + State = 4485; + Match(STAR); + State = 4488; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON_COLON) { + { + State = 4486; + Match(COLON_COLON); + State = 4487; + Match(STAR_STAR); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class CalculationUsageDeclarationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public UsageDeclarationContext usageDeclaration() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ValuePartContext valuePart() { + return GetRuleContext(0); + } + public CalculationUsageDeclarationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_calculationUsageDeclaration; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterCalculationUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitCalculationUsageDeclaration(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitCalculationUsageDeclaration(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public CalculationUsageDeclarationContext calculationUsageDeclaration() { + CalculationUsageDeclarationContext _localctx = new CalculationUsageDeclarationContext(Context, State); + EnterRule(_localctx, 888, RULE_calculationUsageDeclaration); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 4491; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 145135535915008L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & -7998108914974981119L) != 0) || ((((_la - 143)) & ~0x3f) == 0 && ((1L << (_la - 143)) & -6917489432336482271L) != 0) || ((((_la - 211)) & ~0x3f) == 0 && ((1L << (_la - 211)) & 385L) != 0)) { + { + State = 4490; + usageDeclaration(); + } + } + + State = 4494; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==DEFAULT || _la==COLON_EQ || _la==EQ) { + { + State = 4493; + valuePart(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyActionUsage_Context : ParserRuleContext { + public EmptyActionUsage_Context(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyActionUsage_; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyActionUsage_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyActionUsage_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyActionUsage_(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyActionUsage_Context emptyActionUsage_() { + EmptyActionUsage_Context _localctx = new EmptyActionUsage_Context(Context, State); + EnterRule(_localctx, 890, RULE_emptyActionUsage_); + try { + EnterOuterAlt(_localctx, 1); + { + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyFeature_Context : ParserRuleContext { + public EmptyFeature_Context(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyFeature_; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyFeature_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyFeature_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyFeature_(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyFeature_Context emptyFeature_() { + EmptyFeature_Context _localctx = new EmptyFeature_Context(Context, State); + EnterRule(_localctx, 892, RULE_emptyFeature_); + try { + EnterOuterAlt(_localctx, 1); + { + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyMultiplicity_Context : ParserRuleContext { + public EmptyMultiplicity_Context(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyMultiplicity_; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyMultiplicity_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyMultiplicity_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyMultiplicity_(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyMultiplicity_Context emptyMultiplicity_() { + EmptyMultiplicity_Context _localctx = new EmptyMultiplicity_Context(Context, State); + EnterRule(_localctx, 894, RULE_emptyMultiplicity_); + try { + EnterOuterAlt(_localctx, 1); + { + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class EmptyUsage_Context : ParserRuleContext { + public EmptyUsage_Context(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_emptyUsage_; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterEmptyUsage_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitEmptyUsage_(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitEmptyUsage_(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public EmptyUsage_Context emptyUsage_() { + EmptyUsage_Context _localctx = new EmptyUsage_Context(Context, State); + EnterRule(_localctx, 896, RULE_emptyUsage_); + try { + EnterOuterAlt(_localctx, 1); + { + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class FilterPackageImportContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IDENTIFIER() { return GetToken(SysMLv2Parser.IDENTIFIER, 0); } + public FilterPackageImportContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_filterPackageImport; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterFilterPackageImport(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitFilterPackageImport(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitFilterPackageImport(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public FilterPackageImportContext filterPackageImport() { + FilterPackageImportContext _localctx = new FilterPackageImportContext(Context, State); + EnterRule(_localctx, 898, RULE_filterPackageImport); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4504; + Match(IDENTIFIER); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class NonFeatureChainPrimaryExpressionContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IDENTIFIER() { return GetToken(SysMLv2Parser.IDENTIFIER, 0); } + public NonFeatureChainPrimaryExpressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_nonFeatureChainPrimaryExpression; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterNonFeatureChainPrimaryExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitNonFeatureChainPrimaryExpression(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitNonFeatureChainPrimaryExpression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public NonFeatureChainPrimaryExpressionContext nonFeatureChainPrimaryExpression() { + NonFeatureChainPrimaryExpressionContext _localctx = new NonFeatureChainPrimaryExpressionContext(Context, State); + EnterRule(_localctx, 900, RULE_nonFeatureChainPrimaryExpression); + try { + EnterOuterAlt(_localctx, 1); + { + State = 4506; + Match(IDENTIFIER); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class PortConjugationContext : ParserRuleContext { + public PortConjugationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_portConjugation; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.EnterPortConjugation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + ISysMLv2ParserListener typedListener = listener as ISysMLv2ParserListener; + if (typedListener != null) typedListener.ExitPortConjugation(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + ISysMLv2ParserVisitor typedVisitor = visitor as ISysMLv2ParserVisitor; + if (typedVisitor != null) return typedVisitor.VisitPortConjugation(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public PortConjugationContext portConjugation() { + PortConjugationContext _localctx = new PortConjugationContext(Context, State); + EnterRule(_localctx, 902, RULE_portConjugation); + try { + EnterOuterAlt(_localctx, 1); + { + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public override bool Sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 0: return ownedExpression_sempred((OwnedExpressionContext)_localctx, predIndex); + } + return true; + } + private bool ownedExpression_sempred(OwnedExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return Precpred(Context, 27); + case 1: return Precpred(Context, 26); + case 2: return Precpred(Context, 25); + case 3: return Precpred(Context, 24); + case 4: return Precpred(Context, 23); + case 5: return Precpred(Context, 22); + case 6: return Precpred(Context, 21); + case 7: return Precpred(Context, 20); + case 8: return Precpred(Context, 19); + case 9: return Precpred(Context, 18); + case 10: return Precpred(Context, 17); + case 11: return Precpred(Context, 16); + case 12: return Precpred(Context, 15); + case 13: return Precpred(Context, 12); + case 14: return Precpred(Context, 11); + case 15: return Precpred(Context, 10); + case 16: return Precpred(Context, 9); + case 17: return Precpred(Context, 8); + case 18: return Precpred(Context, 7); + case 19: return Precpred(Context, 6); + case 20: return Precpred(Context, 5); + case 21: return Precpred(Context, 4); + case 22: return Precpred(Context, 3); + } + return true; + } + + private static int[] _serializedATN = { + 4,1,226,4511,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2, + 7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, + 2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21, + 2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28, + 2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35, + 2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42, + 2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49, + 2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56, + 2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63, + 2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70, + 2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77, + 2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84, + 2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91, + 2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,7,98, + 2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,7,104, + 2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110,7,110, + 2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116,7,116, + 2,117,7,117,2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122,7,122, + 2,123,7,123,2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128,7,128, + 2,129,7,129,2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134,7,134, + 2,135,7,135,2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140,7,140, + 2,141,7,141,2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146,7,146, + 2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152,7,152, + 2,153,7,153,2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158,7,158, + 2,159,7,159,2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164,7,164, + 2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170,7,170, + 2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176,7,176, + 2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182,7,182, + 2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188,7,188, + 2,189,7,189,2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194,7,194, + 2,195,7,195,2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200,7,200, + 2,201,7,201,2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206,7,206, + 2,207,7,207,2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212,7,212, + 2,213,7,213,2,214,7,214,2,215,7,215,2,216,7,216,2,217,7,217,2,218,7,218, + 2,219,7,219,2,220,7,220,2,221,7,221,2,222,7,222,2,223,7,223,2,224,7,224, + 2,225,7,225,2,226,7,226,2,227,7,227,2,228,7,228,2,229,7,229,2,230,7,230, + 2,231,7,231,2,232,7,232,2,233,7,233,2,234,7,234,2,235,7,235,2,236,7,236, + 2,237,7,237,2,238,7,238,2,239,7,239,2,240,7,240,2,241,7,241,2,242,7,242, + 2,243,7,243,2,244,7,244,2,245,7,245,2,246,7,246,2,247,7,247,2,248,7,248, + 2,249,7,249,2,250,7,250,2,251,7,251,2,252,7,252,2,253,7,253,2,254,7,254, + 2,255,7,255,2,256,7,256,2,257,7,257,2,258,7,258,2,259,7,259,2,260,7,260, + 2,261,7,261,2,262,7,262,2,263,7,263,2,264,7,264,2,265,7,265,2,266,7,266, + 2,267,7,267,2,268,7,268,2,269,7,269,2,270,7,270,2,271,7,271,2,272,7,272, + 2,273,7,273,2,274,7,274,2,275,7,275,2,276,7,276,2,277,7,277,2,278,7,278, + 2,279,7,279,2,280,7,280,2,281,7,281,2,282,7,282,2,283,7,283,2,284,7,284, + 2,285,7,285,2,286,7,286,2,287,7,287,2,288,7,288,2,289,7,289,2,290,7,290, + 2,291,7,291,2,292,7,292,2,293,7,293,2,294,7,294,2,295,7,295,2,296,7,296, + 2,297,7,297,2,298,7,298,2,299,7,299,2,300,7,300,2,301,7,301,2,302,7,302, + 2,303,7,303,2,304,7,304,2,305,7,305,2,306,7,306,2,307,7,307,2,308,7,308, + 2,309,7,309,2,310,7,310,2,311,7,311,2,312,7,312,2,313,7,313,2,314,7,314, + 2,315,7,315,2,316,7,316,2,317,7,317,2,318,7,318,2,319,7,319,2,320,7,320, + 2,321,7,321,2,322,7,322,2,323,7,323,2,324,7,324,2,325,7,325,2,326,7,326, + 2,327,7,327,2,328,7,328,2,329,7,329,2,330,7,330,2,331,7,331,2,332,7,332, + 2,333,7,333,2,334,7,334,2,335,7,335,2,336,7,336,2,337,7,337,2,338,7,338, + 2,339,7,339,2,340,7,340,2,341,7,341,2,342,7,342,2,343,7,343,2,344,7,344, + 2,345,7,345,2,346,7,346,2,347,7,347,2,348,7,348,2,349,7,349,2,350,7,350, + 2,351,7,351,2,352,7,352,2,353,7,353,2,354,7,354,2,355,7,355,2,356,7,356, + 2,357,7,357,2,358,7,358,2,359,7,359,2,360,7,360,2,361,7,361,2,362,7,362, + 2,363,7,363,2,364,7,364,2,365,7,365,2,366,7,366,2,367,7,367,2,368,7,368, + 2,369,7,369,2,370,7,370,2,371,7,371,2,372,7,372,2,373,7,373,2,374,7,374, + 2,375,7,375,2,376,7,376,2,377,7,377,2,378,7,378,2,379,7,379,2,380,7,380, + 2,381,7,381,2,382,7,382,2,383,7,383,2,384,7,384,2,385,7,385,2,386,7,386, + 2,387,7,387,2,388,7,388,2,389,7,389,2,390,7,390,2,391,7,391,2,392,7,392, + 2,393,7,393,2,394,7,394,2,395,7,395,2,396,7,396,2,397,7,397,2,398,7,398, + 2,399,7,399,2,400,7,400,2,401,7,401,2,402,7,402,2,403,7,403,2,404,7,404, + 2,405,7,405,2,406,7,406,2,407,7,407,2,408,7,408,2,409,7,409,2,410,7,410, + 2,411,7,411,2,412,7,412,2,413,7,413,2,414,7,414,2,415,7,415,2,416,7,416, + 2,417,7,417,2,418,7,418,2,419,7,419,2,420,7,420,2,421,7,421,2,422,7,422, + 2,423,7,423,2,424,7,424,2,425,7,425,2,426,7,426,2,427,7,427,2,428,7,428, + 2,429,7,429,2,430,7,430,2,431,7,431,2,432,7,432,2,433,7,433,2,434,7,434, + 2,435,7,435,2,436,7,436,2,437,7,437,2,438,7,438,2,439,7,439,2,440,7,440, + 2,441,7,441,2,442,7,442,2,443,7,443,2,444,7,444,2,445,7,445,2,446,7,446, + 2,447,7,447,2,448,7,448,2,449,7,449,2,450,7,450,2,451,7,451,1,0,1,0,1, + 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3,0,920,8,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, + 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3, + 0,976,8,0,1,0,1,0,1,0,1,0,1,0,3,0,983,8,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0,1,0,1,0,3,0,999,8,0,5,0,1001,8,0,10,0,12,0,1004,9, + 0,1,1,1,1,1,2,1,2,1,2,5,2,1011,8,2,10,2,12,2,1014,9,2,1,3,1,3,1,3,1,3, + 1,3,1,3,1,3,3,3,1023,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,1034, + 8,3,1,3,3,3,1037,8,3,1,4,1,4,1,4,3,4,1042,8,4,1,5,1,5,1,6,1,6,1,6,1,6, + 1,7,1,7,1,7,1,7,1,8,1,8,1,8,3,8,1057,8,8,1,8,1,8,1,9,1,9,1,9,5,9,1064, + 8,9,10,9,12,9,1067,9,9,1,10,1,10,1,10,5,10,1072,8,10,10,10,12,10,1075, + 9,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,3,12,1086,8,12,1,13, + 1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20, + 1,20,1,20,3,20,1105,8,20,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22, + 1,22,1,22,1,22,3,22,1119,8,22,1,23,1,23,1,23,5,23,1124,8,23,10,23,12,23, + 1127,9,23,1,23,1,23,1,23,5,23,1132,8,23,10,23,12,23,1135,9,23,1,23,3,23, + 1138,8,23,1,24,1,24,3,24,1142,8,24,1,25,1,25,3,25,1146,8,25,1,26,5,26, + 1149,8,26,10,26,12,26,1152,9,26,1,26,1,26,3,26,1156,8,26,1,26,3,26,1159, + 8,26,1,26,1,26,1,26,5,26,1164,8,26,10,26,12,26,1167,9,26,1,26,1,26,1,26, + 1,26,5,26,1173,8,26,10,26,12,26,1176,9,26,1,26,1,26,1,26,5,26,1181,8,26, + 10,26,12,26,1184,9,26,1,26,1,26,1,26,1,26,3,26,1190,8,26,1,27,1,27,1,28, + 1,28,1,29,1,29,1,29,1,29,3,29,1200,8,29,1,30,1,30,3,30,1204,8,30,1,30, + 1,30,1,30,1,30,5,30,1210,8,30,10,30,12,30,1213,9,30,3,30,1215,8,30,3,30, + 1217,8,30,1,30,1,30,3,30,1221,8,30,1,30,1,30,1,31,1,31,3,31,1227,8,31, + 1,31,1,31,3,31,1231,8,31,1,31,1,31,1,32,1,32,3,32,1237,8,32,3,32,1239, + 8,32,1,32,1,32,1,32,1,32,1,33,5,33,1246,8,33,10,33,12,33,1249,9,33,1,33, + 1,33,1,34,5,34,1254,8,34,10,34,12,34,1257,9,34,1,34,1,34,1,34,1,35,1,35, + 3,35,1264,8,35,1,36,1,36,1,36,5,36,1269,8,36,10,36,12,36,1272,9,36,1,36, + 3,36,1275,8,36,1,37,1,37,1,37,3,37,1280,8,37,1,38,3,38,1283,8,38,1,39, + 1,39,1,40,1,40,3,40,1289,8,40,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43, + 1,43,1,43,1,43,1,43,3,43,1303,8,43,1,43,3,43,1306,8,43,1,43,1,43,1,43, + 1,43,1,44,1,44,3,44,1314,8,44,1,44,1,44,1,44,5,44,1319,8,44,10,44,12,44, + 1322,9,44,1,44,1,44,1,45,3,45,1327,8,45,1,45,1,45,3,45,1331,8,45,1,45, + 1,45,1,45,1,46,1,46,3,46,1338,8,46,1,47,1,47,1,47,3,47,1343,8,47,1,48, + 1,48,1,48,1,48,1,48,3,48,1350,8,48,1,48,3,48,1353,8,48,1,49,1,49,4,49, + 1357,8,49,11,49,12,49,1358,1,49,1,49,4,49,1363,8,49,11,49,12,49,1364,3, + 49,1367,8,49,1,50,1,50,1,50,1,50,1,51,1,51,3,51,1375,8,51,1,52,1,52,1, + 52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1, + 52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,1403,8,52,1,53,1, + 53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,3,53,1415,8,53,1,54,1,54,1, + 54,1,54,1,54,1,55,3,55,1423,8,55,1,55,5,55,1426,8,55,10,55,12,55,1429, + 9,55,1,56,3,56,1432,8,56,1,56,3,56,1435,8,56,1,56,3,56,1438,8,56,1,56, + 1,56,4,56,1442,8,56,11,56,12,56,1443,1,56,5,56,1447,8,56,10,56,12,56,1450, + 9,56,1,57,1,57,1,57,1,57,5,57,1456,8,57,10,57,12,57,1459,9,57,1,58,1,58, + 1,58,1,59,1,59,1,59,1,59,3,59,1468,8,59,1,60,1,60,1,60,1,60,1,60,5,60, + 1475,8,60,10,60,12,60,1478,9,60,1,61,1,61,1,61,1,61,5,61,1484,8,61,10, + 61,12,61,1487,9,61,1,62,1,62,1,62,1,62,5,62,1493,8,62,10,62,12,62,1496, + 9,62,1,63,1,63,1,63,1,63,5,63,1502,8,63,10,63,12,63,1505,9,63,1,64,1,64, + 1,64,5,64,1510,8,64,10,64,12,64,1513,9,64,1,64,3,64,1516,8,64,1,65,1,65, + 1,65,1,65,3,65,1522,8,65,1,66,1,66,3,66,1526,8,66,3,66,1528,8,66,1,66, + 1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,68,1,68,1,68,5,68,1541,8,68,10,68, + 12,68,1544,9,68,1,69,1,69,1,69,5,69,1549,8,69,10,69,12,69,1552,9,69,1, + 70,1,70,3,70,1556,8,70,3,70,1558,8,70,1,70,1,70,1,70,1,70,5,70,1564,8, + 70,10,70,12,70,1567,9,70,1,70,1,70,1,70,1,70,5,70,1573,8,70,10,70,12,70, + 1576,9,70,1,70,1,70,1,71,1,71,1,71,5,71,1583,8,71,10,71,12,71,1586,9,71, + 1,72,1,72,3,72,1590,8,72,3,72,1592,8,72,1,72,1,72,1,72,1,72,5,72,1598, + 8,72,10,72,12,72,1601,9,72,1,72,1,72,1,72,1,72,5,72,1607,8,72,10,72,12, + 72,1610,9,72,1,72,1,72,1,73,1,73,1,73,5,73,1617,8,73,10,73,12,73,1620, + 9,73,1,74,1,74,1,74,5,74,1625,8,74,10,74,12,74,1628,9,74,1,75,1,75,1,75, + 5,75,1633,8,75,10,75,12,75,1636,9,75,1,76,1,76,1,76,5,76,1641,8,76,10, + 76,12,76,1644,9,76,1,77,1,77,3,77,1648,8,77,1,78,1,78,1,78,1,78,1,79,1, + 79,1,79,1,80,1,80,1,80,1,80,1,80,1,81,3,81,1663,8,81,1,81,3,81,1666,8, + 81,1,81,3,81,1669,8,81,1,81,1,81,3,81,1673,8,81,1,81,5,81,1676,8,81,10, + 81,12,81,1679,9,81,1,82,1,82,1,82,1,82,5,82,1685,8,82,10,82,12,82,1688, + 9,82,1,83,1,83,3,83,1692,8,83,3,83,1694,8,83,1,83,1,83,1,83,1,83,1,83, + 1,83,1,84,1,84,1,85,1,85,1,85,3,85,1707,8,85,1,85,3,85,1710,8,85,1,85, + 1,85,3,85,1714,8,85,1,85,3,85,1717,8,85,1,85,1,85,3,85,1721,8,85,1,85, + 3,85,1724,8,85,1,85,1,85,1,86,3,86,1729,8,86,1,86,1,86,1,87,3,87,1734, + 8,87,1,87,3,87,1737,8,87,1,87,3,87,1740,8,87,1,87,3,87,1743,8,87,1,87, + 3,87,1746,8,87,1,88,1,88,1,88,1,88,3,88,1752,8,88,1,88,5,88,1755,8,88, + 10,88,12,88,1758,9,88,1,89,1,89,1,90,1,90,1,90,1,90,1,90,3,90,1767,8,90, + 3,90,1769,8,90,1,91,1,91,1,92,3,92,1774,8,92,1,92,1,92,1,92,3,92,1779, + 8,92,1,92,1,92,3,92,1783,8,92,1,92,5,92,1786,8,92,10,92,12,92,1789,9,92, + 1,93,1,93,1,93,1,93,3,93,1795,8,93,1,93,3,93,1798,8,93,1,94,1,94,1,94, + 1,94,3,94,1804,8,94,1,95,1,95,1,95,1,95,5,95,1810,8,95,10,95,12,95,1813, + 9,95,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1,97,1,97,5,97,1824,8,97,10,97, + 12,97,1827,9,97,1,98,4,98,1830,8,98,11,98,12,98,1831,1,98,3,98,1835,8, + 98,1,98,5,98,1838,8,98,10,98,12,98,1841,9,98,1,98,1,98,5,98,1845,8,98, + 10,98,12,98,1848,9,98,3,98,1850,8,98,1,99,1,99,1,99,3,99,1855,8,99,1,99, + 1,99,3,99,1859,8,99,3,99,1861,8,99,1,99,1,99,3,99,1865,8,99,1,99,1,99, + 3,99,1869,8,99,3,99,1871,8,99,3,99,1873,8,99,1,100,1,100,1,100,1,100,1, + 100,3,100,1880,8,100,1,101,1,101,1,101,5,101,1885,8,101,10,101,12,101, + 1888,9,101,1,102,1,102,1,102,1,102,1,102,3,102,1895,8,102,1,102,1,102, + 1,103,1,103,1,103,5,103,1902,8,103,10,103,12,103,1905,9,103,1,104,1,104, + 1,104,1,105,1,105,1,105,1,106,1,106,1,106,1,107,1,107,1,107,5,107,1919, + 8,107,10,107,12,107,1922,9,107,1,108,1,108,1,108,1,109,1,109,3,109,1929, + 8,109,3,109,1931,8,109,1,109,1,109,1,109,1,109,1,109,3,109,1938,8,109, + 1,109,1,109,1,109,1,109,1,109,3,109,1945,8,109,1,110,1,110,1,110,5,110, + 1950,8,110,10,110,12,110,1953,9,110,1,111,1,111,3,111,1957,8,111,3,111, + 1959,8,111,1,111,1,111,1,111,1,111,1,111,1,111,1,112,1,112,1,112,5,112, + 1970,8,112,10,112,12,112,1973,9,112,1,113,1,113,1,113,5,113,1978,8,113, + 10,113,12,113,1981,9,113,1,114,1,114,1,114,5,114,1986,8,114,10,114,12, + 114,1989,9,114,1,115,1,115,3,115,1993,8,115,3,115,1995,8,115,1,115,1,115, + 1,115,1,115,1,115,1,115,1,116,1,116,1,116,5,116,2006,8,116,10,116,12,116, + 2009,9,116,1,117,1,117,3,117,2013,8,117,3,117,2015,8,117,1,117,1,117,1, + 117,1,117,5,117,2021,8,117,10,117,12,117,2024,9,117,1,117,1,117,1,117, + 1,117,5,117,2030,8,117,10,117,12,117,2033,9,117,1,117,1,117,1,118,1,118, + 1,118,5,118,2040,8,118,10,118,12,118,2043,9,118,1,119,1,119,3,119,2047, + 8,119,1,119,3,119,2050,8,119,1,119,1,119,1,119,1,119,1,119,1,120,1,120, + 1,121,1,121,1,121,1,121,1,121,1,122,1,122,1,122,1,122,1,122,1,123,1,123, + 1,123,1,123,1,123,1,124,1,124,1,124,1,124,1,124,1,125,1,125,1,125,1,125, + 1,125,1,125,1,126,1,126,1,126,3,126,2088,8,126,1,126,3,126,2091,8,126, + 1,126,3,126,2094,8,126,1,126,1,126,1,127,1,127,3,127,2100,8,127,1,128, + 3,128,2103,8,128,1,128,1,128,1,128,3,128,2108,8,128,3,128,2110,8,128,1, + 128,1,128,1,128,1,128,1,129,3,129,2117,8,129,1,129,1,129,1,129,1,129,1, + 129,1,129,5,129,2125,8,129,10,129,12,129,2128,9,129,1,129,1,129,1,130, + 1,130,1,131,3,131,2135,8,131,1,131,1,131,1,131,3,131,2140,8,131,1,131, + 1,131,1,132,1,132,1,133,1,133,1,134,1,134,1,134,1,134,1,134,1,135,1,135, + 1,135,1,135,1,135,1,135,3,135,2159,8,135,1,135,3,135,2162,8,135,1,135, + 3,135,2165,8,135,1,135,1,135,1,135,1,135,3,135,2171,8,135,3,135,2173,8, + 135,1,136,1,136,1,136,1,136,1,136,1,137,1,137,1,137,1,137,1,137,1,137, + 3,137,2186,8,137,1,137,3,137,2189,8,137,1,137,3,137,2192,8,137,1,137,1, + 137,1,137,1,137,3,137,2198,8,137,3,137,2200,8,137,1,138,1,138,1,138,1, + 138,1,138,1,139,1,139,1,139,1,139,3,139,2211,8,139,1,139,1,139,1,140,1, + 140,1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,141,3,141,2225,8,141,1, + 142,1,142,1,142,5,142,2230,8,142,10,142,12,142,2233,9,142,1,142,3,142, + 2236,8,142,1,143,1,143,1,143,1,143,1,144,1,144,1,144,1,145,1,145,1,145, + 1,145,3,145,2249,8,145,1,145,1,145,1,146,1,146,1,146,1,146,1,146,1,147, + 1,147,1,147,1,147,3,147,2262,8,147,1,147,1,147,1,148,1,148,1,148,3,148, + 2269,8,148,1,148,1,148,3,148,2273,8,148,1,148,1,148,1,149,1,149,1,149, + 5,149,2280,8,149,10,149,12,149,2283,9,149,1,150,1,150,1,150,1,150,1,150, + 1,151,1,151,1,151,1,151,1,151,1,152,1,152,1,152,1,152,1,152,1,152,1,153, + 1,153,3,153,2303,8,153,1,153,1,153,3,153,2307,8,153,1,153,1,153,1,153, + 1,153,1,153,3,153,2314,8,153,1,153,3,153,2317,8,153,1,153,1,153,1,153, + 1,153,1,153,3,153,2324,8,153,1,153,3,153,2327,8,153,1,153,1,153,3,153, + 2331,8,153,1,153,1,153,1,153,1,153,1,153,3,153,2338,8,153,3,153,2340,8, + 153,1,154,1,154,1,155,3,155,2345,8,155,1,155,1,155,3,155,2349,8,155,1, + 155,1,155,3,155,2353,8,155,1,155,1,155,3,155,2357,8,155,1,155,1,155,3, + 155,2361,8,155,3,155,2363,8,155,1,156,4,156,2366,8,156,11,156,12,156,2367, + 1,156,3,156,2371,8,156,1,156,5,156,2374,8,156,10,156,12,156,2377,9,156, + 1,156,1,156,4,156,2381,8,156,11,156,12,156,2382,3,156,2385,8,156,1,157, + 1,157,1,158,1,158,1,158,5,158,2392,8,158,10,158,12,158,2395,9,158,1,159, + 1,159,1,160,1,160,1,160,1,160,3,160,2403,8,160,3,160,2405,8,160,1,160, + 1,160,1,161,1,161,3,161,2411,8,161,1,162,1,162,3,162,2415,8,162,1,162, + 1,162,1,162,1,163,1,163,3,163,2422,8,163,1,163,1,163,1,163,1,164,1,164, + 1,165,1,165,1,166,1,166,1,166,1,166,3,166,2435,8,166,1,166,1,166,1,166, + 1,167,1,167,3,167,2442,8,167,1,168,1,168,1,168,1,168,1,168,1,169,1,169, + 1,169,1,169,3,169,2453,8,169,1,170,1,170,1,170,1,170,3,170,2459,8,170, + 1,171,1,171,1,172,5,172,2464,8,172,10,172,12,172,2467,9,172,1,172,1,172, + 1,172,1,172,1,172,1,172,5,172,2475,8,172,10,172,12,172,2478,9,172,3,172, + 2480,8,172,1,172,1,172,1,173,3,173,2485,8,173,1,173,1,173,1,173,3,173, + 2490,8,173,3,173,2492,8,173,1,173,1,173,1,174,1,174,1,174,5,174,2499,8, + 174,10,174,12,174,2502,9,174,1,174,1,174,1,174,1,174,1,174,1,174,5,174, + 2510,8,174,10,174,12,174,2513,9,174,1,174,3,174,2516,8,174,1,175,1,175, + 1,175,1,175,3,175,2522,8,175,1,176,1,176,1,177,3,177,2527,8,177,1,177, + 3,177,2530,8,177,1,177,1,177,3,177,2534,8,177,1,177,3,177,2537,8,177,1, + 177,1,177,1,178,5,178,2542,8,178,10,178,12,178,2545,9,178,1,178,1,178, + 1,178,1,179,3,179,2551,8,179,1,179,1,179,5,179,2555,8,179,10,179,12,179, + 2558,9,179,1,179,1,179,1,179,1,180,1,180,3,180,2565,8,180,1,181,1,181, + 1,181,5,181,2570,8,181,10,181,12,181,2573,9,181,1,181,3,181,2576,8,181, + 1,182,1,182,1,182,1,182,1,182,1,183,3,183,2584,8,183,1,183,3,183,2587, + 8,183,1,183,1,183,1,183,5,183,2592,8,183,10,183,12,183,2595,9,183,1,183, + 1,183,1,183,1,183,5,183,2601,8,183,10,183,12,183,2604,9,183,1,184,1,184, + 1,185,1,185,1,185,1,185,3,185,2612,8,185,1,186,1,186,1,186,3,186,2617, + 8,186,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187, + 1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187, + 1,187,1,187,1,187,1,187,1,187,1,187,1,187,3,187,2649,8,187,1,188,1,188, + 3,188,2653,8,188,1,189,1,189,1,190,1,190,1,191,3,191,2660,8,191,1,191, + 5,191,2663,8,191,10,191,12,191,2666,9,191,1,192,1,192,1,192,1,193,3,193, + 2672,8,193,1,193,3,193,2675,8,193,1,194,1,194,1,194,5,194,2680,8,194,10, + 194,12,194,2683,9,194,1,194,3,194,2686,8,194,1,195,1,195,1,195,1,195,1, + 195,3,195,2693,8,195,1,195,1,195,1,195,1,195,3,195,2699,8,195,1,195,1, + 195,1,195,3,195,2704,8,195,1,196,1,196,1,196,1,196,1,196,3,196,2711,8, + 196,1,196,3,196,2714,8,196,1,196,1,196,1,196,1,196,1,196,1,196,1,196,1, + 196,3,196,2724,8,196,1,197,1,197,1,197,1,198,1,198,1,198,1,198,1,199,1, + 199,1,199,1,200,1,200,1,200,1,201,1,201,1,201,1,202,3,202,2743,8,202,1, + 202,3,202,2746,8,202,1,202,3,202,2749,8,202,1,202,3,202,2752,8,202,1,203, + 1,203,3,203,2756,8,203,1,204,1,204,1,204,1,205,1,205,1,206,1,206,3,206, + 2765,8,206,1,207,1,207,5,207,2769,8,207,10,207,12,207,2772,9,207,1,208, + 3,208,2775,8,208,1,208,1,208,1,209,1,209,3,209,2781,8,209,1,209,3,209, + 2784,8,209,1,210,3,210,2787,8,210,1,210,1,210,1,211,1,211,1,212,1,212, + 1,212,1,213,1,213,3,213,2798,8,213,1,213,1,213,1,213,1,214,1,214,1,214, + 1,214,1,215,1,215,5,215,2809,8,215,10,215,12,215,2812,9,215,1,215,1,215, + 1,216,1,216,1,216,1,216,1,216,1,216,1,216,1,216,3,216,2824,8,216,1,217, + 1,217,3,217,2828,8,217,1,217,3,217,2831,8,217,1,217,3,217,2834,8,217,1, + 217,1,217,1,218,1,218,3,218,2840,8,218,1,219,1,219,1,219,1,219,1,219,1, + 219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,3,219,2857,8, + 219,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220, + 1,220,1,220,1,220,1,220,1,220,3,220,2875,8,220,1,221,1,221,1,221,1,221, + 1,221,1,221,1,221,1,221,1,221,1,221,1,221,1,221,1,221,1,221,1,221,1,221, + 1,221,1,221,1,221,1,221,1,221,3,221,2898,8,221,1,222,1,222,1,222,1,222, + 5,222,2904,8,222,10,222,12,222,2907,9,222,1,223,1,223,1,223,1,223,1,223, + 1,224,1,224,1,224,1,224,1,225,5,225,2919,8,225,10,225,12,225,2922,9,225, + 1,225,1,225,1,225,1,225,1,225,1,226,1,226,1,226,1,226,5,226,2933,8,226, + 10,226,12,226,2936,9,226,1,226,3,226,2939,8,226,1,227,5,227,2942,8,227, + 10,227,12,227,2945,9,227,1,227,1,227,1,227,1,228,3,228,2951,8,228,1,228, + 1,228,1,229,1,229,1,229,1,229,1,230,3,230,2960,8,230,1,230,1,230,3,230, + 2964,8,230,1,230,5,230,2967,8,230,10,230,12,230,2970,9,230,1,231,1,231, + 1,231,1,231,1,231,1,232,3,232,2978,8,232,1,232,1,232,5,232,2982,8,232, + 10,232,12,232,2985,9,232,1,232,1,232,1,232,1,232,1,233,1,233,1,234,1,234, + 3,234,2995,8,234,1,234,3,234,2998,8,234,1,234,5,234,3001,8,234,10,234, + 12,234,3004,9,234,1,235,1,235,1,235,1,235,1,236,1,236,1,236,5,236,3013, + 8,236,10,236,12,236,3016,9,236,1,236,1,236,1,237,1,237,3,237,3022,8,237, + 1,237,1,237,5,237,3026,8,237,10,237,12,237,3029,9,237,1,237,1,237,1,238, + 1,238,1,239,1,239,1,239,1,239,3,239,3039,8,239,1,239,1,239,3,239,3043, + 8,239,3,239,3045,8,239,1,239,1,239,1,240,1,240,1,240,1,241,1,241,1,242, + 1,242,1,243,3,243,3057,8,243,1,244,1,244,1,244,1,244,1,244,1,245,1,245, + 1,245,1,245,1,246,1,246,1,246,1,246,1,246,1,247,1,247,1,247,1,247,1,248, + 1,248,1,248,1,248,1,248,1,248,1,249,1,249,1,250,1,250,1,251,1,251,1,251, + 1,251,1,252,1,252,1,252,1,253,1,253,1,253,1,253,1,253,1,254,1,254,1,254, + 3,254,3102,8,254,1,254,3,254,3105,8,254,1,254,1,254,3,254,3109,8,254,1, + 254,1,254,3,254,3113,8,254,1,254,1,254,1,255,1,255,3,255,3119,8,255,1, + 256,1,256,1,256,1,256,1,257,1,257,1,257,1,257,1,257,1,257,5,257,3131,8, + 257,10,257,12,257,3134,9,257,1,257,1,257,1,258,1,258,1,258,3,258,3141, + 8,258,3,258,3143,8,258,1,258,1,258,1,258,1,258,1,258,1,258,1,259,1,259, + 1,259,3,259,3154,8,259,3,259,3156,8,259,1,259,1,259,1,259,1,259,1,259, + 1,259,1,260,1,260,1,260,1,260,1,260,1,260,1,261,1,261,1,261,5,261,3173, + 8,261,10,261,12,261,3176,9,261,1,261,3,261,3179,8,261,1,262,1,262,1,262, + 1,262,3,262,3185,8,262,1,262,1,262,1,262,3,262,3190,8,262,1,263,1,263, + 1,263,1,264,1,264,1,264,1,264,1,264,3,264,3200,8,264,1,265,1,265,1,265, + 1,266,1,266,1,266,1,266,3,266,3209,8,266,1,267,1,267,1,267,1,268,1,268, + 1,268,1,268,1,268,1,269,3,269,3220,8,269,1,269,3,269,3223,8,269,1,269, + 1,269,3,269,3227,8,269,1,269,3,269,3230,8,269,1,270,1,270,3,270,3234,8, + 270,1,271,1,271,1,271,1,271,1,272,1,272,1,272,1,272,1,272,1,272,5,272, + 3246,8,272,10,272,12,272,3249,9,272,1,272,1,272,1,273,1,273,1,274,3,274, + 3256,8,274,1,274,1,274,1,274,3,274,3261,8,274,1,274,1,274,1,275,1,275, + 1,275,1,275,1,275,1,276,1,276,1,276,1,276,1,277,1,277,3,277,3276,8,277, + 1,277,1,277,3,277,3280,8,277,1,277,1,277,3,277,3284,8,277,1,278,1,278, + 1,278,1,278,1,278,1,279,1,279,1,279,1,279,1,279,1,280,3,280,3297,8,280, + 1,280,3,280,3300,8,280,1,280,1,280,3,280,3304,8,280,1,280,1,280,1,280, + 1,280,1,280,3,280,3311,8,280,1,280,1,280,1,280,1,280,3,280,3317,8,280, + 1,281,1,281,1,282,1,282,1,283,1,283,1,283,1,283,1,283,1,284,1,284,1,284, + 1,284,1,284,1,284,1,285,1,285,1,286,1,286,1,287,1,287,1,287,1,287,1,287, + 1,287,1,288,1,288,1,288,5,288,3347,8,288,10,288,12,288,3350,9,288,1,288, + 3,288,3353,8,288,1,289,1,289,1,289,5,289,3358,8,289,10,289,12,289,3361, + 9,289,1,289,3,289,3364,8,289,1,289,1,289,5,289,3368,8,289,10,289,12,289, + 3371,9,289,1,289,3,289,3374,8,289,1,290,1,290,1,290,1,290,1,290,1,290, + 3,290,3382,8,290,1,290,3,290,3385,8,290,1,291,1,291,3,291,3389,8,291,1, + 292,1,292,1,292,1,292,1,292,1,293,1,293,1,293,1,294,1,294,1,294,1,295, + 1,295,1,295,1,296,1,296,1,296,1,296,1,296,1,297,3,297,3411,8,297,1,297, + 3,297,3414,8,297,1,298,1,298,1,298,1,298,1,298,1,299,1,299,3,299,3423, + 8,299,1,299,1,299,3,299,3427,8,299,3,299,3429,8,299,1,299,3,299,3432,8, + 299,1,300,1,300,1,300,1,300,1,300,1,300,1,300,1,300,3,300,3442,8,300,1, + 301,1,301,3,301,3446,8,301,1,302,1,302,3,302,3450,8,302,1,303,1,303,1, + 303,1,303,3,303,3456,8,303,1,304,1,304,3,304,3460,8,304,1,304,3,304,3463, + 8,304,1,304,5,304,3466,8,304,10,304,12,304,3469,9,304,1,305,1,305,1,305, + 3,305,3474,8,305,1,305,1,305,1,306,1,306,1,306,3,306,3481,8,306,1,306, + 1,306,1,307,1,307,1,307,3,307,3488,8,307,1,307,1,307,1,308,1,308,1,308, + 3,308,3495,8,308,1,308,1,308,1,309,1,309,1,309,1,309,1,310,3,310,3504, + 8,310,1,310,1,310,1,310,1,311,1,311,1,311,3,311,3512,8,311,1,312,1,312, + 1,313,1,313,3,313,3518,8,313,1,313,3,313,3521,8,313,1,313,3,313,3524,8, + 313,1,314,1,314,1,315,1,315,1,316,1,316,1,316,1,316,3,316,3534,8,316,1, + 317,1,317,1,317,3,317,3539,8,317,1,317,1,317,1,317,3,317,3544,8,317,1, + 317,1,317,3,317,3548,8,317,3,317,3550,8,317,1,317,1,317,1,318,3,318,3555, + 8,318,1,318,1,318,1,318,3,318,3560,8,318,1,319,1,319,1,319,1,319,3,319, + 3566,8,319,1,319,1,319,1,319,1,319,3,319,3572,8,319,1,320,1,320,1,321, + 1,321,1,322,1,322,1,323,1,323,1,324,1,324,1,324,1,324,1,325,3,325,3587, + 8,325,1,325,1,325,1,325,1,325,1,325,1,325,1,326,1,326,1,327,1,327,1,327, + 3,327,3600,8,327,1,328,1,328,1,329,1,329,3,329,3606,8,329,1,329,1,329, + 3,329,3610,8,329,1,329,1,329,1,330,1,330,1,330,1,330,1,330,1,330,1,330, + 3,330,3621,8,330,3,330,3623,8,330,1,331,1,331,1,332,1,332,1,333,1,333, + 3,333,3631,8,333,3,333,3633,8,333,1,333,1,333,5,333,3637,8,333,10,333, + 12,333,3640,9,333,1,333,1,333,1,334,1,334,1,335,1,335,1,335,1,335,1,335, + 3,335,3651,8,335,1,335,1,335,1,335,1,335,1,335,3,335,3658,8,335,1,336, + 1,336,1,336,1,336,1,336,1,336,1,336,1,337,3,337,3668,8,337,1,338,1,338, + 1,338,3,338,3673,8,338,1,338,1,338,1,339,1,339,1,339,1,339,1,340,1,340, + 1,340,1,340,1,341,1,341,1,341,1,342,1,342,3,342,3690,8,342,3,342,3692, + 8,342,1,342,1,342,1,342,1,342,1,342,1,342,1,342,1,343,1,343,1,343,1,343, + 1,343,1,343,1,344,1,344,3,344,3709,8,344,1,344,1,344,5,344,3713,8,344, + 10,344,12,344,3716,9,344,1,344,3,344,3719,8,344,1,345,1,345,3,345,3723, + 8,345,1,345,1,345,5,345,3727,8,345,10,345,12,345,3730,9,345,1,345,1,345, + 1,345,5,345,3735,8,345,10,345,12,345,3738,9,345,1,345,1,345,3,345,3742, + 8,345,1,346,1,346,1,346,1,346,1,347,1,347,1,347,1,347,1,348,1,348,1,348, + 1,348,1,349,1,349,1,349,1,349,3,349,3760,8,349,1,349,1,349,1,350,1,350, + 1,350,1,350,1,350,1,350,1,350,3,350,3771,8,350,1,351,1,351,1,351,1,352, + 1,352,1,352,1,353,1,353,1,353,1,354,1,354,1,354,1,355,1,355,1,355,1,356, + 1,356,1,356,1,357,1,357,1,357,1,357,1,357,1,358,1,358,3,358,3798,8,358, + 1,358,1,358,5,358,3802,8,358,10,358,12,358,3805,9,358,1,358,3,358,3808, + 8,358,1,359,1,359,1,359,1,359,3,359,3814,8,359,1,359,1,359,3,359,3818, + 8,359,3,359,3820,8,359,1,359,3,359,3823,8,359,1,359,1,359,1,360,1,360, + 3,360,3829,8,360,1,360,3,360,3832,8,360,1,360,1,360,1,360,1,360,1,360, + 3,360,3839,8,360,1,360,3,360,3842,8,360,1,360,3,360,3845,8,360,1,360,1, + 360,1,360,1,360,1,361,1,361,1,361,1,361,1,361,3,361,3856,8,361,1,361,3, + 361,3859,8,361,1,361,3,361,3862,8,361,1,361,1,361,1,361,3,361,3867,8,361, + 1,361,3,361,3870,8,361,1,361,1,361,3,361,3874,8,361,3,361,3876,8,361,1, + 361,1,361,1,361,1,361,1,362,1,362,1,362,1,363,1,363,1,364,1,364,1,364, + 1,365,1,365,1,365,1,366,1,366,1,366,1,366,1,366,3,366,3898,8,366,1,367, + 1,367,1,367,5,367,3903,8,367,10,367,12,367,3906,9,367,1,367,3,367,3909, + 8,367,1,368,1,368,1,368,5,368,3914,8,368,10,368,12,368,3917,9,368,1,368, + 3,368,3920,8,368,1,369,1,369,1,369,5,369,3925,8,369,10,369,12,369,3928, + 9,369,1,369,3,369,3931,8,369,1,370,1,370,1,370,5,370,3936,8,370,10,370, + 12,370,3939,9,370,1,370,3,370,3942,8,370,1,371,1,371,1,372,1,372,1,372, + 1,373,1,373,1,374,1,374,1,374,1,374,1,374,1,374,1,375,1,375,1,375,1,375, + 1,375,1,376,1,376,1,376,1,376,1,376,3,376,3967,8,376,1,377,5,377,3970, + 8,377,10,377,12,377,3973,9,377,1,377,3,377,3976,8,377,1,378,1,378,3,378, + 3980,8,378,1,379,1,379,1,379,1,379,1,380,1,380,1,380,1,380,1,380,1,380, + 1,381,1,381,1,381,1,381,1,381,1,382,1,382,1,382,3,382,4000,8,382,1,382, + 1,382,3,382,4004,8,382,1,382,1,382,3,382,4008,8,382,1,382,1,382,1,383, + 3,383,4013,8,383,1,383,3,383,4016,8,383,1,384,1,384,1,384,1,384,1,384, + 1,384,1,385,1,385,1,385,5,385,4027,8,385,10,385,12,385,4030,9,385,1,385, + 3,385,4033,8,385,1,386,1,386,1,386,1,386,1,386,1,386,1,386,3,386,4042, + 8,386,1,387,1,387,1,387,1,388,1,388,5,388,4049,8,388,10,388,12,388,4052, + 9,388,1,388,1,388,1,389,1,389,1,389,1,389,1,390,1,390,1,391,1,391,3,391, + 4064,8,391,1,391,1,391,1,391,5,391,4069,8,391,10,391,12,391,4072,9,391, + 1,391,1,391,4,391,4076,8,391,11,391,12,391,4077,3,391,4080,8,391,1,391, + 1,391,1,391,3,391,4085,8,391,1,392,1,392,1,392,1,392,1,393,1,393,3,393, + 4093,8,393,1,393,1,393,1,393,5,393,4098,8,393,10,393,12,393,4101,9,393, + 1,393,1,393,4,393,4105,8,393,11,393,12,393,4106,3,393,4109,8,393,1,393, + 1,393,1,393,3,393,4114,8,393,1,394,1,394,1,394,1,395,1,395,5,395,4121, + 8,395,10,395,12,395,4124,9,395,1,395,1,395,1,396,1,396,1,396,1,397,1,397, + 5,397,4133,8,397,10,397,12,397,4136,9,397,1,397,1,397,1,398,1,398,1,398, + 1,398,1,398,1,399,1,399,1,399,3,399,4148,8,399,1,399,3,399,4151,8,399, + 1,399,1,399,1,399,3,399,4156,8,399,1,399,1,399,3,399,4160,8,399,3,399, + 4162,8,399,1,399,3,399,4165,8,399,1,399,1,399,3,399,4169,8,399,1,399,1, + 399,1,400,1,400,1,401,1,401,1,402,1,402,1,403,1,403,1,404,1,404,1,404, + 1,404,1,404,1,404,1,405,1,405,1,405,1,405,1,405,1,406,1,406,1,406,1,406, + 1,406,1,406,1,407,1,407,1,407,1,407,1,407,1,408,1,408,1,408,5,408,4206, + 8,408,10,408,12,408,4209,9,408,1,408,3,408,4212,8,408,1,408,3,408,4215, + 8,408,1,409,1,409,1,409,1,409,1,409,3,409,4222,8,409,1,410,1,410,1,410, + 1,410,1,411,5,411,4229,8,411,10,411,12,411,4232,9,411,1,411,1,411,1,411, + 1,412,1,412,1,412,1,412,1,412,1,412,1,413,1,413,1,413,1,413,1,413,1,414, + 1,414,1,414,1,414,1,414,1,414,1,415,1,415,1,415,1,415,1,415,1,416,1,416, + 1,416,1,416,1,417,1,417,5,417,4265,8,417,10,417,12,417,4268,9,417,1,417, + 1,417,1,417,5,417,4273,8,417,10,417,12,417,4276,9,417,1,417,1,417,4,417, + 4280,8,417,11,417,12,417,4281,3,417,4284,8,417,1,417,1,417,1,417,3,417, + 4289,8,417,1,418,1,418,1,418,1,418,1,418,1,418,1,418,1,419,1,419,1,419, + 1,419,1,419,1,419,1,420,1,420,1,420,1,420,3,420,4308,8,420,1,420,1,420, + 1,420,3,420,4313,8,420,3,420,4315,8,420,1,420,3,420,4318,8,420,1,420,1, + 420,1,421,1,421,1,421,1,421,1,421,1,421,1,422,1,422,1,422,5,422,4331,8, + 422,10,422,12,422,4334,9,422,1,422,3,422,4337,8,422,1,423,1,423,1,423, + 3,423,4342,8,423,1,424,1,424,1,424,1,424,1,425,1,425,3,425,4350,8,425, + 1,425,1,425,1,425,5,425,4355,8,425,10,425,12,425,4358,9,425,1,425,1,425, + 4,425,4362,8,425,11,425,12,425,4363,3,425,4366,8,425,1,425,3,425,4369, + 8,425,1,426,1,426,1,426,3,426,4374,8,426,1,426,3,426,4377,8,426,1,426, + 1,426,1,427,1,427,1,427,5,427,4384,8,427,10,427,12,427,4387,9,427,1,427, + 3,427,4390,8,427,1,428,1,428,1,428,1,428,3,428,4396,8,428,1,429,1,429, + 1,429,3,429,4401,8,429,1,429,1,429,1,430,1,430,1,431,1,431,1,432,1,432, + 1,432,1,432,1,432,1,432,1,433,1,433,1,433,1,433,1,433,1,434,1,434,1,434, + 1,434,1,434,1,435,1,435,1,435,1,435,1,436,3,436,4430,8,436,1,436,5,436, + 4433,8,436,10,436,12,436,4436,9,436,1,436,1,436,1,436,1,436,1,437,1,437, + 1,438,1,438,1,439,3,439,4447,8,439,1,439,3,439,4450,8,439,1,439,1,439, + 3,439,4454,8,439,1,439,3,439,4457,8,439,1,439,1,439,1,440,3,440,4462,8, + 440,1,440,4,440,4465,8,440,11,440,12,440,4466,1,440,1,440,1,440,1,441, + 1,441,4,441,4474,8,441,11,441,12,441,4475,1,441,1,441,1,442,1,442,3,442, + 4482,8,442,1,443,1,443,1,443,1,443,1,443,3,443,4489,8,443,1,444,3,444, + 4492,8,444,1,444,3,444,4495,8,444,1,445,1,445,1,446,1,446,1,447,1,447, + 1,448,1,448,1,449,1,449,1,450,1,450,1,451,1,451,1,451,0,1,0,452,0,2,4, + 6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52, + 54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100, + 102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136, + 138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172, + 174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208, + 210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244, + 246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280, + 282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,312,314,316, + 318,320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,352, + 354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388, + 390,392,394,396,398,400,402,404,406,408,410,412,414,416,418,420,422,424, + 426,428,430,432,434,436,438,440,442,444,446,448,450,452,454,456,458,460, + 462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492,494,496, + 498,500,502,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532, + 534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,564,566,568, + 570,572,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604, + 606,608,610,612,614,616,618,620,622,624,626,628,630,632,634,636,638,640, + 642,644,646,648,650,652,654,656,658,660,662,664,666,668,670,672,674,676, + 678,680,682,684,686,688,690,692,694,696,698,700,702,704,706,708,710,712, + 714,716,718,720,722,724,726,728,730,732,734,736,738,740,742,744,746,748, + 750,752,754,756,758,760,762,764,766,768,770,772,774,776,778,780,782,784, + 786,788,790,792,794,796,798,800,802,804,806,808,810,812,814,816,818,820, + 822,824,826,828,830,832,834,836,838,840,842,844,846,848,850,852,854,856, + 858,860,862,864,866,868,870,872,874,876,878,880,882,884,886,888,890,892, + 894,896,898,900,902,0,26,4,0,107,107,199,199,201,201,217,217,2,0,191,191, + 210,210,3,0,174,174,177,178,187,187,4,0,186,186,189,189,206,206,208,208, + 2,0,199,199,201,201,3,0,194,194,198,198,203,203,2,0,179,179,213,213,3, + 0,76,76,90,90,210,210,2,0,64,64,156,156,14,0,20,20,42,42,65,65,75,75,84, + 84,93,93,95,95,97,97,101,101,103,103,121,121,143,143,157,157,163,163,1, + 0,122,124,2,0,139,139,185,185,2,0,34,34,217,217,2,0,31,31,120,120,2,0, + 39,39,163,163,3,0,80,80,83,83,114,114,2,0,148,148,185,185,2,0,128,128, + 175,175,2,0,42,42,188,188,2,0,125,125,176,176,2,0,184,184,207,207,2,0, + 102,102,210,210,2,0,2,2,165,165,2,0,137,137,153,153,2,0,6,6,18,18,2,0, + 17,17,132,132,4801,0,919,1,0,0,0,2,1005,1,0,0,0,4,1007,1,0,0,0,6,1036, + 1,0,0,0,8,1041,1,0,0,0,10,1043,1,0,0,0,12,1045,1,0,0,0,14,1049,1,0,0,0, + 16,1053,1,0,0,0,18,1060,1,0,0,0,20,1068,1,0,0,0,22,1076,1,0,0,0,24,1085, + 1,0,0,0,26,1087,1,0,0,0,28,1089,1,0,0,0,30,1091,1,0,0,0,32,1093,1,0,0, + 0,34,1095,1,0,0,0,36,1097,1,0,0,0,38,1099,1,0,0,0,40,1104,1,0,0,0,42,1106, + 1,0,0,0,44,1118,1,0,0,0,46,1137,1,0,0,0,48,1141,1,0,0,0,50,1145,1,0,0, + 0,52,1189,1,0,0,0,54,1191,1,0,0,0,56,1193,1,0,0,0,58,1199,1,0,0,0,60,1216, + 1,0,0,0,62,1224,1,0,0,0,64,1238,1,0,0,0,66,1247,1,0,0,0,68,1255,1,0,0, + 0,70,1261,1,0,0,0,72,1274,1,0,0,0,74,1279,1,0,0,0,76,1282,1,0,0,0,78,1284, + 1,0,0,0,80,1288,1,0,0,0,82,1290,1,0,0,0,84,1293,1,0,0,0,86,1296,1,0,0, + 0,88,1313,1,0,0,0,90,1326,1,0,0,0,92,1337,1,0,0,0,94,1339,1,0,0,0,96,1352, + 1,0,0,0,98,1366,1,0,0,0,100,1368,1,0,0,0,102,1374,1,0,0,0,104,1402,1,0, + 0,0,106,1414,1,0,0,0,108,1416,1,0,0,0,110,1422,1,0,0,0,112,1431,1,0,0, + 0,114,1451,1,0,0,0,116,1460,1,0,0,0,118,1467,1,0,0,0,120,1469,1,0,0,0, + 122,1479,1,0,0,0,124,1488,1,0,0,0,126,1497,1,0,0,0,128,1515,1,0,0,0,130, + 1521,1,0,0,0,132,1527,1,0,0,0,134,1535,1,0,0,0,136,1537,1,0,0,0,138,1545, + 1,0,0,0,140,1557,1,0,0,0,142,1579,1,0,0,0,144,1591,1,0,0,0,146,1613,1, + 0,0,0,148,1621,1,0,0,0,150,1629,1,0,0,0,152,1637,1,0,0,0,154,1647,1,0, + 0,0,156,1649,1,0,0,0,158,1653,1,0,0,0,160,1656,1,0,0,0,162,1662,1,0,0, + 0,164,1680,1,0,0,0,166,1693,1,0,0,0,168,1701,1,0,0,0,170,1720,1,0,0,0, + 172,1728,1,0,0,0,174,1733,1,0,0,0,176,1751,1,0,0,0,178,1759,1,0,0,0,180, + 1768,1,0,0,0,182,1770,1,0,0,0,184,1773,1,0,0,0,186,1797,1,0,0,0,188,1803, + 1,0,0,0,190,1805,1,0,0,0,192,1814,1,0,0,0,194,1818,1,0,0,0,196,1849,1, + 0,0,0,198,1872,1,0,0,0,200,1879,1,0,0,0,202,1881,1,0,0,0,204,1894,1,0, + 0,0,206,1898,1,0,0,0,208,1906,1,0,0,0,210,1909,1,0,0,0,212,1912,1,0,0, + 0,214,1915,1,0,0,0,216,1923,1,0,0,0,218,1944,1,0,0,0,220,1946,1,0,0,0, + 222,1958,1,0,0,0,224,1966,1,0,0,0,226,1974,1,0,0,0,228,1982,1,0,0,0,230, + 1994,1,0,0,0,232,2002,1,0,0,0,234,2014,1,0,0,0,236,2036,1,0,0,0,238,2044, + 1,0,0,0,240,2056,1,0,0,0,242,2058,1,0,0,0,244,2063,1,0,0,0,246,2068,1, + 0,0,0,248,2073,1,0,0,0,250,2078,1,0,0,0,252,2084,1,0,0,0,254,2099,1,0, + 0,0,256,2109,1,0,0,0,258,2116,1,0,0,0,260,2131,1,0,0,0,262,2134,1,0,0, + 0,264,2143,1,0,0,0,266,2145,1,0,0,0,268,2147,1,0,0,0,270,2172,1,0,0,0, + 272,2174,1,0,0,0,274,2199,1,0,0,0,276,2201,1,0,0,0,278,2206,1,0,0,0,280, + 2214,1,0,0,0,282,2224,1,0,0,0,284,2231,1,0,0,0,286,2237,1,0,0,0,288,2241, + 1,0,0,0,290,2244,1,0,0,0,292,2252,1,0,0,0,294,2257,1,0,0,0,296,2265,1, + 0,0,0,298,2276,1,0,0,0,300,2284,1,0,0,0,302,2289,1,0,0,0,304,2294,1,0, + 0,0,306,2339,1,0,0,0,308,2341,1,0,0,0,310,2362,1,0,0,0,312,2384,1,0,0, + 0,314,2386,1,0,0,0,316,2388,1,0,0,0,318,2396,1,0,0,0,320,2404,1,0,0,0, + 322,2410,1,0,0,0,324,2412,1,0,0,0,326,2419,1,0,0,0,328,2426,1,0,0,0,330, + 2428,1,0,0,0,332,2430,1,0,0,0,334,2441,1,0,0,0,336,2443,1,0,0,0,338,2452, + 1,0,0,0,340,2458,1,0,0,0,342,2460,1,0,0,0,344,2465,1,0,0,0,346,2491,1, + 0,0,0,348,2515,1,0,0,0,350,2521,1,0,0,0,352,2523,1,0,0,0,354,2526,1,0, + 0,0,356,2543,1,0,0,0,358,2550,1,0,0,0,360,2562,1,0,0,0,362,2575,1,0,0, + 0,364,2577,1,0,0,0,366,2586,1,0,0,0,368,2605,1,0,0,0,370,2611,1,0,0,0, + 372,2613,1,0,0,0,374,2648,1,0,0,0,376,2652,1,0,0,0,378,2654,1,0,0,0,380, + 2656,1,0,0,0,382,2659,1,0,0,0,384,2667,1,0,0,0,386,2671,1,0,0,0,388,2685, + 1,0,0,0,390,2703,1,0,0,0,392,2723,1,0,0,0,394,2725,1,0,0,0,396,2728,1, + 0,0,0,398,2732,1,0,0,0,400,2735,1,0,0,0,402,2738,1,0,0,0,404,2742,1,0, + 0,0,406,2753,1,0,0,0,408,2757,1,0,0,0,410,2760,1,0,0,0,412,2764,1,0,0, + 0,414,2766,1,0,0,0,416,2774,1,0,0,0,418,2783,1,0,0,0,420,2786,1,0,0,0, + 422,2790,1,0,0,0,424,2792,1,0,0,0,426,2797,1,0,0,0,428,2802,1,0,0,0,430, + 2806,1,0,0,0,432,2823,1,0,0,0,434,2825,1,0,0,0,436,2839,1,0,0,0,438,2856, + 1,0,0,0,440,2874,1,0,0,0,442,2897,1,0,0,0,444,2899,1,0,0,0,446,2908,1, + 0,0,0,448,2913,1,0,0,0,450,2920,1,0,0,0,452,2938,1,0,0,0,454,2943,1,0, + 0,0,456,2950,1,0,0,0,458,2954,1,0,0,0,460,2959,1,0,0,0,462,2971,1,0,0, + 0,464,2977,1,0,0,0,466,2990,1,0,0,0,468,2992,1,0,0,0,470,3005,1,0,0,0, + 472,3009,1,0,0,0,474,3019,1,0,0,0,476,3032,1,0,0,0,478,3034,1,0,0,0,480, + 3048,1,0,0,0,482,3051,1,0,0,0,484,3053,1,0,0,0,486,3056,1,0,0,0,488,3058, + 1,0,0,0,490,3063,1,0,0,0,492,3067,1,0,0,0,494,3072,1,0,0,0,496,3076,1, + 0,0,0,498,3082,1,0,0,0,500,3084,1,0,0,0,502,3086,1,0,0,0,504,3090,1,0, + 0,0,506,3093,1,0,0,0,508,3098,1,0,0,0,510,3118,1,0,0,0,512,3120,1,0,0, + 0,514,3124,1,0,0,0,516,3137,1,0,0,0,518,3150,1,0,0,0,520,3163,1,0,0,0, + 522,3178,1,0,0,0,524,3189,1,0,0,0,526,3191,1,0,0,0,528,3199,1,0,0,0,530, + 3201,1,0,0,0,532,3208,1,0,0,0,534,3210,1,0,0,0,536,3213,1,0,0,0,538,3229, + 1,0,0,0,540,3233,1,0,0,0,542,3235,1,0,0,0,544,3239,1,0,0,0,546,3252,1, + 0,0,0,548,3255,1,0,0,0,550,3264,1,0,0,0,552,3269,1,0,0,0,554,3283,1,0, + 0,0,556,3285,1,0,0,0,558,3290,1,0,0,0,560,3316,1,0,0,0,562,3318,1,0,0, + 0,564,3320,1,0,0,0,566,3322,1,0,0,0,568,3327,1,0,0,0,570,3333,1,0,0,0, + 572,3335,1,0,0,0,574,3337,1,0,0,0,576,3352,1,0,0,0,578,3373,1,0,0,0,580, + 3384,1,0,0,0,582,3388,1,0,0,0,584,3390,1,0,0,0,586,3395,1,0,0,0,588,3398, + 1,0,0,0,590,3401,1,0,0,0,592,3404,1,0,0,0,594,3410,1,0,0,0,596,3415,1, + 0,0,0,598,3428,1,0,0,0,600,3441,1,0,0,0,602,3443,1,0,0,0,604,3447,1,0, + 0,0,606,3455,1,0,0,0,608,3457,1,0,0,0,610,3470,1,0,0,0,612,3477,1,0,0, + 0,614,3484,1,0,0,0,616,3491,1,0,0,0,618,3498,1,0,0,0,620,3503,1,0,0,0, + 622,3508,1,0,0,0,624,3513,1,0,0,0,626,3523,1,0,0,0,628,3525,1,0,0,0,630, + 3527,1,0,0,0,632,3533,1,0,0,0,634,3535,1,0,0,0,636,3554,1,0,0,0,638,3571, + 1,0,0,0,640,3573,1,0,0,0,642,3575,1,0,0,0,644,3577,1,0,0,0,646,3579,1, + 0,0,0,648,3581,1,0,0,0,650,3586,1,0,0,0,652,3594,1,0,0,0,654,3599,1,0, + 0,0,656,3601,1,0,0,0,658,3603,1,0,0,0,660,3613,1,0,0,0,662,3624,1,0,0, + 0,664,3626,1,0,0,0,666,3632,1,0,0,0,668,3643,1,0,0,0,670,3645,1,0,0,0, + 672,3659,1,0,0,0,674,3667,1,0,0,0,676,3672,1,0,0,0,678,3676,1,0,0,0,680, + 3680,1,0,0,0,682,3684,1,0,0,0,684,3691,1,0,0,0,686,3700,1,0,0,0,688,3718, + 1,0,0,0,690,3741,1,0,0,0,692,3743,1,0,0,0,694,3747,1,0,0,0,696,3751,1, + 0,0,0,698,3755,1,0,0,0,700,3770,1,0,0,0,702,3772,1,0,0,0,704,3775,1,0, + 0,0,706,3778,1,0,0,0,708,3781,1,0,0,0,710,3784,1,0,0,0,712,3787,1,0,0, + 0,714,3790,1,0,0,0,716,3807,1,0,0,0,718,3809,1,0,0,0,720,3826,1,0,0,0, + 722,3850,1,0,0,0,724,3881,1,0,0,0,726,3884,1,0,0,0,728,3886,1,0,0,0,730, + 3889,1,0,0,0,732,3897,1,0,0,0,734,3899,1,0,0,0,736,3910,1,0,0,0,738,3921, + 1,0,0,0,740,3932,1,0,0,0,742,3943,1,0,0,0,744,3945,1,0,0,0,746,3948,1, + 0,0,0,748,3950,1,0,0,0,750,3956,1,0,0,0,752,3966,1,0,0,0,754,3971,1,0, + 0,0,756,3979,1,0,0,0,758,3981,1,0,0,0,760,3985,1,0,0,0,762,3991,1,0,0, + 0,764,3996,1,0,0,0,766,4012,1,0,0,0,768,4017,1,0,0,0,770,4032,1,0,0,0, + 772,4041,1,0,0,0,774,4043,1,0,0,0,776,4046,1,0,0,0,778,4055,1,0,0,0,780, + 4059,1,0,0,0,782,4084,1,0,0,0,784,4086,1,0,0,0,786,4113,1,0,0,0,788,4115, + 1,0,0,0,790,4118,1,0,0,0,792,4127,1,0,0,0,794,4130,1,0,0,0,796,4139,1, + 0,0,0,798,4144,1,0,0,0,800,4172,1,0,0,0,802,4174,1,0,0,0,804,4176,1,0, + 0,0,806,4178,1,0,0,0,808,4180,1,0,0,0,810,4186,1,0,0,0,812,4191,1,0,0, + 0,814,4197,1,0,0,0,816,4214,1,0,0,0,818,4221,1,0,0,0,820,4223,1,0,0,0, + 822,4230,1,0,0,0,824,4236,1,0,0,0,826,4242,1,0,0,0,828,4247,1,0,0,0,830, + 4253,1,0,0,0,832,4258,1,0,0,0,834,4288,1,0,0,0,836,4290,1,0,0,0,838,4297, + 1,0,0,0,840,4303,1,0,0,0,842,4321,1,0,0,0,844,4336,1,0,0,0,846,4341,1, + 0,0,0,848,4343,1,0,0,0,850,4368,1,0,0,0,852,4370,1,0,0,0,854,4389,1,0, + 0,0,856,4395,1,0,0,0,858,4397,1,0,0,0,860,4404,1,0,0,0,862,4406,1,0,0, + 0,864,4408,1,0,0,0,866,4414,1,0,0,0,868,4419,1,0,0,0,870,4424,1,0,0,0, + 872,4429,1,0,0,0,874,4441,1,0,0,0,876,4443,1,0,0,0,878,4446,1,0,0,0,880, + 4461,1,0,0,0,882,4471,1,0,0,0,884,4481,1,0,0,0,886,4483,1,0,0,0,888,4491, + 1,0,0,0,890,4496,1,0,0,0,892,4498,1,0,0,0,894,4500,1,0,0,0,896,4502,1, + 0,0,0,898,4504,1,0,0,0,900,4506,1,0,0,0,902,4508,1,0,0,0,904,905,6,0,-1, + 0,905,906,5,77,0,0,906,907,3,0,0,0,907,908,5,209,0,0,908,909,3,0,0,0,909, + 910,5,55,0,0,910,911,3,0,0,28,911,920,1,0,0,0,912,913,7,0,0,0,913,920, + 3,0,0,14,914,915,7,1,0,0,915,920,3,2,1,0,916,917,5,8,0,0,917,920,3,2,1, + 0,918,920,3,6,3,0,919,904,1,0,0,0,919,912,1,0,0,0,919,914,1,0,0,0,919, + 916,1,0,0,0,919,918,1,0,0,0,920,1002,1,0,0,0,921,922,10,27,0,0,922,923, + 5,190,0,0,923,1001,3,0,0,28,924,925,10,26,0,0,925,926,5,78,0,0,926,1001, + 3,0,0,27,927,928,10,25,0,0,928,929,5,112,0,0,929,1001,3,0,0,26,930,931, + 10,24,0,0,931,932,5,12,0,0,932,1001,3,0,0,25,933,934,10,23,0,0,934,935, + 5,173,0,0,935,1001,3,0,0,24,936,937,10,22,0,0,937,938,5,215,0,0,938,1001, + 3,0,0,23,939,940,10,21,0,0,940,941,5,195,0,0,941,1001,3,0,0,22,942,943, + 10,20,0,0,943,944,7,2,0,0,944,1001,3,0,0,21,945,946,10,19,0,0,946,947, + 7,3,0,0,947,1001,3,0,0,20,948,949,10,18,0,0,949,950,5,181,0,0,950,1001, + 3,0,0,19,951,952,10,17,0,0,952,953,7,4,0,0,953,1001,3,0,0,18,954,955,10, + 16,0,0,955,956,7,5,0,0,956,1001,3,0,0,17,957,958,10,15,0,0,958,959,7,6, + 0,0,959,1001,3,0,0,15,960,961,10,12,0,0,961,962,7,7,0,0,962,1001,3,2,1, + 0,963,964,10,11,0,0,964,965,5,13,0,0,965,1001,3,2,1,0,966,967,10,10,0, + 0,967,968,5,191,0,0,968,1001,3,2,1,0,969,970,10,9,0,0,970,971,5,100,0, + 0,971,1001,3,2,1,0,972,973,10,8,0,0,973,975,5,211,0,0,974,976,3,4,2,0, + 975,974,1,0,0,0,975,976,1,0,0,0,976,977,1,0,0,0,977,1001,5,212,0,0,978, + 979,10,7,0,0,979,980,5,192,0,0,980,982,5,196,0,0,981,983,3,4,2,0,982,981, + 1,0,0,0,982,983,1,0,0,0,983,984,1,0,0,0,984,1001,5,197,0,0,985,986,10, + 6,0,0,986,1001,3,16,8,0,987,988,10,5,0,0,988,989,5,202,0,0,989,1001,3, + 88,44,0,990,991,10,4,0,0,991,992,5,182,0,0,992,1001,3,14,7,0,993,994,10, + 3,0,0,994,995,5,180,0,0,995,998,3,88,44,0,996,999,3,14,7,0,997,999,3,16, + 8,0,998,996,1,0,0,0,998,997,1,0,0,0,999,1001,1,0,0,0,1000,921,1,0,0,0, + 1000,924,1,0,0,0,1000,927,1,0,0,0,1000,930,1,0,0,0,1000,933,1,0,0,0,1000, + 936,1,0,0,0,1000,939,1,0,0,0,1000,942,1,0,0,0,1000,945,1,0,0,0,1000,948, + 1,0,0,0,1000,951,1,0,0,0,1000,954,1,0,0,0,1000,957,1,0,0,0,1000,960,1, + 0,0,0,1000,963,1,0,0,0,1000,966,1,0,0,0,1000,969,1,0,0,0,1000,972,1,0, + 0,0,1000,978,1,0,0,0,1000,985,1,0,0,0,1000,987,1,0,0,0,1000,990,1,0,0, + 0,1000,993,1,0,0,0,1001,1004,1,0,0,0,1002,1000,1,0,0,0,1002,1003,1,0,0, + 0,1003,1,1,0,0,0,1004,1002,1,0,0,0,1005,1006,3,88,44,0,1006,3,1,0,0,0, + 1007,1012,3,0,0,0,1008,1009,5,200,0,0,1009,1011,3,0,0,0,1010,1008,1,0, + 0,0,1011,1014,1,0,0,0,1012,1010,1,0,0,0,1012,1013,1,0,0,0,1013,5,1,0,0, + 0,1014,1012,1,0,0,0,1015,1037,3,8,4,0,1016,1037,5,223,0,0,1017,1037,3, + 24,12,0,1018,1022,3,88,44,0,1019,1023,3,16,8,0,1020,1021,5,202,0,0,1021, + 1023,5,102,0,0,1022,1019,1,0,0,0,1022,1020,1,0,0,0,1022,1023,1,0,0,0,1023, + 1037,1,0,0,0,1024,1037,3,12,6,0,1025,1037,3,14,7,0,1026,1027,5,196,0,0, + 1027,1028,5,13,0,0,1028,1029,3,2,1,0,1029,1030,5,197,0,0,1030,1037,1,0, + 0,0,1031,1033,5,196,0,0,1032,1034,3,4,2,0,1033,1032,1,0,0,0,1033,1034, + 1,0,0,0,1034,1035,1,0,0,0,1035,1037,5,197,0,0,1036,1015,1,0,0,0,1036,1016, + 1,0,0,0,1036,1017,1,0,0,0,1036,1018,1,0,0,0,1036,1024,1,0,0,0,1036,1025, + 1,0,0,0,1036,1026,1,0,0,0,1036,1031,1,0,0,0,1037,7,1,0,0,0,1038,1042,5, + 108,0,0,1039,1040,5,196,0,0,1040,1042,5,197,0,0,1041,1038,1,0,0,0,1041, + 1039,1,0,0,0,1042,9,1,0,0,0,1043,1044,3,88,44,0,1044,11,1,0,0,0,1045,1046, + 5,105,0,0,1046,1047,3,88,44,0,1047,1048,3,16,8,0,1048,13,1,0,0,0,1049, + 1050,5,214,0,0,1050,1051,3,284,142,0,1051,1052,5,216,0,0,1052,15,1,0,0, + 0,1053,1056,5,196,0,0,1054,1057,3,18,9,0,1055,1057,3,20,10,0,1056,1054, + 1,0,0,0,1056,1055,1,0,0,0,1056,1057,1,0,0,0,1057,1058,1,0,0,0,1058,1059, + 5,197,0,0,1059,17,1,0,0,0,1060,1065,3,0,0,0,1061,1062,5,200,0,0,1062,1064, + 3,0,0,0,1063,1061,1,0,0,0,1064,1067,1,0,0,0,1065,1063,1,0,0,0,1065,1066, + 1,0,0,0,1066,19,1,0,0,0,1067,1065,1,0,0,0,1068,1073,3,22,11,0,1069,1070, + 5,200,0,0,1070,1072,3,22,11,0,1071,1069,1,0,0,0,1072,1075,1,0,0,0,1073, + 1071,1,0,0,0,1073,1074,1,0,0,0,1074,21,1,0,0,0,1075,1073,1,0,0,0,1076, + 1077,3,88,44,0,1077,1078,5,207,0,0,1078,1079,3,0,0,0,1079,23,1,0,0,0,1080, + 1086,3,26,13,0,1081,1086,3,28,14,0,1082,1086,3,30,15,0,1083,1086,3,32, + 16,0,1084,1086,3,34,17,0,1085,1080,1,0,0,0,1085,1081,1,0,0,0,1085,1082, + 1,0,0,0,1085,1083,1,0,0,0,1085,1084,1,0,0,0,1086,25,1,0,0,0,1087,1088, + 7,8,0,0,1088,27,1,0,0,0,1089,1090,5,220,0,0,1090,29,1,0,0,0,1091,1092, + 5,221,0,0,1092,31,1,0,0,0,1093,1094,5,222,0,0,1094,33,1,0,0,0,1095,1096, + 5,198,0,0,1096,35,1,0,0,0,1097,1098,3,0,0,0,1098,37,1,0,0,0,1099,1100, + 3,0,0,0,1100,39,1,0,0,0,1101,1105,5,218,0,0,1102,1105,5,219,0,0,1103,1105, + 3,42,21,0,1104,1101,1,0,0,0,1104,1102,1,0,0,0,1104,1103,1,0,0,0,1105,41, + 1,0,0,0,1106,1107,7,9,0,0,1107,43,1,0,0,0,1108,1109,5,206,0,0,1109,1110, + 3,40,20,0,1110,1111,5,208,0,0,1111,1112,3,40,20,0,1112,1119,1,0,0,0,1113, + 1114,5,206,0,0,1114,1115,3,40,20,0,1115,1116,5,208,0,0,1116,1119,1,0,0, + 0,1117,1119,3,40,20,0,1118,1108,1,0,0,0,1118,1113,1,0,0,0,1118,1117,1, + 0,0,0,1119,45,1,0,0,0,1120,1138,5,205,0,0,1121,1125,5,214,0,0,1122,1124, + 3,48,24,0,1123,1122,1,0,0,0,1124,1127,1,0,0,0,1125,1123,1,0,0,0,1125,1126, + 1,0,0,0,1126,1128,1,0,0,0,1127,1125,1,0,0,0,1128,1138,5,216,0,0,1129,1133, + 5,214,0,0,1130,1132,3,56,28,0,1131,1130,1,0,0,0,1132,1135,1,0,0,0,1133, + 1131,1,0,0,0,1133,1134,1,0,0,0,1134,1136,1,0,0,0,1135,1133,1,0,0,0,1136, + 1138,5,216,0,0,1137,1120,1,0,0,0,1137,1121,1,0,0,0,1137,1129,1,0,0,0,1138, + 47,1,0,0,0,1139,1142,3,50,25,0,1140,1142,3,56,28,0,1141,1139,1,0,0,0,1141, + 1140,1,0,0,0,1142,49,1,0,0,0,1143,1146,3,104,52,0,1144,1146,3,106,53,0, + 1145,1143,1,0,0,0,1145,1144,1,0,0,0,1146,51,1,0,0,0,1147,1149,3,338,169, + 0,1148,1147,1,0,0,0,1149,1152,1,0,0,0,1150,1148,1,0,0,0,1150,1151,1,0, + 0,0,1151,1153,1,0,0,0,1152,1150,1,0,0,0,1153,1158,5,48,0,0,1154,1156,3, + 44,22,0,1155,1154,1,0,0,0,1155,1156,1,0,0,0,1156,1157,1,0,0,0,1157,1159, + 5,74,0,0,1158,1155,1,0,0,0,1158,1159,1,0,0,0,1159,1160,1,0,0,0,1160,1165, + 3,88,44,0,1161,1162,5,200,0,0,1162,1164,3,88,44,0,1163,1161,1,0,0,0,1164, + 1167,1,0,0,0,1165,1163,1,0,0,0,1165,1166,1,0,0,0,1166,1168,1,0,0,0,1167, + 1165,1,0,0,0,1168,1169,5,154,0,0,1169,1174,3,88,44,0,1170,1171,5,200,0, + 0,1171,1173,3,88,44,0,1172,1170,1,0,0,0,1173,1176,1,0,0,0,1174,1172,1, + 0,0,0,1174,1175,1,0,0,0,1175,1177,1,0,0,0,1176,1174,1,0,0,0,1177,1178, + 3,46,23,0,1178,1190,1,0,0,0,1179,1181,3,338,169,0,1180,1179,1,0,0,0,1181, + 1184,1,0,0,0,1182,1180,1,0,0,0,1182,1183,1,0,0,0,1183,1185,1,0,0,0,1184, + 1182,1,0,0,0,1185,1186,5,48,0,0,1186,1187,3,366,183,0,1187,1188,3,46,23, + 0,1188,1190,1,0,0,0,1189,1150,1,0,0,0,1189,1182,1,0,0,0,1190,53,1,0,0, + 0,1191,1192,3,88,44,0,1192,55,1,0,0,0,1193,1194,3,58,29,0,1194,57,1,0, + 0,0,1195,1200,3,60,30,0,1196,1200,3,62,31,0,1197,1200,3,64,32,0,1198,1200, + 3,344,172,0,1199,1195,1,0,0,0,1199,1196,1,0,0,0,1199,1197,1,0,0,0,1199, + 1198,1,0,0,0,1200,59,1,0,0,0,1201,1203,5,30,0,0,1202,1204,3,44,22,0,1203, + 1202,1,0,0,0,1203,1204,1,0,0,0,1204,1214,1,0,0,0,1205,1206,5,1,0,0,1206, + 1211,3,54,27,0,1207,1208,5,200,0,0,1208,1210,3,54,27,0,1209,1207,1,0,0, + 0,1210,1213,1,0,0,0,1211,1209,1,0,0,0,1211,1212,1,0,0,0,1212,1215,1,0, + 0,0,1213,1211,1,0,0,0,1214,1205,1,0,0,0,1214,1215,1,0,0,0,1215,1217,1, + 0,0,0,1216,1201,1,0,0,0,1216,1217,1,0,0,0,1217,1220,1,0,0,0,1218,1219, + 5,95,0,0,1219,1221,5,220,0,0,1220,1218,1,0,0,0,1220,1221,1,0,0,0,1221, + 1222,1,0,0,0,1222,1223,5,223,0,0,1223,61,1,0,0,0,1224,1226,5,54,0,0,1225, + 1227,3,44,22,0,1226,1225,1,0,0,0,1226,1227,1,0,0,0,1227,1230,1,0,0,0,1228, + 1229,5,95,0,0,1229,1231,5,220,0,0,1230,1228,1,0,0,0,1230,1231,1,0,0,0, + 1231,1232,1,0,0,0,1232,1233,5,223,0,0,1233,63,1,0,0,0,1234,1236,5,131, + 0,0,1235,1237,3,44,22,0,1236,1235,1,0,0,0,1236,1237,1,0,0,0,1237,1239, + 1,0,0,0,1238,1234,1,0,0,0,1238,1239,1,0,0,0,1239,1240,1,0,0,0,1240,1241, + 5,93,0,0,1241,1242,5,220,0,0,1242,1243,5,223,0,0,1243,65,1,0,0,0,1244, + 1246,3,370,185,0,1245,1244,1,0,0,0,1246,1249,1,0,0,0,1247,1245,1,0,0,0, + 1247,1248,1,0,0,0,1248,1250,1,0,0,0,1249,1247,1,0,0,0,1250,1251,5,0,0, + 1,1251,67,1,0,0,0,1252,1254,3,340,170,0,1253,1252,1,0,0,0,1254,1257,1, + 0,0,0,1255,1253,1,0,0,0,1255,1256,1,0,0,0,1256,1258,1,0,0,0,1257,1255, + 1,0,0,0,1258,1259,3,70,35,0,1259,1260,3,72,36,0,1260,69,1,0,0,0,1261,1263, + 5,104,0,0,1262,1264,3,44,22,0,1263,1262,1,0,0,0,1263,1264,1,0,0,0,1264, + 71,1,0,0,0,1265,1275,5,205,0,0,1266,1270,5,214,0,0,1267,1269,3,74,37,0, + 1268,1267,1,0,0,0,1269,1272,1,0,0,0,1270,1268,1,0,0,0,1270,1271,1,0,0, + 0,1271,1273,1,0,0,0,1272,1270,1,0,0,0,1273,1275,5,216,0,0,1274,1265,1, + 0,0,0,1274,1266,1,0,0,0,1275,73,1,0,0,0,1276,1280,3,80,40,0,1277,1280, + 3,86,43,0,1278,1280,3,90,45,0,1279,1276,1,0,0,0,1279,1277,1,0,0,0,1279, + 1278,1,0,0,0,1280,75,1,0,0,0,1281,1283,3,78,39,0,1282,1281,1,0,0,0,1282, + 1283,1,0,0,0,1283,77,1,0,0,0,1284,1285,7,10,0,0,1285,79,1,0,0,0,1286,1289, + 3,82,41,0,1287,1289,3,84,42,0,1288,1286,1,0,0,0,1288,1287,1,0,0,0,1289, + 81,1,0,0,0,1290,1291,3,76,38,0,1291,1292,3,102,51,0,1292,83,1,0,0,0,1293, + 1294,3,76,38,0,1294,1295,3,106,53,0,1295,85,1,0,0,0,1296,1297,3,76,38, + 0,1297,1302,5,7,0,0,1298,1299,5,206,0,0,1299,1300,3,40,20,0,1300,1301, + 5,208,0,0,1301,1303,1,0,0,0,1302,1298,1,0,0,0,1302,1303,1,0,0,0,1303,1305, + 1,0,0,0,1304,1306,3,40,20,0,1305,1304,1,0,0,0,1305,1306,1,0,0,0,1306,1307, + 1,0,0,0,1307,1308,5,71,0,0,1308,1309,3,88,44,0,1309,1310,3,46,23,0,1310, + 87,1,0,0,0,1311,1312,5,193,0,0,1312,1314,5,183,0,0,1313,1311,1,0,0,0,1313, + 1314,1,0,0,0,1314,1320,1,0,0,0,1315,1316,3,40,20,0,1316,1317,5,183,0,0, + 1317,1319,1,0,0,0,1318,1315,1,0,0,0,1319,1322,1,0,0,0,1320,1318,1,0,0, + 0,1320,1321,1,0,0,0,1321,1323,1,0,0,0,1322,1320,1,0,0,0,1323,1324,3,40, + 20,0,1324,89,1,0,0,0,1325,1327,3,78,39,0,1326,1325,1,0,0,0,1326,1327,1, + 0,0,0,1327,1328,1,0,0,0,1328,1330,5,79,0,0,1329,1331,5,8,0,0,1330,1329, + 1,0,0,0,1330,1331,1,0,0,0,1331,1332,1,0,0,0,1332,1333,3,92,46,0,1333,1334, + 3,46,23,0,1334,91,1,0,0,0,1335,1338,3,94,47,0,1336,1338,3,96,48,0,1337, + 1335,1,0,0,0,1337,1336,1,0,0,0,1338,93,1,0,0,0,1339,1342,3,88,44,0,1340, + 1341,5,183,0,0,1341,1343,5,179,0,0,1342,1340,1,0,0,0,1342,1343,1,0,0,0, + 1343,95,1,0,0,0,1344,1345,3,88,44,0,1345,1346,5,183,0,0,1346,1349,5,198, + 0,0,1347,1348,5,183,0,0,1348,1350,5,179,0,0,1349,1347,1,0,0,0,1349,1350, + 1,0,0,0,1350,1353,1,0,0,0,1351,1353,3,98,49,0,1352,1344,1,0,0,0,1352,1351, + 1,0,0,0,1353,97,1,0,0,0,1354,1356,3,884,442,0,1355,1357,3,100,50,0,1356, + 1355,1,0,0,0,1357,1358,1,0,0,0,1358,1356,1,0,0,0,1358,1359,1,0,0,0,1359, + 1367,1,0,0,0,1360,1362,3,898,449,0,1361,1363,3,100,50,0,1362,1361,1,0, + 0,0,1363,1364,1,0,0,0,1364,1362,1,0,0,0,1364,1365,1,0,0,0,1365,1367,1, + 0,0,0,1366,1354,1,0,0,0,1366,1360,1,0,0,0,1367,99,1,0,0,0,1368,1369,5, + 211,0,0,1369,1370,3,0,0,0,1370,1371,5,212,0,0,1371,101,1,0,0,0,1372,1375, + 3,58,29,0,1373,1375,3,104,52,0,1374,1372,1,0,0,0,1374,1373,1,0,0,0,1375, + 103,1,0,0,0,1376,1403,3,52,26,0,1377,1403,3,68,34,0,1378,1403,3,108,54, + 0,1379,1403,3,160,80,0,1380,1403,3,242,121,0,1381,1403,3,244,122,0,1382, + 1403,3,246,123,0,1383,1403,3,336,168,0,1384,1403,3,248,124,0,1385,1403, + 3,250,125,0,1386,1403,3,300,150,0,1387,1403,3,276,138,0,1388,1403,3,280, + 140,0,1389,1403,3,292,146,0,1390,1403,3,322,161,0,1391,1403,3,356,178, + 0,1392,1403,3,358,179,0,1393,1403,3,132,66,0,1394,1403,3,140,70,0,1395, + 1403,3,166,83,0,1396,1403,3,144,72,0,1397,1403,3,234,117,0,1398,1403,3, + 218,109,0,1399,1403,3,222,111,0,1400,1403,3,230,115,0,1401,1403,3,238, + 119,0,1402,1376,1,0,0,0,1402,1377,1,0,0,0,1402,1378,1,0,0,0,1402,1379, + 1,0,0,0,1402,1380,1,0,0,0,1402,1381,1,0,0,0,1402,1382,1,0,0,0,1402,1383, + 1,0,0,0,1402,1384,1,0,0,0,1402,1385,1,0,0,0,1402,1386,1,0,0,0,1402,1387, + 1,0,0,0,1402,1388,1,0,0,0,1402,1389,1,0,0,0,1402,1390,1,0,0,0,1402,1391, + 1,0,0,0,1402,1392,1,0,0,0,1402,1393,1,0,0,0,1402,1394,1,0,0,0,1402,1395, + 1,0,0,0,1402,1396,1,0,0,0,1402,1397,1,0,0,0,1402,1398,1,0,0,0,1402,1399, + 1,0,0,0,1402,1400,1,0,0,0,1402,1401,1,0,0,0,1403,105,1,0,0,0,1404,1415, + 3,170,85,0,1405,1415,3,278,139,0,1406,1415,3,290,145,0,1407,1415,3,294, + 147,0,1408,1415,3,296,148,0,1409,1415,3,252,126,0,1410,1415,3,268,134, + 0,1411,1415,3,272,136,0,1412,1415,3,302,151,0,1413,1415,3,304,152,0,1414, + 1404,1,0,0,0,1414,1405,1,0,0,0,1414,1406,1,0,0,0,1414,1407,1,0,0,0,1414, + 1408,1,0,0,0,1414,1409,1,0,0,0,1414,1410,1,0,0,0,1414,1411,1,0,0,0,1414, + 1412,1,0,0,0,1414,1413,1,0,0,0,1415,107,1,0,0,0,1416,1417,3,110,55,0,1417, + 1418,5,157,0,0,1418,1419,3,112,56,0,1419,1420,3,128,64,0,1420,109,1,0, + 0,0,1421,1423,5,2,0,0,1422,1421,1,0,0,0,1422,1423,1,0,0,0,1423,1427,1, + 0,0,0,1424,1426,3,340,170,0,1425,1424,1,0,0,0,1426,1429,1,0,0,0,1427,1425, + 1,0,0,0,1427,1428,1,0,0,0,1428,111,1,0,0,0,1429,1427,1,0,0,0,1430,1432, + 5,8,0,0,1431,1430,1,0,0,0,1431,1432,1,0,0,0,1432,1434,1,0,0,0,1433,1435, + 3,44,22,0,1434,1433,1,0,0,0,1434,1435,1,0,0,0,1435,1437,1,0,0,0,1436,1438, + 3,328,164,0,1437,1436,1,0,0,0,1437,1438,1,0,0,0,1438,1441,1,0,0,0,1439, + 1442,3,114,57,0,1440,1442,3,116,58,0,1441,1439,1,0,0,0,1441,1440,1,0,0, + 0,1442,1443,1,0,0,0,1443,1441,1,0,0,0,1443,1444,1,0,0,0,1444,1448,1,0, + 0,0,1445,1447,3,118,59,0,1446,1445,1,0,0,0,1447,1450,1,0,0,0,1448,1446, + 1,0,0,0,1448,1449,1,0,0,0,1449,113,1,0,0,0,1450,1448,1,0,0,0,1451,1452, + 7,11,0,0,1452,1457,3,134,67,0,1453,1454,5,200,0,0,1454,1456,3,134,67,0, + 1455,1453,1,0,0,0,1456,1459,1,0,0,0,1457,1455,1,0,0,0,1457,1458,1,0,0, + 0,1458,115,1,0,0,0,1459,1457,1,0,0,0,1460,1461,7,12,0,0,1461,1462,3,142, + 71,0,1462,117,1,0,0,0,1463,1468,3,120,60,0,1464,1468,3,122,61,0,1465,1468, + 3,124,62,0,1466,1468,3,126,63,0,1467,1463,1,0,0,0,1467,1464,1,0,0,0,1467, + 1465,1,0,0,0,1467,1466,1,0,0,0,1468,119,1,0,0,0,1469,1470,5,52,0,0,1470, + 1471,5,74,0,0,1471,1476,3,146,73,0,1472,1473,5,200,0,0,1473,1475,3,146, + 73,0,1474,1472,1,0,0,0,1475,1478,1,0,0,0,1476,1474,1,0,0,0,1476,1477,1, + 0,0,0,1477,121,1,0,0,0,1478,1476,1,0,0,0,1479,1480,5,160,0,0,1480,1485, + 3,148,74,0,1481,1482,5,200,0,0,1482,1484,3,148,74,0,1483,1481,1,0,0,0, + 1484,1487,1,0,0,0,1485,1483,1,0,0,0,1485,1486,1,0,0,0,1486,123,1,0,0,0, + 1487,1485,1,0,0,0,1488,1489,5,86,0,0,1489,1494,3,150,75,0,1490,1491,5, + 200,0,0,1491,1493,3,150,75,0,1492,1490,1,0,0,0,1493,1496,1,0,0,0,1494, + 1492,1,0,0,0,1494,1495,1,0,0,0,1495,125,1,0,0,0,1496,1494,1,0,0,0,1497, + 1498,5,50,0,0,1498,1503,3,152,76,0,1499,1500,5,200,0,0,1500,1502,3,152, + 76,0,1501,1499,1,0,0,0,1502,1505,1,0,0,0,1503,1501,1,0,0,0,1503,1504,1, + 0,0,0,1504,127,1,0,0,0,1505,1503,1,0,0,0,1506,1516,5,205,0,0,1507,1511, + 5,214,0,0,1508,1510,3,130,65,0,1509,1508,1,0,0,0,1510,1513,1,0,0,0,1511, + 1509,1,0,0,0,1511,1512,1,0,0,0,1512,1514,1,0,0,0,1513,1511,1,0,0,0,1514, + 1516,5,216,0,0,1515,1506,1,0,0,0,1515,1507,1,0,0,0,1516,129,1,0,0,0,1517, + 1522,3,82,41,0,1518,1522,3,154,77,0,1519,1522,3,86,43,0,1520,1522,3,90, + 45,0,1521,1517,1,0,0,0,1521,1518,1,0,0,0,1521,1519,1,0,0,0,1521,1520,1, + 0,0,0,1522,131,1,0,0,0,1523,1525,5,138,0,0,1524,1526,3,44,22,0,1525,1524, + 1,0,0,0,1525,1526,1,0,0,0,1526,1528,1,0,0,0,1527,1523,1,0,0,0,1527,1528, + 1,0,0,0,1528,1529,1,0,0,0,1529,1530,5,149,0,0,1530,1531,3,136,68,0,1531, + 1532,7,11,0,0,1532,1533,3,138,69,0,1533,1534,3,46,23,0,1534,133,1,0,0, + 0,1535,1536,3,138,69,0,1536,135,1,0,0,0,1537,1542,3,88,44,0,1538,1539, + 5,202,0,0,1539,1541,3,88,44,0,1540,1538,1,0,0,0,1541,1544,1,0,0,0,1542, + 1540,1,0,0,0,1542,1543,1,0,0,0,1543,137,1,0,0,0,1544,1542,1,0,0,0,1545, + 1550,3,88,44,0,1546,1547,5,202,0,0,1547,1549,3,88,44,0,1548,1546,1,0,0, + 0,1549,1552,1,0,0,0,1550,1548,1,0,0,0,1550,1551,1,0,0,0,1551,139,1,0,0, + 0,1552,1550,1,0,0,0,1553,1555,5,35,0,0,1554,1556,3,44,22,0,1555,1554,1, + 0,0,0,1555,1556,1,0,0,0,1556,1558,1,0,0,0,1557,1553,1,0,0,0,1557,1558, + 1,0,0,0,1558,1559,1,0,0,0,1559,1560,5,33,0,0,1560,1565,3,88,44,0,1561, + 1562,5,202,0,0,1562,1564,3,88,44,0,1563,1561,1,0,0,0,1564,1567,1,0,0,0, + 1565,1563,1,0,0,0,1565,1566,1,0,0,0,1566,1568,1,0,0,0,1567,1565,1,0,0, + 0,1568,1569,7,12,0,0,1569,1574,3,88,44,0,1570,1571,5,202,0,0,1571,1573, + 3,88,44,0,1572,1570,1,0,0,0,1573,1576,1,0,0,0,1574,1572,1,0,0,0,1574,1575, + 1,0,0,0,1575,1577,1,0,0,0,1576,1574,1,0,0,0,1577,1578,3,46,23,0,1578,141, + 1,0,0,0,1579,1584,3,88,44,0,1580,1581,5,202,0,0,1581,1583,3,88,44,0,1582, + 1580,1,0,0,0,1583,1586,1,0,0,0,1584,1582,1,0,0,0,1584,1585,1,0,0,0,1585, + 143,1,0,0,0,1586,1584,1,0,0,0,1587,1589,5,51,0,0,1588,1590,3,44,22,0,1589, + 1588,1,0,0,0,1589,1590,1,0,0,0,1590,1592,1,0,0,0,1591,1587,1,0,0,0,1591, + 1592,1,0,0,0,1592,1593,1,0,0,0,1593,1594,5,52,0,0,1594,1599,3,88,44,0, + 1595,1596,5,202,0,0,1596,1598,3,88,44,0,1597,1595,1,0,0,0,1598,1601,1, + 0,0,0,1599,1597,1,0,0,0,1599,1600,1,0,0,0,1600,1602,1,0,0,0,1601,1599, + 1,0,0,0,1602,1603,5,74,0,0,1603,1608,3,88,44,0,1604,1605,5,202,0,0,1605, + 1607,3,88,44,0,1606,1604,1,0,0,0,1607,1610,1,0,0,0,1608,1606,1,0,0,0,1608, + 1609,1,0,0,0,1609,1611,1,0,0,0,1610,1608,1,0,0,0,1611,1612,3,46,23,0,1612, + 145,1,0,0,0,1613,1618,3,88,44,0,1614,1615,5,202,0,0,1615,1617,3,88,44, + 0,1616,1614,1,0,0,0,1617,1620,1,0,0,0,1618,1616,1,0,0,0,1618,1619,1,0, + 0,0,1619,147,1,0,0,0,1620,1618,1,0,0,0,1621,1626,3,88,44,0,1622,1623,5, + 202,0,0,1623,1625,3,88,44,0,1624,1622,1,0,0,0,1625,1628,1,0,0,0,1626,1624, + 1,0,0,0,1626,1627,1,0,0,0,1627,149,1,0,0,0,1628,1626,1,0,0,0,1629,1634, + 3,88,44,0,1630,1631,5,202,0,0,1631,1633,3,88,44,0,1632,1630,1,0,0,0,1633, + 1636,1,0,0,0,1634,1632,1,0,0,0,1634,1635,1,0,0,0,1635,151,1,0,0,0,1636, + 1634,1,0,0,0,1637,1642,3,88,44,0,1638,1639,5,202,0,0,1639,1641,3,88,44, + 0,1640,1638,1,0,0,0,1641,1644,1,0,0,0,1642,1640,1,0,0,0,1642,1643,1,0, + 0,0,1643,153,1,0,0,0,1644,1642,1,0,0,0,1645,1648,3,156,78,0,1646,1648, + 3,158,79,0,1647,1645,1,0,0,0,1647,1646,1,0,0,0,1648,155,1,0,0,0,1649,1650, + 3,76,38,0,1650,1651,5,97,0,0,1651,1652,3,106,53,0,1652,157,1,0,0,0,1653, + 1654,3,76,38,0,1654,1655,3,106,53,0,1655,159,1,0,0,0,1656,1657,3,110,55, + 0,1657,1658,5,29,0,0,1658,1659,3,162,81,0,1659,1660,3,128,64,0,1660,161, + 1,0,0,0,1661,1663,5,8,0,0,1662,1661,1,0,0,0,1662,1663,1,0,0,0,1663,1665, + 1,0,0,0,1664,1666,3,44,22,0,1665,1664,1,0,0,0,1665,1666,1,0,0,0,1666,1668, + 1,0,0,0,1667,1669,3,328,164,0,1668,1667,1,0,0,0,1668,1669,1,0,0,0,1669, + 1672,1,0,0,0,1670,1673,3,164,82,0,1671,1673,3,116,58,0,1672,1670,1,0,0, + 0,1672,1671,1,0,0,0,1672,1673,1,0,0,0,1673,1677,1,0,0,0,1674,1676,3,118, + 59,0,1675,1674,1,0,0,0,1676,1679,1,0,0,0,1677,1675,1,0,0,0,1677,1678,1, + 0,0,0,1678,163,1,0,0,0,1679,1677,1,0,0,0,1680,1681,7,11,0,0,1681,1686, + 3,168,84,0,1682,1683,5,200,0,0,1683,1685,3,168,84,0,1684,1682,1,0,0,0, + 1685,1688,1,0,0,0,1686,1684,1,0,0,0,1686,1687,1,0,0,0,1687,165,1,0,0,0, + 1688,1686,1,0,0,0,1689,1691,5,138,0,0,1690,1692,3,44,22,0,1691,1690,1, + 0,0,0,1691,1692,1,0,0,0,1692,1694,1,0,0,0,1693,1689,1,0,0,0,1693,1694, + 1,0,0,0,1694,1695,1,0,0,0,1695,1696,5,145,0,0,1696,1697,3,88,44,0,1697, + 1698,7,11,0,0,1698,1699,3,88,44,0,1699,1700,3,46,23,0,1700,167,1,0,0,0, + 1701,1702,3,88,44,0,1702,169,1,0,0,0,1703,1706,3,176,88,0,1704,1707,5, + 65,0,0,1705,1707,3,340,170,0,1706,1704,1,0,0,0,1706,1705,1,0,0,0,1707, + 1709,1,0,0,0,1708,1710,3,184,92,0,1709,1708,1,0,0,0,1709,1710,1,0,0,0, + 1710,1721,1,0,0,0,1711,1714,3,172,86,0,1712,1714,3,174,87,0,1713,1711, + 1,0,0,0,1713,1712,1,0,0,0,1714,1716,1,0,0,0,1715,1717,5,127,0,0,1716,1715, + 1,0,0,0,1716,1717,1,0,0,0,1717,1718,1,0,0,0,1718,1719,3,184,92,0,1719, + 1721,1,0,0,0,1720,1703,1,0,0,0,1720,1713,1,0,0,0,1721,1723,1,0,0,0,1722, + 1724,3,318,159,0,1723,1722,1,0,0,0,1723,1724,1,0,0,0,1724,1725,1,0,0,0, + 1725,1726,3,128,64,0,1726,171,1,0,0,0,1727,1729,5,39,0,0,1728,1727,1,0, + 0,0,1728,1729,1,0,0,0,1729,1730,1,0,0,0,1730,1731,5,56,0,0,1731,173,1, + 0,0,0,1732,1734,3,182,91,0,1733,1732,1,0,0,0,1733,1734,1,0,0,0,1734,1736, + 1,0,0,0,1735,1737,5,49,0,0,1736,1735,1,0,0,0,1736,1737,1,0,0,0,1737,1739, + 1,0,0,0,1738,1740,5,2,0,0,1739,1738,1,0,0,0,1739,1740,1,0,0,0,1740,1742, + 1,0,0,0,1741,1743,7,13,0,0,1742,1741,1,0,0,0,1742,1743,1,0,0,0,1743,1745, + 1,0,0,0,1744,1746,7,14,0,0,1745,1744,1,0,0,0,1745,1746,1,0,0,0,1746,175, + 1,0,0,0,1747,1748,3,172,86,0,1748,1749,3,178,89,0,1749,1752,1,0,0,0,1750, + 1752,3,174,87,0,1751,1747,1,0,0,0,1751,1750,1,0,0,0,1752,1756,1,0,0,0, + 1753,1755,3,340,170,0,1754,1753,1,0,0,0,1755,1758,1,0,0,0,1756,1754,1, + 0,0,0,1756,1757,1,0,0,0,1757,177,1,0,0,0,1758,1756,1,0,0,0,1759,1760,3, + 180,90,0,1760,179,1,0,0,0,1761,1762,3,174,87,0,1762,1763,3,184,92,0,1763, + 1769,1,0,0,0,1764,1766,3,406,203,0,1765,1767,3,418,209,0,1766,1765,1,0, + 0,0,1766,1767,1,0,0,0,1767,1769,1,0,0,0,1768,1761,1,0,0,0,1768,1764,1, + 0,0,0,1769,181,1,0,0,0,1770,1771,7,15,0,0,1771,183,1,0,0,0,1772,1774,5, + 8,0,0,1773,1772,1,0,0,0,1773,1774,1,0,0,0,1774,1782,1,0,0,0,1775,1778, + 3,186,93,0,1776,1779,3,196,98,0,1777,1779,3,116,58,0,1778,1776,1,0,0,0, + 1778,1777,1,0,0,0,1778,1779,1,0,0,0,1779,1783,1,0,0,0,1780,1783,3,196, + 98,0,1781,1783,3,116,58,0,1782,1775,1,0,0,0,1782,1780,1,0,0,0,1782,1781, + 1,0,0,0,1783,1787,1,0,0,0,1784,1786,3,188,94,0,1785,1784,1,0,0,0,1786, + 1789,1,0,0,0,1787,1785,1,0,0,0,1787,1788,1,0,0,0,1788,185,1,0,0,0,1789, + 1787,1,0,0,0,1790,1791,5,206,0,0,1791,1792,3,40,20,0,1792,1794,5,208,0, + 0,1793,1795,3,40,20,0,1794,1793,1,0,0,0,1794,1795,1,0,0,0,1795,1798,1, + 0,0,0,1796,1798,3,40,20,0,1797,1790,1,0,0,0,1797,1796,1,0,0,0,1798,187, + 1,0,0,0,1799,1804,3,118,59,0,1800,1804,3,190,95,0,1801,1804,3,192,96,0, + 1802,1804,3,194,97,0,1803,1799,1,0,0,0,1803,1800,1,0,0,0,1803,1801,1,0, + 0,0,1803,1802,1,0,0,0,1804,189,1,0,0,0,1805,1806,5,27,0,0,1806,1811,3, + 88,44,0,1807,1808,5,202,0,0,1808,1810,3,88,44,0,1809,1807,1,0,0,0,1810, + 1813,1,0,0,0,1811,1809,1,0,0,0,1811,1812,1,0,0,0,1812,191,1,0,0,0,1813, + 1811,1,0,0,0,1814,1815,5,88,0,0,1815,1816,5,111,0,0,1816,1817,3,236,118, + 0,1817,193,1,0,0,0,1818,1819,5,66,0,0,1819,1820,5,24,0,0,1820,1825,3,240, + 120,0,1821,1822,5,200,0,0,1822,1824,3,240,120,0,1823,1821,1,0,0,0,1824, + 1827,1,0,0,0,1825,1823,1,0,0,0,1825,1826,1,0,0,0,1826,195,1,0,0,0,1827, + 1825,1,0,0,0,1828,1830,3,200,100,0,1829,1828,1,0,0,0,1830,1831,1,0,0,0, + 1831,1829,1,0,0,0,1831,1832,1,0,0,0,1832,1834,1,0,0,0,1833,1835,3,198, + 99,0,1834,1833,1,0,0,0,1834,1835,1,0,0,0,1835,1839,1,0,0,0,1836,1838,3, + 200,100,0,1837,1836,1,0,0,0,1838,1841,1,0,0,0,1839,1837,1,0,0,0,1839,1840, + 1,0,0,0,1840,1850,1,0,0,0,1841,1839,1,0,0,0,1842,1846,3,198,99,0,1843, + 1845,3,200,100,0,1844,1843,1,0,0,0,1845,1848,1,0,0,0,1846,1844,1,0,0,0, + 1846,1847,1,0,0,0,1847,1850,1,0,0,0,1848,1846,1,0,0,0,1849,1829,1,0,0, + 0,1849,1842,1,0,0,0,1850,197,1,0,0,0,1851,1860,3,328,164,0,1852,1854,5, + 113,0,0,1853,1855,5,106,0,0,1854,1853,1,0,0,0,1854,1855,1,0,0,0,1855,1861, + 1,0,0,0,1856,1858,5,106,0,0,1857,1859,5,113,0,0,1858,1857,1,0,0,0,1858, + 1859,1,0,0,0,1859,1861,1,0,0,0,1860,1852,1,0,0,0,1860,1856,1,0,0,0,1860, + 1861,1,0,0,0,1861,1873,1,0,0,0,1862,1864,5,113,0,0,1863,1865,5,106,0,0, + 1864,1863,1,0,0,0,1864,1865,1,0,0,0,1865,1871,1,0,0,0,1866,1868,5,106, + 0,0,1867,1869,5,113,0,0,1868,1867,1,0,0,0,1868,1869,1,0,0,0,1869,1871, + 1,0,0,0,1870,1862,1,0,0,0,1870,1866,1,0,0,0,1871,1873,1,0,0,0,1872,1851, + 1,0,0,0,1872,1870,1,0,0,0,1873,199,1,0,0,0,1874,1880,3,202,101,0,1875, + 1880,3,206,103,0,1876,1880,3,210,105,0,1877,1880,3,212,106,0,1878,1880, + 3,214,107,0,1879,1874,1,0,0,0,1879,1875,1,0,0,0,1879,1876,1,0,0,0,1879, + 1877,1,0,0,0,1879,1878,1,0,0,0,1880,201,1,0,0,0,1881,1886,3,204,102,0, + 1882,1883,5,200,0,0,1883,1885,3,218,109,0,1884,1882,1,0,0,0,1885,1888, + 1,0,0,0,1886,1884,1,0,0,0,1886,1887,1,0,0,0,1887,203,1,0,0,0,1888,1886, + 1,0,0,0,1889,1895,5,204,0,0,1890,1891,5,158,0,0,1891,1895,5,24,0,0,1892, + 1893,5,47,0,0,1893,1895,5,24,0,0,1894,1889,1,0,0,0,1894,1890,1,0,0,0,1894, + 1892,1,0,0,0,1895,1896,1,0,0,0,1896,1897,3,218,109,0,1897,205,1,0,0,0, + 1898,1903,3,208,104,0,1899,1900,5,200,0,0,1900,1902,3,224,112,0,1901,1899, + 1,0,0,0,1902,1905,1,0,0,0,1903,1901,1,0,0,0,1903,1904,1,0,0,0,1904,207, + 1,0,0,0,1905,1903,1,0,0,0,1906,1907,7,16,0,0,1907,1908,3,224,112,0,1908, + 209,1,0,0,0,1909,1910,7,17,0,0,1910,1911,3,226,113,0,1911,211,1,0,0,0, + 1912,1913,7,18,0,0,1913,1914,3,228,114,0,1914,213,1,0,0,0,1915,1920,3, + 216,108,0,1916,1917,5,200,0,0,1917,1919,3,232,116,0,1918,1916,1,0,0,0, + 1919,1922,1,0,0,0,1920,1918,1,0,0,0,1920,1921,1,0,0,0,1921,215,1,0,0,0, + 1922,1920,1,0,0,0,1923,1924,7,19,0,0,1924,1925,3,232,116,0,1925,217,1, + 0,0,0,1926,1928,5,138,0,0,1927,1929,3,44,22,0,1928,1927,1,0,0,0,1928,1929, + 1,0,0,0,1929,1931,1,0,0,0,1930,1926,1,0,0,0,1930,1931,1,0,0,0,1931,1932, + 1,0,0,0,1932,1933,5,159,0,0,1933,1937,3,88,44,0,1934,1938,5,204,0,0,1935, + 1936,5,158,0,0,1936,1938,5,24,0,0,1937,1934,1,0,0,0,1937,1935,1,0,0,0, + 1938,1939,1,0,0,0,1939,1940,3,138,69,0,1940,1941,3,46,23,0,1941,1945,1, + 0,0,0,1942,1945,3,220,110,0,1943,1945,3,504,252,0,1944,1930,1,0,0,0,1944, + 1942,1,0,0,0,1944,1943,1,0,0,0,1945,219,1,0,0,0,1946,1951,3,88,44,0,1947, + 1948,5,202,0,0,1948,1950,3,88,44,0,1949,1947,1,0,0,0,1950,1953,1,0,0,0, + 1951,1949,1,0,0,0,1951,1952,1,0,0,0,1952,221,1,0,0,0,1953,1951,1,0,0,0, + 1954,1956,5,138,0,0,1955,1957,3,44,22,0,1956,1955,1,0,0,0,1956,1957,1, + 0,0,0,1957,1959,1,0,0,0,1958,1954,1,0,0,0,1958,1959,1,0,0,0,1959,1960, + 1,0,0,0,1960,1961,5,147,0,0,1961,1962,3,136,68,0,1962,1963,7,16,0,0,1963, + 1964,3,138,69,0,1964,1965,3,46,23,0,1965,223,1,0,0,0,1966,1971,3,88,44, + 0,1967,1968,5,202,0,0,1968,1970,3,88,44,0,1969,1967,1,0,0,0,1970,1973, + 1,0,0,0,1971,1969,1,0,0,0,1971,1972,1,0,0,0,1972,225,1,0,0,0,1973,1971, + 1,0,0,0,1974,1979,3,88,44,0,1975,1976,5,202,0,0,1976,1978,3,88,44,0,1977, + 1975,1,0,0,0,1978,1981,1,0,0,0,1979,1977,1,0,0,0,1979,1980,1,0,0,0,1980, + 227,1,0,0,0,1981,1979,1,0,0,0,1982,1987,3,88,44,0,1983,1984,5,202,0,0, + 1984,1986,3,88,44,0,1985,1983,1,0,0,0,1986,1989,1,0,0,0,1987,1985,1,0, + 0,0,1987,1988,1,0,0,0,1988,229,1,0,0,0,1989,1987,1,0,0,0,1990,1992,5,138, + 0,0,1991,1993,3,44,22,0,1992,1991,1,0,0,0,1992,1993,1,0,0,0,1993,1995, + 1,0,0,0,1994,1990,1,0,0,0,1994,1995,1,0,0,0,1995,1996,1,0,0,0,1996,1997, + 5,126,0,0,1997,1998,3,136,68,0,1998,1999,7,19,0,0,1999,2000,3,138,69,0, + 2000,2001,3,46,23,0,2001,231,1,0,0,0,2002,2007,3,88,44,0,2003,2004,5,202, + 0,0,2004,2006,3,88,44,0,2005,2003,1,0,0,0,2006,2009,1,0,0,0,2007,2005, + 1,0,0,0,2007,2008,1,0,0,0,2008,233,1,0,0,0,2009,2007,1,0,0,0,2010,2012, + 5,89,0,0,2011,2013,3,44,22,0,2012,2011,1,0,0,0,2012,2013,1,0,0,0,2013, + 2015,1,0,0,0,2014,2010,1,0,0,0,2014,2015,1,0,0,0,2015,2016,1,0,0,0,2016, + 2017,5,88,0,0,2017,2022,3,88,44,0,2018,2019,5,202,0,0,2019,2021,3,88,44, + 0,2020,2018,1,0,0,0,2021,2024,1,0,0,0,2022,2020,1,0,0,0,2022,2023,1,0, + 0,0,2023,2025,1,0,0,0,2024,2022,1,0,0,0,2025,2026,5,111,0,0,2026,2031, + 3,88,44,0,2027,2028,5,202,0,0,2028,2030,3,88,44,0,2029,2027,1,0,0,0,2030, + 2033,1,0,0,0,2031,2029,1,0,0,0,2031,2032,1,0,0,0,2032,2034,1,0,0,0,2033, + 2031,1,0,0,0,2034,2035,3,46,23,0,2035,235,1,0,0,0,2036,2041,3,88,44,0, + 2037,2038,5,202,0,0,2038,2040,3,88,44,0,2039,2037,1,0,0,0,2040,2043,1, + 0,0,0,2041,2039,1,0,0,0,2041,2042,1,0,0,0,2042,237,1,0,0,0,2043,2041,1, + 0,0,0,2044,2049,5,67,0,0,2045,2047,3,44,22,0,2046,2045,1,0,0,0,2046,2047, + 1,0,0,0,2047,2048,1,0,0,0,2048,2050,5,111,0,0,2049,2046,1,0,0,0,2049,2050, + 1,0,0,0,2050,2051,1,0,0,0,2051,2052,3,88,44,0,2052,2053,5,24,0,0,2053, + 2054,3,88,44,0,2054,2055,3,46,23,0,2055,239,1,0,0,0,2056,2057,3,88,44, + 0,2057,241,1,0,0,0,2058,2059,3,110,55,0,2059,2060,5,43,0,0,2060,2061,3, + 162,81,0,2061,2062,3,128,64,0,2062,243,1,0,0,0,2063,2064,3,110,55,0,2064, + 2065,5,28,0,0,2065,2066,3,162,81,0,2066,2067,3,128,64,0,2067,245,1,0,0, + 0,2068,2069,3,110,55,0,2069,2070,5,144,0,0,2070,2071,3,162,81,0,2071,2072, + 3,128,64,0,2072,247,1,0,0,0,2073,2074,3,110,55,0,2074,2075,5,16,0,0,2075, + 2076,3,162,81,0,2076,2077,3,128,64,0,2077,249,1,0,0,0,2078,2079,3,110, + 55,0,2079,2080,5,16,0,0,2080,2081,5,144,0,0,2081,2082,3,162,81,0,2082, + 2083,3,128,64,0,2083,251,1,0,0,0,2084,2085,3,176,88,0,2085,2093,5,38,0, + 0,2086,2088,3,184,92,0,2087,2086,1,0,0,0,2087,2088,1,0,0,0,2088,2090,1, + 0,0,0,2089,2091,3,318,159,0,2090,2089,1,0,0,0,2090,2091,1,0,0,0,2091,2094, + 1,0,0,0,2092,2094,3,254,127,0,2093,2087,1,0,0,0,2093,2092,1,0,0,0,2094, + 2095,1,0,0,0,2095,2096,3,128,64,0,2096,253,1,0,0,0,2097,2100,3,256,128, + 0,2098,2100,3,258,129,0,2099,2097,1,0,0,0,2099,2098,1,0,0,0,2100,255,1, + 0,0,0,2101,2103,3,184,92,0,2102,2101,1,0,0,0,2102,2103,1,0,0,0,2103,2104, + 1,0,0,0,2104,2110,5,74,0,0,2105,2107,5,8,0,0,2106,2108,5,74,0,0,2107,2106, + 1,0,0,0,2107,2108,1,0,0,0,2108,2110,1,0,0,0,2109,2102,1,0,0,0,2109,2105, + 1,0,0,0,2109,2110,1,0,0,0,2110,2111,1,0,0,0,2111,2112,3,260,130,0,2112, + 2113,5,154,0,0,2113,2114,3,260,130,0,2114,257,1,0,0,0,2115,2117,3,184, + 92,0,2116,2115,1,0,0,0,2116,2117,1,0,0,0,2117,2118,1,0,0,0,2118,2119,5, + 196,0,0,2119,2120,3,260,130,0,2120,2121,5,200,0,0,2121,2126,3,260,130, + 0,2122,2123,5,200,0,0,2123,2125,3,260,130,0,2124,2122,1,0,0,0,2125,2128, + 1,0,0,0,2126,2124,1,0,0,0,2126,2127,1,0,0,0,2127,2129,1,0,0,0,2128,2126, + 1,0,0,0,2129,2130,5,197,0,0,2130,259,1,0,0,0,2131,2132,3,262,131,0,2132, + 261,1,0,0,0,2133,2135,3,264,132,0,2134,2133,1,0,0,0,2134,2135,1,0,0,0, + 2135,2139,1,0,0,0,2136,2137,3,40,20,0,2137,2138,7,17,0,0,2138,2140,1,0, + 0,0,2139,2136,1,0,0,0,2139,2140,1,0,0,0,2140,2141,1,0,0,0,2141,2142,3, + 226,113,0,2142,263,1,0,0,0,2143,2144,3,266,133,0,2144,265,1,0,0,0,2145, + 2146,3,328,164,0,2146,267,1,0,0,0,2147,2148,3,176,88,0,2148,2149,5,22, + 0,0,2149,2150,3,270,135,0,2150,2151,3,128,64,0,2151,269,1,0,0,0,2152,2158, + 3,184,92,0,2153,2154,5,111,0,0,2154,2155,3,260,130,0,2155,2156,5,207,0, + 0,2156,2157,3,260,130,0,2157,2159,1,0,0,0,2158,2153,1,0,0,0,2158,2159, + 1,0,0,0,2159,2173,1,0,0,0,2160,2162,5,8,0,0,2161,2160,1,0,0,0,2161,2162, + 1,0,0,0,2162,2170,1,0,0,0,2163,2165,5,111,0,0,2164,2163,1,0,0,0,2164,2165, + 1,0,0,0,2165,2166,1,0,0,0,2166,2167,3,260,130,0,2167,2168,5,207,0,0,2168, + 2169,3,260,130,0,2169,2171,1,0,0,0,2170,2164,1,0,0,0,2170,2171,1,0,0,0, + 2171,2173,1,0,0,0,2172,2152,1,0,0,0,2172,2161,1,0,0,0,2173,271,1,0,0,0, + 2174,2175,3,176,88,0,2175,2176,5,150,0,0,2176,2177,3,274,137,0,2177,2178, + 3,128,64,0,2178,273,1,0,0,0,2179,2185,3,184,92,0,2180,2181,5,69,0,0,2181, + 2182,3,260,130,0,2182,2183,5,152,0,0,2183,2184,3,260,130,0,2184,2186,1, + 0,0,0,2185,2180,1,0,0,0,2185,2186,1,0,0,0,2186,2200,1,0,0,0,2187,2189, + 5,8,0,0,2188,2187,1,0,0,0,2188,2189,1,0,0,0,2189,2197,1,0,0,0,2190,2192, + 5,69,0,0,2191,2190,1,0,0,0,2191,2192,1,0,0,0,2192,2193,1,0,0,0,2193,2194, + 3,260,130,0,2194,2195,5,152,0,0,2195,2196,3,260,130,0,2196,2198,1,0,0, + 0,2197,2191,1,0,0,0,2197,2198,1,0,0,0,2198,2200,1,0,0,0,2199,2179,1,0, + 0,0,2199,2188,1,0,0,0,2200,275,1,0,0,0,2201,2202,3,110,55,0,2202,2203, + 5,20,0,0,2203,2204,3,162,81,0,2204,2205,3,128,64,0,2205,277,1,0,0,0,2206, + 2207,3,176,88,0,2207,2208,5,143,0,0,2208,2210,3,184,92,0,2209,2211,3,318, + 159,0,2210,2209,1,0,0,0,2210,2211,1,0,0,0,2211,2212,1,0,0,0,2212,2213, + 3,128,64,0,2213,279,1,0,0,0,2214,2215,3,110,55,0,2215,2216,5,75,0,0,2216, + 2217,3,162,81,0,2217,2218,3,282,141,0,2218,281,1,0,0,0,2219,2225,5,205, + 0,0,2220,2221,5,214,0,0,2221,2222,3,284,142,0,2222,2223,5,216,0,0,2223, + 2225,1,0,0,0,2224,2219,1,0,0,0,2224,2220,1,0,0,0,2225,283,1,0,0,0,2226, + 2230,3,390,195,0,2227,2230,3,130,65,0,2228,2230,3,286,143,0,2229,2226, + 1,0,0,0,2229,2227,1,0,0,0,2229,2228,1,0,0,0,2230,2233,1,0,0,0,2231,2229, + 1,0,0,0,2231,2232,1,0,0,0,2232,2235,1,0,0,0,2233,2231,1,0,0,0,2234,2236, + 3,288,144,0,2235,2234,1,0,0,0,2235,2236,1,0,0,0,2236,285,1,0,0,0,2237, + 2238,3,76,38,0,2238,2239,5,134,0,0,2239,2240,3,106,53,0,2240,287,1,0,0, + 0,2241,2242,3,76,38,0,2242,2243,3,0,0,0,2243,289,1,0,0,0,2244,2245,3,176, + 88,0,2245,2246,5,63,0,0,2246,2248,3,184,92,0,2247,2249,3,318,159,0,2248, + 2247,1,0,0,0,2248,2249,1,0,0,0,2249,2250,1,0,0,0,2250,2251,3,282,141,0, + 2251,291,1,0,0,0,2252,2253,3,110,55,0,2253,2254,5,121,0,0,2254,2255,3, + 162,81,0,2255,2256,3,282,141,0,2256,293,1,0,0,0,2257,2258,3,176,88,0,2258, + 2259,5,23,0,0,2259,2261,3,184,92,0,2260,2262,3,318,159,0,2261,2260,1,0, + 0,0,2261,2262,1,0,0,0,2262,2263,1,0,0,0,2263,2264,3,282,141,0,2264,295, + 1,0,0,0,2265,2266,3,176,88,0,2266,2268,5,87,0,0,2267,2269,7,8,0,0,2268, + 2267,1,0,0,0,2268,2269,1,0,0,0,2269,2270,1,0,0,0,2270,2272,3,184,92,0, + 2271,2273,3,318,159,0,2272,2271,1,0,0,0,2272,2273,1,0,0,0,2273,2274,1, + 0,0,0,2274,2275,3,282,141,0,2275,297,1,0,0,0,2276,2281,3,88,44,0,2277, + 2278,5,202,0,0,2278,2280,3,88,44,0,2279,2277,1,0,0,0,2280,2283,1,0,0,0, + 2281,2279,1,0,0,0,2281,2282,1,0,0,0,2282,299,1,0,0,0,2283,2281,1,0,0,0, + 2284,2285,3,110,55,0,2285,2286,5,84,0,0,2286,2287,3,162,81,0,2287,2288, + 3,128,64,0,2288,301,1,0,0,0,2289,2290,3,176,88,0,2290,2291,5,70,0,0,2291, + 2292,3,306,153,0,2292,2293,3,128,64,0,2293,303,1,0,0,0,2294,2295,3,176, + 88,0,2295,2296,5,150,0,0,2296,2297,5,70,0,0,2297,2298,3,306,153,0,2298, + 2299,3,128,64,0,2299,305,1,0,0,0,2300,2302,3,184,92,0,2301,2303,3,318, + 159,0,2302,2301,1,0,0,0,2302,2303,1,0,0,0,2303,2306,1,0,0,0,2304,2305, + 5,111,0,0,2305,2307,3,308,154,0,2306,2304,1,0,0,0,2306,2307,1,0,0,0,2307, + 2313,1,0,0,0,2308,2309,5,74,0,0,2309,2310,3,314,157,0,2310,2311,5,154, + 0,0,2311,2312,3,314,157,0,2312,2314,1,0,0,0,2313,2308,1,0,0,0,2313,2314, + 1,0,0,0,2314,2340,1,0,0,0,2315,2317,5,8,0,0,2316,2315,1,0,0,0,2316,2317, + 1,0,0,0,2317,2318,1,0,0,0,2318,2319,3,314,157,0,2319,2320,5,154,0,0,2320, + 2321,3,314,157,0,2321,2340,1,0,0,0,2322,2324,3,418,209,0,2323,2322,1,0, + 0,0,2323,2324,1,0,0,0,2324,2326,1,0,0,0,2325,2327,3,318,159,0,2326,2325, + 1,0,0,0,2326,2327,1,0,0,0,2327,2330,1,0,0,0,2328,2329,5,111,0,0,2329,2331, + 3,570,285,0,2330,2328,1,0,0,0,2330,2331,1,0,0,0,2331,2337,1,0,0,0,2332, + 2333,5,74,0,0,2333,2334,3,314,157,0,2334,2335,5,154,0,0,2335,2336,3,314, + 157,0,2336,2338,1,0,0,0,2337,2332,1,0,0,0,2337,2338,1,0,0,0,2338,2340, + 1,0,0,0,2339,2300,1,0,0,0,2339,2316,1,0,0,0,2339,2323,1,0,0,0,2340,307, + 1,0,0,0,2341,2342,3,310,155,0,2342,309,1,0,0,0,2343,2345,3,44,22,0,2344, + 2343,1,0,0,0,2344,2345,1,0,0,0,2345,2346,1,0,0,0,2346,2363,3,318,159,0, + 2347,2349,3,44,22,0,2348,2347,1,0,0,0,2348,2349,1,0,0,0,2349,2350,1,0, + 0,0,2350,2352,3,312,156,0,2351,2353,3,318,159,0,2352,2351,1,0,0,0,2352, + 2353,1,0,0,0,2353,2363,1,0,0,0,2354,2356,3,220,110,0,2355,2357,3,328,164, + 0,2356,2355,1,0,0,0,2356,2357,1,0,0,0,2357,2363,1,0,0,0,2358,2360,3,328, + 164,0,2359,2361,3,220,110,0,2360,2359,1,0,0,0,2360,2361,1,0,0,0,2361,2363, + 1,0,0,0,2362,2344,1,0,0,0,2362,2348,1,0,0,0,2362,2354,1,0,0,0,2362,2358, + 1,0,0,0,2363,311,1,0,0,0,2364,2366,3,200,100,0,2365,2364,1,0,0,0,2366, + 2367,1,0,0,0,2367,2365,1,0,0,0,2367,2368,1,0,0,0,2368,2370,1,0,0,0,2369, + 2371,3,198,99,0,2370,2369,1,0,0,0,2370,2371,1,0,0,0,2371,2375,1,0,0,0, + 2372,2374,3,200,100,0,2373,2372,1,0,0,0,2374,2377,1,0,0,0,2375,2373,1, + 0,0,0,2375,2376,1,0,0,0,2376,2385,1,0,0,0,2377,2375,1,0,0,0,2378,2380, + 3,198,99,0,2379,2381,3,200,100,0,2380,2379,1,0,0,0,2381,2382,1,0,0,0,2382, + 2380,1,0,0,0,2382,2383,1,0,0,0,2383,2385,1,0,0,0,2384,2365,1,0,0,0,2384, + 2378,1,0,0,0,2385,313,1,0,0,0,2386,2387,3,316,158,0,2387,315,1,0,0,0,2388, + 2393,3,88,44,0,2389,2390,5,202,0,0,2390,2392,3,88,44,0,2391,2389,1,0,0, + 0,2392,2395,1,0,0,0,2393,2391,1,0,0,0,2393,2394,1,0,0,0,2394,317,1,0,0, + 0,2395,2393,1,0,0,0,2396,2397,3,320,160,0,2397,319,1,0,0,0,2398,2405,5, + 207,0,0,2399,2405,5,184,0,0,2400,2402,5,46,0,0,2401,2403,7,20,0,0,2402, + 2401,1,0,0,0,2402,2403,1,0,0,0,2403,2405,1,0,0,0,2404,2398,1,0,0,0,2404, + 2399,1,0,0,0,2404,2400,1,0,0,0,2405,2406,1,0,0,0,2406,2407,3,0,0,0,2407, + 321,1,0,0,0,2408,2411,3,324,162,0,2409,2411,3,326,163,0,2410,2408,1,0, + 0,0,2410,2409,1,0,0,0,2411,323,1,0,0,0,2412,2414,5,103,0,0,2413,2415,3, + 44,22,0,2414,2413,1,0,0,0,2414,2415,1,0,0,0,2415,2416,1,0,0,0,2416,2417, + 3,208,104,0,2417,2418,3,128,64,0,2418,325,1,0,0,0,2419,2421,5,103,0,0, + 2420,2422,3,44,22,0,2421,2420,1,0,0,0,2421,2422,1,0,0,0,2422,2423,1,0, + 0,0,2423,2424,3,332,166,0,2424,2425,3,128,64,0,2425,327,1,0,0,0,2426,2427, + 3,330,165,0,2427,329,1,0,0,0,2428,2429,3,332,166,0,2429,331,1,0,0,0,2430, + 2434,5,211,0,0,2431,2432,3,334,167,0,2432,2433,5,181,0,0,2433,2435,1,0, + 0,0,2434,2431,1,0,0,0,2434,2435,1,0,0,0,2435,2436,1,0,0,0,2436,2437,3, + 334,167,0,2437,2438,5,212,0,0,2438,333,1,0,0,0,2439,2442,3,24,12,0,2440, + 2442,3,10,5,0,2441,2439,1,0,0,0,2441,2440,1,0,0,0,2442,335,1,0,0,0,2443, + 2444,3,110,55,0,2444,2445,5,101,0,0,2445,2446,3,162,81,0,2446,2447,3,128, + 64,0,2447,337,1,0,0,0,2448,2449,5,192,0,0,2449,2453,3,342,171,0,2450,2451, + 5,192,0,0,2451,2453,3,874,437,0,2452,2448,1,0,0,0,2452,2450,1,0,0,0,2453, + 339,1,0,0,0,2454,2455,5,192,0,0,2455,2459,3,342,171,0,2456,2457,5,192, + 0,0,2457,2459,3,874,437,0,2458,2454,1,0,0,0,2458,2456,1,0,0,0,2459,341, + 1,0,0,0,2460,2461,3,220,110,0,2461,343,1,0,0,0,2462,2464,3,340,170,0,2463, + 2462,1,0,0,0,2464,2467,1,0,0,0,2465,2463,1,0,0,0,2465,2466,1,0,0,0,2466, + 2468,1,0,0,0,2467,2465,1,0,0,0,2468,2469,7,21,0,0,2469,2479,3,346,173, + 0,2470,2471,5,1,0,0,2471,2476,3,54,27,0,2472,2473,5,200,0,0,2473,2475, + 3,54,27,0,2474,2472,1,0,0,0,2475,2478,1,0,0,0,2476,2474,1,0,0,0,2476,2477, + 1,0,0,0,2477,2480,1,0,0,0,2478,2476,1,0,0,0,2479,2470,1,0,0,0,2479,2480, + 1,0,0,0,2480,2481,1,0,0,0,2481,2482,3,348,174,0,2482,345,1,0,0,0,2483, + 2485,3,44,22,0,2484,2483,1,0,0,0,2484,2485,1,0,0,0,2485,2489,1,0,0,0,2486, + 2490,5,204,0,0,2487,2488,5,158,0,0,2488,2490,5,24,0,0,2489,2486,1,0,0, + 0,2489,2487,1,0,0,0,2490,2492,1,0,0,0,2491,2484,1,0,0,0,2491,2492,1,0, + 0,0,2492,2493,1,0,0,0,2493,2494,3,220,110,0,2494,347,1,0,0,0,2495,2516, + 5,205,0,0,2496,2500,5,214,0,0,2497,2499,3,350,175,0,2498,2497,1,0,0,0, + 2499,2502,1,0,0,0,2500,2498,1,0,0,0,2500,2501,1,0,0,0,2501,2503,1,0,0, + 0,2502,2500,1,0,0,0,2503,2516,5,216,0,0,2504,2511,5,214,0,0,2505,2510, + 3,394,197,0,2506,2510,3,876,438,0,2507,2510,3,86,43,0,2508,2510,3,90,45, + 0,2509,2505,1,0,0,0,2509,2506,1,0,0,0,2509,2507,1,0,0,0,2509,2508,1,0, + 0,0,2510,2513,1,0,0,0,2511,2509,1,0,0,0,2511,2512,1,0,0,0,2512,2514,1, + 0,0,0,2513,2511,1,0,0,0,2514,2516,5,216,0,0,2515,2495,1,0,0,0,2515,2496, + 1,0,0,0,2515,2504,1,0,0,0,2516,349,1,0,0,0,2517,2522,3,82,41,0,2518,2522, + 3,352,176,0,2519,2522,3,86,43,0,2520,2522,3,90,45,0,2521,2517,1,0,0,0, + 2521,2518,1,0,0,0,2521,2519,1,0,0,0,2521,2520,1,0,0,0,2522,351,1,0,0,0, + 2523,2524,3,354,177,0,2524,353,1,0,0,0,2525,2527,5,65,0,0,2526,2525,1, + 0,0,0,2526,2527,1,0,0,0,2527,2529,1,0,0,0,2528,2530,7,19,0,0,2529,2528, + 1,0,0,0,2529,2530,1,0,0,0,2530,2531,1,0,0,0,2531,2533,3,232,116,0,2532, + 2534,3,196,98,0,2533,2532,1,0,0,0,2533,2534,1,0,0,0,2534,2536,1,0,0,0, + 2535,2537,3,318,159,0,2536,2535,1,0,0,0,2536,2537,1,0,0,0,2537,2538,1, + 0,0,0,2538,2539,3,348,174,0,2539,355,1,0,0,0,2540,2542,3,340,170,0,2541, + 2540,1,0,0,0,2542,2545,1,0,0,0,2543,2541,1,0,0,0,2543,2544,1,0,0,0,2544, + 2546,1,0,0,0,2545,2543,1,0,0,0,2546,2547,3,360,180,0,2547,2548,3,362,181, + 0,2548,357,1,0,0,0,2549,2551,5,141,0,0,2550,2549,1,0,0,0,2550,2551,1,0, + 0,0,2551,2552,1,0,0,0,2552,2556,5,94,0,0,2553,2555,3,340,170,0,2554,2553, + 1,0,0,0,2555,2558,1,0,0,0,2556,2554,1,0,0,0,2556,2557,1,0,0,0,2557,2559, + 1,0,0,0,2558,2556,1,0,0,0,2559,2560,3,360,180,0,2560,2561,3,362,181,0, + 2561,359,1,0,0,0,2562,2564,5,115,0,0,2563,2565,3,44,22,0,2564,2563,1,0, + 0,0,2564,2565,1,0,0,0,2565,361,1,0,0,0,2566,2576,5,205,0,0,2567,2571,5, + 214,0,0,2568,2570,3,370,185,0,2569,2568,1,0,0,0,2570,2573,1,0,0,0,2571, + 2569,1,0,0,0,2571,2572,1,0,0,0,2572,2574,1,0,0,0,2573,2571,1,0,0,0,2574, + 2576,5,216,0,0,2575,2566,1,0,0,0,2575,2567,1,0,0,0,2576,363,1,0,0,0,2577, + 2578,3,76,38,0,2578,2579,5,68,0,0,2579,2580,3,0,0,0,2580,2581,5,205,0, + 0,2581,365,1,0,0,0,2582,2584,3,44,22,0,2583,2582,1,0,0,0,2583,2584,1,0, + 0,0,2584,2585,1,0,0,0,2585,2587,5,74,0,0,2586,2583,1,0,0,0,2586,2587,1, + 0,0,0,2587,2588,1,0,0,0,2588,2593,3,88,44,0,2589,2590,5,200,0,0,2590,2592, + 3,88,44,0,2591,2589,1,0,0,0,2592,2595,1,0,0,0,2593,2591,1,0,0,0,2593,2594, + 1,0,0,0,2594,2596,1,0,0,0,2595,2593,1,0,0,0,2596,2597,5,154,0,0,2597,2602, + 3,88,44,0,2598,2599,5,200,0,0,2599,2601,3,88,44,0,2600,2598,1,0,0,0,2601, + 2604,1,0,0,0,2602,2600,1,0,0,0,2602,2603,1,0,0,0,2603,367,1,0,0,0,2604, + 2602,1,0,0,0,2605,2606,3,58,29,0,2606,369,1,0,0,0,2607,2612,3,372,186, + 0,2608,2612,3,364,182,0,2609,2612,3,86,43,0,2610,2612,3,90,45,0,2611,2607, + 1,0,0,0,2611,2608,1,0,0,0,2611,2609,1,0,0,0,2611,2610,1,0,0,0,2612,371, + 1,0,0,0,2613,2616,3,76,38,0,2614,2617,3,374,187,0,2615,2617,3,376,188, + 0,2616,2614,1,0,0,0,2616,2615,1,0,0,0,2617,373,1,0,0,0,2618,2649,3,356, + 178,0,2619,2649,3,358,179,0,2620,2649,3,58,29,0,2621,2649,3,52,26,0,2622, + 2649,3,446,223,0,2623,2649,3,450,225,0,2624,2649,3,462,231,0,2625,2649, + 3,464,232,0,2626,2649,3,488,244,0,2627,2649,3,492,246,0,2628,2649,3,506, + 253,0,2629,2649,3,556,278,0,2630,2649,3,520,260,0,2631,2649,3,496,248, + 0,2632,2649,3,574,287,0,2633,2649,3,748,374,0,2634,2649,3,686,343,0,2635, + 2649,3,760,380,0,2636,2649,3,768,384,0,2637,2649,3,808,404,0,2638,2649, + 3,812,406,0,2639,2649,3,824,412,0,2640,2649,3,828,414,0,2641,2649,3,836, + 418,0,2642,2649,3,842,421,0,2643,2649,3,864,432,0,2644,2649,3,868,434, + 0,2645,2649,3,872,436,0,2646,2649,3,550,275,0,2647,2649,3,880,440,0,2648, + 2618,1,0,0,0,2648,2619,1,0,0,0,2648,2620,1,0,0,0,2648,2621,1,0,0,0,2648, + 2622,1,0,0,0,2648,2623,1,0,0,0,2648,2624,1,0,0,0,2648,2625,1,0,0,0,2648, + 2626,1,0,0,0,2648,2627,1,0,0,0,2648,2628,1,0,0,0,2648,2629,1,0,0,0,2648, + 2630,1,0,0,0,2648,2631,1,0,0,0,2648,2632,1,0,0,0,2648,2633,1,0,0,0,2648, + 2634,1,0,0,0,2648,2635,1,0,0,0,2648,2636,1,0,0,0,2648,2637,1,0,0,0,2648, + 2638,1,0,0,0,2648,2639,1,0,0,0,2648,2640,1,0,0,0,2648,2641,1,0,0,0,2648, + 2642,1,0,0,0,2648,2643,1,0,0,0,2648,2644,1,0,0,0,2648,2645,1,0,0,0,2648, + 2646,1,0,0,0,2648,2647,1,0,0,0,2649,375,1,0,0,0,2650,2653,3,432,216,0, + 2651,2653,3,436,218,0,2652,2650,1,0,0,0,2652,2651,1,0,0,0,2653,377,1,0, + 0,0,2654,2655,7,22,0,0,2655,379,1,0,0,0,2656,2657,3,340,170,0,2657,381, + 1,0,0,0,2658,2660,3,378,189,0,2659,2658,1,0,0,0,2659,2660,1,0,0,0,2660, + 2664,1,0,0,0,2661,2663,3,380,190,0,2662,2661,1,0,0,0,2663,2666,1,0,0,0, + 2664,2662,1,0,0,0,2664,2665,1,0,0,0,2665,383,1,0,0,0,2666,2664,1,0,0,0, + 2667,2668,3,386,193,0,2668,2669,3,388,194,0,2669,385,1,0,0,0,2670,2672, + 3,44,22,0,2671,2670,1,0,0,0,2671,2672,1,0,0,0,2672,2674,1,0,0,0,2673,2675, + 3,444,222,0,2674,2673,1,0,0,0,2674,2675,1,0,0,0,2675,387,1,0,0,0,2676, + 2686,5,205,0,0,2677,2681,5,214,0,0,2678,2680,3,390,195,0,2679,2678,1,0, + 0,0,2680,2683,1,0,0,0,2681,2679,1,0,0,0,2681,2682,1,0,0,0,2682,2684,1, + 0,0,0,2683,2681,1,0,0,0,2684,2686,5,216,0,0,2685,2676,1,0,0,0,2685,2677, + 1,0,0,0,2686,389,1,0,0,0,2687,2704,3,90,45,0,2688,2689,3,76,38,0,2689, + 2690,3,392,196,0,2690,2704,1,0,0,0,2691,2693,3,480,240,0,2692,2691,1,0, + 0,0,2692,2693,1,0,0,0,2693,2694,1,0,0,0,2694,2695,3,76,38,0,2695,2696, + 3,434,217,0,2696,2704,1,0,0,0,2697,2699,3,480,240,0,2698,2697,1,0,0,0, + 2698,2699,1,0,0,0,2699,2700,1,0,0,0,2700,2701,3,76,38,0,2701,2702,3,436, + 218,0,2702,2704,1,0,0,0,2703,2687,1,0,0,0,2703,2688,1,0,0,0,2703,2692, + 1,0,0,0,2703,2698,1,0,0,0,2704,391,1,0,0,0,2705,2710,5,7,0,0,2706,2707, + 5,206,0,0,2707,2708,3,40,20,0,2708,2709,5,208,0,0,2709,2711,1,0,0,0,2710, + 2706,1,0,0,0,2710,2711,1,0,0,0,2711,2713,1,0,0,0,2712,2714,3,40,20,0,2713, + 2712,1,0,0,0,2713,2714,1,0,0,0,2714,2715,1,0,0,0,2715,2716,5,71,0,0,2716, + 2717,3,88,44,0,2717,2718,3,46,23,0,2718,2724,1,0,0,0,2719,2720,5,164,0, + 0,2720,2724,3,442,221,0,2721,2724,3,374,187,0,2722,2724,3,432,216,0,2723, + 2705,1,0,0,0,2723,2719,1,0,0,0,2723,2721,1,0,0,0,2723,2722,1,0,0,0,2724, + 393,1,0,0,0,2725,2726,3,76,38,0,2726,2727,3,374,187,0,2727,395,1,0,0,0, + 2728,2729,3,76,38,0,2729,2730,5,164,0,0,2730,2731,3,442,221,0,2731,397, + 1,0,0,0,2732,2733,3,76,38,0,2733,2734,3,432,216,0,2734,399,1,0,0,0,2735, + 2736,3,76,38,0,2736,2737,3,438,219,0,2737,401,1,0,0,0,2738,2739,3,76,38, + 0,2739,2740,3,440,220,0,2740,403,1,0,0,0,2741,2743,3,182,91,0,2742,2741, + 1,0,0,0,2742,2743,1,0,0,0,2743,2745,1,0,0,0,2744,2746,5,49,0,0,2745,2744, + 1,0,0,0,2745,2746,1,0,0,0,2746,2748,1,0,0,0,2747,2749,7,22,0,0,2748,2747, + 1,0,0,0,2748,2749,1,0,0,0,2749,2751,1,0,0,0,2750,2752,5,40,0,0,2751,2750, + 1,0,0,0,2751,2752,1,0,0,0,2752,405,1,0,0,0,2753,2755,3,404,202,0,2754, + 2756,5,127,0,0,2755,2754,1,0,0,0,2755,2756,1,0,0,0,2756,407,1,0,0,0,2757, + 2758,5,56,0,0,2758,2759,3,178,89,0,2759,409,1,0,0,0,2760,2761,3,340,170, + 0,2761,411,1,0,0,0,2762,2765,3,408,204,0,2763,2765,3,406,203,0,2764,2762, + 1,0,0,0,2764,2763,1,0,0,0,2765,413,1,0,0,0,2766,2770,3,412,206,0,2767, + 2769,3,410,205,0,2768,2767,1,0,0,0,2769,2772,1,0,0,0,2770,2768,1,0,0,0, + 2770,2771,1,0,0,0,2771,415,1,0,0,0,2772,2770,1,0,0,0,2773,2775,3,418,209, + 0,2774,2773,1,0,0,0,2774,2775,1,0,0,0,2775,2776,1,0,0,0,2776,2777,3,420, + 210,0,2777,417,1,0,0,0,2778,2780,3,44,22,0,2779,2781,3,196,98,0,2780,2779, + 1,0,0,0,2780,2781,1,0,0,0,2781,2784,1,0,0,0,2782,2784,3,196,98,0,2783, + 2778,1,0,0,0,2783,2782,1,0,0,0,2784,419,1,0,0,0,2785,2787,3,318,159,0, + 2786,2785,1,0,0,0,2786,2787,1,0,0,0,2787,2788,1,0,0,0,2788,2789,3,422, + 211,0,2789,421,1,0,0,0,2790,2791,3,388,194,0,2791,423,1,0,0,0,2792,2793, + 3,404,202,0,2793,2794,3,416,208,0,2794,425,1,0,0,0,2795,2798,3,408,204, + 0,2796,2798,3,404,202,0,2797,2795,1,0,0,0,2797,2796,1,0,0,0,2798,2799, + 1,0,0,0,2799,2800,5,127,0,0,2800,2801,3,416,208,0,2801,427,1,0,0,0,2802, + 2803,3,408,204,0,2803,2804,3,184,92,0,2804,2805,3,420,210,0,2805,429,1, + 0,0,0,2806,2810,3,226,113,0,2807,2809,3,200,100,0,2808,2807,1,0,0,0,2809, + 2812,1,0,0,0,2810,2808,1,0,0,0,2810,2811,1,0,0,0,2811,2813,1,0,0,0,2812, + 2810,1,0,0,0,2813,2814,3,422,211,0,2814,431,1,0,0,0,2815,2824,3,426,213, + 0,2816,2824,3,428,214,0,2817,2824,3,448,224,0,2818,2824,3,458,229,0,2819, + 2824,3,516,258,0,2820,2824,3,518,259,0,2821,2824,3,882,441,0,2822,2824, + 3,424,212,0,2823,2815,1,0,0,0,2823,2816,1,0,0,0,2823,2817,1,0,0,0,2823, + 2818,1,0,0,0,2823,2819,1,0,0,0,2823,2820,1,0,0,0,2823,2821,1,0,0,0,2823, + 2822,1,0,0,0,2824,433,1,0,0,0,2825,2827,5,56,0,0,2826,2828,3,40,20,0,2827, + 2826,1,0,0,0,2827,2828,1,0,0,0,2828,2830,1,0,0,0,2829,2831,3,264,132,0, + 2830,2829,1,0,0,0,2830,2831,1,0,0,0,2831,2833,1,0,0,0,2832,2834,5,106, + 0,0,2833,2832,1,0,0,0,2833,2834,1,0,0,0,2834,2835,1,0,0,0,2835,2836,3, + 436,218,0,2836,435,1,0,0,0,2837,2840,3,438,219,0,2838,2840,3,440,220,0, + 2839,2837,1,0,0,0,2839,2838,1,0,0,0,2840,437,1,0,0,0,2841,2857,3,470,235, + 0,2842,2857,3,472,236,0,2843,2857,3,474,237,0,2844,2857,3,478,239,0,2845, + 2857,3,490,245,0,2846,2857,3,494,247,0,2847,2857,3,852,426,0,2848,2857, + 3,870,435,0,2849,2857,3,502,251,0,2850,2857,3,508,254,0,2851,2857,3,536, + 268,0,2852,2857,3,552,276,0,2853,2857,3,558,279,0,2854,2857,3,566,283, + 0,2855,2857,3,568,284,0,2856,2841,1,0,0,0,2856,2842,1,0,0,0,2856,2843, + 1,0,0,0,2856,2844,1,0,0,0,2856,2845,1,0,0,0,2856,2846,1,0,0,0,2856,2847, + 1,0,0,0,2856,2848,1,0,0,0,2856,2849,1,0,0,0,2856,2850,1,0,0,0,2856,2851, + 1,0,0,0,2856,2852,1,0,0,0,2856,2853,1,0,0,0,2856,2854,1,0,0,0,2856,2855, + 1,0,0,0,2857,439,1,0,0,0,2858,2875,3,592,296,0,2859,2875,3,750,375,0,2860, + 2875,3,714,357,0,2861,2875,3,762,381,0,2862,2875,3,796,398,0,2863,2875, + 3,810,405,0,2864,2875,3,814,407,0,2865,2875,3,826,413,0,2866,2875,3,830, + 415,0,2867,2875,3,838,419,0,2868,2875,3,866,433,0,2869,2875,3,596,298, + 0,2870,2875,3,718,359,0,2871,2875,3,840,420,0,2872,2875,3,764,382,0,2873, + 2875,3,798,399,0,2874,2858,1,0,0,0,2874,2859,1,0,0,0,2874,2860,1,0,0,0, + 2874,2861,1,0,0,0,2874,2862,1,0,0,0,2874,2863,1,0,0,0,2874,2864,1,0,0, + 0,2874,2865,1,0,0,0,2874,2866,1,0,0,0,2874,2867,1,0,0,0,2874,2868,1,0, + 0,0,2874,2869,1,0,0,0,2874,2870,1,0,0,0,2874,2871,1,0,0,0,2874,2872,1, + 0,0,0,2874,2873,1,0,0,0,2875,441,1,0,0,0,2876,2898,3,430,215,0,2877,2898, + 3,426,213,0,2878,2898,3,448,224,0,2879,2898,3,516,258,0,2880,2898,3,518, + 259,0,2881,2898,3,470,235,0,2882,2898,3,472,236,0,2883,2898,3,474,237, + 0,2884,2898,3,478,239,0,2885,2898,3,490,245,0,2886,2898,3,494,247,0,2887, + 2898,3,852,426,0,2888,2898,3,870,435,0,2889,2898,3,502,251,0,2890,2898, + 3,508,254,0,2891,2898,3,536,268,0,2892,2898,3,552,276,0,2893,2898,3,558, + 279,0,2894,2898,3,566,283,0,2895,2898,3,568,284,0,2896,2898,3,440,220, + 0,2897,2876,1,0,0,0,2897,2877,1,0,0,0,2897,2878,1,0,0,0,2897,2879,1,0, + 0,0,2897,2880,1,0,0,0,2897,2881,1,0,0,0,2897,2882,1,0,0,0,2897,2883,1, + 0,0,0,2897,2884,1,0,0,0,2897,2885,1,0,0,0,2897,2886,1,0,0,0,2897,2887, + 1,0,0,0,2897,2888,1,0,0,0,2897,2889,1,0,0,0,2897,2890,1,0,0,0,2897,2891, + 1,0,0,0,2897,2892,1,0,0,0,2897,2893,1,0,0,0,2897,2894,1,0,0,0,2897,2895, + 1,0,0,0,2897,2896,1,0,0,0,2898,443,1,0,0,0,2899,2900,7,11,0,0,2900,2905, + 3,168,84,0,2901,2902,5,200,0,0,2902,2904,3,168,84,0,2903,2901,1,0,0,0, + 2904,2907,1,0,0,0,2905,2903,1,0,0,0,2905,2906,1,0,0,0,2906,445,1,0,0,0, + 2907,2905,1,0,0,0,2908,2909,3,382,191,0,2909,2910,5,19,0,0,2910,2911,5, + 45,0,0,2911,2912,3,384,192,0,2912,447,1,0,0,0,2913,2914,3,414,207,0,2914, + 2915,5,19,0,0,2915,2916,3,416,208,0,2916,449,1,0,0,0,2917,2919,3,380,190, + 0,2918,2917,1,0,0,0,2919,2922,1,0,0,0,2920,2918,1,0,0,0,2920,2921,1,0, + 0,0,2921,2923,1,0,0,0,2922,2920,1,0,0,0,2923,2924,5,58,0,0,2924,2925,5, + 45,0,0,2925,2926,3,386,193,0,2926,2927,3,452,226,0,2927,451,1,0,0,0,2928, + 2939,5,205,0,0,2929,2934,5,214,0,0,2930,2933,3,368,184,0,2931,2933,3,454, + 227,0,2932,2930,1,0,0,0,2932,2931,1,0,0,0,2933,2936,1,0,0,0,2934,2932, + 1,0,0,0,2934,2935,1,0,0,0,2935,2937,1,0,0,0,2936,2934,1,0,0,0,2937,2939, + 5,216,0,0,2938,2928,1,0,0,0,2938,2929,1,0,0,0,2939,453,1,0,0,0,2940,2942, + 3,340,170,0,2941,2940,1,0,0,0,2942,2945,1,0,0,0,2943,2941,1,0,0,0,2943, + 2944,1,0,0,0,2944,2946,1,0,0,0,2945,2943,1,0,0,0,2946,2947,3,76,38,0,2947, + 2948,3,456,228,0,2948,455,1,0,0,0,2949,2951,5,58,0,0,2950,2949,1,0,0,0, + 2950,2951,1,0,0,0,2951,2952,1,0,0,0,2952,2953,3,416,208,0,2953,457,1,0, + 0,0,2954,2955,3,414,207,0,2955,2956,5,58,0,0,2956,2957,3,416,208,0,2957, + 459,1,0,0,0,2958,2960,3,378,189,0,2959,2958,1,0,0,0,2959,2960,1,0,0,0, + 2960,2963,1,0,0,0,2961,2962,5,82,0,0,2962,2964,3,466,233,0,2963,2961,1, + 0,0,0,2963,2964,1,0,0,0,2964,2968,1,0,0,0,2965,2967,3,380,190,0,2966,2965, + 1,0,0,0,2967,2970,1,0,0,0,2968,2966,1,0,0,0,2968,2969,1,0,0,0,2969,461, + 1,0,0,0,2970,2968,1,0,0,0,2971,2972,3,460,230,0,2972,2973,5,110,0,0,2973, + 2974,5,45,0,0,2974,2975,3,384,192,0,2975,463,1,0,0,0,2976,2978,3,378,189, + 0,2977,2976,1,0,0,0,2977,2978,1,0,0,0,2978,2979,1,0,0,0,2979,2983,5,82, + 0,0,2980,2982,3,380,190,0,2981,2980,1,0,0,0,2982,2985,1,0,0,0,2983,2981, + 1,0,0,0,2983,2984,1,0,0,0,2984,2986,1,0,0,0,2985,2983,1,0,0,0,2986,2987, + 5,45,0,0,2987,2988,3,384,192,0,2988,2989,3,466,233,0,2989,465,1,0,0,0, + 2990,2991,3,894,447,0,2991,467,1,0,0,0,2992,2994,3,406,203,0,2993,2995, + 5,82,0,0,2994,2993,1,0,0,0,2994,2995,1,0,0,0,2995,2997,1,0,0,0,2996,2998, + 3,476,238,0,2997,2996,1,0,0,0,2997,2998,1,0,0,0,2998,3002,1,0,0,0,2999, + 3001,3,410,205,0,3000,2999,1,0,0,0,3001,3004,1,0,0,0,3002,3000,1,0,0,0, + 3002,3003,1,0,0,0,3003,469,1,0,0,0,3004,3002,1,0,0,0,3005,3006,3,468,234, + 0,3006,3007,5,110,0,0,3007,3008,3,416,208,0,3008,471,1,0,0,0,3009,3010, + 3,406,203,0,3010,3014,5,82,0,0,3011,3013,3,410,205,0,3012,3011,1,0,0,0, + 3013,3016,1,0,0,0,3014,3012,1,0,0,0,3014,3015,1,0,0,0,3015,3017,1,0,0, + 0,3016,3014,1,0,0,0,3017,3018,3,416,208,0,3018,473,1,0,0,0,3019,3021,3, + 406,203,0,3020,3022,5,82,0,0,3021,3020,1,0,0,0,3021,3022,1,0,0,0,3022, + 3023,1,0,0,0,3023,3027,3,476,238,0,3024,3026,3,410,205,0,3025,3024,1,0, + 0,0,3026,3029,1,0,0,0,3027,3025,1,0,0,0,3027,3028,1,0,0,0,3028,3030,1, + 0,0,0,3029,3027,1,0,0,0,3030,3031,3,416,208,0,3031,475,1,0,0,0,3032,3033, + 7,23,0,0,3033,477,1,0,0,0,3034,3035,3,468,234,0,3035,3044,5,59,0,0,3036, + 3038,3,226,113,0,3037,3039,3,196,98,0,3038,3037,1,0,0,0,3038,3039,1,0, + 0,0,3039,3045,1,0,0,0,3040,3042,5,110,0,0,3041,3043,3,418,209,0,3042,3041, + 1,0,0,0,3042,3043,1,0,0,0,3043,3045,1,0,0,0,3044,3036,1,0,0,0,3044,3040, + 1,0,0,0,3045,3046,1,0,0,0,3046,3047,3,420,210,0,3047,479,1,0,0,0,3048, + 3049,5,152,0,0,3049,3050,3,482,241,0,3050,481,1,0,0,0,3051,3052,3,484, + 242,0,3052,483,1,0,0,0,3053,3054,3,486,243,0,3054,485,1,0,0,0,3055,3057, + 3,328,164,0,3056,3055,1,0,0,0,3056,3057,1,0,0,0,3057,487,1,0,0,0,3058, + 3059,3,460,230,0,3059,3060,5,91,0,0,3060,3061,5,45,0,0,3061,3062,3,384, + 192,0,3062,489,1,0,0,0,3063,3064,3,468,234,0,3064,3065,5,91,0,0,3065,3066, + 3,416,208,0,3066,491,1,0,0,0,3067,3068,3,460,230,0,3068,3069,5,117,0,0, + 3069,3070,5,45,0,0,3070,3071,3,384,192,0,3071,493,1,0,0,0,3072,3073,3, + 468,234,0,3073,3074,5,117,0,0,3074,3075,3,416,208,0,3075,495,1,0,0,0,3076, + 3077,3,382,191,0,3077,3078,5,119,0,0,3078,3079,5,45,0,0,3079,3080,3,384, + 192,0,3080,3081,3,498,249,0,3081,497,1,0,0,0,3082,3083,3,500,250,0,3083, + 499,1,0,0,0,3084,3085,3,902,451,0,3085,501,1,0,0,0,3086,3087,3,468,234, + 0,3087,3088,5,119,0,0,3088,3089,3,416,208,0,3089,503,1,0,0,0,3090,3091, + 5,217,0,0,3091,3092,3,88,44,0,3092,505,1,0,0,0,3093,3094,3,460,230,0,3094, + 3095,5,37,0,0,3095,3096,5,45,0,0,3096,3097,3,384,192,0,3097,507,1,0,0, + 0,3098,3112,3,468,234,0,3099,3101,5,37,0,0,3100,3102,3,418,209,0,3101, + 3100,1,0,0,0,3101,3102,1,0,0,0,3102,3104,1,0,0,0,3103,3105,3,318,159,0, + 3104,3103,1,0,0,0,3104,3105,1,0,0,0,3105,3108,1,0,0,0,3106,3107,5,36,0, + 0,3107,3109,3,510,255,0,3108,3106,1,0,0,0,3108,3109,1,0,0,0,3109,3113, + 1,0,0,0,3110,3111,5,36,0,0,3111,3113,3,510,255,0,3112,3099,1,0,0,0,3112, + 3110,1,0,0,0,3113,3114,1,0,0,0,3114,3115,3,422,211,0,3115,509,1,0,0,0, + 3116,3119,3,512,256,0,3117,3119,3,514,257,0,3118,3116,1,0,0,0,3118,3117, + 1,0,0,0,3119,511,1,0,0,0,3120,3121,3,260,130,0,3121,3122,5,154,0,0,3122, + 3123,3,260,130,0,3123,513,1,0,0,0,3124,3125,5,196,0,0,3125,3126,3,260, + 130,0,3126,3127,5,200,0,0,3127,3132,3,260,130,0,3128,3129,5,200,0,0,3129, + 3131,3,260,130,0,3130,3128,1,0,0,0,3131,3134,1,0,0,0,3132,3130,1,0,0,0, + 3132,3133,1,0,0,0,3133,3135,1,0,0,0,3134,3132,1,0,0,0,3135,3136,5,197, + 0,0,3136,515,1,0,0,0,3137,3142,3,414,207,0,3138,3140,5,22,0,0,3139,3141, + 3,418,209,0,3140,3139,1,0,0,0,3140,3141,1,0,0,0,3141,3143,1,0,0,0,3142, + 3138,1,0,0,0,3142,3143,1,0,0,0,3143,3144,1,0,0,0,3144,3145,5,21,0,0,3145, + 3146,3,260,130,0,3146,3147,5,207,0,0,3147,3148,3,260,130,0,3148,3149,3, + 422,211,0,3149,517,1,0,0,0,3150,3155,3,414,207,0,3151,3153,5,150,0,0,3152, + 3154,3,418,209,0,3153,3152,1,0,0,0,3153,3154,1,0,0,0,3154,3156,1,0,0,0, + 3155,3151,1,0,0,0,3155,3156,1,0,0,0,3156,3157,1,0,0,0,3157,3158,5,69,0, + 0,3158,3159,3,260,130,0,3159,3160,5,152,0,0,3160,3161,3,260,130,0,3161, + 3162,3,422,211,0,3162,519,1,0,0,0,3163,3164,3,460,230,0,3164,3165,5,85, + 0,0,3165,3166,5,45,0,0,3166,3167,3,386,193,0,3167,3168,3,522,261,0,3168, + 521,1,0,0,0,3169,3179,5,205,0,0,3170,3174,5,214,0,0,3171,3173,3,524,262, + 0,3172,3171,1,0,0,0,3173,3176,1,0,0,0,3174,3172,1,0,0,0,3174,3175,1,0, + 0,0,3175,3177,1,0,0,0,3176,3174,1,0,0,0,3177,3179,5,216,0,0,3178,3169, + 1,0,0,0,3178,3170,1,0,0,0,3179,523,1,0,0,0,3180,3190,3,394,197,0,3181, + 3190,3,396,198,0,3182,3190,3,526,263,0,3183,3185,3,480,240,0,3184,3183, + 1,0,0,0,3184,3185,1,0,0,0,3185,3186,1,0,0,0,3186,3190,3,530,265,0,3187, + 3190,3,86,43,0,3188,3190,3,90,45,0,3189,3180,1,0,0,0,3189,3181,1,0,0,0, + 3189,3182,1,0,0,0,3189,3184,1,0,0,0,3189,3187,1,0,0,0,3189,3188,1,0,0, + 0,3190,525,1,0,0,0,3191,3192,3,76,38,0,3192,3193,3,528,264,0,3193,527, + 1,0,0,0,3194,3200,3,426,213,0,3195,3200,3,448,224,0,3196,3200,3,458,229, + 0,3197,3200,3,516,258,0,3198,3200,3,518,259,0,3199,3194,1,0,0,0,3199,3195, + 1,0,0,0,3199,3196,1,0,0,0,3199,3197,1,0,0,0,3199,3198,1,0,0,0,3200,529, + 1,0,0,0,3201,3202,3,76,38,0,3202,3203,3,532,266,0,3203,531,1,0,0,0,3204, + 3209,3,534,267,0,3205,3209,3,434,217,0,3206,3209,3,438,219,0,3207,3209, + 3,440,220,0,3208,3204,1,0,0,0,3208,3205,1,0,0,0,3208,3206,1,0,0,0,3208, + 3207,1,0,0,0,3209,533,1,0,0,0,3210,3211,5,56,0,0,3211,3212,3,416,208,0, + 3212,535,1,0,0,0,3213,3214,3,468,234,0,3214,3215,5,85,0,0,3215,3216,3, + 538,269,0,3216,3217,3,522,261,0,3217,537,1,0,0,0,3218,3220,3,418,209,0, + 3219,3218,1,0,0,0,3219,3220,1,0,0,0,3220,3222,1,0,0,0,3221,3223,3,318, + 159,0,3222,3221,1,0,0,0,3222,3223,1,0,0,0,3223,3226,1,0,0,0,3224,3225, + 5,36,0,0,3225,3227,3,540,270,0,3226,3224,1,0,0,0,3226,3227,1,0,0,0,3227, + 3230,1,0,0,0,3228,3230,3,540,270,0,3229,3219,1,0,0,0,3229,3228,1,0,0,0, + 3230,539,1,0,0,0,3231,3234,3,542,271,0,3232,3234,3,544,272,0,3233,3231, + 1,0,0,0,3233,3232,1,0,0,0,3234,541,1,0,0,0,3235,3236,3,546,273,0,3236, + 3237,5,154,0,0,3237,3238,3,546,273,0,3238,543,1,0,0,0,3239,3240,5,196, + 0,0,3240,3241,3,546,273,0,3241,3242,5,200,0,0,3242,3247,3,546,273,0,3243, + 3244,5,200,0,0,3244,3246,3,546,273,0,3245,3243,1,0,0,0,3246,3249,1,0,0, + 0,3247,3245,1,0,0,0,3247,3248,1,0,0,0,3248,3250,1,0,0,0,3249,3247,1,0, + 0,0,3250,3251,5,197,0,0,3251,545,1,0,0,0,3252,3253,3,548,274,0,3253,547, + 1,0,0,0,3254,3256,3,264,132,0,3255,3254,1,0,0,0,3255,3256,1,0,0,0,3256, + 3260,1,0,0,0,3257,3258,3,40,20,0,3258,3259,7,17,0,0,3259,3261,1,0,0,0, + 3260,3257,1,0,0,0,3260,3261,1,0,0,0,3261,3262,1,0,0,0,3262,3263,3,226, + 113,0,3263,549,1,0,0,0,3264,3265,3,460,230,0,3265,3266,5,10,0,0,3266,3267, + 5,45,0,0,3267,3268,3,384,192,0,3268,551,1,0,0,0,3269,3270,3,468,234,0, + 3270,3271,3,554,277,0,3271,3272,3,422,211,0,3272,553,1,0,0,0,3273,3275, + 5,10,0,0,3274,3276,3,418,209,0,3275,3274,1,0,0,0,3275,3276,1,0,0,0,3276, + 3279,1,0,0,0,3277,3278,5,9,0,0,3278,3280,3,510,255,0,3279,3277,1,0,0,0, + 3279,3280,1,0,0,0,3280,3284,1,0,0,0,3281,3282,5,9,0,0,3282,3284,3,510, + 255,0,3283,3273,1,0,0,0,3283,3281,1,0,0,0,3284,555,1,0,0,0,3285,3286,3, + 460,230,0,3286,3287,5,70,0,0,3287,3288,5,45,0,0,3288,3289,3,384,192,0, + 3289,557,1,0,0,0,3290,3291,3,468,234,0,3291,3292,5,99,0,0,3292,3293,3, + 560,280,0,3293,3294,3,388,194,0,3294,559,1,0,0,0,3295,3297,3,418,209,0, + 3296,3295,1,0,0,0,3296,3297,1,0,0,0,3297,3299,1,0,0,0,3298,3300,3,318, + 159,0,3299,3298,1,0,0,0,3299,3300,1,0,0,0,3300,3303,1,0,0,0,3301,3302, + 5,111,0,0,3302,3304,3,570,285,0,3303,3301,1,0,0,0,3303,3304,1,0,0,0,3304, + 3310,1,0,0,0,3305,3306,5,74,0,0,3306,3307,3,562,281,0,3307,3308,5,154, + 0,0,3308,3309,3,562,281,0,3309,3311,1,0,0,0,3310,3305,1,0,0,0,3310,3311, + 1,0,0,0,3311,3317,1,0,0,0,3312,3313,3,562,281,0,3313,3314,5,154,0,0,3314, + 3315,3,562,281,0,3315,3317,1,0,0,0,3316,3296,1,0,0,0,3316,3312,1,0,0,0, + 3317,561,1,0,0,0,3318,3319,3,564,282,0,3319,563,1,0,0,0,3320,3321,3,226, + 113,0,3321,565,1,0,0,0,3322,3323,3,468,234,0,3323,3324,5,70,0,0,3324,3325, + 3,306,153,0,3325,3326,3,388,194,0,3326,567,1,0,0,0,3327,3328,3,468,234, + 0,3328,3329,5,150,0,0,3329,3330,5,70,0,0,3330,3331,3,306,153,0,3331,3332, + 3,388,194,0,3332,569,1,0,0,0,3333,3334,3,572,286,0,3334,571,1,0,0,0,3335, + 3336,3,310,155,0,3336,573,1,0,0,0,3337,3338,3,460,230,0,3338,3339,5,4, + 0,0,3339,3340,5,45,0,0,3340,3341,3,386,193,0,3341,3342,3,576,288,0,3342, + 575,1,0,0,0,3343,3353,5,205,0,0,3344,3348,5,214,0,0,3345,3347,3,578,289, + 0,3346,3345,1,0,0,0,3347,3350,1,0,0,0,3348,3346,1,0,0,0,3348,3349,1,0, + 0,0,3349,3351,1,0,0,0,3350,3348,1,0,0,0,3351,3353,5,216,0,0,3352,3343, + 1,0,0,0,3352,3344,1,0,0,0,3353,577,1,0,0,0,3354,3374,3,580,290,0,3355, + 3359,3,584,292,0,3356,3358,3,588,294,0,3357,3356,1,0,0,0,3358,3361,1,0, + 0,0,3359,3357,1,0,0,0,3359,3360,1,0,0,0,3360,3374,1,0,0,0,3361,3359,1, + 0,0,0,3362,3364,3,480,240,0,3363,3362,1,0,0,0,3363,3364,1,0,0,0,3364,3365, + 1,0,0,0,3365,3369,3,582,291,0,3366,3368,3,588,294,0,3367,3366,1,0,0,0, + 3368,3371,1,0,0,0,3369,3367,1,0,0,0,3369,3370,1,0,0,0,3370,3374,1,0,0, + 0,3371,3369,1,0,0,0,3372,3374,3,590,295,0,3373,3354,1,0,0,0,3373,3355, + 1,0,0,0,3373,3363,1,0,0,0,3373,3372,1,0,0,0,3374,579,1,0,0,0,3375,3385, + 3,90,45,0,3376,3385,3,86,43,0,3377,3385,3,394,197,0,3378,3385,3,396,198, + 0,3379,3385,3,398,199,0,3380,3382,3,480,240,0,3381,3380,1,0,0,0,3381,3382, + 1,0,0,0,3382,3383,1,0,0,0,3383,3385,3,400,200,0,3384,3375,1,0,0,0,3384, + 3376,1,0,0,0,3384,3377,1,0,0,0,3384,3378,1,0,0,0,3384,3379,1,0,0,0,3384, + 3381,1,0,0,0,3385,581,1,0,0,0,3386,3389,3,586,293,0,3387,3389,3,402,201, + 0,3388,3386,1,0,0,0,3388,3387,1,0,0,0,3389,583,1,0,0,0,3390,3391,3,76, + 38,0,3391,3392,5,69,0,0,3392,3393,3,88,44,0,3393,3394,3,46,23,0,3394,585, + 1,0,0,0,3395,3396,3,76,38,0,3396,3397,3,600,300,0,3397,587,1,0,0,0,3398, + 3399,3,76,38,0,3399,3400,3,676,338,0,3400,589,1,0,0,0,3401,3402,3,76,38, + 0,3402,3403,3,684,342,0,3403,591,1,0,0,0,3404,3405,3,468,234,0,3405,3406, + 5,4,0,0,3406,3407,3,594,297,0,3407,3408,3,576,288,0,3408,593,1,0,0,0,3409, + 3411,3,418,209,0,3410,3409,1,0,0,0,3410,3411,1,0,0,0,3411,3413,1,0,0,0, + 3412,3414,3,318,159,0,3413,3412,1,0,0,0,3413,3414,1,0,0,0,3414,595,1,0, + 0,0,3415,3416,3,468,234,0,3416,3417,5,118,0,0,3417,3418,3,598,299,0,3418, + 3419,3,576,288,0,3419,597,1,0,0,0,3420,3422,3,226,113,0,3421,3423,3,196, + 98,0,3422,3421,1,0,0,0,3422,3423,1,0,0,0,3423,3429,1,0,0,0,3424,3426,5, + 4,0,0,3425,3427,3,418,209,0,3426,3425,1,0,0,0,3426,3427,1,0,0,0,3427,3429, + 1,0,0,0,3428,3420,1,0,0,0,3428,3424,1,0,0,0,3429,3431,1,0,0,0,3430,3432, + 3,318,159,0,3431,3430,1,0,0,0,3431,3432,1,0,0,0,3432,599,1,0,0,0,3433, + 3442,3,606,303,0,3434,3442,3,634,317,0,3435,3442,3,618,309,0,3436,3442, + 3,648,324,0,3437,3442,3,658,329,0,3438,3442,3,660,330,0,3439,3442,3,670, + 335,0,3440,3442,3,672,336,0,3441,3433,1,0,0,0,3441,3434,1,0,0,0,3441,3435, + 1,0,0,0,3441,3436,1,0,0,0,3441,3437,1,0,0,0,3441,3438,1,0,0,0,3441,3439, + 1,0,0,0,3441,3440,1,0,0,0,3442,601,1,0,0,0,3443,3445,5,4,0,0,3444,3446, + 3,418,209,0,3445,3444,1,0,0,0,3445,3446,1,0,0,0,3446,603,1,0,0,0,3447, + 3449,3,468,234,0,3448,3450,3,602,301,0,3449,3448,1,0,0,0,3449,3450,1,0, + 0,0,3450,605,1,0,0,0,3451,3456,3,610,305,0,3452,3456,3,612,306,0,3453, + 3456,3,614,307,0,3454,3456,3,616,308,0,3455,3451,1,0,0,0,3455,3452,1,0, + 0,0,3455,3453,1,0,0,0,3455,3454,1,0,0,0,3456,607,1,0,0,0,3457,3459,3,404, + 202,0,3458,3460,5,82,0,0,3459,3458,1,0,0,0,3459,3460,1,0,0,0,3460,3462, + 1,0,0,0,3461,3463,3,476,238,0,3462,3461,1,0,0,0,3462,3463,1,0,0,0,3463, + 3467,1,0,0,0,3464,3466,3,410,205,0,3465,3464,1,0,0,0,3466,3469,1,0,0,0, + 3467,3465,1,0,0,0,3467,3468,1,0,0,0,3468,609,1,0,0,0,3469,3467,1,0,0,0, + 3470,3471,3,608,304,0,3471,3473,5,98,0,0,3472,3474,3,418,209,0,3473,3472, + 1,0,0,0,3473,3474,1,0,0,0,3474,3475,1,0,0,0,3475,3476,3,576,288,0,3476, + 611,1,0,0,0,3477,3478,3,608,304,0,3478,3480,5,44,0,0,3479,3481,3,418,209, + 0,3480,3479,1,0,0,0,3480,3481,1,0,0,0,3481,3482,1,0,0,0,3482,3483,3,576, + 288,0,3483,613,1,0,0,0,3484,3485,3,608,304,0,3485,3487,5,92,0,0,3486,3488, + 3,418,209,0,3487,3486,1,0,0,0,3487,3488,1,0,0,0,3488,3489,1,0,0,0,3489, + 3490,3,576,288,0,3490,615,1,0,0,0,3491,3492,3,608,304,0,3492,3494,5,72, + 0,0,3493,3495,3,418,209,0,3494,3493,1,0,0,0,3494,3495,1,0,0,0,3495,3496, + 1,0,0,0,3496,3497,3,576,288,0,3497,617,1,0,0,0,3498,3499,3,468,234,0,3499, + 3500,3,620,310,0,3500,3501,3,576,288,0,3501,619,1,0,0,0,3502,3504,3,602, + 301,0,3503,3502,1,0,0,0,3503,3504,1,0,0,0,3504,3505,1,0,0,0,3505,3506, + 5,3,0,0,3506,3507,3,622,311,0,3507,621,1,0,0,0,3508,3511,3,624,312,0,3509, + 3510,5,168,0,0,3510,3512,3,640,320,0,3511,3509,1,0,0,0,3511,3512,1,0,0, + 0,3512,623,1,0,0,0,3513,3514,3,626,313,0,3514,625,1,0,0,0,3515,3524,3, + 310,155,0,3516,3518,3,44,22,0,3517,3516,1,0,0,0,3517,3518,1,0,0,0,3518, + 3520,1,0,0,0,3519,3521,3,312,156,0,3520,3519,1,0,0,0,3520,3521,1,0,0,0, + 3521,3522,1,0,0,0,3522,3524,3,628,314,0,3523,3515,1,0,0,0,3523,3517,1, + 0,0,0,3524,627,1,0,0,0,3525,3526,3,630,315,0,3526,629,1,0,0,0,3527,3528, + 3,632,316,0,3528,631,1,0,0,0,3529,3530,7,24,0,0,3530,3534,3,36,18,0,3531, + 3532,5,171,0,0,3532,3534,3,38,19,0,3533,3529,1,0,0,0,3533,3531,1,0,0,0, + 3534,633,1,0,0,0,3535,3538,3,468,234,0,3536,3539,3,602,301,0,3537,3539, + 3,594,297,0,3538,3536,1,0,0,0,3538,3537,1,0,0,0,3539,3540,1,0,0,0,3540, + 3549,5,136,0,0,3541,3543,3,640,320,0,3542,3544,3,638,319,0,3543,3542,1, + 0,0,0,3543,3544,1,0,0,0,3544,3550,1,0,0,0,3545,3547,3,646,323,0,3546,3548, + 3,638,319,0,3547,3546,1,0,0,0,3547,3548,1,0,0,0,3548,3550,1,0,0,0,3549, + 3541,1,0,0,0,3549,3545,1,0,0,0,3550,3551,1,0,0,0,3551,3552,3,576,288,0, + 3552,635,1,0,0,0,3553,3555,3,602,301,0,3554,3553,1,0,0,0,3554,3555,1,0, + 0,0,3555,3556,1,0,0,0,3556,3557,5,136,0,0,3557,3559,3,640,320,0,3558,3560, + 3,638,319,0,3559,3558,1,0,0,0,3559,3560,1,0,0,0,3560,637,1,0,0,0,3561, + 3562,5,168,0,0,3562,3565,3,640,320,0,3563,3564,5,154,0,0,3564,3566,3,640, + 320,0,3565,3563,1,0,0,0,3565,3566,1,0,0,0,3566,3572,1,0,0,0,3567,3568, + 3,646,323,0,3568,3569,5,154,0,0,3569,3570,3,640,320,0,3570,3572,1,0,0, + 0,3571,3561,1,0,0,0,3571,3567,1,0,0,0,3572,639,1,0,0,0,3573,3574,3,642, + 321,0,3574,641,1,0,0,0,3575,3576,3,644,322,0,3576,643,1,0,0,0,3577,3578, + 3,0,0,0,3578,645,1,0,0,0,3579,3580,3,896,448,0,3580,647,1,0,0,0,3581,3582, + 3,468,234,0,3582,3583,3,650,325,0,3583,3584,3,576,288,0,3584,649,1,0,0, + 0,3585,3587,3,602,301,0,3586,3585,1,0,0,0,3586,3587,1,0,0,0,3587,3588, + 1,0,0,0,3588,3589,5,15,0,0,3589,3590,3,652,326,0,3590,3591,3,298,149,0, + 3591,3592,5,184,0,0,3592,3593,3,640,320,0,3593,651,1,0,0,0,3594,3595,3, + 654,327,0,3595,653,1,0,0,0,3596,3597,3,656,328,0,3597,3598,5,202,0,0,3598, + 3600,1,0,0,0,3599,3596,1,0,0,0,3599,3600,1,0,0,0,3600,655,1,0,0,0,3601, + 3602,3,900,450,0,3602,657,1,0,0,0,3603,3605,3,468,234,0,3604,3606,3,602, + 301,0,3605,3604,1,0,0,0,3605,3606,1,0,0,0,3606,3607,1,0,0,0,3607,3609, + 5,151,0,0,3608,3610,3,640,320,0,3609,3608,1,0,0,0,3609,3610,1,0,0,0,3610, + 3611,1,0,0,0,3611,3612,3,576,288,0,3612,659,1,0,0,0,3613,3614,3,604,302, + 0,3614,3615,5,77,0,0,3615,3616,3,662,331,0,3616,3622,3,664,332,0,3617, + 3620,5,55,0,0,3618,3621,3,664,332,0,3619,3621,3,668,334,0,3620,3618,1, + 0,0,0,3620,3619,1,0,0,0,3621,3623,1,0,0,0,3622,3617,1,0,0,0,3622,3623, + 1,0,0,0,3623,661,1,0,0,0,3624,3625,3,0,0,0,3625,663,1,0,0,0,3626,3627, + 3,666,333,0,3627,665,1,0,0,0,3628,3630,5,4,0,0,3629,3631,3,418,209,0,3630, + 3629,1,0,0,0,3630,3631,1,0,0,0,3631,3633,1,0,0,0,3632,3628,1,0,0,0,3632, + 3633,1,0,0,0,3633,3634,1,0,0,0,3634,3638,5,214,0,0,3635,3637,3,578,289, + 0,3636,3635,1,0,0,0,3637,3640,1,0,0,0,3638,3636,1,0,0,0,3638,3639,1,0, + 0,0,3639,3641,1,0,0,0,3640,3638,1,0,0,0,3641,3642,5,216,0,0,3642,667,1, + 0,0,0,3643,3644,3,660,330,0,3644,669,1,0,0,0,3645,3650,3,604,302,0,3646, + 3647,5,172,0,0,3647,3651,3,662,331,0,3648,3649,5,96,0,0,3649,3651,3,646, + 323,0,3650,3646,1,0,0,0,3650,3648,1,0,0,0,3651,3652,1,0,0,0,3652,3657, + 3,664,332,0,3653,3654,5,161,0,0,3654,3655,3,662,331,0,3655,3656,5,205, + 0,0,3656,3658,1,0,0,0,3657,3653,1,0,0,0,3657,3658,1,0,0,0,3658,671,1,0, + 0,0,3659,3660,3,604,302,0,3660,3661,5,71,0,0,3661,3662,3,674,337,0,3662, + 3663,5,80,0,0,3663,3664,3,640,320,0,3664,3665,3,664,332,0,3665,673,1,0, + 0,0,3666,3668,3,418,209,0,3667,3666,1,0,0,0,3667,3668,1,0,0,0,3668,675, + 1,0,0,0,3669,3673,3,678,339,0,3670,3673,3,680,340,0,3671,3673,3,682,341, + 0,3672,3669,1,0,0,0,3672,3670,1,0,0,0,3672,3671,1,0,0,0,3673,3674,1,0, + 0,0,3674,3675,3,422,211,0,3675,677,1,0,0,0,3676,3677,3,484,242,0,3677, + 3678,5,152,0,0,3678,3679,3,260,130,0,3679,679,1,0,0,0,3680,3681,3,728, + 364,0,3681,3682,5,152,0,0,3682,3683,3,742,371,0,3683,681,1,0,0,0,3684, + 3685,5,55,0,0,3685,3686,3,742,371,0,3686,683,1,0,0,0,3687,3689,5,150,0, + 0,3688,3690,3,418,209,0,3689,3688,1,0,0,0,3689,3690,1,0,0,0,3690,3692, + 1,0,0,0,3691,3687,1,0,0,0,3691,3692,1,0,0,0,3692,3693,1,0,0,0,3693,3694, + 5,69,0,0,3694,3695,3,298,149,0,3695,3696,3,728,364,0,3696,3697,5,152,0, + 0,3697,3698,3,742,371,0,3698,3699,3,422,211,0,3699,685,1,0,0,0,3700,3701, + 3,460,230,0,3701,3702,5,142,0,0,3702,3703,5,45,0,0,3703,3704,3,386,193, + 0,3704,3705,3,688,344,0,3705,687,1,0,0,0,3706,3719,5,205,0,0,3707,3709, + 5,116,0,0,3708,3707,1,0,0,0,3708,3709,1,0,0,0,3709,3710,1,0,0,0,3710,3714, + 5,214,0,0,3711,3713,3,690,345,0,3712,3711,1,0,0,0,3713,3716,1,0,0,0,3714, + 3712,1,0,0,0,3714,3715,1,0,0,0,3715,3717,1,0,0,0,3716,3714,1,0,0,0,3717, + 3719,5,216,0,0,3718,3706,1,0,0,0,3718,3708,1,0,0,0,3719,689,1,0,0,0,3720, + 3742,3,580,290,0,3721,3723,3,480,240,0,3722,3721,1,0,0,0,3722,3723,1,0, + 0,0,3723,3724,1,0,0,0,3724,3728,3,402,201,0,3725,3727,3,712,356,0,3726, + 3725,1,0,0,0,3727,3730,1,0,0,0,3728,3726,1,0,0,0,3728,3729,1,0,0,0,3729, + 3742,1,0,0,0,3730,3728,1,0,0,0,3731,3742,3,710,355,0,3732,3736,3,692,346, + 0,3733,3735,3,698,349,0,3734,3733,1,0,0,0,3735,3738,1,0,0,0,3736,3734, + 1,0,0,0,3736,3737,1,0,0,0,3737,3742,1,0,0,0,3738,3736,1,0,0,0,3739,3742, + 3,694,347,0,3740,3742,3,696,348,0,3741,3720,1,0,0,0,3741,3722,1,0,0,0, + 3741,3731,1,0,0,0,3741,3732,1,0,0,0,3741,3739,1,0,0,0,3741,3740,1,0,0, + 0,3742,691,1,0,0,0,3743,3744,3,76,38,0,3744,3745,5,57,0,0,3745,3746,3, + 700,350,0,3746,693,1,0,0,0,3747,3748,3,76,38,0,3748,3749,5,53,0,0,3749, + 3750,3,700,350,0,3750,695,1,0,0,0,3751,3752,3,76,38,0,3752,3753,5,61,0, + 0,3753,3754,3,700,350,0,3754,697,1,0,0,0,3755,3759,3,76,38,0,3756,3760, + 3,680,340,0,3757,3758,5,152,0,0,3758,3760,3,742,371,0,3759,3756,1,0,0, + 0,3759,3757,1,0,0,0,3760,3761,1,0,0,0,3761,3762,5,205,0,0,3762,699,1,0, + 0,0,3763,3764,3,890,445,0,3764,3765,5,205,0,0,3765,3771,1,0,0,0,3766,3771, + 3,702,351,0,3767,3771,3,704,352,0,3768,3771,3,706,353,0,3769,3771,3,708, + 354,0,3770,3763,1,0,0,0,3770,3766,1,0,0,0,3770,3767,1,0,0,0,3770,3768, + 1,0,0,0,3770,3769,1,0,0,0,3771,701,1,0,0,0,3772,3773,3,598,299,0,3773, + 3774,3,576,288,0,3774,703,1,0,0,0,3775,3776,3,620,310,0,3776,3777,3,576, + 288,0,3777,705,1,0,0,0,3778,3779,3,636,318,0,3779,3780,3,576,288,0,3780, + 707,1,0,0,0,3781,3782,3,650,325,0,3782,3783,3,576,288,0,3783,709,1,0,0, + 0,3784,3785,3,76,38,0,3785,3786,3,720,360,0,3786,711,1,0,0,0,3787,3788, + 3,76,38,0,3788,3789,3,722,361,0,3789,713,1,0,0,0,3790,3791,3,468,234,0, + 3791,3792,5,142,0,0,3792,3793,3,594,297,0,3793,3794,3,716,358,0,3794,715, + 1,0,0,0,3795,3808,5,205,0,0,3796,3798,5,116,0,0,3797,3796,1,0,0,0,3797, + 3798,1,0,0,0,3798,3799,1,0,0,0,3799,3803,5,214,0,0,3800,3802,3,690,345, + 0,3801,3800,1,0,0,0,3802,3805,1,0,0,0,3803,3801,1,0,0,0,3803,3804,1,0, + 0,0,3804,3806,1,0,0,0,3805,3803,1,0,0,0,3806,3808,5,216,0,0,3807,3795, + 1,0,0,0,3807,3797,1,0,0,0,3808,717,1,0,0,0,3809,3810,3,468,234,0,3810, + 3819,5,60,0,0,3811,3813,3,226,113,0,3812,3814,3,196,98,0,3813,3812,1,0, + 0,0,3813,3814,1,0,0,0,3814,3820,1,0,0,0,3815,3817,5,142,0,0,3816,3818, + 3,418,209,0,3817,3816,1,0,0,0,3817,3818,1,0,0,0,3818,3820,1,0,0,0,3819, + 3811,1,0,0,0,3819,3815,1,0,0,0,3820,3822,1,0,0,0,3821,3823,3,318,159,0, + 3822,3821,1,0,0,0,3822,3823,1,0,0,0,3823,3824,1,0,0,0,3824,3825,3,716, + 358,0,3825,719,1,0,0,0,3826,3831,5,155,0,0,3827,3829,3,418,209,0,3828, + 3827,1,0,0,0,3828,3829,1,0,0,0,3829,3830,1,0,0,0,3830,3832,5,69,0,0,3831, + 3828,1,0,0,0,3831,3832,1,0,0,0,3832,3833,1,0,0,0,3833,3834,3,298,149,0, + 3834,3838,3,646,323,0,3835,3836,3,646,323,0,3836,3837,3,724,362,0,3837, + 3839,1,0,0,0,3838,3835,1,0,0,0,3838,3839,1,0,0,0,3839,3841,1,0,0,0,3840, + 3842,3,728,364,0,3841,3840,1,0,0,0,3841,3842,1,0,0,0,3842,3844,1,0,0,0, + 3843,3845,3,730,365,0,3844,3843,1,0,0,0,3844,3845,1,0,0,0,3845,3846,1, + 0,0,0,3846,3847,5,152,0,0,3847,3848,3,742,371,0,3848,3849,3,576,288,0, + 3849,721,1,0,0,0,3850,3875,3,646,323,0,3851,3855,5,155,0,0,3852,3853,3, + 646,323,0,3853,3854,3,724,362,0,3854,3856,1,0,0,0,3855,3852,1,0,0,0,3855, + 3856,1,0,0,0,3856,3858,1,0,0,0,3857,3859,3,728,364,0,3858,3857,1,0,0,0, + 3858,3859,1,0,0,0,3859,3861,1,0,0,0,3860,3862,3,730,365,0,3861,3860,1, + 0,0,0,3861,3862,1,0,0,0,3862,3876,1,0,0,0,3863,3864,3,646,323,0,3864,3866, + 3,724,362,0,3865,3867,3,728,364,0,3866,3865,1,0,0,0,3866,3867,1,0,0,0, + 3867,3869,1,0,0,0,3868,3870,3,730,365,0,3869,3868,1,0,0,0,3869,3870,1, + 0,0,0,3870,3876,1,0,0,0,3871,3873,3,728,364,0,3872,3874,3,730,365,0,3873, + 3872,1,0,0,0,3873,3874,1,0,0,0,3874,3876,1,0,0,0,3875,3851,1,0,0,0,3875, + 3863,1,0,0,0,3875,3871,1,0,0,0,3875,3876,1,0,0,0,3876,3877,1,0,0,0,3877, + 3878,5,152,0,0,3878,3879,3,742,371,0,3879,3880,3,576,288,0,3880,723,1, + 0,0,0,3881,3882,5,3,0,0,3882,3883,3,726,363,0,3883,725,1,0,0,0,3884,3885, + 3,622,311,0,3885,727,1,0,0,0,3886,3887,5,77,0,0,3887,3888,3,0,0,0,3888, + 729,1,0,0,0,3889,3890,5,53,0,0,3890,3891,3,732,366,0,3891,731,1,0,0,0, + 3892,3898,3,890,445,0,3893,3898,3,734,367,0,3894,3898,3,736,368,0,3895, + 3898,3,738,369,0,3896,3898,3,740,370,0,3897,3892,1,0,0,0,3897,3893,1,0, + 0,0,3897,3894,1,0,0,0,3897,3895,1,0,0,0,3897,3896,1,0,0,0,3898,733,1,0, + 0,0,3899,3908,3,598,299,0,3900,3904,5,214,0,0,3901,3903,3,578,289,0,3902, + 3901,1,0,0,0,3903,3906,1,0,0,0,3904,3902,1,0,0,0,3904,3905,1,0,0,0,3905, + 3907,1,0,0,0,3906,3904,1,0,0,0,3907,3909,5,216,0,0,3908,3900,1,0,0,0,3908, + 3909,1,0,0,0,3909,735,1,0,0,0,3910,3919,3,620,310,0,3911,3915,5,214,0, + 0,3912,3914,3,578,289,0,3913,3912,1,0,0,0,3914,3917,1,0,0,0,3915,3913, + 1,0,0,0,3915,3916,1,0,0,0,3916,3918,1,0,0,0,3917,3915,1,0,0,0,3918,3920, + 5,216,0,0,3919,3911,1,0,0,0,3919,3920,1,0,0,0,3920,737,1,0,0,0,3921,3930, + 3,636,318,0,3922,3926,5,214,0,0,3923,3925,3,578,289,0,3924,3923,1,0,0, + 0,3925,3928,1,0,0,0,3926,3924,1,0,0,0,3926,3927,1,0,0,0,3927,3929,1,0, + 0,0,3928,3926,1,0,0,0,3929,3931,5,216,0,0,3930,3922,1,0,0,0,3930,3931, + 1,0,0,0,3931,739,1,0,0,0,3932,3941,3,650,325,0,3933,3937,5,214,0,0,3934, + 3936,3,578,289,0,3935,3934,1,0,0,0,3936,3939,1,0,0,0,3937,3935,1,0,0,0, + 3937,3938,1,0,0,0,3938,3940,1,0,0,0,3939,3937,1,0,0,0,3940,3942,5,216, + 0,0,3941,3933,1,0,0,0,3941,3942,1,0,0,0,3942,741,1,0,0,0,3943,3944,3,744, + 372,0,3944,743,1,0,0,0,3945,3946,3,746,373,0,3946,3947,3,260,130,0,3947, + 745,1,0,0,0,3948,3949,3,892,446,0,3949,747,1,0,0,0,3950,3951,3,460,230, + 0,3951,3952,5,25,0,0,3952,3953,5,45,0,0,3953,3954,3,386,193,0,3954,3955, + 3,752,376,0,3955,749,1,0,0,0,3956,3957,3,468,234,0,3957,3958,5,25,0,0, + 3958,3959,3,594,297,0,3959,3960,3,752,376,0,3960,751,1,0,0,0,3961,3967, + 5,205,0,0,3962,3963,5,214,0,0,3963,3964,3,754,377,0,3964,3965,5,216,0, + 0,3965,3967,1,0,0,0,3966,3961,1,0,0,0,3966,3962,1,0,0,0,3967,753,1,0,0, + 0,3968,3970,3,756,378,0,3969,3968,1,0,0,0,3970,3973,1,0,0,0,3971,3969, + 1,0,0,0,3971,3972,1,0,0,0,3972,3975,1,0,0,0,3973,3971,1,0,0,0,3974,3976, + 3,288,144,0,3975,3974,1,0,0,0,3975,3976,1,0,0,0,3976,755,1,0,0,0,3977, + 3980,3,578,289,0,3978,3980,3,758,379,0,3979,3977,1,0,0,0,3979,3978,1,0, + 0,0,3980,757,1,0,0,0,3981,3982,3,76,38,0,3982,3983,5,134,0,0,3983,3984, + 3,376,188,0,3984,759,1,0,0,0,3985,3986,3,460,230,0,3986,3987,5,41,0,0, + 3987,3988,5,45,0,0,3988,3989,3,386,193,0,3989,3990,3,752,376,0,3990,761, + 1,0,0,0,3991,3992,3,468,234,0,3992,3993,5,41,0,0,3993,3994,3,766,383,0, + 3994,3995,3,752,376,0,3995,763,1,0,0,0,3996,3997,3,468,234,0,3997,3999, + 5,14,0,0,3998,4000,5,107,0,0,3999,3998,1,0,0,0,3999,4000,1,0,0,0,4000, + 4007,1,0,0,0,4001,4003,3,226,113,0,4002,4004,3,196,98,0,4003,4002,1,0, + 0,0,4003,4004,1,0,0,0,4004,4008,1,0,0,0,4005,4006,5,41,0,0,4006,4008,3, + 766,383,0,4007,4001,1,0,0,0,4007,4005,1,0,0,0,4008,4009,1,0,0,0,4009,4010, + 3,752,376,0,4010,765,1,0,0,0,4011,4013,3,418,209,0,4012,4011,1,0,0,0,4012, + 4013,1,0,0,0,4013,4015,1,0,0,0,4014,4016,3,318,159,0,4015,4014,1,0,0,0, + 4015,4016,1,0,0,0,4016,767,1,0,0,0,4017,4018,3,460,230,0,4018,4019,5,133, + 0,0,4019,4020,5,45,0,0,4020,4021,3,386,193,0,4021,4022,3,770,385,0,4022, + 769,1,0,0,0,4023,4033,5,205,0,0,4024,4028,5,214,0,0,4025,4027,3,772,386, + 0,4026,4025,1,0,0,0,4027,4030,1,0,0,0,4028,4026,1,0,0,0,4028,4029,1,0, + 0,0,4029,4031,1,0,0,0,4030,4028,1,0,0,0,4031,4033,5,216,0,0,4032,4023, + 1,0,0,0,4032,4024,1,0,0,0,4033,771,1,0,0,0,4034,4042,3,390,195,0,4035, + 4042,3,774,387,0,4036,4042,3,778,389,0,4037,4042,3,784,392,0,4038,4042, + 3,832,416,0,4039,4042,3,788,394,0,4040,4042,3,792,396,0,4041,4034,1,0, + 0,0,4041,4035,1,0,0,0,4041,4036,1,0,0,0,4041,4037,1,0,0,0,4041,4038,1, + 0,0,0,4041,4039,1,0,0,0,4041,4040,1,0,0,0,4042,773,1,0,0,0,4043,4044,3, + 76,38,0,4044,4045,3,776,388,0,4045,775,1,0,0,0,4046,4050,5,146,0,0,4047, + 4049,3,410,205,0,4048,4047,1,0,0,0,4049,4052,1,0,0,0,4050,4048,1,0,0,0, + 4050,4051,1,0,0,0,4051,4053,1,0,0,0,4052,4050,1,0,0,0,4053,4054,3,416, + 208,0,4054,777,1,0,0,0,4055,4056,3,76,38,0,4056,4057,3,780,390,0,4057, + 4058,3,782,391,0,4058,779,1,0,0,0,4059,4060,7,25,0,0,4060,781,1,0,0,0, + 4061,4063,3,226,113,0,4062,4064,3,196,98,0,4063,4062,1,0,0,0,4063,4064, + 1,0,0,0,4064,4065,1,0,0,0,4065,4066,3,770,385,0,4066,4085,1,0,0,0,4067, + 4069,3,410,205,0,4068,4067,1,0,0,0,4069,4072,1,0,0,0,4070,4068,1,0,0,0, + 4070,4071,1,0,0,0,4071,4073,1,0,0,0,4072,4070,1,0,0,0,4073,4080,5,41,0, + 0,4074,4076,3,410,205,0,4075,4074,1,0,0,0,4076,4077,1,0,0,0,4077,4075, + 1,0,0,0,4077,4078,1,0,0,0,4078,4080,1,0,0,0,4079,4070,1,0,0,0,4079,4075, + 1,0,0,0,4080,4081,1,0,0,0,4081,4082,3,766,383,0,4082,4083,3,752,376,0, + 4083,4085,1,0,0,0,4084,4061,1,0,0,0,4084,4079,1,0,0,0,4085,783,1,0,0,0, + 4086,4087,3,76,38,0,4087,4088,5,73,0,0,4088,4089,3,786,393,0,4089,785, + 1,0,0,0,4090,4092,3,226,113,0,4091,4093,3,196,98,0,4092,4091,1,0,0,0,4092, + 4093,1,0,0,0,4093,4094,1,0,0,0,4094,4095,3,752,376,0,4095,4114,1,0,0,0, + 4096,4098,3,410,205,0,4097,4096,1,0,0,0,4098,4101,1,0,0,0,4099,4097,1, + 0,0,0,4099,4100,1,0,0,0,4100,4102,1,0,0,0,4101,4099,1,0,0,0,4102,4109, + 5,32,0,0,4103,4105,3,410,205,0,4104,4103,1,0,0,0,4105,4106,1,0,0,0,4106, + 4104,1,0,0,0,4106,4107,1,0,0,0,4107,4109,1,0,0,0,4108,4099,1,0,0,0,4108, + 4104,1,0,0,0,4109,4110,1,0,0,0,4110,4111,3,888,444,0,4111,4112,3,752,376, + 0,4112,4114,1,0,0,0,4113,4090,1,0,0,0,4113,4108,1,0,0,0,4114,787,1,0,0, + 0,4115,4116,3,76,38,0,4116,4117,3,790,395,0,4117,789,1,0,0,0,4118,4122, + 5,5,0,0,4119,4121,3,410,205,0,4120,4119,1,0,0,0,4121,4124,1,0,0,0,4122, + 4120,1,0,0,0,4122,4123,1,0,0,0,4123,4125,1,0,0,0,4124,4122,1,0,0,0,4125, + 4126,3,416,208,0,4126,791,1,0,0,0,4127,4128,3,76,38,0,4128,4129,3,794, + 397,0,4129,793,1,0,0,0,4130,4134,5,140,0,0,4131,4133,3,410,205,0,4132, + 4131,1,0,0,0,4133,4136,1,0,0,0,4134,4132,1,0,0,0,4134,4135,1,0,0,0,4135, + 4137,1,0,0,0,4136,4134,1,0,0,0,4137,4138,3,416,208,0,4138,795,1,0,0,0, + 4139,4140,3,468,234,0,4140,4141,5,133,0,0,4141,4142,3,766,383,0,4142,4143, + 3,770,385,0,4143,797,1,0,0,0,4144,4150,3,468,234,0,4145,4147,5,14,0,0, + 4146,4148,5,107,0,0,4147,4146,1,0,0,0,4147,4148,1,0,0,0,4148,4151,1,0, + 0,0,4149,4151,5,107,0,0,4150,4145,1,0,0,0,4150,4149,1,0,0,0,4150,4151, + 1,0,0,0,4151,4152,1,0,0,0,4152,4161,5,135,0,0,4153,4155,3,226,113,0,4154, + 4156,3,196,98,0,4155,4154,1,0,0,0,4155,4156,1,0,0,0,4156,4162,1,0,0,0, + 4157,4159,5,133,0,0,4158,4160,3,418,209,0,4159,4158,1,0,0,0,4159,4160, + 1,0,0,0,4160,4162,1,0,0,0,4161,4153,1,0,0,0,4161,4157,1,0,0,0,4162,4164, + 1,0,0,0,4163,4165,3,318,159,0,4164,4163,1,0,0,0,4164,4165,1,0,0,0,4165, + 4168,1,0,0,0,4166,4167,5,24,0,0,4167,4169,3,800,400,0,4168,4166,1,0,0, + 0,4168,4169,1,0,0,0,4169,4170,1,0,0,0,4170,4171,3,770,385,0,4171,799,1, + 0,0,0,4172,4173,3,802,401,0,4173,801,1,0,0,0,4174,4175,3,804,402,0,4175, + 803,1,0,0,0,4176,4177,3,806,403,0,4177,805,1,0,0,0,4178,4179,3,298,149, + 0,4179,807,1,0,0,0,4180,4181,3,460,230,0,4181,4182,5,32,0,0,4182,4183, + 5,45,0,0,4183,4184,3,386,193,0,4184,4185,3,770,385,0,4185,809,1,0,0,0, + 4186,4187,3,468,234,0,4187,4188,5,32,0,0,4188,4189,3,766,383,0,4189,4190, + 3,770,385,0,4190,811,1,0,0,0,4191,4192,3,460,230,0,4192,4193,5,26,0,0, + 4193,4194,5,45,0,0,4194,4195,3,386,193,0,4195,4196,3,816,408,0,4196,813, + 1,0,0,0,4197,4198,3,468,234,0,4198,4199,5,26,0,0,4199,4200,3,766,383,0, + 4200,4201,3,816,408,0,4201,815,1,0,0,0,4202,4215,5,205,0,0,4203,4207,5, + 214,0,0,4204,4206,3,818,409,0,4205,4204,1,0,0,0,4206,4209,1,0,0,0,4207, + 4205,1,0,0,0,4207,4208,1,0,0,0,4208,4211,1,0,0,0,4209,4207,1,0,0,0,4210, + 4212,3,288,144,0,4211,4210,1,0,0,0,4211,4212,1,0,0,0,4212,4213,1,0,0,0, + 4213,4215,5,216,0,0,4214,4202,1,0,0,0,4214,4203,1,0,0,0,4215,817,1,0,0, + 0,4216,4222,3,578,289,0,4217,4222,3,758,379,0,4218,4222,3,774,387,0,4219, + 4222,3,788,394,0,4220,4222,3,820,410,0,4221,4216,1,0,0,0,4221,4217,1,0, + 0,0,4221,4218,1,0,0,0,4221,4219,1,0,0,0,4221,4220,1,0,0,0,4222,819,1,0, + 0,0,4223,4224,3,76,38,0,4224,4225,5,109,0,0,4225,4226,3,822,411,0,4226, + 821,1,0,0,0,4227,4229,3,410,205,0,4228,4227,1,0,0,0,4229,4232,1,0,0,0, + 4230,4228,1,0,0,0,4230,4231,1,0,0,0,4231,4233,1,0,0,0,4232,4230,1,0,0, + 0,4233,4234,3,766,383,0,4234,4235,3,770,385,0,4235,823,1,0,0,0,4236,4237, + 3,460,230,0,4237,4238,5,11,0,0,4238,4239,5,45,0,0,4239,4240,3,386,193, + 0,4240,4241,3,816,408,0,4241,825,1,0,0,0,4242,4243,3,468,234,0,4243,4244, + 5,11,0,0,4244,4245,3,766,383,0,4245,4246,3,816,408,0,4246,827,1,0,0,0, + 4247,4248,3,460,230,0,4248,4249,5,166,0,0,4249,4250,5,45,0,0,4250,4251, + 3,386,193,0,4251,4252,3,816,408,0,4252,829,1,0,0,0,4253,4254,3,468,234, + 0,4254,4255,5,166,0,0,4255,4256,3,766,383,0,4256,4257,3,816,408,0,4257, + 831,1,0,0,0,4258,4259,3,76,38,0,4259,4260,5,167,0,0,4260,4261,3,834,417, + 0,4261,833,1,0,0,0,4262,4266,3,226,113,0,4263,4265,3,200,100,0,4264,4263, + 1,0,0,0,4265,4268,1,0,0,0,4266,4264,1,0,0,0,4266,4267,1,0,0,0,4267,4269, + 1,0,0,0,4268,4266,1,0,0,0,4269,4270,3,770,385,0,4270,4289,1,0,0,0,4271, + 4273,3,410,205,0,4272,4271,1,0,0,0,4273,4276,1,0,0,0,4274,4272,1,0,0,0, + 4274,4275,1,0,0,0,4275,4277,1,0,0,0,4276,4274,1,0,0,0,4277,4284,5,133, + 0,0,4278,4280,3,410,205,0,4279,4278,1,0,0,0,4280,4281,1,0,0,0,4281,4279, + 1,0,0,0,4281,4282,1,0,0,0,4282,4284,1,0,0,0,4283,4274,1,0,0,0,4283,4279, + 1,0,0,0,4284,4285,1,0,0,0,4285,4286,3,766,383,0,4286,4287,3,770,385,0, + 4287,4289,1,0,0,0,4288,4262,1,0,0,0,4288,4283,1,0,0,0,4289,835,1,0,0,0, + 4290,4291,3,460,230,0,4291,4292,5,162,0,0,4292,4293,5,26,0,0,4293,4294, + 5,45,0,0,4294,4295,3,386,193,0,4295,4296,3,816,408,0,4296,837,1,0,0,0, + 4297,4298,3,468,234,0,4298,4299,5,162,0,0,4299,4300,5,26,0,0,4300,4301, + 3,766,383,0,4301,4302,3,816,408,0,4302,839,1,0,0,0,4303,4304,3,468,234, + 0,4304,4314,5,81,0,0,4305,4307,3,226,113,0,4306,4308,3,196,98,0,4307,4306, + 1,0,0,0,4307,4308,1,0,0,0,4308,4315,1,0,0,0,4309,4310,5,162,0,0,4310,4312, + 5,26,0,0,4311,4313,3,418,209,0,4312,4311,1,0,0,0,4312,4313,1,0,0,0,4313, + 4315,1,0,0,0,4314,4305,1,0,0,0,4314,4309,1,0,0,0,4315,4317,1,0,0,0,4316, + 4318,3,318,159,0,4317,4316,1,0,0,0,4317,4318,1,0,0,0,4318,4319,1,0,0,0, + 4319,4320,3,816,408,0,4320,841,1,0,0,0,4321,4322,3,460,230,0,4322,4323, + 5,169,0,0,4323,4324,5,45,0,0,4324,4325,3,386,193,0,4325,4326,3,844,422, + 0,4326,843,1,0,0,0,4327,4337,5,205,0,0,4328,4332,5,214,0,0,4329,4331,3, + 846,423,0,4330,4329,1,0,0,0,4331,4334,1,0,0,0,4332,4330,1,0,0,0,4332,4333, + 1,0,0,0,4333,4335,1,0,0,0,4334,4332,1,0,0,0,4335,4337,5,216,0,0,4336,4327, + 1,0,0,0,4336,4328,1,0,0,0,4337,845,1,0,0,0,4338,4342,3,390,195,0,4339, + 4342,3,364,182,0,4340,4342,3,848,424,0,4341,4338,1,0,0,0,4341,4339,1,0, + 0,0,4341,4340,1,0,0,0,4342,847,1,0,0,0,4343,4344,3,76,38,0,4344,4345,5, + 129,0,0,4345,4346,3,850,425,0,4346,849,1,0,0,0,4347,4349,3,226,113,0,4348, + 4350,3,196,98,0,4349,4348,1,0,0,0,4349,4350,1,0,0,0,4350,4351,1,0,0,0, + 4351,4352,3,422,211,0,4352,4369,1,0,0,0,4353,4355,3,410,205,0,4354,4353, + 1,0,0,0,4355,4358,1,0,0,0,4356,4354,1,0,0,0,4356,4357,1,0,0,0,4357,4359, + 1,0,0,0,4358,4356,1,0,0,0,4359,4366,5,130,0,0,4360,4362,3,410,205,0,4361, + 4360,1,0,0,0,4362,4363,1,0,0,0,4363,4361,1,0,0,0,4363,4364,1,0,0,0,4364, + 4366,1,0,0,0,4365,4356,1,0,0,0,4365,4361,1,0,0,0,4366,4367,1,0,0,0,4367, + 4369,3,416,208,0,4368,4347,1,0,0,0,4368,4365,1,0,0,0,4369,851,1,0,0,0, + 4370,4371,3,468,234,0,4371,4373,5,169,0,0,4372,4374,3,418,209,0,4373,4372, + 1,0,0,0,4373,4374,1,0,0,0,4374,4376,1,0,0,0,4375,4377,3,318,159,0,4376, + 4375,1,0,0,0,4376,4377,1,0,0,0,4377,4378,1,0,0,0,4378,4379,3,854,427,0, + 4379,853,1,0,0,0,4380,4390,5,205,0,0,4381,4385,5,214,0,0,4382,4384,3,856, + 428,0,4383,4382,1,0,0,0,4384,4387,1,0,0,0,4385,4383,1,0,0,0,4385,4386, + 1,0,0,0,4386,4388,1,0,0,0,4387,4385,1,0,0,0,4388,4390,5,216,0,0,4389,4380, + 1,0,0,0,4389,4381,1,0,0,0,4390,855,1,0,0,0,4391,4396,3,390,195,0,4392, + 4396,3,364,182,0,4393,4396,3,848,424,0,4394,4396,3,858,429,0,4395,4391, + 1,0,0,0,4395,4392,1,0,0,0,4395,4393,1,0,0,0,4395,4394,1,0,0,0,4396,857, + 1,0,0,0,4397,4400,5,62,0,0,4398,4401,3,860,430,0,4399,4401,3,862,431,0, + 4400,4398,1,0,0,0,4400,4399,1,0,0,0,4401,4402,1,0,0,0,4402,4403,3,46,23, + 0,4403,859,1,0,0,0,4404,4405,3,94,47,0,4405,861,1,0,0,0,4406,4407,3,96, + 48,0,4407,863,1,0,0,0,4408,4409,3,460,230,0,4409,4410,5,170,0,0,4410,4411, + 5,45,0,0,4411,4412,3,386,193,0,4412,4413,3,770,385,0,4413,865,1,0,0,0, + 4414,4415,3,468,234,0,4415,4416,5,170,0,0,4416,4417,3,766,383,0,4417,4418, + 3,770,385,0,4418,867,1,0,0,0,4419,4420,3,460,230,0,4420,4421,5,130,0,0, + 4421,4422,5,45,0,0,4422,4423,3,384,192,0,4423,869,1,0,0,0,4424,4425,3, + 468,234,0,4425,4426,5,130,0,0,4426,4427,3,416,208,0,4427,871,1,0,0,0,4428, + 4430,5,2,0,0,4429,4428,1,0,0,0,4429,4430,1,0,0,0,4430,4434,1,0,0,0,4431, + 4433,3,380,190,0,4432,4431,1,0,0,0,4433,4436,1,0,0,0,4434,4432,1,0,0,0, + 4434,4435,1,0,0,0,4435,4437,1,0,0,0,4436,4434,1,0,0,0,4437,4438,5,102, + 0,0,4438,4439,5,45,0,0,4439,4440,3,384,192,0,4440,873,1,0,0,0,4441,4442, + 3,220,110,0,4442,875,1,0,0,0,4443,4444,3,878,439,0,4444,877,1,0,0,0,4445, + 4447,5,127,0,0,4446,4445,1,0,0,0,4446,4447,1,0,0,0,4447,4449,1,0,0,0,4448, + 4450,7,19,0,0,4449,4448,1,0,0,0,4449,4450,1,0,0,0,4450,4451,1,0,0,0,4451, + 4453,3,232,116,0,4452,4454,3,196,98,0,4453,4452,1,0,0,0,4453,4454,1,0, + 0,0,4454,4456,1,0,0,0,4455,4457,3,318,159,0,4456,4455,1,0,0,0,4456,4457, + 1,0,0,0,4457,4458,1,0,0,0,4458,4459,3,348,174,0,4459,879,1,0,0,0,4460, + 4462,3,378,189,0,4461,4460,1,0,0,0,4461,4462,1,0,0,0,4462,4464,1,0,0,0, + 4463,4465,3,380,190,0,4464,4463,1,0,0,0,4465,4466,1,0,0,0,4466,4464,1, + 0,0,0,4466,4467,1,0,0,0,4467,4468,1,0,0,0,4468,4469,5,45,0,0,4469,4470, + 3,384,192,0,4470,881,1,0,0,0,4471,4473,3,412,206,0,4472,4474,3,410,205, + 0,4473,4472,1,0,0,0,4474,4475,1,0,0,0,4475,4473,1,0,0,0,4475,4476,1,0, + 0,0,4476,4477,1,0,0,0,4477,4478,3,416,208,0,4478,883,1,0,0,0,4479,4482, + 3,94,47,0,4480,4482,3,886,443,0,4481,4479,1,0,0,0,4481,4480,1,0,0,0,4482, + 885,1,0,0,0,4483,4484,3,88,44,0,4484,4485,5,183,0,0,4485,4488,5,198,0, + 0,4486,4487,5,183,0,0,4487,4489,5,179,0,0,4488,4486,1,0,0,0,4488,4489, + 1,0,0,0,4489,887,1,0,0,0,4490,4492,3,418,209,0,4491,4490,1,0,0,0,4491, + 4492,1,0,0,0,4492,4494,1,0,0,0,4493,4495,3,318,159,0,4494,4493,1,0,0,0, + 4494,4495,1,0,0,0,4495,889,1,0,0,0,4496,4497,1,0,0,0,4497,891,1,0,0,0, + 4498,4499,1,0,0,0,4499,893,1,0,0,0,4500,4501,1,0,0,0,4501,895,1,0,0,0, + 4502,4503,1,0,0,0,4503,897,1,0,0,0,4504,4505,5,218,0,0,4505,899,1,0,0, + 0,4506,4507,5,218,0,0,4507,901,1,0,0,0,4508,4509,1,0,0,0,4509,903,1,0, + 0,0,510,919,975,982,998,1000,1002,1012,1022,1033,1036,1041,1056,1065,1073, + 1085,1104,1118,1125,1133,1137,1141,1145,1150,1155,1158,1165,1174,1182, + 1189,1199,1203,1211,1214,1216,1220,1226,1230,1236,1238,1247,1255,1263, + 1270,1274,1279,1282,1288,1302,1305,1313,1320,1326,1330,1337,1342,1349, + 1352,1358,1364,1366,1374,1402,1414,1422,1427,1431,1434,1437,1441,1443, + 1448,1457,1467,1476,1485,1494,1503,1511,1515,1521,1525,1527,1542,1550, + 1555,1557,1565,1574,1584,1589,1591,1599,1608,1618,1626,1634,1642,1647, + 1662,1665,1668,1672,1677,1686,1691,1693,1706,1709,1713,1716,1720,1723, + 1728,1733,1736,1739,1742,1745,1751,1756,1766,1768,1773,1778,1782,1787, + 1794,1797,1803,1811,1825,1831,1834,1839,1846,1849,1854,1858,1860,1864, + 1868,1870,1872,1879,1886,1894,1903,1920,1928,1930,1937,1944,1951,1956, + 1958,1971,1979,1987,1992,1994,2007,2012,2014,2022,2031,2041,2046,2049, + 2087,2090,2093,2099,2102,2107,2109,2116,2126,2134,2139,2158,2161,2164, + 2170,2172,2185,2188,2191,2197,2199,2210,2224,2229,2231,2235,2248,2261, + 2268,2272,2281,2302,2306,2313,2316,2323,2326,2330,2337,2339,2344,2348, + 2352,2356,2360,2362,2367,2370,2375,2382,2384,2393,2402,2404,2410,2414, + 2421,2434,2441,2452,2458,2465,2476,2479,2484,2489,2491,2500,2509,2511, + 2515,2521,2526,2529,2533,2536,2543,2550,2556,2564,2571,2575,2583,2586, + 2593,2602,2611,2616,2648,2652,2659,2664,2671,2674,2681,2685,2692,2698, + 2703,2710,2713,2723,2742,2745,2748,2751,2755,2764,2770,2774,2780,2783, + 2786,2797,2810,2823,2827,2830,2833,2839,2856,2874,2897,2905,2920,2932, + 2934,2938,2943,2950,2959,2963,2968,2977,2983,2994,2997,3002,3014,3021, + 3027,3038,3042,3044,3056,3101,3104,3108,3112,3118,3132,3140,3142,3153, + 3155,3174,3178,3184,3189,3199,3208,3219,3222,3226,3229,3233,3247,3255, + 3260,3275,3279,3283,3296,3299,3303,3310,3316,3348,3352,3359,3363,3369, + 3373,3381,3384,3388,3410,3413,3422,3426,3428,3431,3441,3445,3449,3455, + 3459,3462,3467,3473,3480,3487,3494,3503,3511,3517,3520,3523,3533,3538, + 3543,3547,3549,3554,3559,3565,3571,3586,3599,3605,3609,3620,3622,3630, + 3632,3638,3650,3657,3667,3672,3689,3691,3708,3714,3718,3722,3728,3736, + 3741,3759,3770,3797,3803,3807,3813,3817,3819,3822,3828,3831,3838,3841, + 3844,3855,3858,3861,3866,3869,3873,3875,3897,3904,3908,3915,3919,3926, + 3930,3937,3941,3966,3971,3975,3979,3999,4003,4007,4012,4015,4028,4032, + 4041,4050,4063,4070,4077,4079,4084,4092,4099,4106,4108,4113,4122,4134, + 4147,4150,4155,4159,4161,4164,4168,4207,4211,4214,4221,4230,4266,4274, + 4281,4283,4288,4307,4312,4314,4317,4332,4336,4341,4349,4356,4363,4365, + 4368,4373,4376,4385,4389,4395,4400,4429,4434,4446,4449,4453,4456,4461, + 4466,4475,4481,4488,4491,4494 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace DemaConsulting.SysML2Tools.Parser.Antlr diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.interp b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.interp new file mode 100644 index 00000000..c1919092 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.interp @@ -0,0 +1,915 @@ +token literal names: +null +'about' +'abstract' +'accept' +'action' +'actor' +'after' +'alias' +'all' +'allocate' +'allocation' +'analysis' +'and' +'as' +'assert' +'assign' +'assoc' +'assume' +'at' +'attribute' +'behavior' +'bind' +'binding' +'bool' +'by' +'calc' +'case' +'chains' +'class' +'classifier' +'comment' +'composite' +'concern' +'conjugate' +'conjugates' +'conjugation' +'connect' +'connection' +'connector' +'const' +'constant' +'constraint' +'crosses' +'datatype' +'decide' +'def' +'default' +'defined' +'dependency' +'derived' +'differences' +'disjoining' +'disjoint' +'do' +'doc' +'else' +'end' +'entry' +'enum' +'event' +'exhibit' +'exit' +'expose' +'expr' +'false' +'feature' +'featured' +'featuring' +'filter' +'first' +'flow' +'for' +'fork' +'frame' +'from' +'function' +'hastype' +'if' +'implies' +'import' +'in' +'include' +'individual' +'inout' +'interaction' +'interface' +'intersects' +'inv' +'inverse' +'inverting' +'istype' +'item' +'join' +'language' +'library' +'locale' +'loop' +'member' +'merge' +'message' +'meta' +'metaclass' +'metadata' +'multiplicity' +'namespace' +'new' +'nonunique' +'not' +'null' +'objective' +'occurrence' +'of' +'or' +'ordered' +'out' +'package' +'parallel' +'part' +'perform' +'port' +'portion' +'predicate' +'private' +'protected' +'public' +'redefines' +'redefinition' +'ref' +'references' +'render' +'rendering' +'rep' +'require' +'requirement' +'return' +'satisfy' +'send' +'snapshot' +'specialization' +'specializes' +'stakeholder' +'standard' +'state' +'step' +'struct' +'subclassifier' +'subject' +'subset' +'subsets' +'subtype' +'succession' +'terminate' +'then' +'timeslice' +'to' +'transition' +'true' +'type' +'typed' +'typing' +'unions' +'until' +'use' +'var' +'variant' +'variation' +'verification' +'verify' +'via' +'view' +'viewpoint' +'when' +'while' +'xor' +'!==' +'::>' +':>>' +'===' +'!=' +'**' +'->' +'..' +'.?' +'::' +':=' +':>' +'<=' +'==' +'=>' +'>=' +'??' +'@@' +'#' +'$' +'%' +'&' +'(' +')' +'*' +'+' +',' +'-' +'.' +'/' +':' +';' +'<' +'=' +'>' +'?' +'@' +'[' +']' +'^' +'{' +'|' +'}' +'~' +null +null +null +null +null +null +null +'//' +null + +token symbolic names: +null +ABOUT +ABSTRACT +ACCEPT +ACTION +ACTOR +AFTER +ALIAS +ALL +ALLOCATE +ALLOCATION +ANALYSIS +AND +AS +ASSERT +ASSIGN +ASSOC +ASSUME +AT +ATTRIBUTE +BEHAVIOR +BIND +BINDING +BOOL +BY +CALC +CASE +CHAINS +CLASS +CLASSIFIER +COMMENT +COMPOSITE +CONCERN +CONJUGATE +CONJUGATES +CONJUGATION +CONNECT +CONNECTION +CONNECTOR +CONST +CONSTANT +CONSTRAINT +CROSSES +DATATYPE +DECIDE +DEF +DEFAULT +DEFINED +DEPENDENCY +DERIVED +DIFFERENCES +DISJOINING +DISJOINT +DO +DOC +ELSE +END +ENTRY +ENUM +EVENT +EXHIBIT +EXIT +EXPOSE +EXPR +FALSE +FEATURE +FEATURED +FEATURING +FILTER +FIRST +FLOW +FOR +FORK +FRAME +FROM +FUNCTION +HASTYPE +IF +IMPLIES +IMPORT +IN +INCLUDE +INDIVIDUAL +INOUT +INTERACTION +INTERFACE +INTERSECTS +INV +INVERSE +INVERTING +ISTYPE +ITEM +JOIN +LANGUAGE +LIBRARY +LOCALE +LOOP +MEMBER +MERGE +MESSAGE +META +METACLASS +METADATA +MULTIPLICITY +NAMESPACE +NEW +NONUNIQUE +NOT +NULL +OBJECTIVE +OCCURRENCE +OF +OR +ORDERED +OUT +PACKAGE +PARALLEL +PART +PERFORM +PORT +PORTION +PREDICATE +PRIVATE +PROTECTED +PUBLIC +REDEFINES +REDEFINITION +REF +REFERENCES +RENDER +RENDERING +REP +REQUIRE +REQUIREMENT +RETURN +SATISFY +SEND +SNAPSHOT +SPECIALIZATION +SPECIALIZES +STAKEHOLDER +STANDARD +STATE +STEP +STRUCT +SUBCLASSIFIER +SUBJECT +SUBSET +SUBSETS +SUBTYPE +SUCCESSION +TERMINATE +THEN +TIMESLICE +TO +TRANSITION +TRUE +TYPE +TYPED +TYPING +UNIONS +UNTIL +USE +VAR +VARIANT +VARIATION +VERIFICATION +VERIFY +VIA +VIEW +VIEWPOINT +WHEN +WHILE +XOR +BANG_EQ_EQ +COLON_COLON_GT +COLON_GT_GT +EQ_EQ_EQ +BANG_EQ +STAR_STAR +ARROW +DOT_DOT +DOT_QUESTION +COLON_COLON +COLON_EQ +COLON_GT +LE +EQ_EQ +FAT_ARROW +GE +QUESTION_QUESTION +AT_AT +HASH +DOLLAR +PERCENT +AMP +LPAREN +RPAREN +STAR +PLUS +COMMA +MINUS +DOT +SLASH +COLON +SEMI +LT +EQ +GT +QUESTION +AT_SIGN +LBRACK +RBRACK +CARET +LBRACE +PIPE +RBRACE +TILDE +IDENTIFIER +STRING +DOUBLE_STRING +INTEGER +REAL +REGULAR_COMMENT +SINGLE_LINE_NOTE +BARE_LINE_COMMENT +WS + +rule names: +ownedExpression +typeReference +sequenceExpressionList +baseExpression +nullExpression +featureReferenceExpression +constructorExpression +bodyExpression +argumentList +positionalArgumentList +namedArgumentList +namedArgument +literalExpression +literalBoolean +literalString +literalInteger +literalReal +literalInfinity +argumentMember +argumentExpressionMember +name +unreservedKeyword +identification +relationshipBody +relationshipOwnedElement +ownedRelatedElement +dependency +annotation +ownedAnnotation +annotatingElement +comment +documentation +textualRepresentation +rootNamespace +namespace +namespaceDeclaration +namespaceBody +namespaceBodyElement +memberPrefix +visibilityIndicator +namespaceMember +nonFeatureMember +namespaceFeatureMember +aliasMember +qualifiedName +importRule +importDeclaration +membershipImport +namespaceImport +filterPackage +filterPackageMember +memberElement +nonFeatureElement +featureElement +type +typePrefix +typeDeclaration +specializationPart +conjugationPart +typeRelationshipPart +disjoiningPart +unioningPart +intersectingPart +differencingPart +typeBody +typeBodyElement +specialization +ownedSpecialization +specificType +generalType +conjugation +ownedConjugation +disjoining +ownedDisjoining +unioning +intersecting +differencing +featureMember +typeFeatureMember +ownedFeatureMember +classifier +classifierDeclaration +superclassingPart +subclassification +ownedSubclassification +feature +endFeaturePrefix +basicFeaturePrefix +featurePrefix +ownedCrossFeatureMember +ownedCrossFeature +featureDirection +featureDeclaration +featureIdentification +featureRelationshipPart +chainingPart +invertingPart +typeFeaturingPart +featureSpecializationPart +multiplicityPart +featureSpecialization +typings +typedBy +subsettings +subsets +references +crosses +redefinitions +redefines +featureTyping +ownedFeatureTyping +subsetting +ownedSubsetting +ownedReferenceSubsetting +ownedCrossSubsetting +redefinition +ownedRedefinition +featureInverting +ownedFeatureInverting +typeFeaturing +ownedTypeFeaturing +dataType +class +structure +association +associationStructure +connector +connectorDeclaration +binaryConnectorDeclaration +naryConnectorDeclaration +connectorEndMember +connectorEnd +ownedCrossMultiplicityMember +ownedCrossMultiplicity +bindingConnector +bindingConnectorDeclaration +succession +successionDeclaration +behavior +step +function +functionBody +functionBodyPart +returnFeatureMember +resultExpressionMember +expression +predicate +booleanExpression +invariant +featureChainMember +interaction +flow +successionFlow +flowDeclaration +payloadFeatureMember +payloadFeature +payloadFeatureSpecializationPart +flowEndMember +flowEnd +valuePart +featureValue +multiplicity +multiplicitySubset +multiplicityRange +ownedMultiplicity +ownedMultiplicityRange +multiplicityBounds +multiplicityExpressionMember +metaclass +prefixMetadataAnnotation +prefixMetadataMember +prefixMetadataFeature +metadataFeature +metadataFeatureDeclaration +metadataBody +metadataBodyElement +metadataBodyFeatureMember +metadataBodyFeature +package +libraryPackage +packageDeclaration +packageBody +elementFilterMember +dependencyDeclaration +annotatingMember +packageBodyElement +packageMember +definitionElement +usageElement +basicDefinitionPrefix +definitionExtensionKeyword +definitionPrefix +definition +definitionDeclaration +definitionBody +definitionBodyItem +definitionBodyItemContent +definitionMember +variantUsageMember +nonOccurrenceUsageMember +structureUsageMember +behaviorUsageMember +refPrefix +basicUsagePrefix +endUsagePrefix +usageExtensionKeyword +unextendedUsagePrefix +usagePrefix +usage +usageDeclaration +usageCompletion +usageBody +defaultReferenceUsage +referenceUsage +endFeatureUsage +variantReference +nonOccurrenceUsageElement +endOccurrenceUsageElement +occurrenceUsageElement +structureUsageElement +behaviorUsageElement +variantUsageElement +subclassificationPart +attributeDefinition +attributeUsage +enumerationDefinition +enumerationBody +enumerationUsageMember +enumeratedValue +enumerationUsage +occurrenceDefinitionPrefix +occurrenceDefinition +individualDefinition +emptyMultiplicityMember +occurrenceUsagePrefix +occurrenceUsage +individualUsage +portionUsage +portionKind +eventOccurrenceUsage +sourceSuccessionMember +sourceSuccession +sourceEndMember +sourceEnd +itemDefinition +itemUsage +partDefinition +partUsage +portDefinition +conjugatedPortDefinitionMember +conjugatedPortDefinition +portUsage +conjugatedPortTyping +connectionDefinition +connectionUsage +connectorPart +binaryConnectorPart +naryConnectorPart +bindingConnectorAsUsage +successionAsUsage +interfaceDefinition +interfaceBody +interfaceBodyItem +interfaceNonOccurrenceUsageMember +interfaceNonOccurrenceUsageElement +interfaceOccurrenceUsageMember +interfaceOccurrenceUsageElement +defaultInterfaceEnd +interfaceUsage +interfaceUsageDeclaration +interfacePart +binaryInterfacePart +naryInterfacePart +interfaceEndMember +interfaceEnd +allocationDefinition +allocationUsage +allocationUsageDeclaration +flowDefinition +message +messageDeclaration +messageEventMember +messageEvent +flowUsage +successionFlowUsage +flowPayloadFeatureMember +flowPayloadFeature +actionDefinition +actionBody +actionBodyItem +nonBehaviorBodyItem +actionBehaviorMember +initialNodeMember +actionNodeMember +actionTargetSuccessionMember +guardedSuccessionMember +actionUsage +actionUsageDeclaration +performActionUsage +performActionUsageDeclaration +actionNode +actionNodeUsageDeclaration +actionNodePrefix +controlNode +controlNodePrefix +mergeNode +decisionNode +joinNode +forkNode +acceptNode +acceptNodeDeclaration +acceptParameterPart +payloadParameterMember +payloadParameter +triggerValuePart +triggerFeatureValue +triggerExpression +sendNode +sendNodeDeclaration +senderReceiverPart +nodeParameterMember +nodeParameter +featureBinding +emptyParameterMember +assignmentNode +assignmentNodeDeclaration +assignmentTargetMember +assignmentTargetParameter +assignmentTargetBinding +terminateNode +ifNode +expressionParameterMember +actionBodyParameterMember +actionBodyParameter +ifNodeParameterMember +whileLoopNode +forLoopNode +forVariableDeclarationMember +actionTargetSuccession +targetSuccession +guardedTargetSuccession +defaultTargetSuccession +guardedSuccession +stateDefinition +stateDefBody +stateBodyItem +entryActionMember +doActionMember +exitActionMember +entryTransitionMember +stateActionUsage +statePerformActionUsage +stateAcceptActionUsage +stateSendActionUsage +stateAssignmentActionUsage +transitionUsageMember +targetTransitionUsageMember +stateUsage +stateUsageBody +exhibitStateUsage +transitionUsage +targetTransitionUsage +triggerActionMember +triggerAction +guardExpressionMember +effectBehaviorMember +effectBehaviorUsage +transitionPerformActionUsage +transitionAcceptActionUsage +transitionSendActionUsage +transitionAssignmentActionUsage +transitionSuccessionMember +transitionSuccession +emptyEndMember +calculationDefinition +calculationUsage +calculationBody +calculationBodyPart +calculationBodyItem +returnParameterMember +constraintDefinition +constraintUsage +assertConstraintUsage +constraintUsageDeclaration +requirementDefinition +requirementBody +requirementBodyItem +subjectMember +subjectUsage +requirementConstraintMember +requirementKind +requirementConstraintUsage +framedConcernMember +framedConcernUsage +actorMember +actorUsage +stakeholderMember +stakeholderUsage +requirementUsage +satisfyRequirementUsage +satisfactionSubjectMember +satisfactionParameter +satisfactionFeatureValue +satisfactionReferenceExpression +concernDefinition +concernUsage +caseDefinition +caseUsage +caseBody +caseBodyItem +objectiveMember +objectiveRequirementUsage +analysisCaseDefinition +analysisCaseUsage +verificationCaseDefinition +verificationCaseUsage +requirementVerificationMember +requirementVerificationUsage +useCaseDefinition +useCaseUsage +includeUseCaseUsage +viewDefinition +viewDefinitionBody +viewDefinitionBodyItem +viewRenderingMember +viewRenderingUsage +viewUsage +viewBody +viewBodyItem +expose +membershipExpose +namespaceExpose +viewpointDefinition +viewpointUsage +renderingDefinition +renderingUsage +metadataDefinition +prefixMetadataUsage +metadataBodyUsageMember +metadataBodyUsage +extendedDefinition +extendedUsage +filterPackageImportDeclaration +namespaceImportDirect +calculationUsageDeclaration +emptyActionUsage_ +emptyFeature_ +emptyMultiplicity_ +emptyUsage_ +filterPackageImport +nonFeatureChainPrimaryExpression +portConjugation + + +atn: +[4, 1, 226, 4511, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 2, 225, 7, 225, 2, 226, 7, 226, 2, 227, 7, 227, 2, 228, 7, 228, 2, 229, 7, 229, 2, 230, 7, 230, 2, 231, 7, 231, 2, 232, 7, 232, 2, 233, 7, 233, 2, 234, 7, 234, 2, 235, 7, 235, 2, 236, 7, 236, 2, 237, 7, 237, 2, 238, 7, 238, 2, 239, 7, 239, 2, 240, 7, 240, 2, 241, 7, 241, 2, 242, 7, 242, 2, 243, 7, 243, 2, 244, 7, 244, 2, 245, 7, 245, 2, 246, 7, 246, 2, 247, 7, 247, 2, 248, 7, 248, 2, 249, 7, 249, 2, 250, 7, 250, 2, 251, 7, 251, 2, 252, 7, 252, 2, 253, 7, 253, 2, 254, 7, 254, 2, 255, 7, 255, 2, 256, 7, 256, 2, 257, 7, 257, 2, 258, 7, 258, 2, 259, 7, 259, 2, 260, 7, 260, 2, 261, 7, 261, 2, 262, 7, 262, 2, 263, 7, 263, 2, 264, 7, 264, 2, 265, 7, 265, 2, 266, 7, 266, 2, 267, 7, 267, 2, 268, 7, 268, 2, 269, 7, 269, 2, 270, 7, 270, 2, 271, 7, 271, 2, 272, 7, 272, 2, 273, 7, 273, 2, 274, 7, 274, 2, 275, 7, 275, 2, 276, 7, 276, 2, 277, 7, 277, 2, 278, 7, 278, 2, 279, 7, 279, 2, 280, 7, 280, 2, 281, 7, 281, 2, 282, 7, 282, 2, 283, 7, 283, 2, 284, 7, 284, 2, 285, 7, 285, 2, 286, 7, 286, 2, 287, 7, 287, 2, 288, 7, 288, 2, 289, 7, 289, 2, 290, 7, 290, 2, 291, 7, 291, 2, 292, 7, 292, 2, 293, 7, 293, 2, 294, 7, 294, 2, 295, 7, 295, 2, 296, 7, 296, 2, 297, 7, 297, 2, 298, 7, 298, 2, 299, 7, 299, 2, 300, 7, 300, 2, 301, 7, 301, 2, 302, 7, 302, 2, 303, 7, 303, 2, 304, 7, 304, 2, 305, 7, 305, 2, 306, 7, 306, 2, 307, 7, 307, 2, 308, 7, 308, 2, 309, 7, 309, 2, 310, 7, 310, 2, 311, 7, 311, 2, 312, 7, 312, 2, 313, 7, 313, 2, 314, 7, 314, 2, 315, 7, 315, 2, 316, 7, 316, 2, 317, 7, 317, 2, 318, 7, 318, 2, 319, 7, 319, 2, 320, 7, 320, 2, 321, 7, 321, 2, 322, 7, 322, 2, 323, 7, 323, 2, 324, 7, 324, 2, 325, 7, 325, 2, 326, 7, 326, 2, 327, 7, 327, 2, 328, 7, 328, 2, 329, 7, 329, 2, 330, 7, 330, 2, 331, 7, 331, 2, 332, 7, 332, 2, 333, 7, 333, 2, 334, 7, 334, 2, 335, 7, 335, 2, 336, 7, 336, 2, 337, 7, 337, 2, 338, 7, 338, 2, 339, 7, 339, 2, 340, 7, 340, 2, 341, 7, 341, 2, 342, 7, 342, 2, 343, 7, 343, 2, 344, 7, 344, 2, 345, 7, 345, 2, 346, 7, 346, 2, 347, 7, 347, 2, 348, 7, 348, 2, 349, 7, 349, 2, 350, 7, 350, 2, 351, 7, 351, 2, 352, 7, 352, 2, 353, 7, 353, 2, 354, 7, 354, 2, 355, 7, 355, 2, 356, 7, 356, 2, 357, 7, 357, 2, 358, 7, 358, 2, 359, 7, 359, 2, 360, 7, 360, 2, 361, 7, 361, 2, 362, 7, 362, 2, 363, 7, 363, 2, 364, 7, 364, 2, 365, 7, 365, 2, 366, 7, 366, 2, 367, 7, 367, 2, 368, 7, 368, 2, 369, 7, 369, 2, 370, 7, 370, 2, 371, 7, 371, 2, 372, 7, 372, 2, 373, 7, 373, 2, 374, 7, 374, 2, 375, 7, 375, 2, 376, 7, 376, 2, 377, 7, 377, 2, 378, 7, 378, 2, 379, 7, 379, 2, 380, 7, 380, 2, 381, 7, 381, 2, 382, 7, 382, 2, 383, 7, 383, 2, 384, 7, 384, 2, 385, 7, 385, 2, 386, 7, 386, 2, 387, 7, 387, 2, 388, 7, 388, 2, 389, 7, 389, 2, 390, 7, 390, 2, 391, 7, 391, 2, 392, 7, 392, 2, 393, 7, 393, 2, 394, 7, 394, 2, 395, 7, 395, 2, 396, 7, 396, 2, 397, 7, 397, 2, 398, 7, 398, 2, 399, 7, 399, 2, 400, 7, 400, 2, 401, 7, 401, 2, 402, 7, 402, 2, 403, 7, 403, 2, 404, 7, 404, 2, 405, 7, 405, 2, 406, 7, 406, 2, 407, 7, 407, 2, 408, 7, 408, 2, 409, 7, 409, 2, 410, 7, 410, 2, 411, 7, 411, 2, 412, 7, 412, 2, 413, 7, 413, 2, 414, 7, 414, 2, 415, 7, 415, 2, 416, 7, 416, 2, 417, 7, 417, 2, 418, 7, 418, 2, 419, 7, 419, 2, 420, 7, 420, 2, 421, 7, 421, 2, 422, 7, 422, 2, 423, 7, 423, 2, 424, 7, 424, 2, 425, 7, 425, 2, 426, 7, 426, 2, 427, 7, 427, 2, 428, 7, 428, 2, 429, 7, 429, 2, 430, 7, 430, 2, 431, 7, 431, 2, 432, 7, 432, 2, 433, 7, 433, 2, 434, 7, 434, 2, 435, 7, 435, 2, 436, 7, 436, 2, 437, 7, 437, 2, 438, 7, 438, 2, 439, 7, 439, 2, 440, 7, 440, 2, 441, 7, 441, 2, 442, 7, 442, 2, 443, 7, 443, 2, 444, 7, 444, 2, 445, 7, 445, 2, 446, 7, 446, 2, 447, 7, 447, 2, 448, 7, 448, 2, 449, 7, 449, 2, 450, 7, 450, 2, 451, 7, 451, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 920, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 976, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 983, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 999, 8, 0, 5, 0, 1001, 8, 0, 10, 0, 12, 0, 1004, 9, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 5, 2, 1011, 8, 2, 10, 2, 12, 2, 1014, 9, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 1023, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 1034, 8, 3, 1, 3, 3, 3, 1037, 8, 3, 1, 4, 1, 4, 1, 4, 3, 4, 1042, 8, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 1057, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 1064, 8, 9, 10, 9, 12, 9, 1067, 9, 9, 1, 10, 1, 10, 1, 10, 5, 10, 1072, 8, 10, 10, 10, 12, 10, 1075, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 1086, 8, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 3, 20, 1105, 8, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 1119, 8, 22, 1, 23, 1, 23, 1, 23, 5, 23, 1124, 8, 23, 10, 23, 12, 23, 1127, 9, 23, 1, 23, 1, 23, 1, 23, 5, 23, 1132, 8, 23, 10, 23, 12, 23, 1135, 9, 23, 1, 23, 3, 23, 1138, 8, 23, 1, 24, 1, 24, 3, 24, 1142, 8, 24, 1, 25, 1, 25, 3, 25, 1146, 8, 25, 1, 26, 5, 26, 1149, 8, 26, 10, 26, 12, 26, 1152, 9, 26, 1, 26, 1, 26, 3, 26, 1156, 8, 26, 1, 26, 3, 26, 1159, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 1164, 8, 26, 10, 26, 12, 26, 1167, 9, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 1173, 8, 26, 10, 26, 12, 26, 1176, 9, 26, 1, 26, 1, 26, 1, 26, 5, 26, 1181, 8, 26, 10, 26, 12, 26, 1184, 9, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 1190, 8, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 1200, 8, 29, 1, 30, 1, 30, 3, 30, 1204, 8, 30, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 1210, 8, 30, 10, 30, 12, 30, 1213, 9, 30, 3, 30, 1215, 8, 30, 3, 30, 1217, 8, 30, 1, 30, 1, 30, 3, 30, 1221, 8, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 1227, 8, 31, 1, 31, 1, 31, 3, 31, 1231, 8, 31, 1, 31, 1, 31, 1, 32, 1, 32, 3, 32, 1237, 8, 32, 3, 32, 1239, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 5, 33, 1246, 8, 33, 10, 33, 12, 33, 1249, 9, 33, 1, 33, 1, 33, 1, 34, 5, 34, 1254, 8, 34, 10, 34, 12, 34, 1257, 9, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 3, 35, 1264, 8, 35, 1, 36, 1, 36, 1, 36, 5, 36, 1269, 8, 36, 10, 36, 12, 36, 1272, 9, 36, 1, 36, 3, 36, 1275, 8, 36, 1, 37, 1, 37, 1, 37, 3, 37, 1280, 8, 37, 1, 38, 3, 38, 1283, 8, 38, 1, 39, 1, 39, 1, 40, 1, 40, 3, 40, 1289, 8, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 1303, 8, 43, 1, 43, 3, 43, 1306, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 3, 44, 1314, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1319, 8, 44, 10, 44, 12, 44, 1322, 9, 44, 1, 44, 1, 44, 1, 45, 3, 45, 1327, 8, 45, 1, 45, 1, 45, 3, 45, 1331, 8, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 3, 46, 1338, 8, 46, 1, 47, 1, 47, 1, 47, 3, 47, 1343, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1350, 8, 48, 1, 48, 3, 48, 1353, 8, 48, 1, 49, 1, 49, 4, 49, 1357, 8, 49, 11, 49, 12, 49, 1358, 1, 49, 1, 49, 4, 49, 1363, 8, 49, 11, 49, 12, 49, 1364, 3, 49, 1367, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 3, 51, 1375, 8, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 3, 52, 1403, 8, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1415, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1423, 8, 55, 1, 55, 5, 55, 1426, 8, 55, 10, 55, 12, 55, 1429, 9, 55, 1, 56, 3, 56, 1432, 8, 56, 1, 56, 3, 56, 1435, 8, 56, 1, 56, 3, 56, 1438, 8, 56, 1, 56, 1, 56, 4, 56, 1442, 8, 56, 11, 56, 12, 56, 1443, 1, 56, 5, 56, 1447, 8, 56, 10, 56, 12, 56, 1450, 9, 56, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 1456, 8, 57, 10, 57, 12, 57, 1459, 9, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 1468, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1475, 8, 60, 10, 60, 12, 60, 1478, 9, 60, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 1484, 8, 61, 10, 61, 12, 61, 1487, 9, 61, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 1493, 8, 62, 10, 62, 12, 62, 1496, 9, 62, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 1502, 8, 63, 10, 63, 12, 63, 1505, 9, 63, 1, 64, 1, 64, 1, 64, 5, 64, 1510, 8, 64, 10, 64, 12, 64, 1513, 9, 64, 1, 64, 3, 64, 1516, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1522, 8, 65, 1, 66, 1, 66, 3, 66, 1526, 8, 66, 3, 66, 1528, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 5, 68, 1541, 8, 68, 10, 68, 12, 68, 1544, 9, 68, 1, 69, 1, 69, 1, 69, 5, 69, 1549, 8, 69, 10, 69, 12, 69, 1552, 9, 69, 1, 70, 1, 70, 3, 70, 1556, 8, 70, 3, 70, 1558, 8, 70, 1, 70, 1, 70, 1, 70, 1, 70, 5, 70, 1564, 8, 70, 10, 70, 12, 70, 1567, 9, 70, 1, 70, 1, 70, 1, 70, 1, 70, 5, 70, 1573, 8, 70, 10, 70, 12, 70, 1576, 9, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 5, 71, 1583, 8, 71, 10, 71, 12, 71, 1586, 9, 71, 1, 72, 1, 72, 3, 72, 1590, 8, 72, 3, 72, 1592, 8, 72, 1, 72, 1, 72, 1, 72, 1, 72, 5, 72, 1598, 8, 72, 10, 72, 12, 72, 1601, 9, 72, 1, 72, 1, 72, 1, 72, 1, 72, 5, 72, 1607, 8, 72, 10, 72, 12, 72, 1610, 9, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 5, 73, 1617, 8, 73, 10, 73, 12, 73, 1620, 9, 73, 1, 74, 1, 74, 1, 74, 5, 74, 1625, 8, 74, 10, 74, 12, 74, 1628, 9, 74, 1, 75, 1, 75, 1, 75, 5, 75, 1633, 8, 75, 10, 75, 12, 75, 1636, 9, 75, 1, 76, 1, 76, 1, 76, 5, 76, 1641, 8, 76, 10, 76, 12, 76, 1644, 9, 76, 1, 77, 1, 77, 3, 77, 1648, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 3, 81, 1663, 8, 81, 1, 81, 3, 81, 1666, 8, 81, 1, 81, 3, 81, 1669, 8, 81, 1, 81, 1, 81, 3, 81, 1673, 8, 81, 1, 81, 5, 81, 1676, 8, 81, 10, 81, 12, 81, 1679, 9, 81, 1, 82, 1, 82, 1, 82, 1, 82, 5, 82, 1685, 8, 82, 10, 82, 12, 82, 1688, 9, 82, 1, 83, 1, 83, 3, 83, 1692, 8, 83, 3, 83, 1694, 8, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 3, 85, 1707, 8, 85, 1, 85, 3, 85, 1710, 8, 85, 1, 85, 1, 85, 3, 85, 1714, 8, 85, 1, 85, 3, 85, 1717, 8, 85, 1, 85, 1, 85, 3, 85, 1721, 8, 85, 1, 85, 3, 85, 1724, 8, 85, 1, 85, 1, 85, 1, 86, 3, 86, 1729, 8, 86, 1, 86, 1, 86, 1, 87, 3, 87, 1734, 8, 87, 1, 87, 3, 87, 1737, 8, 87, 1, 87, 3, 87, 1740, 8, 87, 1, 87, 3, 87, 1743, 8, 87, 1, 87, 3, 87, 1746, 8, 87, 1, 88, 1, 88, 1, 88, 1, 88, 3, 88, 1752, 8, 88, 1, 88, 5, 88, 1755, 8, 88, 10, 88, 12, 88, 1758, 9, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 3, 90, 1767, 8, 90, 3, 90, 1769, 8, 90, 1, 91, 1, 91, 1, 92, 3, 92, 1774, 8, 92, 1, 92, 1, 92, 1, 92, 3, 92, 1779, 8, 92, 1, 92, 1, 92, 3, 92, 1783, 8, 92, 1, 92, 5, 92, 1786, 8, 92, 10, 92, 12, 92, 1789, 9, 92, 1, 93, 1, 93, 1, 93, 1, 93, 3, 93, 1795, 8, 93, 1, 93, 3, 93, 1798, 8, 93, 1, 94, 1, 94, 1, 94, 1, 94, 3, 94, 1804, 8, 94, 1, 95, 1, 95, 1, 95, 1, 95, 5, 95, 1810, 8, 95, 10, 95, 12, 95, 1813, 9, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 5, 97, 1824, 8, 97, 10, 97, 12, 97, 1827, 9, 97, 1, 98, 4, 98, 1830, 8, 98, 11, 98, 12, 98, 1831, 1, 98, 3, 98, 1835, 8, 98, 1, 98, 5, 98, 1838, 8, 98, 10, 98, 12, 98, 1841, 9, 98, 1, 98, 1, 98, 5, 98, 1845, 8, 98, 10, 98, 12, 98, 1848, 9, 98, 3, 98, 1850, 8, 98, 1, 99, 1, 99, 1, 99, 3, 99, 1855, 8, 99, 1, 99, 1, 99, 3, 99, 1859, 8, 99, 3, 99, 1861, 8, 99, 1, 99, 1, 99, 3, 99, 1865, 8, 99, 1, 99, 1, 99, 3, 99, 1869, 8, 99, 3, 99, 1871, 8, 99, 3, 99, 1873, 8, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 3, 100, 1880, 8, 100, 1, 101, 1, 101, 1, 101, 5, 101, 1885, 8, 101, 10, 101, 12, 101, 1888, 9, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 3, 102, 1895, 8, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 5, 103, 1902, 8, 103, 10, 103, 12, 103, 1905, 9, 103, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 5, 107, 1919, 8, 107, 10, 107, 12, 107, 1922, 9, 107, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 3, 109, 1929, 8, 109, 3, 109, 1931, 8, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 3, 109, 1938, 8, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 3, 109, 1945, 8, 109, 1, 110, 1, 110, 1, 110, 5, 110, 1950, 8, 110, 10, 110, 12, 110, 1953, 9, 110, 1, 111, 1, 111, 3, 111, 1957, 8, 111, 3, 111, 1959, 8, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 5, 112, 1970, 8, 112, 10, 112, 12, 112, 1973, 9, 112, 1, 113, 1, 113, 1, 113, 5, 113, 1978, 8, 113, 10, 113, 12, 113, 1981, 9, 113, 1, 114, 1, 114, 1, 114, 5, 114, 1986, 8, 114, 10, 114, 12, 114, 1989, 9, 114, 1, 115, 1, 115, 3, 115, 1993, 8, 115, 3, 115, 1995, 8, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 5, 116, 2006, 8, 116, 10, 116, 12, 116, 2009, 9, 116, 1, 117, 1, 117, 3, 117, 2013, 8, 117, 3, 117, 2015, 8, 117, 1, 117, 1, 117, 1, 117, 1, 117, 5, 117, 2021, 8, 117, 10, 117, 12, 117, 2024, 9, 117, 1, 117, 1, 117, 1, 117, 1, 117, 5, 117, 2030, 8, 117, 10, 117, 12, 117, 2033, 9, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 5, 118, 2040, 8, 118, 10, 118, 12, 118, 2043, 9, 118, 1, 119, 1, 119, 3, 119, 2047, 8, 119, 1, 119, 3, 119, 2050, 8, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 3, 126, 2088, 8, 126, 1, 126, 3, 126, 2091, 8, 126, 1, 126, 3, 126, 2094, 8, 126, 1, 126, 1, 126, 1, 127, 1, 127, 3, 127, 2100, 8, 127, 1, 128, 3, 128, 2103, 8, 128, 1, 128, 1, 128, 1, 128, 3, 128, 2108, 8, 128, 3, 128, 2110, 8, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 3, 129, 2117, 8, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 5, 129, 2125, 8, 129, 10, 129, 12, 129, 2128, 9, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 131, 3, 131, 2135, 8, 131, 1, 131, 1, 131, 1, 131, 3, 131, 2140, 8, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 3, 135, 2159, 8, 135, 1, 135, 3, 135, 2162, 8, 135, 1, 135, 3, 135, 2165, 8, 135, 1, 135, 1, 135, 1, 135, 1, 135, 3, 135, 2171, 8, 135, 3, 135, 2173, 8, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 3, 137, 2186, 8, 137, 1, 137, 3, 137, 2189, 8, 137, 1, 137, 3, 137, 2192, 8, 137, 1, 137, 1, 137, 1, 137, 1, 137, 3, 137, 2198, 8, 137, 3, 137, 2200, 8, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 3, 139, 2211, 8, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 3, 141, 2225, 8, 141, 1, 142, 1, 142, 1, 142, 5, 142, 2230, 8, 142, 10, 142, 12, 142, 2233, 9, 142, 1, 142, 3, 142, 2236, 8, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 3, 145, 2249, 8, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 3, 147, 2262, 8, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 3, 148, 2269, 8, 148, 1, 148, 1, 148, 3, 148, 2273, 8, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 5, 149, 2280, 8, 149, 10, 149, 12, 149, 2283, 9, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 3, 153, 2303, 8, 153, 1, 153, 1, 153, 3, 153, 2307, 8, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 3, 153, 2314, 8, 153, 1, 153, 3, 153, 2317, 8, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 3, 153, 2324, 8, 153, 1, 153, 3, 153, 2327, 8, 153, 1, 153, 1, 153, 3, 153, 2331, 8, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 3, 153, 2338, 8, 153, 3, 153, 2340, 8, 153, 1, 154, 1, 154, 1, 155, 3, 155, 2345, 8, 155, 1, 155, 1, 155, 3, 155, 2349, 8, 155, 1, 155, 1, 155, 3, 155, 2353, 8, 155, 1, 155, 1, 155, 3, 155, 2357, 8, 155, 1, 155, 1, 155, 3, 155, 2361, 8, 155, 3, 155, 2363, 8, 155, 1, 156, 4, 156, 2366, 8, 156, 11, 156, 12, 156, 2367, 1, 156, 3, 156, 2371, 8, 156, 1, 156, 5, 156, 2374, 8, 156, 10, 156, 12, 156, 2377, 9, 156, 1, 156, 1, 156, 4, 156, 2381, 8, 156, 11, 156, 12, 156, 2382, 3, 156, 2385, 8, 156, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 5, 158, 2392, 8, 158, 10, 158, 12, 158, 2395, 9, 158, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 3, 160, 2403, 8, 160, 3, 160, 2405, 8, 160, 1, 160, 1, 160, 1, 161, 1, 161, 3, 161, 2411, 8, 161, 1, 162, 1, 162, 3, 162, 2415, 8, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 3, 163, 2422, 8, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 3, 166, 2435, 8, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 3, 167, 2442, 8, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 3, 169, 2453, 8, 169, 1, 170, 1, 170, 1, 170, 1, 170, 3, 170, 2459, 8, 170, 1, 171, 1, 171, 1, 172, 5, 172, 2464, 8, 172, 10, 172, 12, 172, 2467, 9, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 5, 172, 2475, 8, 172, 10, 172, 12, 172, 2478, 9, 172, 3, 172, 2480, 8, 172, 1, 172, 1, 172, 1, 173, 3, 173, 2485, 8, 173, 1, 173, 1, 173, 1, 173, 3, 173, 2490, 8, 173, 3, 173, 2492, 8, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 5, 174, 2499, 8, 174, 10, 174, 12, 174, 2502, 9, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 5, 174, 2510, 8, 174, 10, 174, 12, 174, 2513, 9, 174, 1, 174, 3, 174, 2516, 8, 174, 1, 175, 1, 175, 1, 175, 1, 175, 3, 175, 2522, 8, 175, 1, 176, 1, 176, 1, 177, 3, 177, 2527, 8, 177, 1, 177, 3, 177, 2530, 8, 177, 1, 177, 1, 177, 3, 177, 2534, 8, 177, 1, 177, 3, 177, 2537, 8, 177, 1, 177, 1, 177, 1, 178, 5, 178, 2542, 8, 178, 10, 178, 12, 178, 2545, 9, 178, 1, 178, 1, 178, 1, 178, 1, 179, 3, 179, 2551, 8, 179, 1, 179, 1, 179, 5, 179, 2555, 8, 179, 10, 179, 12, 179, 2558, 9, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 3, 180, 2565, 8, 180, 1, 181, 1, 181, 1, 181, 5, 181, 2570, 8, 181, 10, 181, 12, 181, 2573, 9, 181, 1, 181, 3, 181, 2576, 8, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 3, 183, 2584, 8, 183, 1, 183, 3, 183, 2587, 8, 183, 1, 183, 1, 183, 1, 183, 5, 183, 2592, 8, 183, 10, 183, 12, 183, 2595, 9, 183, 1, 183, 1, 183, 1, 183, 1, 183, 5, 183, 2601, 8, 183, 10, 183, 12, 183, 2604, 9, 183, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 3, 185, 2612, 8, 185, 1, 186, 1, 186, 1, 186, 3, 186, 2617, 8, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 3, 187, 2649, 8, 187, 1, 188, 1, 188, 3, 188, 2653, 8, 188, 1, 189, 1, 189, 1, 190, 1, 190, 1, 191, 3, 191, 2660, 8, 191, 1, 191, 5, 191, 2663, 8, 191, 10, 191, 12, 191, 2666, 9, 191, 1, 192, 1, 192, 1, 192, 1, 193, 3, 193, 2672, 8, 193, 1, 193, 3, 193, 2675, 8, 193, 1, 194, 1, 194, 1, 194, 5, 194, 2680, 8, 194, 10, 194, 12, 194, 2683, 9, 194, 1, 194, 3, 194, 2686, 8, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 3, 195, 2693, 8, 195, 1, 195, 1, 195, 1, 195, 1, 195, 3, 195, 2699, 8, 195, 1, 195, 1, 195, 1, 195, 3, 195, 2704, 8, 195, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 3, 196, 2711, 8, 196, 1, 196, 3, 196, 2714, 8, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 3, 196, 2724, 8, 196, 1, 197, 1, 197, 1, 197, 1, 198, 1, 198, 1, 198, 1, 198, 1, 199, 1, 199, 1, 199, 1, 200, 1, 200, 1, 200, 1, 201, 1, 201, 1, 201, 1, 202, 3, 202, 2743, 8, 202, 1, 202, 3, 202, 2746, 8, 202, 1, 202, 3, 202, 2749, 8, 202, 1, 202, 3, 202, 2752, 8, 202, 1, 203, 1, 203, 3, 203, 2756, 8, 203, 1, 204, 1, 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 3, 206, 2765, 8, 206, 1, 207, 1, 207, 5, 207, 2769, 8, 207, 10, 207, 12, 207, 2772, 9, 207, 1, 208, 3, 208, 2775, 8, 208, 1, 208, 1, 208, 1, 209, 1, 209, 3, 209, 2781, 8, 209, 1, 209, 3, 209, 2784, 8, 209, 1, 210, 3, 210, 2787, 8, 210, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, 212, 1, 213, 1, 213, 3, 213, 2798, 8, 213, 1, 213, 1, 213, 1, 213, 1, 214, 1, 214, 1, 214, 1, 214, 1, 215, 1, 215, 5, 215, 2809, 8, 215, 10, 215, 12, 215, 2812, 9, 215, 1, 215, 1, 215, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 3, 216, 2824, 8, 216, 1, 217, 1, 217, 3, 217, 2828, 8, 217, 1, 217, 3, 217, 2831, 8, 217, 1, 217, 3, 217, 2834, 8, 217, 1, 217, 1, 217, 1, 218, 1, 218, 3, 218, 2840, 8, 218, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 3, 219, 2857, 8, 219, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 3, 220, 2875, 8, 220, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 3, 221, 2898, 8, 221, 1, 222, 1, 222, 1, 222, 1, 222, 5, 222, 2904, 8, 222, 10, 222, 12, 222, 2907, 9, 222, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 224, 1, 224, 1, 224, 1, 224, 1, 225, 5, 225, 2919, 8, 225, 10, 225, 12, 225, 2922, 9, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 226, 1, 226, 1, 226, 1, 226, 5, 226, 2933, 8, 226, 10, 226, 12, 226, 2936, 9, 226, 1, 226, 3, 226, 2939, 8, 226, 1, 227, 5, 227, 2942, 8, 227, 10, 227, 12, 227, 2945, 9, 227, 1, 227, 1, 227, 1, 227, 1, 228, 3, 228, 2951, 8, 228, 1, 228, 1, 228, 1, 229, 1, 229, 1, 229, 1, 229, 1, 230, 3, 230, 2960, 8, 230, 1, 230, 1, 230, 3, 230, 2964, 8, 230, 1, 230, 5, 230, 2967, 8, 230, 10, 230, 12, 230, 2970, 9, 230, 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, 1, 232, 3, 232, 2978, 8, 232, 1, 232, 1, 232, 5, 232, 2982, 8, 232, 10, 232, 12, 232, 2985, 9, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 233, 1, 233, 1, 234, 1, 234, 3, 234, 2995, 8, 234, 1, 234, 3, 234, 2998, 8, 234, 1, 234, 5, 234, 3001, 8, 234, 10, 234, 12, 234, 3004, 9, 234, 1, 235, 1, 235, 1, 235, 1, 235, 1, 236, 1, 236, 1, 236, 5, 236, 3013, 8, 236, 10, 236, 12, 236, 3016, 9, 236, 1, 236, 1, 236, 1, 237, 1, 237, 3, 237, 3022, 8, 237, 1, 237, 1, 237, 5, 237, 3026, 8, 237, 10, 237, 12, 237, 3029, 9, 237, 1, 237, 1, 237, 1, 238, 1, 238, 1, 239, 1, 239, 1, 239, 1, 239, 3, 239, 3039, 8, 239, 1, 239, 1, 239, 3, 239, 3043, 8, 239, 3, 239, 3045, 8, 239, 1, 239, 1, 239, 1, 240, 1, 240, 1, 240, 1, 241, 1, 241, 1, 242, 1, 242, 1, 243, 3, 243, 3057, 8, 243, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 245, 1, 245, 1, 245, 1, 245, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 247, 1, 247, 1, 247, 1, 247, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 1, 249, 1, 249, 1, 250, 1, 250, 1, 251, 1, 251, 1, 251, 1, 251, 1, 252, 1, 252, 1, 252, 1, 253, 1, 253, 1, 253, 1, 253, 1, 253, 1, 254, 1, 254, 1, 254, 3, 254, 3102, 8, 254, 1, 254, 3, 254, 3105, 8, 254, 1, 254, 1, 254, 3, 254, 3109, 8, 254, 1, 254, 1, 254, 3, 254, 3113, 8, 254, 1, 254, 1, 254, 1, 255, 1, 255, 3, 255, 3119, 8, 255, 1, 256, 1, 256, 1, 256, 1, 256, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 5, 257, 3131, 8, 257, 10, 257, 12, 257, 3134, 9, 257, 1, 257, 1, 257, 1, 258, 1, 258, 1, 258, 3, 258, 3141, 8, 258, 3, 258, 3143, 8, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 259, 1, 259, 1, 259, 3, 259, 3154, 8, 259, 3, 259, 3156, 8, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 260, 1, 260, 1, 260, 1, 260, 1, 260, 1, 260, 1, 261, 1, 261, 1, 261, 5, 261, 3173, 8, 261, 10, 261, 12, 261, 3176, 9, 261, 1, 261, 3, 261, 3179, 8, 261, 1, 262, 1, 262, 1, 262, 1, 262, 3, 262, 3185, 8, 262, 1, 262, 1, 262, 1, 262, 3, 262, 3190, 8, 262, 1, 263, 1, 263, 1, 263, 1, 264, 1, 264, 1, 264, 1, 264, 1, 264, 3, 264, 3200, 8, 264, 1, 265, 1, 265, 1, 265, 1, 266, 1, 266, 1, 266, 1, 266, 3, 266, 3209, 8, 266, 1, 267, 1, 267, 1, 267, 1, 268, 1, 268, 1, 268, 1, 268, 1, 268, 1, 269, 3, 269, 3220, 8, 269, 1, 269, 3, 269, 3223, 8, 269, 1, 269, 1, 269, 3, 269, 3227, 8, 269, 1, 269, 3, 269, 3230, 8, 269, 1, 270, 1, 270, 3, 270, 3234, 8, 270, 1, 271, 1, 271, 1, 271, 1, 271, 1, 272, 1, 272, 1, 272, 1, 272, 1, 272, 1, 272, 5, 272, 3246, 8, 272, 10, 272, 12, 272, 3249, 9, 272, 1, 272, 1, 272, 1, 273, 1, 273, 1, 274, 3, 274, 3256, 8, 274, 1, 274, 1, 274, 1, 274, 3, 274, 3261, 8, 274, 1, 274, 1, 274, 1, 275, 1, 275, 1, 275, 1, 275, 1, 275, 1, 276, 1, 276, 1, 276, 1, 276, 1, 277, 1, 277, 3, 277, 3276, 8, 277, 1, 277, 1, 277, 3, 277, 3280, 8, 277, 1, 277, 1, 277, 3, 277, 3284, 8, 277, 1, 278, 1, 278, 1, 278, 1, 278, 1, 278, 1, 279, 1, 279, 1, 279, 1, 279, 1, 279, 1, 280, 3, 280, 3297, 8, 280, 1, 280, 3, 280, 3300, 8, 280, 1, 280, 1, 280, 3, 280, 3304, 8, 280, 1, 280, 1, 280, 1, 280, 1, 280, 1, 280, 3, 280, 3311, 8, 280, 1, 280, 1, 280, 1, 280, 1, 280, 3, 280, 3317, 8, 280, 1, 281, 1, 281, 1, 282, 1, 282, 1, 283, 1, 283, 1, 283, 1, 283, 1, 283, 1, 284, 1, 284, 1, 284, 1, 284, 1, 284, 1, 284, 1, 285, 1, 285, 1, 286, 1, 286, 1, 287, 1, 287, 1, 287, 1, 287, 1, 287, 1, 287, 1, 288, 1, 288, 1, 288, 5, 288, 3347, 8, 288, 10, 288, 12, 288, 3350, 9, 288, 1, 288, 3, 288, 3353, 8, 288, 1, 289, 1, 289, 1, 289, 5, 289, 3358, 8, 289, 10, 289, 12, 289, 3361, 9, 289, 1, 289, 3, 289, 3364, 8, 289, 1, 289, 1, 289, 5, 289, 3368, 8, 289, 10, 289, 12, 289, 3371, 9, 289, 1, 289, 3, 289, 3374, 8, 289, 1, 290, 1, 290, 1, 290, 1, 290, 1, 290, 1, 290, 3, 290, 3382, 8, 290, 1, 290, 3, 290, 3385, 8, 290, 1, 291, 1, 291, 3, 291, 3389, 8, 291, 1, 292, 1, 292, 1, 292, 1, 292, 1, 292, 1, 293, 1, 293, 1, 293, 1, 294, 1, 294, 1, 294, 1, 295, 1, 295, 1, 295, 1, 296, 1, 296, 1, 296, 1, 296, 1, 296, 1, 297, 3, 297, 3411, 8, 297, 1, 297, 3, 297, 3414, 8, 297, 1, 298, 1, 298, 1, 298, 1, 298, 1, 298, 1, 299, 1, 299, 3, 299, 3423, 8, 299, 1, 299, 1, 299, 3, 299, 3427, 8, 299, 3, 299, 3429, 8, 299, 1, 299, 3, 299, 3432, 8, 299, 1, 300, 1, 300, 1, 300, 1, 300, 1, 300, 1, 300, 1, 300, 1, 300, 3, 300, 3442, 8, 300, 1, 301, 1, 301, 3, 301, 3446, 8, 301, 1, 302, 1, 302, 3, 302, 3450, 8, 302, 1, 303, 1, 303, 1, 303, 1, 303, 3, 303, 3456, 8, 303, 1, 304, 1, 304, 3, 304, 3460, 8, 304, 1, 304, 3, 304, 3463, 8, 304, 1, 304, 5, 304, 3466, 8, 304, 10, 304, 12, 304, 3469, 9, 304, 1, 305, 1, 305, 1, 305, 3, 305, 3474, 8, 305, 1, 305, 1, 305, 1, 306, 1, 306, 1, 306, 3, 306, 3481, 8, 306, 1, 306, 1, 306, 1, 307, 1, 307, 1, 307, 3, 307, 3488, 8, 307, 1, 307, 1, 307, 1, 308, 1, 308, 1, 308, 3, 308, 3495, 8, 308, 1, 308, 1, 308, 1, 309, 1, 309, 1, 309, 1, 309, 1, 310, 3, 310, 3504, 8, 310, 1, 310, 1, 310, 1, 310, 1, 311, 1, 311, 1, 311, 3, 311, 3512, 8, 311, 1, 312, 1, 312, 1, 313, 1, 313, 3, 313, 3518, 8, 313, 1, 313, 3, 313, 3521, 8, 313, 1, 313, 3, 313, 3524, 8, 313, 1, 314, 1, 314, 1, 315, 1, 315, 1, 316, 1, 316, 1, 316, 1, 316, 3, 316, 3534, 8, 316, 1, 317, 1, 317, 1, 317, 3, 317, 3539, 8, 317, 1, 317, 1, 317, 1, 317, 3, 317, 3544, 8, 317, 1, 317, 1, 317, 3, 317, 3548, 8, 317, 3, 317, 3550, 8, 317, 1, 317, 1, 317, 1, 318, 3, 318, 3555, 8, 318, 1, 318, 1, 318, 1, 318, 3, 318, 3560, 8, 318, 1, 319, 1, 319, 1, 319, 1, 319, 3, 319, 3566, 8, 319, 1, 319, 1, 319, 1, 319, 1, 319, 3, 319, 3572, 8, 319, 1, 320, 1, 320, 1, 321, 1, 321, 1, 322, 1, 322, 1, 323, 1, 323, 1, 324, 1, 324, 1, 324, 1, 324, 1, 325, 3, 325, 3587, 8, 325, 1, 325, 1, 325, 1, 325, 1, 325, 1, 325, 1, 325, 1, 326, 1, 326, 1, 327, 1, 327, 1, 327, 3, 327, 3600, 8, 327, 1, 328, 1, 328, 1, 329, 1, 329, 3, 329, 3606, 8, 329, 1, 329, 1, 329, 3, 329, 3610, 8, 329, 1, 329, 1, 329, 1, 330, 1, 330, 1, 330, 1, 330, 1, 330, 1, 330, 1, 330, 3, 330, 3621, 8, 330, 3, 330, 3623, 8, 330, 1, 331, 1, 331, 1, 332, 1, 332, 1, 333, 1, 333, 3, 333, 3631, 8, 333, 3, 333, 3633, 8, 333, 1, 333, 1, 333, 5, 333, 3637, 8, 333, 10, 333, 12, 333, 3640, 9, 333, 1, 333, 1, 333, 1, 334, 1, 334, 1, 335, 1, 335, 1, 335, 1, 335, 1, 335, 3, 335, 3651, 8, 335, 1, 335, 1, 335, 1, 335, 1, 335, 1, 335, 3, 335, 3658, 8, 335, 1, 336, 1, 336, 1, 336, 1, 336, 1, 336, 1, 336, 1, 336, 1, 337, 3, 337, 3668, 8, 337, 1, 338, 1, 338, 1, 338, 3, 338, 3673, 8, 338, 1, 338, 1, 338, 1, 339, 1, 339, 1, 339, 1, 339, 1, 340, 1, 340, 1, 340, 1, 340, 1, 341, 1, 341, 1, 341, 1, 342, 1, 342, 3, 342, 3690, 8, 342, 3, 342, 3692, 8, 342, 1, 342, 1, 342, 1, 342, 1, 342, 1, 342, 1, 342, 1, 342, 1, 343, 1, 343, 1, 343, 1, 343, 1, 343, 1, 343, 1, 344, 1, 344, 3, 344, 3709, 8, 344, 1, 344, 1, 344, 5, 344, 3713, 8, 344, 10, 344, 12, 344, 3716, 9, 344, 1, 344, 3, 344, 3719, 8, 344, 1, 345, 1, 345, 3, 345, 3723, 8, 345, 1, 345, 1, 345, 5, 345, 3727, 8, 345, 10, 345, 12, 345, 3730, 9, 345, 1, 345, 1, 345, 1, 345, 5, 345, 3735, 8, 345, 10, 345, 12, 345, 3738, 9, 345, 1, 345, 1, 345, 3, 345, 3742, 8, 345, 1, 346, 1, 346, 1, 346, 1, 346, 1, 347, 1, 347, 1, 347, 1, 347, 1, 348, 1, 348, 1, 348, 1, 348, 1, 349, 1, 349, 1, 349, 1, 349, 3, 349, 3760, 8, 349, 1, 349, 1, 349, 1, 350, 1, 350, 1, 350, 1, 350, 1, 350, 1, 350, 1, 350, 3, 350, 3771, 8, 350, 1, 351, 1, 351, 1, 351, 1, 352, 1, 352, 1, 352, 1, 353, 1, 353, 1, 353, 1, 354, 1, 354, 1, 354, 1, 355, 1, 355, 1, 355, 1, 356, 1, 356, 1, 356, 1, 357, 1, 357, 1, 357, 1, 357, 1, 357, 1, 358, 1, 358, 3, 358, 3798, 8, 358, 1, 358, 1, 358, 5, 358, 3802, 8, 358, 10, 358, 12, 358, 3805, 9, 358, 1, 358, 3, 358, 3808, 8, 358, 1, 359, 1, 359, 1, 359, 1, 359, 3, 359, 3814, 8, 359, 1, 359, 1, 359, 3, 359, 3818, 8, 359, 3, 359, 3820, 8, 359, 1, 359, 3, 359, 3823, 8, 359, 1, 359, 1, 359, 1, 360, 1, 360, 3, 360, 3829, 8, 360, 1, 360, 3, 360, 3832, 8, 360, 1, 360, 1, 360, 1, 360, 1, 360, 1, 360, 3, 360, 3839, 8, 360, 1, 360, 3, 360, 3842, 8, 360, 1, 360, 3, 360, 3845, 8, 360, 1, 360, 1, 360, 1, 360, 1, 360, 1, 361, 1, 361, 1, 361, 1, 361, 1, 361, 3, 361, 3856, 8, 361, 1, 361, 3, 361, 3859, 8, 361, 1, 361, 3, 361, 3862, 8, 361, 1, 361, 1, 361, 1, 361, 3, 361, 3867, 8, 361, 1, 361, 3, 361, 3870, 8, 361, 1, 361, 1, 361, 3, 361, 3874, 8, 361, 3, 361, 3876, 8, 361, 1, 361, 1, 361, 1, 361, 1, 361, 1, 362, 1, 362, 1, 362, 1, 363, 1, 363, 1, 364, 1, 364, 1, 364, 1, 365, 1, 365, 1, 365, 1, 366, 1, 366, 1, 366, 1, 366, 1, 366, 3, 366, 3898, 8, 366, 1, 367, 1, 367, 1, 367, 5, 367, 3903, 8, 367, 10, 367, 12, 367, 3906, 9, 367, 1, 367, 3, 367, 3909, 8, 367, 1, 368, 1, 368, 1, 368, 5, 368, 3914, 8, 368, 10, 368, 12, 368, 3917, 9, 368, 1, 368, 3, 368, 3920, 8, 368, 1, 369, 1, 369, 1, 369, 5, 369, 3925, 8, 369, 10, 369, 12, 369, 3928, 9, 369, 1, 369, 3, 369, 3931, 8, 369, 1, 370, 1, 370, 1, 370, 5, 370, 3936, 8, 370, 10, 370, 12, 370, 3939, 9, 370, 1, 370, 3, 370, 3942, 8, 370, 1, 371, 1, 371, 1, 372, 1, 372, 1, 372, 1, 373, 1, 373, 1, 374, 1, 374, 1, 374, 1, 374, 1, 374, 1, 374, 1, 375, 1, 375, 1, 375, 1, 375, 1, 375, 1, 376, 1, 376, 1, 376, 1, 376, 1, 376, 3, 376, 3967, 8, 376, 1, 377, 5, 377, 3970, 8, 377, 10, 377, 12, 377, 3973, 9, 377, 1, 377, 3, 377, 3976, 8, 377, 1, 378, 1, 378, 3, 378, 3980, 8, 378, 1, 379, 1, 379, 1, 379, 1, 379, 1, 380, 1, 380, 1, 380, 1, 380, 1, 380, 1, 380, 1, 381, 1, 381, 1, 381, 1, 381, 1, 381, 1, 382, 1, 382, 1, 382, 3, 382, 4000, 8, 382, 1, 382, 1, 382, 3, 382, 4004, 8, 382, 1, 382, 1, 382, 3, 382, 4008, 8, 382, 1, 382, 1, 382, 1, 383, 3, 383, 4013, 8, 383, 1, 383, 3, 383, 4016, 8, 383, 1, 384, 1, 384, 1, 384, 1, 384, 1, 384, 1, 384, 1, 385, 1, 385, 1, 385, 5, 385, 4027, 8, 385, 10, 385, 12, 385, 4030, 9, 385, 1, 385, 3, 385, 4033, 8, 385, 1, 386, 1, 386, 1, 386, 1, 386, 1, 386, 1, 386, 1, 386, 3, 386, 4042, 8, 386, 1, 387, 1, 387, 1, 387, 1, 388, 1, 388, 5, 388, 4049, 8, 388, 10, 388, 12, 388, 4052, 9, 388, 1, 388, 1, 388, 1, 389, 1, 389, 1, 389, 1, 389, 1, 390, 1, 390, 1, 391, 1, 391, 3, 391, 4064, 8, 391, 1, 391, 1, 391, 1, 391, 5, 391, 4069, 8, 391, 10, 391, 12, 391, 4072, 9, 391, 1, 391, 1, 391, 4, 391, 4076, 8, 391, 11, 391, 12, 391, 4077, 3, 391, 4080, 8, 391, 1, 391, 1, 391, 1, 391, 3, 391, 4085, 8, 391, 1, 392, 1, 392, 1, 392, 1, 392, 1, 393, 1, 393, 3, 393, 4093, 8, 393, 1, 393, 1, 393, 1, 393, 5, 393, 4098, 8, 393, 10, 393, 12, 393, 4101, 9, 393, 1, 393, 1, 393, 4, 393, 4105, 8, 393, 11, 393, 12, 393, 4106, 3, 393, 4109, 8, 393, 1, 393, 1, 393, 1, 393, 3, 393, 4114, 8, 393, 1, 394, 1, 394, 1, 394, 1, 395, 1, 395, 5, 395, 4121, 8, 395, 10, 395, 12, 395, 4124, 9, 395, 1, 395, 1, 395, 1, 396, 1, 396, 1, 396, 1, 397, 1, 397, 5, 397, 4133, 8, 397, 10, 397, 12, 397, 4136, 9, 397, 1, 397, 1, 397, 1, 398, 1, 398, 1, 398, 1, 398, 1, 398, 1, 399, 1, 399, 1, 399, 3, 399, 4148, 8, 399, 1, 399, 3, 399, 4151, 8, 399, 1, 399, 1, 399, 1, 399, 3, 399, 4156, 8, 399, 1, 399, 1, 399, 3, 399, 4160, 8, 399, 3, 399, 4162, 8, 399, 1, 399, 3, 399, 4165, 8, 399, 1, 399, 1, 399, 3, 399, 4169, 8, 399, 1, 399, 1, 399, 1, 400, 1, 400, 1, 401, 1, 401, 1, 402, 1, 402, 1, 403, 1, 403, 1, 404, 1, 404, 1, 404, 1, 404, 1, 404, 1, 404, 1, 405, 1, 405, 1, 405, 1, 405, 1, 405, 1, 406, 1, 406, 1, 406, 1, 406, 1, 406, 1, 406, 1, 407, 1, 407, 1, 407, 1, 407, 1, 407, 1, 408, 1, 408, 1, 408, 5, 408, 4206, 8, 408, 10, 408, 12, 408, 4209, 9, 408, 1, 408, 3, 408, 4212, 8, 408, 1, 408, 3, 408, 4215, 8, 408, 1, 409, 1, 409, 1, 409, 1, 409, 1, 409, 3, 409, 4222, 8, 409, 1, 410, 1, 410, 1, 410, 1, 410, 1, 411, 5, 411, 4229, 8, 411, 10, 411, 12, 411, 4232, 9, 411, 1, 411, 1, 411, 1, 411, 1, 412, 1, 412, 1, 412, 1, 412, 1, 412, 1, 412, 1, 413, 1, 413, 1, 413, 1, 413, 1, 413, 1, 414, 1, 414, 1, 414, 1, 414, 1, 414, 1, 414, 1, 415, 1, 415, 1, 415, 1, 415, 1, 415, 1, 416, 1, 416, 1, 416, 1, 416, 1, 417, 1, 417, 5, 417, 4265, 8, 417, 10, 417, 12, 417, 4268, 9, 417, 1, 417, 1, 417, 1, 417, 5, 417, 4273, 8, 417, 10, 417, 12, 417, 4276, 9, 417, 1, 417, 1, 417, 4, 417, 4280, 8, 417, 11, 417, 12, 417, 4281, 3, 417, 4284, 8, 417, 1, 417, 1, 417, 1, 417, 3, 417, 4289, 8, 417, 1, 418, 1, 418, 1, 418, 1, 418, 1, 418, 1, 418, 1, 418, 1, 419, 1, 419, 1, 419, 1, 419, 1, 419, 1, 419, 1, 420, 1, 420, 1, 420, 1, 420, 3, 420, 4308, 8, 420, 1, 420, 1, 420, 1, 420, 3, 420, 4313, 8, 420, 3, 420, 4315, 8, 420, 1, 420, 3, 420, 4318, 8, 420, 1, 420, 1, 420, 1, 421, 1, 421, 1, 421, 1, 421, 1, 421, 1, 421, 1, 422, 1, 422, 1, 422, 5, 422, 4331, 8, 422, 10, 422, 12, 422, 4334, 9, 422, 1, 422, 3, 422, 4337, 8, 422, 1, 423, 1, 423, 1, 423, 3, 423, 4342, 8, 423, 1, 424, 1, 424, 1, 424, 1, 424, 1, 425, 1, 425, 3, 425, 4350, 8, 425, 1, 425, 1, 425, 1, 425, 5, 425, 4355, 8, 425, 10, 425, 12, 425, 4358, 9, 425, 1, 425, 1, 425, 4, 425, 4362, 8, 425, 11, 425, 12, 425, 4363, 3, 425, 4366, 8, 425, 1, 425, 3, 425, 4369, 8, 425, 1, 426, 1, 426, 1, 426, 3, 426, 4374, 8, 426, 1, 426, 3, 426, 4377, 8, 426, 1, 426, 1, 426, 1, 427, 1, 427, 1, 427, 5, 427, 4384, 8, 427, 10, 427, 12, 427, 4387, 9, 427, 1, 427, 3, 427, 4390, 8, 427, 1, 428, 1, 428, 1, 428, 1, 428, 3, 428, 4396, 8, 428, 1, 429, 1, 429, 1, 429, 3, 429, 4401, 8, 429, 1, 429, 1, 429, 1, 430, 1, 430, 1, 431, 1, 431, 1, 432, 1, 432, 1, 432, 1, 432, 1, 432, 1, 432, 1, 433, 1, 433, 1, 433, 1, 433, 1, 433, 1, 434, 1, 434, 1, 434, 1, 434, 1, 434, 1, 435, 1, 435, 1, 435, 1, 435, 1, 436, 3, 436, 4430, 8, 436, 1, 436, 5, 436, 4433, 8, 436, 10, 436, 12, 436, 4436, 9, 436, 1, 436, 1, 436, 1, 436, 1, 436, 1, 437, 1, 437, 1, 438, 1, 438, 1, 439, 3, 439, 4447, 8, 439, 1, 439, 3, 439, 4450, 8, 439, 1, 439, 1, 439, 3, 439, 4454, 8, 439, 1, 439, 3, 439, 4457, 8, 439, 1, 439, 1, 439, 1, 440, 3, 440, 4462, 8, 440, 1, 440, 4, 440, 4465, 8, 440, 11, 440, 12, 440, 4466, 1, 440, 1, 440, 1, 440, 1, 441, 1, 441, 4, 441, 4474, 8, 441, 11, 441, 12, 441, 4475, 1, 441, 1, 441, 1, 442, 1, 442, 3, 442, 4482, 8, 442, 1, 443, 1, 443, 1, 443, 1, 443, 1, 443, 3, 443, 4489, 8, 443, 1, 444, 3, 444, 4492, 8, 444, 1, 444, 3, 444, 4495, 8, 444, 1, 445, 1, 445, 1, 446, 1, 446, 1, 447, 1, 447, 1, 448, 1, 448, 1, 449, 1, 449, 1, 450, 1, 450, 1, 451, 1, 451, 1, 451, 0, 1, 0, 452, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, 826, 828, 830, 832, 834, 836, 838, 840, 842, 844, 846, 848, 850, 852, 854, 856, 858, 860, 862, 864, 866, 868, 870, 872, 874, 876, 878, 880, 882, 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, 0, 26, 4, 0, 107, 107, 199, 199, 201, 201, 217, 217, 2, 0, 191, 191, 210, 210, 3, 0, 174, 174, 177, 178, 187, 187, 4, 0, 186, 186, 189, 189, 206, 206, 208, 208, 2, 0, 199, 199, 201, 201, 3, 0, 194, 194, 198, 198, 203, 203, 2, 0, 179, 179, 213, 213, 3, 0, 76, 76, 90, 90, 210, 210, 2, 0, 64, 64, 156, 156, 14, 0, 20, 20, 42, 42, 65, 65, 75, 75, 84, 84, 93, 93, 95, 95, 97, 97, 101, 101, 103, 103, 121, 121, 143, 143, 157, 157, 163, 163, 1, 0, 122, 124, 2, 0, 139, 139, 185, 185, 2, 0, 34, 34, 217, 217, 2, 0, 31, 31, 120, 120, 2, 0, 39, 39, 163, 163, 3, 0, 80, 80, 83, 83, 114, 114, 2, 0, 148, 148, 185, 185, 2, 0, 128, 128, 175, 175, 2, 0, 42, 42, 188, 188, 2, 0, 125, 125, 176, 176, 2, 0, 184, 184, 207, 207, 2, 0, 102, 102, 210, 210, 2, 0, 2, 2, 165, 165, 2, 0, 137, 137, 153, 153, 2, 0, 6, 6, 18, 18, 2, 0, 17, 17, 132, 132, 4801, 0, 919, 1, 0, 0, 0, 2, 1005, 1, 0, 0, 0, 4, 1007, 1, 0, 0, 0, 6, 1036, 1, 0, 0, 0, 8, 1041, 1, 0, 0, 0, 10, 1043, 1, 0, 0, 0, 12, 1045, 1, 0, 0, 0, 14, 1049, 1, 0, 0, 0, 16, 1053, 1, 0, 0, 0, 18, 1060, 1, 0, 0, 0, 20, 1068, 1, 0, 0, 0, 22, 1076, 1, 0, 0, 0, 24, 1085, 1, 0, 0, 0, 26, 1087, 1, 0, 0, 0, 28, 1089, 1, 0, 0, 0, 30, 1091, 1, 0, 0, 0, 32, 1093, 1, 0, 0, 0, 34, 1095, 1, 0, 0, 0, 36, 1097, 1, 0, 0, 0, 38, 1099, 1, 0, 0, 0, 40, 1104, 1, 0, 0, 0, 42, 1106, 1, 0, 0, 0, 44, 1118, 1, 0, 0, 0, 46, 1137, 1, 0, 0, 0, 48, 1141, 1, 0, 0, 0, 50, 1145, 1, 0, 0, 0, 52, 1189, 1, 0, 0, 0, 54, 1191, 1, 0, 0, 0, 56, 1193, 1, 0, 0, 0, 58, 1199, 1, 0, 0, 0, 60, 1216, 1, 0, 0, 0, 62, 1224, 1, 0, 0, 0, 64, 1238, 1, 0, 0, 0, 66, 1247, 1, 0, 0, 0, 68, 1255, 1, 0, 0, 0, 70, 1261, 1, 0, 0, 0, 72, 1274, 1, 0, 0, 0, 74, 1279, 1, 0, 0, 0, 76, 1282, 1, 0, 0, 0, 78, 1284, 1, 0, 0, 0, 80, 1288, 1, 0, 0, 0, 82, 1290, 1, 0, 0, 0, 84, 1293, 1, 0, 0, 0, 86, 1296, 1, 0, 0, 0, 88, 1313, 1, 0, 0, 0, 90, 1326, 1, 0, 0, 0, 92, 1337, 1, 0, 0, 0, 94, 1339, 1, 0, 0, 0, 96, 1352, 1, 0, 0, 0, 98, 1366, 1, 0, 0, 0, 100, 1368, 1, 0, 0, 0, 102, 1374, 1, 0, 0, 0, 104, 1402, 1, 0, 0, 0, 106, 1414, 1, 0, 0, 0, 108, 1416, 1, 0, 0, 0, 110, 1422, 1, 0, 0, 0, 112, 1431, 1, 0, 0, 0, 114, 1451, 1, 0, 0, 0, 116, 1460, 1, 0, 0, 0, 118, 1467, 1, 0, 0, 0, 120, 1469, 1, 0, 0, 0, 122, 1479, 1, 0, 0, 0, 124, 1488, 1, 0, 0, 0, 126, 1497, 1, 0, 0, 0, 128, 1515, 1, 0, 0, 0, 130, 1521, 1, 0, 0, 0, 132, 1527, 1, 0, 0, 0, 134, 1535, 1, 0, 0, 0, 136, 1537, 1, 0, 0, 0, 138, 1545, 1, 0, 0, 0, 140, 1557, 1, 0, 0, 0, 142, 1579, 1, 0, 0, 0, 144, 1591, 1, 0, 0, 0, 146, 1613, 1, 0, 0, 0, 148, 1621, 1, 0, 0, 0, 150, 1629, 1, 0, 0, 0, 152, 1637, 1, 0, 0, 0, 154, 1647, 1, 0, 0, 0, 156, 1649, 1, 0, 0, 0, 158, 1653, 1, 0, 0, 0, 160, 1656, 1, 0, 0, 0, 162, 1662, 1, 0, 0, 0, 164, 1680, 1, 0, 0, 0, 166, 1693, 1, 0, 0, 0, 168, 1701, 1, 0, 0, 0, 170, 1720, 1, 0, 0, 0, 172, 1728, 1, 0, 0, 0, 174, 1733, 1, 0, 0, 0, 176, 1751, 1, 0, 0, 0, 178, 1759, 1, 0, 0, 0, 180, 1768, 1, 0, 0, 0, 182, 1770, 1, 0, 0, 0, 184, 1773, 1, 0, 0, 0, 186, 1797, 1, 0, 0, 0, 188, 1803, 1, 0, 0, 0, 190, 1805, 1, 0, 0, 0, 192, 1814, 1, 0, 0, 0, 194, 1818, 1, 0, 0, 0, 196, 1849, 1, 0, 0, 0, 198, 1872, 1, 0, 0, 0, 200, 1879, 1, 0, 0, 0, 202, 1881, 1, 0, 0, 0, 204, 1894, 1, 0, 0, 0, 206, 1898, 1, 0, 0, 0, 208, 1906, 1, 0, 0, 0, 210, 1909, 1, 0, 0, 0, 212, 1912, 1, 0, 0, 0, 214, 1915, 1, 0, 0, 0, 216, 1923, 1, 0, 0, 0, 218, 1944, 1, 0, 0, 0, 220, 1946, 1, 0, 0, 0, 222, 1958, 1, 0, 0, 0, 224, 1966, 1, 0, 0, 0, 226, 1974, 1, 0, 0, 0, 228, 1982, 1, 0, 0, 0, 230, 1994, 1, 0, 0, 0, 232, 2002, 1, 0, 0, 0, 234, 2014, 1, 0, 0, 0, 236, 2036, 1, 0, 0, 0, 238, 2044, 1, 0, 0, 0, 240, 2056, 1, 0, 0, 0, 242, 2058, 1, 0, 0, 0, 244, 2063, 1, 0, 0, 0, 246, 2068, 1, 0, 0, 0, 248, 2073, 1, 0, 0, 0, 250, 2078, 1, 0, 0, 0, 252, 2084, 1, 0, 0, 0, 254, 2099, 1, 0, 0, 0, 256, 2109, 1, 0, 0, 0, 258, 2116, 1, 0, 0, 0, 260, 2131, 1, 0, 0, 0, 262, 2134, 1, 0, 0, 0, 264, 2143, 1, 0, 0, 0, 266, 2145, 1, 0, 0, 0, 268, 2147, 1, 0, 0, 0, 270, 2172, 1, 0, 0, 0, 272, 2174, 1, 0, 0, 0, 274, 2199, 1, 0, 0, 0, 276, 2201, 1, 0, 0, 0, 278, 2206, 1, 0, 0, 0, 280, 2214, 1, 0, 0, 0, 282, 2224, 1, 0, 0, 0, 284, 2231, 1, 0, 0, 0, 286, 2237, 1, 0, 0, 0, 288, 2241, 1, 0, 0, 0, 290, 2244, 1, 0, 0, 0, 292, 2252, 1, 0, 0, 0, 294, 2257, 1, 0, 0, 0, 296, 2265, 1, 0, 0, 0, 298, 2276, 1, 0, 0, 0, 300, 2284, 1, 0, 0, 0, 302, 2289, 1, 0, 0, 0, 304, 2294, 1, 0, 0, 0, 306, 2339, 1, 0, 0, 0, 308, 2341, 1, 0, 0, 0, 310, 2362, 1, 0, 0, 0, 312, 2384, 1, 0, 0, 0, 314, 2386, 1, 0, 0, 0, 316, 2388, 1, 0, 0, 0, 318, 2396, 1, 0, 0, 0, 320, 2404, 1, 0, 0, 0, 322, 2410, 1, 0, 0, 0, 324, 2412, 1, 0, 0, 0, 326, 2419, 1, 0, 0, 0, 328, 2426, 1, 0, 0, 0, 330, 2428, 1, 0, 0, 0, 332, 2430, 1, 0, 0, 0, 334, 2441, 1, 0, 0, 0, 336, 2443, 1, 0, 0, 0, 338, 2452, 1, 0, 0, 0, 340, 2458, 1, 0, 0, 0, 342, 2460, 1, 0, 0, 0, 344, 2465, 1, 0, 0, 0, 346, 2491, 1, 0, 0, 0, 348, 2515, 1, 0, 0, 0, 350, 2521, 1, 0, 0, 0, 352, 2523, 1, 0, 0, 0, 354, 2526, 1, 0, 0, 0, 356, 2543, 1, 0, 0, 0, 358, 2550, 1, 0, 0, 0, 360, 2562, 1, 0, 0, 0, 362, 2575, 1, 0, 0, 0, 364, 2577, 1, 0, 0, 0, 366, 2586, 1, 0, 0, 0, 368, 2605, 1, 0, 0, 0, 370, 2611, 1, 0, 0, 0, 372, 2613, 1, 0, 0, 0, 374, 2648, 1, 0, 0, 0, 376, 2652, 1, 0, 0, 0, 378, 2654, 1, 0, 0, 0, 380, 2656, 1, 0, 0, 0, 382, 2659, 1, 0, 0, 0, 384, 2667, 1, 0, 0, 0, 386, 2671, 1, 0, 0, 0, 388, 2685, 1, 0, 0, 0, 390, 2703, 1, 0, 0, 0, 392, 2723, 1, 0, 0, 0, 394, 2725, 1, 0, 0, 0, 396, 2728, 1, 0, 0, 0, 398, 2732, 1, 0, 0, 0, 400, 2735, 1, 0, 0, 0, 402, 2738, 1, 0, 0, 0, 404, 2742, 1, 0, 0, 0, 406, 2753, 1, 0, 0, 0, 408, 2757, 1, 0, 0, 0, 410, 2760, 1, 0, 0, 0, 412, 2764, 1, 0, 0, 0, 414, 2766, 1, 0, 0, 0, 416, 2774, 1, 0, 0, 0, 418, 2783, 1, 0, 0, 0, 420, 2786, 1, 0, 0, 0, 422, 2790, 1, 0, 0, 0, 424, 2792, 1, 0, 0, 0, 426, 2797, 1, 0, 0, 0, 428, 2802, 1, 0, 0, 0, 430, 2806, 1, 0, 0, 0, 432, 2823, 1, 0, 0, 0, 434, 2825, 1, 0, 0, 0, 436, 2839, 1, 0, 0, 0, 438, 2856, 1, 0, 0, 0, 440, 2874, 1, 0, 0, 0, 442, 2897, 1, 0, 0, 0, 444, 2899, 1, 0, 0, 0, 446, 2908, 1, 0, 0, 0, 448, 2913, 1, 0, 0, 0, 450, 2920, 1, 0, 0, 0, 452, 2938, 1, 0, 0, 0, 454, 2943, 1, 0, 0, 0, 456, 2950, 1, 0, 0, 0, 458, 2954, 1, 0, 0, 0, 460, 2959, 1, 0, 0, 0, 462, 2971, 1, 0, 0, 0, 464, 2977, 1, 0, 0, 0, 466, 2990, 1, 0, 0, 0, 468, 2992, 1, 0, 0, 0, 470, 3005, 1, 0, 0, 0, 472, 3009, 1, 0, 0, 0, 474, 3019, 1, 0, 0, 0, 476, 3032, 1, 0, 0, 0, 478, 3034, 1, 0, 0, 0, 480, 3048, 1, 0, 0, 0, 482, 3051, 1, 0, 0, 0, 484, 3053, 1, 0, 0, 0, 486, 3056, 1, 0, 0, 0, 488, 3058, 1, 0, 0, 0, 490, 3063, 1, 0, 0, 0, 492, 3067, 1, 0, 0, 0, 494, 3072, 1, 0, 0, 0, 496, 3076, 1, 0, 0, 0, 498, 3082, 1, 0, 0, 0, 500, 3084, 1, 0, 0, 0, 502, 3086, 1, 0, 0, 0, 504, 3090, 1, 0, 0, 0, 506, 3093, 1, 0, 0, 0, 508, 3098, 1, 0, 0, 0, 510, 3118, 1, 0, 0, 0, 512, 3120, 1, 0, 0, 0, 514, 3124, 1, 0, 0, 0, 516, 3137, 1, 0, 0, 0, 518, 3150, 1, 0, 0, 0, 520, 3163, 1, 0, 0, 0, 522, 3178, 1, 0, 0, 0, 524, 3189, 1, 0, 0, 0, 526, 3191, 1, 0, 0, 0, 528, 3199, 1, 0, 0, 0, 530, 3201, 1, 0, 0, 0, 532, 3208, 1, 0, 0, 0, 534, 3210, 1, 0, 0, 0, 536, 3213, 1, 0, 0, 0, 538, 3229, 1, 0, 0, 0, 540, 3233, 1, 0, 0, 0, 542, 3235, 1, 0, 0, 0, 544, 3239, 1, 0, 0, 0, 546, 3252, 1, 0, 0, 0, 548, 3255, 1, 0, 0, 0, 550, 3264, 1, 0, 0, 0, 552, 3269, 1, 0, 0, 0, 554, 3283, 1, 0, 0, 0, 556, 3285, 1, 0, 0, 0, 558, 3290, 1, 0, 0, 0, 560, 3316, 1, 0, 0, 0, 562, 3318, 1, 0, 0, 0, 564, 3320, 1, 0, 0, 0, 566, 3322, 1, 0, 0, 0, 568, 3327, 1, 0, 0, 0, 570, 3333, 1, 0, 0, 0, 572, 3335, 1, 0, 0, 0, 574, 3337, 1, 0, 0, 0, 576, 3352, 1, 0, 0, 0, 578, 3373, 1, 0, 0, 0, 580, 3384, 1, 0, 0, 0, 582, 3388, 1, 0, 0, 0, 584, 3390, 1, 0, 0, 0, 586, 3395, 1, 0, 0, 0, 588, 3398, 1, 0, 0, 0, 590, 3401, 1, 0, 0, 0, 592, 3404, 1, 0, 0, 0, 594, 3410, 1, 0, 0, 0, 596, 3415, 1, 0, 0, 0, 598, 3428, 1, 0, 0, 0, 600, 3441, 1, 0, 0, 0, 602, 3443, 1, 0, 0, 0, 604, 3447, 1, 0, 0, 0, 606, 3455, 1, 0, 0, 0, 608, 3457, 1, 0, 0, 0, 610, 3470, 1, 0, 0, 0, 612, 3477, 1, 0, 0, 0, 614, 3484, 1, 0, 0, 0, 616, 3491, 1, 0, 0, 0, 618, 3498, 1, 0, 0, 0, 620, 3503, 1, 0, 0, 0, 622, 3508, 1, 0, 0, 0, 624, 3513, 1, 0, 0, 0, 626, 3523, 1, 0, 0, 0, 628, 3525, 1, 0, 0, 0, 630, 3527, 1, 0, 0, 0, 632, 3533, 1, 0, 0, 0, 634, 3535, 1, 0, 0, 0, 636, 3554, 1, 0, 0, 0, 638, 3571, 1, 0, 0, 0, 640, 3573, 1, 0, 0, 0, 642, 3575, 1, 0, 0, 0, 644, 3577, 1, 0, 0, 0, 646, 3579, 1, 0, 0, 0, 648, 3581, 1, 0, 0, 0, 650, 3586, 1, 0, 0, 0, 652, 3594, 1, 0, 0, 0, 654, 3599, 1, 0, 0, 0, 656, 3601, 1, 0, 0, 0, 658, 3603, 1, 0, 0, 0, 660, 3613, 1, 0, 0, 0, 662, 3624, 1, 0, 0, 0, 664, 3626, 1, 0, 0, 0, 666, 3632, 1, 0, 0, 0, 668, 3643, 1, 0, 0, 0, 670, 3645, 1, 0, 0, 0, 672, 3659, 1, 0, 0, 0, 674, 3667, 1, 0, 0, 0, 676, 3672, 1, 0, 0, 0, 678, 3676, 1, 0, 0, 0, 680, 3680, 1, 0, 0, 0, 682, 3684, 1, 0, 0, 0, 684, 3691, 1, 0, 0, 0, 686, 3700, 1, 0, 0, 0, 688, 3718, 1, 0, 0, 0, 690, 3741, 1, 0, 0, 0, 692, 3743, 1, 0, 0, 0, 694, 3747, 1, 0, 0, 0, 696, 3751, 1, 0, 0, 0, 698, 3755, 1, 0, 0, 0, 700, 3770, 1, 0, 0, 0, 702, 3772, 1, 0, 0, 0, 704, 3775, 1, 0, 0, 0, 706, 3778, 1, 0, 0, 0, 708, 3781, 1, 0, 0, 0, 710, 3784, 1, 0, 0, 0, 712, 3787, 1, 0, 0, 0, 714, 3790, 1, 0, 0, 0, 716, 3807, 1, 0, 0, 0, 718, 3809, 1, 0, 0, 0, 720, 3826, 1, 0, 0, 0, 722, 3850, 1, 0, 0, 0, 724, 3881, 1, 0, 0, 0, 726, 3884, 1, 0, 0, 0, 728, 3886, 1, 0, 0, 0, 730, 3889, 1, 0, 0, 0, 732, 3897, 1, 0, 0, 0, 734, 3899, 1, 0, 0, 0, 736, 3910, 1, 0, 0, 0, 738, 3921, 1, 0, 0, 0, 740, 3932, 1, 0, 0, 0, 742, 3943, 1, 0, 0, 0, 744, 3945, 1, 0, 0, 0, 746, 3948, 1, 0, 0, 0, 748, 3950, 1, 0, 0, 0, 750, 3956, 1, 0, 0, 0, 752, 3966, 1, 0, 0, 0, 754, 3971, 1, 0, 0, 0, 756, 3979, 1, 0, 0, 0, 758, 3981, 1, 0, 0, 0, 760, 3985, 1, 0, 0, 0, 762, 3991, 1, 0, 0, 0, 764, 3996, 1, 0, 0, 0, 766, 4012, 1, 0, 0, 0, 768, 4017, 1, 0, 0, 0, 770, 4032, 1, 0, 0, 0, 772, 4041, 1, 0, 0, 0, 774, 4043, 1, 0, 0, 0, 776, 4046, 1, 0, 0, 0, 778, 4055, 1, 0, 0, 0, 780, 4059, 1, 0, 0, 0, 782, 4084, 1, 0, 0, 0, 784, 4086, 1, 0, 0, 0, 786, 4113, 1, 0, 0, 0, 788, 4115, 1, 0, 0, 0, 790, 4118, 1, 0, 0, 0, 792, 4127, 1, 0, 0, 0, 794, 4130, 1, 0, 0, 0, 796, 4139, 1, 0, 0, 0, 798, 4144, 1, 0, 0, 0, 800, 4172, 1, 0, 0, 0, 802, 4174, 1, 0, 0, 0, 804, 4176, 1, 0, 0, 0, 806, 4178, 1, 0, 0, 0, 808, 4180, 1, 0, 0, 0, 810, 4186, 1, 0, 0, 0, 812, 4191, 1, 0, 0, 0, 814, 4197, 1, 0, 0, 0, 816, 4214, 1, 0, 0, 0, 818, 4221, 1, 0, 0, 0, 820, 4223, 1, 0, 0, 0, 822, 4230, 1, 0, 0, 0, 824, 4236, 1, 0, 0, 0, 826, 4242, 1, 0, 0, 0, 828, 4247, 1, 0, 0, 0, 830, 4253, 1, 0, 0, 0, 832, 4258, 1, 0, 0, 0, 834, 4288, 1, 0, 0, 0, 836, 4290, 1, 0, 0, 0, 838, 4297, 1, 0, 0, 0, 840, 4303, 1, 0, 0, 0, 842, 4321, 1, 0, 0, 0, 844, 4336, 1, 0, 0, 0, 846, 4341, 1, 0, 0, 0, 848, 4343, 1, 0, 0, 0, 850, 4368, 1, 0, 0, 0, 852, 4370, 1, 0, 0, 0, 854, 4389, 1, 0, 0, 0, 856, 4395, 1, 0, 0, 0, 858, 4397, 1, 0, 0, 0, 860, 4404, 1, 0, 0, 0, 862, 4406, 1, 0, 0, 0, 864, 4408, 1, 0, 0, 0, 866, 4414, 1, 0, 0, 0, 868, 4419, 1, 0, 0, 0, 870, 4424, 1, 0, 0, 0, 872, 4429, 1, 0, 0, 0, 874, 4441, 1, 0, 0, 0, 876, 4443, 1, 0, 0, 0, 878, 4446, 1, 0, 0, 0, 880, 4461, 1, 0, 0, 0, 882, 4471, 1, 0, 0, 0, 884, 4481, 1, 0, 0, 0, 886, 4483, 1, 0, 0, 0, 888, 4491, 1, 0, 0, 0, 890, 4496, 1, 0, 0, 0, 892, 4498, 1, 0, 0, 0, 894, 4500, 1, 0, 0, 0, 896, 4502, 1, 0, 0, 0, 898, 4504, 1, 0, 0, 0, 900, 4506, 1, 0, 0, 0, 902, 4508, 1, 0, 0, 0, 904, 905, 6, 0, -1, 0, 905, 906, 5, 77, 0, 0, 906, 907, 3, 0, 0, 0, 907, 908, 5, 209, 0, 0, 908, 909, 3, 0, 0, 0, 909, 910, 5, 55, 0, 0, 910, 911, 3, 0, 0, 28, 911, 920, 1, 0, 0, 0, 912, 913, 7, 0, 0, 0, 913, 920, 3, 0, 0, 14, 914, 915, 7, 1, 0, 0, 915, 920, 3, 2, 1, 0, 916, 917, 5, 8, 0, 0, 917, 920, 3, 2, 1, 0, 918, 920, 3, 6, 3, 0, 919, 904, 1, 0, 0, 0, 919, 912, 1, 0, 0, 0, 919, 914, 1, 0, 0, 0, 919, 916, 1, 0, 0, 0, 919, 918, 1, 0, 0, 0, 920, 1002, 1, 0, 0, 0, 921, 922, 10, 27, 0, 0, 922, 923, 5, 190, 0, 0, 923, 1001, 3, 0, 0, 28, 924, 925, 10, 26, 0, 0, 925, 926, 5, 78, 0, 0, 926, 1001, 3, 0, 0, 27, 927, 928, 10, 25, 0, 0, 928, 929, 5, 112, 0, 0, 929, 1001, 3, 0, 0, 26, 930, 931, 10, 24, 0, 0, 931, 932, 5, 12, 0, 0, 932, 1001, 3, 0, 0, 25, 933, 934, 10, 23, 0, 0, 934, 935, 5, 173, 0, 0, 935, 1001, 3, 0, 0, 24, 936, 937, 10, 22, 0, 0, 937, 938, 5, 215, 0, 0, 938, 1001, 3, 0, 0, 23, 939, 940, 10, 21, 0, 0, 940, 941, 5, 195, 0, 0, 941, 1001, 3, 0, 0, 22, 942, 943, 10, 20, 0, 0, 943, 944, 7, 2, 0, 0, 944, 1001, 3, 0, 0, 21, 945, 946, 10, 19, 0, 0, 946, 947, 7, 3, 0, 0, 947, 1001, 3, 0, 0, 20, 948, 949, 10, 18, 0, 0, 949, 950, 5, 181, 0, 0, 950, 1001, 3, 0, 0, 19, 951, 952, 10, 17, 0, 0, 952, 953, 7, 4, 0, 0, 953, 1001, 3, 0, 0, 18, 954, 955, 10, 16, 0, 0, 955, 956, 7, 5, 0, 0, 956, 1001, 3, 0, 0, 17, 957, 958, 10, 15, 0, 0, 958, 959, 7, 6, 0, 0, 959, 1001, 3, 0, 0, 15, 960, 961, 10, 12, 0, 0, 961, 962, 7, 7, 0, 0, 962, 1001, 3, 2, 1, 0, 963, 964, 10, 11, 0, 0, 964, 965, 5, 13, 0, 0, 965, 1001, 3, 2, 1, 0, 966, 967, 10, 10, 0, 0, 967, 968, 5, 191, 0, 0, 968, 1001, 3, 2, 1, 0, 969, 970, 10, 9, 0, 0, 970, 971, 5, 100, 0, 0, 971, 1001, 3, 2, 1, 0, 972, 973, 10, 8, 0, 0, 973, 975, 5, 211, 0, 0, 974, 976, 3, 4, 2, 0, 975, 974, 1, 0, 0, 0, 975, 976, 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 1001, 5, 212, 0, 0, 978, 979, 10, 7, 0, 0, 979, 980, 5, 192, 0, 0, 980, 982, 5, 196, 0, 0, 981, 983, 3, 4, 2, 0, 982, 981, 1, 0, 0, 0, 982, 983, 1, 0, 0, 0, 983, 984, 1, 0, 0, 0, 984, 1001, 5, 197, 0, 0, 985, 986, 10, 6, 0, 0, 986, 1001, 3, 16, 8, 0, 987, 988, 10, 5, 0, 0, 988, 989, 5, 202, 0, 0, 989, 1001, 3, 88, 44, 0, 990, 991, 10, 4, 0, 0, 991, 992, 5, 182, 0, 0, 992, 1001, 3, 14, 7, 0, 993, 994, 10, 3, 0, 0, 994, 995, 5, 180, 0, 0, 995, 998, 3, 88, 44, 0, 996, 999, 3, 14, 7, 0, 997, 999, 3, 16, 8, 0, 998, 996, 1, 0, 0, 0, 998, 997, 1, 0, 0, 0, 999, 1001, 1, 0, 0, 0, 1000, 921, 1, 0, 0, 0, 1000, 924, 1, 0, 0, 0, 1000, 927, 1, 0, 0, 0, 1000, 930, 1, 0, 0, 0, 1000, 933, 1, 0, 0, 0, 1000, 936, 1, 0, 0, 0, 1000, 939, 1, 0, 0, 0, 1000, 942, 1, 0, 0, 0, 1000, 945, 1, 0, 0, 0, 1000, 948, 1, 0, 0, 0, 1000, 951, 1, 0, 0, 0, 1000, 954, 1, 0, 0, 0, 1000, 957, 1, 0, 0, 0, 1000, 960, 1, 0, 0, 0, 1000, 963, 1, 0, 0, 0, 1000, 966, 1, 0, 0, 0, 1000, 969, 1, 0, 0, 0, 1000, 972, 1, 0, 0, 0, 1000, 978, 1, 0, 0, 0, 1000, 985, 1, 0, 0, 0, 1000, 987, 1, 0, 0, 0, 1000, 990, 1, 0, 0, 0, 1000, 993, 1, 0, 0, 0, 1001, 1004, 1, 0, 0, 0, 1002, 1000, 1, 0, 0, 0, 1002, 1003, 1, 0, 0, 0, 1003, 1, 1, 0, 0, 0, 1004, 1002, 1, 0, 0, 0, 1005, 1006, 3, 88, 44, 0, 1006, 3, 1, 0, 0, 0, 1007, 1012, 3, 0, 0, 0, 1008, 1009, 5, 200, 0, 0, 1009, 1011, 3, 0, 0, 0, 1010, 1008, 1, 0, 0, 0, 1011, 1014, 1, 0, 0, 0, 1012, 1010, 1, 0, 0, 0, 1012, 1013, 1, 0, 0, 0, 1013, 5, 1, 0, 0, 0, 1014, 1012, 1, 0, 0, 0, 1015, 1037, 3, 8, 4, 0, 1016, 1037, 5, 223, 0, 0, 1017, 1037, 3, 24, 12, 0, 1018, 1022, 3, 88, 44, 0, 1019, 1023, 3, 16, 8, 0, 1020, 1021, 5, 202, 0, 0, 1021, 1023, 5, 102, 0, 0, 1022, 1019, 1, 0, 0, 0, 1022, 1020, 1, 0, 0, 0, 1022, 1023, 1, 0, 0, 0, 1023, 1037, 1, 0, 0, 0, 1024, 1037, 3, 12, 6, 0, 1025, 1037, 3, 14, 7, 0, 1026, 1027, 5, 196, 0, 0, 1027, 1028, 5, 13, 0, 0, 1028, 1029, 3, 2, 1, 0, 1029, 1030, 5, 197, 0, 0, 1030, 1037, 1, 0, 0, 0, 1031, 1033, 5, 196, 0, 0, 1032, 1034, 3, 4, 2, 0, 1033, 1032, 1, 0, 0, 0, 1033, 1034, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1037, 5, 197, 0, 0, 1036, 1015, 1, 0, 0, 0, 1036, 1016, 1, 0, 0, 0, 1036, 1017, 1, 0, 0, 0, 1036, 1018, 1, 0, 0, 0, 1036, 1024, 1, 0, 0, 0, 1036, 1025, 1, 0, 0, 0, 1036, 1026, 1, 0, 0, 0, 1036, 1031, 1, 0, 0, 0, 1037, 7, 1, 0, 0, 0, 1038, 1042, 5, 108, 0, 0, 1039, 1040, 5, 196, 0, 0, 1040, 1042, 5, 197, 0, 0, 1041, 1038, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1042, 9, 1, 0, 0, 0, 1043, 1044, 3, 88, 44, 0, 1044, 11, 1, 0, 0, 0, 1045, 1046, 5, 105, 0, 0, 1046, 1047, 3, 88, 44, 0, 1047, 1048, 3, 16, 8, 0, 1048, 13, 1, 0, 0, 0, 1049, 1050, 5, 214, 0, 0, 1050, 1051, 3, 284, 142, 0, 1051, 1052, 5, 216, 0, 0, 1052, 15, 1, 0, 0, 0, 1053, 1056, 5, 196, 0, 0, 1054, 1057, 3, 18, 9, 0, 1055, 1057, 3, 20, 10, 0, 1056, 1054, 1, 0, 0, 0, 1056, 1055, 1, 0, 0, 0, 1056, 1057, 1, 0, 0, 0, 1057, 1058, 1, 0, 0, 0, 1058, 1059, 5, 197, 0, 0, 1059, 17, 1, 0, 0, 0, 1060, 1065, 3, 0, 0, 0, 1061, 1062, 5, 200, 0, 0, 1062, 1064, 3, 0, 0, 0, 1063, 1061, 1, 0, 0, 0, 1064, 1067, 1, 0, 0, 0, 1065, 1063, 1, 0, 0, 0, 1065, 1066, 1, 0, 0, 0, 1066, 19, 1, 0, 0, 0, 1067, 1065, 1, 0, 0, 0, 1068, 1073, 3, 22, 11, 0, 1069, 1070, 5, 200, 0, 0, 1070, 1072, 3, 22, 11, 0, 1071, 1069, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1071, 1, 0, 0, 0, 1073, 1074, 1, 0, 0, 0, 1074, 21, 1, 0, 0, 0, 1075, 1073, 1, 0, 0, 0, 1076, 1077, 3, 88, 44, 0, 1077, 1078, 5, 207, 0, 0, 1078, 1079, 3, 0, 0, 0, 1079, 23, 1, 0, 0, 0, 1080, 1086, 3, 26, 13, 0, 1081, 1086, 3, 28, 14, 0, 1082, 1086, 3, 30, 15, 0, 1083, 1086, 3, 32, 16, 0, 1084, 1086, 3, 34, 17, 0, 1085, 1080, 1, 0, 0, 0, 1085, 1081, 1, 0, 0, 0, 1085, 1082, 1, 0, 0, 0, 1085, 1083, 1, 0, 0, 0, 1085, 1084, 1, 0, 0, 0, 1086, 25, 1, 0, 0, 0, 1087, 1088, 7, 8, 0, 0, 1088, 27, 1, 0, 0, 0, 1089, 1090, 5, 220, 0, 0, 1090, 29, 1, 0, 0, 0, 1091, 1092, 5, 221, 0, 0, 1092, 31, 1, 0, 0, 0, 1093, 1094, 5, 222, 0, 0, 1094, 33, 1, 0, 0, 0, 1095, 1096, 5, 198, 0, 0, 1096, 35, 1, 0, 0, 0, 1097, 1098, 3, 0, 0, 0, 1098, 37, 1, 0, 0, 0, 1099, 1100, 3, 0, 0, 0, 1100, 39, 1, 0, 0, 0, 1101, 1105, 5, 218, 0, 0, 1102, 1105, 5, 219, 0, 0, 1103, 1105, 3, 42, 21, 0, 1104, 1101, 1, 0, 0, 0, 1104, 1102, 1, 0, 0, 0, 1104, 1103, 1, 0, 0, 0, 1105, 41, 1, 0, 0, 0, 1106, 1107, 7, 9, 0, 0, 1107, 43, 1, 0, 0, 0, 1108, 1109, 5, 206, 0, 0, 1109, 1110, 3, 40, 20, 0, 1110, 1111, 5, 208, 0, 0, 1111, 1112, 3, 40, 20, 0, 1112, 1119, 1, 0, 0, 0, 1113, 1114, 5, 206, 0, 0, 1114, 1115, 3, 40, 20, 0, 1115, 1116, 5, 208, 0, 0, 1116, 1119, 1, 0, 0, 0, 1117, 1119, 3, 40, 20, 0, 1118, 1108, 1, 0, 0, 0, 1118, 1113, 1, 0, 0, 0, 1118, 1117, 1, 0, 0, 0, 1119, 45, 1, 0, 0, 0, 1120, 1138, 5, 205, 0, 0, 1121, 1125, 5, 214, 0, 0, 1122, 1124, 3, 48, 24, 0, 1123, 1122, 1, 0, 0, 0, 1124, 1127, 1, 0, 0, 0, 1125, 1123, 1, 0, 0, 0, 1125, 1126, 1, 0, 0, 0, 1126, 1128, 1, 0, 0, 0, 1127, 1125, 1, 0, 0, 0, 1128, 1138, 5, 216, 0, 0, 1129, 1133, 5, 214, 0, 0, 1130, 1132, 3, 56, 28, 0, 1131, 1130, 1, 0, 0, 0, 1132, 1135, 1, 0, 0, 0, 1133, 1131, 1, 0, 0, 0, 1133, 1134, 1, 0, 0, 0, 1134, 1136, 1, 0, 0, 0, 1135, 1133, 1, 0, 0, 0, 1136, 1138, 5, 216, 0, 0, 1137, 1120, 1, 0, 0, 0, 1137, 1121, 1, 0, 0, 0, 1137, 1129, 1, 0, 0, 0, 1138, 47, 1, 0, 0, 0, 1139, 1142, 3, 50, 25, 0, 1140, 1142, 3, 56, 28, 0, 1141, 1139, 1, 0, 0, 0, 1141, 1140, 1, 0, 0, 0, 1142, 49, 1, 0, 0, 0, 1143, 1146, 3, 104, 52, 0, 1144, 1146, 3, 106, 53, 0, 1145, 1143, 1, 0, 0, 0, 1145, 1144, 1, 0, 0, 0, 1146, 51, 1, 0, 0, 0, 1147, 1149, 3, 338, 169, 0, 1148, 1147, 1, 0, 0, 0, 1149, 1152, 1, 0, 0, 0, 1150, 1148, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1153, 1, 0, 0, 0, 1152, 1150, 1, 0, 0, 0, 1153, 1158, 5, 48, 0, 0, 1154, 1156, 3, 44, 22, 0, 1155, 1154, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1159, 5, 74, 0, 0, 1158, 1155, 1, 0, 0, 0, 1158, 1159, 1, 0, 0, 0, 1159, 1160, 1, 0, 0, 0, 1160, 1165, 3, 88, 44, 0, 1161, 1162, 5, 200, 0, 0, 1162, 1164, 3, 88, 44, 0, 1163, 1161, 1, 0, 0, 0, 1164, 1167, 1, 0, 0, 0, 1165, 1163, 1, 0, 0, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1168, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, 1168, 1169, 5, 154, 0, 0, 1169, 1174, 3, 88, 44, 0, 1170, 1171, 5, 200, 0, 0, 1171, 1173, 3, 88, 44, 0, 1172, 1170, 1, 0, 0, 0, 1173, 1176, 1, 0, 0, 0, 1174, 1172, 1, 0, 0, 0, 1174, 1175, 1, 0, 0, 0, 1175, 1177, 1, 0, 0, 0, 1176, 1174, 1, 0, 0, 0, 1177, 1178, 3, 46, 23, 0, 1178, 1190, 1, 0, 0, 0, 1179, 1181, 3, 338, 169, 0, 1180, 1179, 1, 0, 0, 0, 1181, 1184, 1, 0, 0, 0, 1182, 1180, 1, 0, 0, 0, 1182, 1183, 1, 0, 0, 0, 1183, 1185, 1, 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1185, 1186, 5, 48, 0, 0, 1186, 1187, 3, 366, 183, 0, 1187, 1188, 3, 46, 23, 0, 1188, 1190, 1, 0, 0, 0, 1189, 1150, 1, 0, 0, 0, 1189, 1182, 1, 0, 0, 0, 1190, 53, 1, 0, 0, 0, 1191, 1192, 3, 88, 44, 0, 1192, 55, 1, 0, 0, 0, 1193, 1194, 3, 58, 29, 0, 1194, 57, 1, 0, 0, 0, 1195, 1200, 3, 60, 30, 0, 1196, 1200, 3, 62, 31, 0, 1197, 1200, 3, 64, 32, 0, 1198, 1200, 3, 344, 172, 0, 1199, 1195, 1, 0, 0, 0, 1199, 1196, 1, 0, 0, 0, 1199, 1197, 1, 0, 0, 0, 1199, 1198, 1, 0, 0, 0, 1200, 59, 1, 0, 0, 0, 1201, 1203, 5, 30, 0, 0, 1202, 1204, 3, 44, 22, 0, 1203, 1202, 1, 0, 0, 0, 1203, 1204, 1, 0, 0, 0, 1204, 1214, 1, 0, 0, 0, 1205, 1206, 5, 1, 0, 0, 1206, 1211, 3, 54, 27, 0, 1207, 1208, 5, 200, 0, 0, 1208, 1210, 3, 54, 27, 0, 1209, 1207, 1, 0, 0, 0, 1210, 1213, 1, 0, 0, 0, 1211, 1209, 1, 0, 0, 0, 1211, 1212, 1, 0, 0, 0, 1212, 1215, 1, 0, 0, 0, 1213, 1211, 1, 0, 0, 0, 1214, 1205, 1, 0, 0, 0, 1214, 1215, 1, 0, 0, 0, 1215, 1217, 1, 0, 0, 0, 1216, 1201, 1, 0, 0, 0, 1216, 1217, 1, 0, 0, 0, 1217, 1220, 1, 0, 0, 0, 1218, 1219, 5, 95, 0, 0, 1219, 1221, 5, 220, 0, 0, 1220, 1218, 1, 0, 0, 0, 1220, 1221, 1, 0, 0, 0, 1221, 1222, 1, 0, 0, 0, 1222, 1223, 5, 223, 0, 0, 1223, 61, 1, 0, 0, 0, 1224, 1226, 5, 54, 0, 0, 1225, 1227, 3, 44, 22, 0, 1226, 1225, 1, 0, 0, 0, 1226, 1227, 1, 0, 0, 0, 1227, 1230, 1, 0, 0, 0, 1228, 1229, 5, 95, 0, 0, 1229, 1231, 5, 220, 0, 0, 1230, 1228, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1232, 1, 0, 0, 0, 1232, 1233, 5, 223, 0, 0, 1233, 63, 1, 0, 0, 0, 1234, 1236, 5, 131, 0, 0, 1235, 1237, 3, 44, 22, 0, 1236, 1235, 1, 0, 0, 0, 1236, 1237, 1, 0, 0, 0, 1237, 1239, 1, 0, 0, 0, 1238, 1234, 1, 0, 0, 0, 1238, 1239, 1, 0, 0, 0, 1239, 1240, 1, 0, 0, 0, 1240, 1241, 5, 93, 0, 0, 1241, 1242, 5, 220, 0, 0, 1242, 1243, 5, 223, 0, 0, 1243, 65, 1, 0, 0, 0, 1244, 1246, 3, 370, 185, 0, 1245, 1244, 1, 0, 0, 0, 1246, 1249, 1, 0, 0, 0, 1247, 1245, 1, 0, 0, 0, 1247, 1248, 1, 0, 0, 0, 1248, 1250, 1, 0, 0, 0, 1249, 1247, 1, 0, 0, 0, 1250, 1251, 5, 0, 0, 1, 1251, 67, 1, 0, 0, 0, 1252, 1254, 3, 340, 170, 0, 1253, 1252, 1, 0, 0, 0, 1254, 1257, 1, 0, 0, 0, 1255, 1253, 1, 0, 0, 0, 1255, 1256, 1, 0, 0, 0, 1256, 1258, 1, 0, 0, 0, 1257, 1255, 1, 0, 0, 0, 1258, 1259, 3, 70, 35, 0, 1259, 1260, 3, 72, 36, 0, 1260, 69, 1, 0, 0, 0, 1261, 1263, 5, 104, 0, 0, 1262, 1264, 3, 44, 22, 0, 1263, 1262, 1, 0, 0, 0, 1263, 1264, 1, 0, 0, 0, 1264, 71, 1, 0, 0, 0, 1265, 1275, 5, 205, 0, 0, 1266, 1270, 5, 214, 0, 0, 1267, 1269, 3, 74, 37, 0, 1268, 1267, 1, 0, 0, 0, 1269, 1272, 1, 0, 0, 0, 1270, 1268, 1, 0, 0, 0, 1270, 1271, 1, 0, 0, 0, 1271, 1273, 1, 0, 0, 0, 1272, 1270, 1, 0, 0, 0, 1273, 1275, 5, 216, 0, 0, 1274, 1265, 1, 0, 0, 0, 1274, 1266, 1, 0, 0, 0, 1275, 73, 1, 0, 0, 0, 1276, 1280, 3, 80, 40, 0, 1277, 1280, 3, 86, 43, 0, 1278, 1280, 3, 90, 45, 0, 1279, 1276, 1, 0, 0, 0, 1279, 1277, 1, 0, 0, 0, 1279, 1278, 1, 0, 0, 0, 1280, 75, 1, 0, 0, 0, 1281, 1283, 3, 78, 39, 0, 1282, 1281, 1, 0, 0, 0, 1282, 1283, 1, 0, 0, 0, 1283, 77, 1, 0, 0, 0, 1284, 1285, 7, 10, 0, 0, 1285, 79, 1, 0, 0, 0, 1286, 1289, 3, 82, 41, 0, 1287, 1289, 3, 84, 42, 0, 1288, 1286, 1, 0, 0, 0, 1288, 1287, 1, 0, 0, 0, 1289, 81, 1, 0, 0, 0, 1290, 1291, 3, 76, 38, 0, 1291, 1292, 3, 102, 51, 0, 1292, 83, 1, 0, 0, 0, 1293, 1294, 3, 76, 38, 0, 1294, 1295, 3, 106, 53, 0, 1295, 85, 1, 0, 0, 0, 1296, 1297, 3, 76, 38, 0, 1297, 1302, 5, 7, 0, 0, 1298, 1299, 5, 206, 0, 0, 1299, 1300, 3, 40, 20, 0, 1300, 1301, 5, 208, 0, 0, 1301, 1303, 1, 0, 0, 0, 1302, 1298, 1, 0, 0, 0, 1302, 1303, 1, 0, 0, 0, 1303, 1305, 1, 0, 0, 0, 1304, 1306, 3, 40, 20, 0, 1305, 1304, 1, 0, 0, 0, 1305, 1306, 1, 0, 0, 0, 1306, 1307, 1, 0, 0, 0, 1307, 1308, 5, 71, 0, 0, 1308, 1309, 3, 88, 44, 0, 1309, 1310, 3, 46, 23, 0, 1310, 87, 1, 0, 0, 0, 1311, 1312, 5, 193, 0, 0, 1312, 1314, 5, 183, 0, 0, 1313, 1311, 1, 0, 0, 0, 1313, 1314, 1, 0, 0, 0, 1314, 1320, 1, 0, 0, 0, 1315, 1316, 3, 40, 20, 0, 1316, 1317, 5, 183, 0, 0, 1317, 1319, 1, 0, 0, 0, 1318, 1315, 1, 0, 0, 0, 1319, 1322, 1, 0, 0, 0, 1320, 1318, 1, 0, 0, 0, 1320, 1321, 1, 0, 0, 0, 1321, 1323, 1, 0, 0, 0, 1322, 1320, 1, 0, 0, 0, 1323, 1324, 3, 40, 20, 0, 1324, 89, 1, 0, 0, 0, 1325, 1327, 3, 78, 39, 0, 1326, 1325, 1, 0, 0, 0, 1326, 1327, 1, 0, 0, 0, 1327, 1328, 1, 0, 0, 0, 1328, 1330, 5, 79, 0, 0, 1329, 1331, 5, 8, 0, 0, 1330, 1329, 1, 0, 0, 0, 1330, 1331, 1, 0, 0, 0, 1331, 1332, 1, 0, 0, 0, 1332, 1333, 3, 92, 46, 0, 1333, 1334, 3, 46, 23, 0, 1334, 91, 1, 0, 0, 0, 1335, 1338, 3, 94, 47, 0, 1336, 1338, 3, 96, 48, 0, 1337, 1335, 1, 0, 0, 0, 1337, 1336, 1, 0, 0, 0, 1338, 93, 1, 0, 0, 0, 1339, 1342, 3, 88, 44, 0, 1340, 1341, 5, 183, 0, 0, 1341, 1343, 5, 179, 0, 0, 1342, 1340, 1, 0, 0, 0, 1342, 1343, 1, 0, 0, 0, 1343, 95, 1, 0, 0, 0, 1344, 1345, 3, 88, 44, 0, 1345, 1346, 5, 183, 0, 0, 1346, 1349, 5, 198, 0, 0, 1347, 1348, 5, 183, 0, 0, 1348, 1350, 5, 179, 0, 0, 1349, 1347, 1, 0, 0, 0, 1349, 1350, 1, 0, 0, 0, 1350, 1353, 1, 0, 0, 0, 1351, 1353, 3, 98, 49, 0, 1352, 1344, 1, 0, 0, 0, 1352, 1351, 1, 0, 0, 0, 1353, 97, 1, 0, 0, 0, 1354, 1356, 3, 884, 442, 0, 1355, 1357, 3, 100, 50, 0, 1356, 1355, 1, 0, 0, 0, 1357, 1358, 1, 0, 0, 0, 1358, 1356, 1, 0, 0, 0, 1358, 1359, 1, 0, 0, 0, 1359, 1367, 1, 0, 0, 0, 1360, 1362, 3, 898, 449, 0, 1361, 1363, 3, 100, 50, 0, 1362, 1361, 1, 0, 0, 0, 1363, 1364, 1, 0, 0, 0, 1364, 1362, 1, 0, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, 1367, 1, 0, 0, 0, 1366, 1354, 1, 0, 0, 0, 1366, 1360, 1, 0, 0, 0, 1367, 99, 1, 0, 0, 0, 1368, 1369, 5, 211, 0, 0, 1369, 1370, 3, 0, 0, 0, 1370, 1371, 5, 212, 0, 0, 1371, 101, 1, 0, 0, 0, 1372, 1375, 3, 58, 29, 0, 1373, 1375, 3, 104, 52, 0, 1374, 1372, 1, 0, 0, 0, 1374, 1373, 1, 0, 0, 0, 1375, 103, 1, 0, 0, 0, 1376, 1403, 3, 52, 26, 0, 1377, 1403, 3, 68, 34, 0, 1378, 1403, 3, 108, 54, 0, 1379, 1403, 3, 160, 80, 0, 1380, 1403, 3, 242, 121, 0, 1381, 1403, 3, 244, 122, 0, 1382, 1403, 3, 246, 123, 0, 1383, 1403, 3, 336, 168, 0, 1384, 1403, 3, 248, 124, 0, 1385, 1403, 3, 250, 125, 0, 1386, 1403, 3, 300, 150, 0, 1387, 1403, 3, 276, 138, 0, 1388, 1403, 3, 280, 140, 0, 1389, 1403, 3, 292, 146, 0, 1390, 1403, 3, 322, 161, 0, 1391, 1403, 3, 356, 178, 0, 1392, 1403, 3, 358, 179, 0, 1393, 1403, 3, 132, 66, 0, 1394, 1403, 3, 140, 70, 0, 1395, 1403, 3, 166, 83, 0, 1396, 1403, 3, 144, 72, 0, 1397, 1403, 3, 234, 117, 0, 1398, 1403, 3, 218, 109, 0, 1399, 1403, 3, 222, 111, 0, 1400, 1403, 3, 230, 115, 0, 1401, 1403, 3, 238, 119, 0, 1402, 1376, 1, 0, 0, 0, 1402, 1377, 1, 0, 0, 0, 1402, 1378, 1, 0, 0, 0, 1402, 1379, 1, 0, 0, 0, 1402, 1380, 1, 0, 0, 0, 1402, 1381, 1, 0, 0, 0, 1402, 1382, 1, 0, 0, 0, 1402, 1383, 1, 0, 0, 0, 1402, 1384, 1, 0, 0, 0, 1402, 1385, 1, 0, 0, 0, 1402, 1386, 1, 0, 0, 0, 1402, 1387, 1, 0, 0, 0, 1402, 1388, 1, 0, 0, 0, 1402, 1389, 1, 0, 0, 0, 1402, 1390, 1, 0, 0, 0, 1402, 1391, 1, 0, 0, 0, 1402, 1392, 1, 0, 0, 0, 1402, 1393, 1, 0, 0, 0, 1402, 1394, 1, 0, 0, 0, 1402, 1395, 1, 0, 0, 0, 1402, 1396, 1, 0, 0, 0, 1402, 1397, 1, 0, 0, 0, 1402, 1398, 1, 0, 0, 0, 1402, 1399, 1, 0, 0, 0, 1402, 1400, 1, 0, 0, 0, 1402, 1401, 1, 0, 0, 0, 1403, 105, 1, 0, 0, 0, 1404, 1415, 3, 170, 85, 0, 1405, 1415, 3, 278, 139, 0, 1406, 1415, 3, 290, 145, 0, 1407, 1415, 3, 294, 147, 0, 1408, 1415, 3, 296, 148, 0, 1409, 1415, 3, 252, 126, 0, 1410, 1415, 3, 268, 134, 0, 1411, 1415, 3, 272, 136, 0, 1412, 1415, 3, 302, 151, 0, 1413, 1415, 3, 304, 152, 0, 1414, 1404, 1, 0, 0, 0, 1414, 1405, 1, 0, 0, 0, 1414, 1406, 1, 0, 0, 0, 1414, 1407, 1, 0, 0, 0, 1414, 1408, 1, 0, 0, 0, 1414, 1409, 1, 0, 0, 0, 1414, 1410, 1, 0, 0, 0, 1414, 1411, 1, 0, 0, 0, 1414, 1412, 1, 0, 0, 0, 1414, 1413, 1, 0, 0, 0, 1415, 107, 1, 0, 0, 0, 1416, 1417, 3, 110, 55, 0, 1417, 1418, 5, 157, 0, 0, 1418, 1419, 3, 112, 56, 0, 1419, 1420, 3, 128, 64, 0, 1420, 109, 1, 0, 0, 0, 1421, 1423, 5, 2, 0, 0, 1422, 1421, 1, 0, 0, 0, 1422, 1423, 1, 0, 0, 0, 1423, 1427, 1, 0, 0, 0, 1424, 1426, 3, 340, 170, 0, 1425, 1424, 1, 0, 0, 0, 1426, 1429, 1, 0, 0, 0, 1427, 1425, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 111, 1, 0, 0, 0, 1429, 1427, 1, 0, 0, 0, 1430, 1432, 5, 8, 0, 0, 1431, 1430, 1, 0, 0, 0, 1431, 1432, 1, 0, 0, 0, 1432, 1434, 1, 0, 0, 0, 1433, 1435, 3, 44, 22, 0, 1434, 1433, 1, 0, 0, 0, 1434, 1435, 1, 0, 0, 0, 1435, 1437, 1, 0, 0, 0, 1436, 1438, 3, 328, 164, 0, 1437, 1436, 1, 0, 0, 0, 1437, 1438, 1, 0, 0, 0, 1438, 1441, 1, 0, 0, 0, 1439, 1442, 3, 114, 57, 0, 1440, 1442, 3, 116, 58, 0, 1441, 1439, 1, 0, 0, 0, 1441, 1440, 1, 0, 0, 0, 1442, 1443, 1, 0, 0, 0, 1443, 1441, 1, 0, 0, 0, 1443, 1444, 1, 0, 0, 0, 1444, 1448, 1, 0, 0, 0, 1445, 1447, 3, 118, 59, 0, 1446, 1445, 1, 0, 0, 0, 1447, 1450, 1, 0, 0, 0, 1448, 1446, 1, 0, 0, 0, 1448, 1449, 1, 0, 0, 0, 1449, 113, 1, 0, 0, 0, 1450, 1448, 1, 0, 0, 0, 1451, 1452, 7, 11, 0, 0, 1452, 1457, 3, 134, 67, 0, 1453, 1454, 5, 200, 0, 0, 1454, 1456, 3, 134, 67, 0, 1455, 1453, 1, 0, 0, 0, 1456, 1459, 1, 0, 0, 0, 1457, 1455, 1, 0, 0, 0, 1457, 1458, 1, 0, 0, 0, 1458, 115, 1, 0, 0, 0, 1459, 1457, 1, 0, 0, 0, 1460, 1461, 7, 12, 0, 0, 1461, 1462, 3, 142, 71, 0, 1462, 117, 1, 0, 0, 0, 1463, 1468, 3, 120, 60, 0, 1464, 1468, 3, 122, 61, 0, 1465, 1468, 3, 124, 62, 0, 1466, 1468, 3, 126, 63, 0, 1467, 1463, 1, 0, 0, 0, 1467, 1464, 1, 0, 0, 0, 1467, 1465, 1, 0, 0, 0, 1467, 1466, 1, 0, 0, 0, 1468, 119, 1, 0, 0, 0, 1469, 1470, 5, 52, 0, 0, 1470, 1471, 5, 74, 0, 0, 1471, 1476, 3, 146, 73, 0, 1472, 1473, 5, 200, 0, 0, 1473, 1475, 3, 146, 73, 0, 1474, 1472, 1, 0, 0, 0, 1475, 1478, 1, 0, 0, 0, 1476, 1474, 1, 0, 0, 0, 1476, 1477, 1, 0, 0, 0, 1477, 121, 1, 0, 0, 0, 1478, 1476, 1, 0, 0, 0, 1479, 1480, 5, 160, 0, 0, 1480, 1485, 3, 148, 74, 0, 1481, 1482, 5, 200, 0, 0, 1482, 1484, 3, 148, 74, 0, 1483, 1481, 1, 0, 0, 0, 1484, 1487, 1, 0, 0, 0, 1485, 1483, 1, 0, 0, 0, 1485, 1486, 1, 0, 0, 0, 1486, 123, 1, 0, 0, 0, 1487, 1485, 1, 0, 0, 0, 1488, 1489, 5, 86, 0, 0, 1489, 1494, 3, 150, 75, 0, 1490, 1491, 5, 200, 0, 0, 1491, 1493, 3, 150, 75, 0, 1492, 1490, 1, 0, 0, 0, 1493, 1496, 1, 0, 0, 0, 1494, 1492, 1, 0, 0, 0, 1494, 1495, 1, 0, 0, 0, 1495, 125, 1, 0, 0, 0, 1496, 1494, 1, 0, 0, 0, 1497, 1498, 5, 50, 0, 0, 1498, 1503, 3, 152, 76, 0, 1499, 1500, 5, 200, 0, 0, 1500, 1502, 3, 152, 76, 0, 1501, 1499, 1, 0, 0, 0, 1502, 1505, 1, 0, 0, 0, 1503, 1501, 1, 0, 0, 0, 1503, 1504, 1, 0, 0, 0, 1504, 127, 1, 0, 0, 0, 1505, 1503, 1, 0, 0, 0, 1506, 1516, 5, 205, 0, 0, 1507, 1511, 5, 214, 0, 0, 1508, 1510, 3, 130, 65, 0, 1509, 1508, 1, 0, 0, 0, 1510, 1513, 1, 0, 0, 0, 1511, 1509, 1, 0, 0, 0, 1511, 1512, 1, 0, 0, 0, 1512, 1514, 1, 0, 0, 0, 1513, 1511, 1, 0, 0, 0, 1514, 1516, 5, 216, 0, 0, 1515, 1506, 1, 0, 0, 0, 1515, 1507, 1, 0, 0, 0, 1516, 129, 1, 0, 0, 0, 1517, 1522, 3, 82, 41, 0, 1518, 1522, 3, 154, 77, 0, 1519, 1522, 3, 86, 43, 0, 1520, 1522, 3, 90, 45, 0, 1521, 1517, 1, 0, 0, 0, 1521, 1518, 1, 0, 0, 0, 1521, 1519, 1, 0, 0, 0, 1521, 1520, 1, 0, 0, 0, 1522, 131, 1, 0, 0, 0, 1523, 1525, 5, 138, 0, 0, 1524, 1526, 3, 44, 22, 0, 1525, 1524, 1, 0, 0, 0, 1525, 1526, 1, 0, 0, 0, 1526, 1528, 1, 0, 0, 0, 1527, 1523, 1, 0, 0, 0, 1527, 1528, 1, 0, 0, 0, 1528, 1529, 1, 0, 0, 0, 1529, 1530, 5, 149, 0, 0, 1530, 1531, 3, 136, 68, 0, 1531, 1532, 7, 11, 0, 0, 1532, 1533, 3, 138, 69, 0, 1533, 1534, 3, 46, 23, 0, 1534, 133, 1, 0, 0, 0, 1535, 1536, 3, 138, 69, 0, 1536, 135, 1, 0, 0, 0, 1537, 1542, 3, 88, 44, 0, 1538, 1539, 5, 202, 0, 0, 1539, 1541, 3, 88, 44, 0, 1540, 1538, 1, 0, 0, 0, 1541, 1544, 1, 0, 0, 0, 1542, 1540, 1, 0, 0, 0, 1542, 1543, 1, 0, 0, 0, 1543, 137, 1, 0, 0, 0, 1544, 1542, 1, 0, 0, 0, 1545, 1550, 3, 88, 44, 0, 1546, 1547, 5, 202, 0, 0, 1547, 1549, 3, 88, 44, 0, 1548, 1546, 1, 0, 0, 0, 1549, 1552, 1, 0, 0, 0, 1550, 1548, 1, 0, 0, 0, 1550, 1551, 1, 0, 0, 0, 1551, 139, 1, 0, 0, 0, 1552, 1550, 1, 0, 0, 0, 1553, 1555, 5, 35, 0, 0, 1554, 1556, 3, 44, 22, 0, 1555, 1554, 1, 0, 0, 0, 1555, 1556, 1, 0, 0, 0, 1556, 1558, 1, 0, 0, 0, 1557, 1553, 1, 0, 0, 0, 1557, 1558, 1, 0, 0, 0, 1558, 1559, 1, 0, 0, 0, 1559, 1560, 5, 33, 0, 0, 1560, 1565, 3, 88, 44, 0, 1561, 1562, 5, 202, 0, 0, 1562, 1564, 3, 88, 44, 0, 1563, 1561, 1, 0, 0, 0, 1564, 1567, 1, 0, 0, 0, 1565, 1563, 1, 0, 0, 0, 1565, 1566, 1, 0, 0, 0, 1566, 1568, 1, 0, 0, 0, 1567, 1565, 1, 0, 0, 0, 1568, 1569, 7, 12, 0, 0, 1569, 1574, 3, 88, 44, 0, 1570, 1571, 5, 202, 0, 0, 1571, 1573, 3, 88, 44, 0, 1572, 1570, 1, 0, 0, 0, 1573, 1576, 1, 0, 0, 0, 1574, 1572, 1, 0, 0, 0, 1574, 1575, 1, 0, 0, 0, 1575, 1577, 1, 0, 0, 0, 1576, 1574, 1, 0, 0, 0, 1577, 1578, 3, 46, 23, 0, 1578, 141, 1, 0, 0, 0, 1579, 1584, 3, 88, 44, 0, 1580, 1581, 5, 202, 0, 0, 1581, 1583, 3, 88, 44, 0, 1582, 1580, 1, 0, 0, 0, 1583, 1586, 1, 0, 0, 0, 1584, 1582, 1, 0, 0, 0, 1584, 1585, 1, 0, 0, 0, 1585, 143, 1, 0, 0, 0, 1586, 1584, 1, 0, 0, 0, 1587, 1589, 5, 51, 0, 0, 1588, 1590, 3, 44, 22, 0, 1589, 1588, 1, 0, 0, 0, 1589, 1590, 1, 0, 0, 0, 1590, 1592, 1, 0, 0, 0, 1591, 1587, 1, 0, 0, 0, 1591, 1592, 1, 0, 0, 0, 1592, 1593, 1, 0, 0, 0, 1593, 1594, 5, 52, 0, 0, 1594, 1599, 3, 88, 44, 0, 1595, 1596, 5, 202, 0, 0, 1596, 1598, 3, 88, 44, 0, 1597, 1595, 1, 0, 0, 0, 1598, 1601, 1, 0, 0, 0, 1599, 1597, 1, 0, 0, 0, 1599, 1600, 1, 0, 0, 0, 1600, 1602, 1, 0, 0, 0, 1601, 1599, 1, 0, 0, 0, 1602, 1603, 5, 74, 0, 0, 1603, 1608, 3, 88, 44, 0, 1604, 1605, 5, 202, 0, 0, 1605, 1607, 3, 88, 44, 0, 1606, 1604, 1, 0, 0, 0, 1607, 1610, 1, 0, 0, 0, 1608, 1606, 1, 0, 0, 0, 1608, 1609, 1, 0, 0, 0, 1609, 1611, 1, 0, 0, 0, 1610, 1608, 1, 0, 0, 0, 1611, 1612, 3, 46, 23, 0, 1612, 145, 1, 0, 0, 0, 1613, 1618, 3, 88, 44, 0, 1614, 1615, 5, 202, 0, 0, 1615, 1617, 3, 88, 44, 0, 1616, 1614, 1, 0, 0, 0, 1617, 1620, 1, 0, 0, 0, 1618, 1616, 1, 0, 0, 0, 1618, 1619, 1, 0, 0, 0, 1619, 147, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1621, 1626, 3, 88, 44, 0, 1622, 1623, 5, 202, 0, 0, 1623, 1625, 3, 88, 44, 0, 1624, 1622, 1, 0, 0, 0, 1625, 1628, 1, 0, 0, 0, 1626, 1624, 1, 0, 0, 0, 1626, 1627, 1, 0, 0, 0, 1627, 149, 1, 0, 0, 0, 1628, 1626, 1, 0, 0, 0, 1629, 1634, 3, 88, 44, 0, 1630, 1631, 5, 202, 0, 0, 1631, 1633, 3, 88, 44, 0, 1632, 1630, 1, 0, 0, 0, 1633, 1636, 1, 0, 0, 0, 1634, 1632, 1, 0, 0, 0, 1634, 1635, 1, 0, 0, 0, 1635, 151, 1, 0, 0, 0, 1636, 1634, 1, 0, 0, 0, 1637, 1642, 3, 88, 44, 0, 1638, 1639, 5, 202, 0, 0, 1639, 1641, 3, 88, 44, 0, 1640, 1638, 1, 0, 0, 0, 1641, 1644, 1, 0, 0, 0, 1642, 1640, 1, 0, 0, 0, 1642, 1643, 1, 0, 0, 0, 1643, 153, 1, 0, 0, 0, 1644, 1642, 1, 0, 0, 0, 1645, 1648, 3, 156, 78, 0, 1646, 1648, 3, 158, 79, 0, 1647, 1645, 1, 0, 0, 0, 1647, 1646, 1, 0, 0, 0, 1648, 155, 1, 0, 0, 0, 1649, 1650, 3, 76, 38, 0, 1650, 1651, 5, 97, 0, 0, 1651, 1652, 3, 106, 53, 0, 1652, 157, 1, 0, 0, 0, 1653, 1654, 3, 76, 38, 0, 1654, 1655, 3, 106, 53, 0, 1655, 159, 1, 0, 0, 0, 1656, 1657, 3, 110, 55, 0, 1657, 1658, 5, 29, 0, 0, 1658, 1659, 3, 162, 81, 0, 1659, 1660, 3, 128, 64, 0, 1660, 161, 1, 0, 0, 0, 1661, 1663, 5, 8, 0, 0, 1662, 1661, 1, 0, 0, 0, 1662, 1663, 1, 0, 0, 0, 1663, 1665, 1, 0, 0, 0, 1664, 1666, 3, 44, 22, 0, 1665, 1664, 1, 0, 0, 0, 1665, 1666, 1, 0, 0, 0, 1666, 1668, 1, 0, 0, 0, 1667, 1669, 3, 328, 164, 0, 1668, 1667, 1, 0, 0, 0, 1668, 1669, 1, 0, 0, 0, 1669, 1672, 1, 0, 0, 0, 1670, 1673, 3, 164, 82, 0, 1671, 1673, 3, 116, 58, 0, 1672, 1670, 1, 0, 0, 0, 1672, 1671, 1, 0, 0, 0, 1672, 1673, 1, 0, 0, 0, 1673, 1677, 1, 0, 0, 0, 1674, 1676, 3, 118, 59, 0, 1675, 1674, 1, 0, 0, 0, 1676, 1679, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1677, 1678, 1, 0, 0, 0, 1678, 163, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1680, 1681, 7, 11, 0, 0, 1681, 1686, 3, 168, 84, 0, 1682, 1683, 5, 200, 0, 0, 1683, 1685, 3, 168, 84, 0, 1684, 1682, 1, 0, 0, 0, 1685, 1688, 1, 0, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 165, 1, 0, 0, 0, 1688, 1686, 1, 0, 0, 0, 1689, 1691, 5, 138, 0, 0, 1690, 1692, 3, 44, 22, 0, 1691, 1690, 1, 0, 0, 0, 1691, 1692, 1, 0, 0, 0, 1692, 1694, 1, 0, 0, 0, 1693, 1689, 1, 0, 0, 0, 1693, 1694, 1, 0, 0, 0, 1694, 1695, 1, 0, 0, 0, 1695, 1696, 5, 145, 0, 0, 1696, 1697, 3, 88, 44, 0, 1697, 1698, 7, 11, 0, 0, 1698, 1699, 3, 88, 44, 0, 1699, 1700, 3, 46, 23, 0, 1700, 167, 1, 0, 0, 0, 1701, 1702, 3, 88, 44, 0, 1702, 169, 1, 0, 0, 0, 1703, 1706, 3, 176, 88, 0, 1704, 1707, 5, 65, 0, 0, 1705, 1707, 3, 340, 170, 0, 1706, 1704, 1, 0, 0, 0, 1706, 1705, 1, 0, 0, 0, 1707, 1709, 1, 0, 0, 0, 1708, 1710, 3, 184, 92, 0, 1709, 1708, 1, 0, 0, 0, 1709, 1710, 1, 0, 0, 0, 1710, 1721, 1, 0, 0, 0, 1711, 1714, 3, 172, 86, 0, 1712, 1714, 3, 174, 87, 0, 1713, 1711, 1, 0, 0, 0, 1713, 1712, 1, 0, 0, 0, 1714, 1716, 1, 0, 0, 0, 1715, 1717, 5, 127, 0, 0, 1716, 1715, 1, 0, 0, 0, 1716, 1717, 1, 0, 0, 0, 1717, 1718, 1, 0, 0, 0, 1718, 1719, 3, 184, 92, 0, 1719, 1721, 1, 0, 0, 0, 1720, 1703, 1, 0, 0, 0, 1720, 1713, 1, 0, 0, 0, 1721, 1723, 1, 0, 0, 0, 1722, 1724, 3, 318, 159, 0, 1723, 1722, 1, 0, 0, 0, 1723, 1724, 1, 0, 0, 0, 1724, 1725, 1, 0, 0, 0, 1725, 1726, 3, 128, 64, 0, 1726, 171, 1, 0, 0, 0, 1727, 1729, 5, 39, 0, 0, 1728, 1727, 1, 0, 0, 0, 1728, 1729, 1, 0, 0, 0, 1729, 1730, 1, 0, 0, 0, 1730, 1731, 5, 56, 0, 0, 1731, 173, 1, 0, 0, 0, 1732, 1734, 3, 182, 91, 0, 1733, 1732, 1, 0, 0, 0, 1733, 1734, 1, 0, 0, 0, 1734, 1736, 1, 0, 0, 0, 1735, 1737, 5, 49, 0, 0, 1736, 1735, 1, 0, 0, 0, 1736, 1737, 1, 0, 0, 0, 1737, 1739, 1, 0, 0, 0, 1738, 1740, 5, 2, 0, 0, 1739, 1738, 1, 0, 0, 0, 1739, 1740, 1, 0, 0, 0, 1740, 1742, 1, 0, 0, 0, 1741, 1743, 7, 13, 0, 0, 1742, 1741, 1, 0, 0, 0, 1742, 1743, 1, 0, 0, 0, 1743, 1745, 1, 0, 0, 0, 1744, 1746, 7, 14, 0, 0, 1745, 1744, 1, 0, 0, 0, 1745, 1746, 1, 0, 0, 0, 1746, 175, 1, 0, 0, 0, 1747, 1748, 3, 172, 86, 0, 1748, 1749, 3, 178, 89, 0, 1749, 1752, 1, 0, 0, 0, 1750, 1752, 3, 174, 87, 0, 1751, 1747, 1, 0, 0, 0, 1751, 1750, 1, 0, 0, 0, 1752, 1756, 1, 0, 0, 0, 1753, 1755, 3, 340, 170, 0, 1754, 1753, 1, 0, 0, 0, 1755, 1758, 1, 0, 0, 0, 1756, 1754, 1, 0, 0, 0, 1756, 1757, 1, 0, 0, 0, 1757, 177, 1, 0, 0, 0, 1758, 1756, 1, 0, 0, 0, 1759, 1760, 3, 180, 90, 0, 1760, 179, 1, 0, 0, 0, 1761, 1762, 3, 174, 87, 0, 1762, 1763, 3, 184, 92, 0, 1763, 1769, 1, 0, 0, 0, 1764, 1766, 3, 406, 203, 0, 1765, 1767, 3, 418, 209, 0, 1766, 1765, 1, 0, 0, 0, 1766, 1767, 1, 0, 0, 0, 1767, 1769, 1, 0, 0, 0, 1768, 1761, 1, 0, 0, 0, 1768, 1764, 1, 0, 0, 0, 1769, 181, 1, 0, 0, 0, 1770, 1771, 7, 15, 0, 0, 1771, 183, 1, 0, 0, 0, 1772, 1774, 5, 8, 0, 0, 1773, 1772, 1, 0, 0, 0, 1773, 1774, 1, 0, 0, 0, 1774, 1782, 1, 0, 0, 0, 1775, 1778, 3, 186, 93, 0, 1776, 1779, 3, 196, 98, 0, 1777, 1779, 3, 116, 58, 0, 1778, 1776, 1, 0, 0, 0, 1778, 1777, 1, 0, 0, 0, 1778, 1779, 1, 0, 0, 0, 1779, 1783, 1, 0, 0, 0, 1780, 1783, 3, 196, 98, 0, 1781, 1783, 3, 116, 58, 0, 1782, 1775, 1, 0, 0, 0, 1782, 1780, 1, 0, 0, 0, 1782, 1781, 1, 0, 0, 0, 1783, 1787, 1, 0, 0, 0, 1784, 1786, 3, 188, 94, 0, 1785, 1784, 1, 0, 0, 0, 1786, 1789, 1, 0, 0, 0, 1787, 1785, 1, 0, 0, 0, 1787, 1788, 1, 0, 0, 0, 1788, 185, 1, 0, 0, 0, 1789, 1787, 1, 0, 0, 0, 1790, 1791, 5, 206, 0, 0, 1791, 1792, 3, 40, 20, 0, 1792, 1794, 5, 208, 0, 0, 1793, 1795, 3, 40, 20, 0, 1794, 1793, 1, 0, 0, 0, 1794, 1795, 1, 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1798, 3, 40, 20, 0, 1797, 1790, 1, 0, 0, 0, 1797, 1796, 1, 0, 0, 0, 1798, 187, 1, 0, 0, 0, 1799, 1804, 3, 118, 59, 0, 1800, 1804, 3, 190, 95, 0, 1801, 1804, 3, 192, 96, 0, 1802, 1804, 3, 194, 97, 0, 1803, 1799, 1, 0, 0, 0, 1803, 1800, 1, 0, 0, 0, 1803, 1801, 1, 0, 0, 0, 1803, 1802, 1, 0, 0, 0, 1804, 189, 1, 0, 0, 0, 1805, 1806, 5, 27, 0, 0, 1806, 1811, 3, 88, 44, 0, 1807, 1808, 5, 202, 0, 0, 1808, 1810, 3, 88, 44, 0, 1809, 1807, 1, 0, 0, 0, 1810, 1813, 1, 0, 0, 0, 1811, 1809, 1, 0, 0, 0, 1811, 1812, 1, 0, 0, 0, 1812, 191, 1, 0, 0, 0, 1813, 1811, 1, 0, 0, 0, 1814, 1815, 5, 88, 0, 0, 1815, 1816, 5, 111, 0, 0, 1816, 1817, 3, 236, 118, 0, 1817, 193, 1, 0, 0, 0, 1818, 1819, 5, 66, 0, 0, 1819, 1820, 5, 24, 0, 0, 1820, 1825, 3, 240, 120, 0, 1821, 1822, 5, 200, 0, 0, 1822, 1824, 3, 240, 120, 0, 1823, 1821, 1, 0, 0, 0, 1824, 1827, 1, 0, 0, 0, 1825, 1823, 1, 0, 0, 0, 1825, 1826, 1, 0, 0, 0, 1826, 195, 1, 0, 0, 0, 1827, 1825, 1, 0, 0, 0, 1828, 1830, 3, 200, 100, 0, 1829, 1828, 1, 0, 0, 0, 1830, 1831, 1, 0, 0, 0, 1831, 1829, 1, 0, 0, 0, 1831, 1832, 1, 0, 0, 0, 1832, 1834, 1, 0, 0, 0, 1833, 1835, 3, 198, 99, 0, 1834, 1833, 1, 0, 0, 0, 1834, 1835, 1, 0, 0, 0, 1835, 1839, 1, 0, 0, 0, 1836, 1838, 3, 200, 100, 0, 1837, 1836, 1, 0, 0, 0, 1838, 1841, 1, 0, 0, 0, 1839, 1837, 1, 0, 0, 0, 1839, 1840, 1, 0, 0, 0, 1840, 1850, 1, 0, 0, 0, 1841, 1839, 1, 0, 0, 0, 1842, 1846, 3, 198, 99, 0, 1843, 1845, 3, 200, 100, 0, 1844, 1843, 1, 0, 0, 0, 1845, 1848, 1, 0, 0, 0, 1846, 1844, 1, 0, 0, 0, 1846, 1847, 1, 0, 0, 0, 1847, 1850, 1, 0, 0, 0, 1848, 1846, 1, 0, 0, 0, 1849, 1829, 1, 0, 0, 0, 1849, 1842, 1, 0, 0, 0, 1850, 197, 1, 0, 0, 0, 1851, 1860, 3, 328, 164, 0, 1852, 1854, 5, 113, 0, 0, 1853, 1855, 5, 106, 0, 0, 1854, 1853, 1, 0, 0, 0, 1854, 1855, 1, 0, 0, 0, 1855, 1861, 1, 0, 0, 0, 1856, 1858, 5, 106, 0, 0, 1857, 1859, 5, 113, 0, 0, 1858, 1857, 1, 0, 0, 0, 1858, 1859, 1, 0, 0, 0, 1859, 1861, 1, 0, 0, 0, 1860, 1852, 1, 0, 0, 0, 1860, 1856, 1, 0, 0, 0, 1860, 1861, 1, 0, 0, 0, 1861, 1873, 1, 0, 0, 0, 1862, 1864, 5, 113, 0, 0, 1863, 1865, 5, 106, 0, 0, 1864, 1863, 1, 0, 0, 0, 1864, 1865, 1, 0, 0, 0, 1865, 1871, 1, 0, 0, 0, 1866, 1868, 5, 106, 0, 0, 1867, 1869, 5, 113, 0, 0, 1868, 1867, 1, 0, 0, 0, 1868, 1869, 1, 0, 0, 0, 1869, 1871, 1, 0, 0, 0, 1870, 1862, 1, 0, 0, 0, 1870, 1866, 1, 0, 0, 0, 1871, 1873, 1, 0, 0, 0, 1872, 1851, 1, 0, 0, 0, 1872, 1870, 1, 0, 0, 0, 1873, 199, 1, 0, 0, 0, 1874, 1880, 3, 202, 101, 0, 1875, 1880, 3, 206, 103, 0, 1876, 1880, 3, 210, 105, 0, 1877, 1880, 3, 212, 106, 0, 1878, 1880, 3, 214, 107, 0, 1879, 1874, 1, 0, 0, 0, 1879, 1875, 1, 0, 0, 0, 1879, 1876, 1, 0, 0, 0, 1879, 1877, 1, 0, 0, 0, 1879, 1878, 1, 0, 0, 0, 1880, 201, 1, 0, 0, 0, 1881, 1886, 3, 204, 102, 0, 1882, 1883, 5, 200, 0, 0, 1883, 1885, 3, 218, 109, 0, 1884, 1882, 1, 0, 0, 0, 1885, 1888, 1, 0, 0, 0, 1886, 1884, 1, 0, 0, 0, 1886, 1887, 1, 0, 0, 0, 1887, 203, 1, 0, 0, 0, 1888, 1886, 1, 0, 0, 0, 1889, 1895, 5, 204, 0, 0, 1890, 1891, 5, 158, 0, 0, 1891, 1895, 5, 24, 0, 0, 1892, 1893, 5, 47, 0, 0, 1893, 1895, 5, 24, 0, 0, 1894, 1889, 1, 0, 0, 0, 1894, 1890, 1, 0, 0, 0, 1894, 1892, 1, 0, 0, 0, 1895, 1896, 1, 0, 0, 0, 1896, 1897, 3, 218, 109, 0, 1897, 205, 1, 0, 0, 0, 1898, 1903, 3, 208, 104, 0, 1899, 1900, 5, 200, 0, 0, 1900, 1902, 3, 224, 112, 0, 1901, 1899, 1, 0, 0, 0, 1902, 1905, 1, 0, 0, 0, 1903, 1901, 1, 0, 0, 0, 1903, 1904, 1, 0, 0, 0, 1904, 207, 1, 0, 0, 0, 1905, 1903, 1, 0, 0, 0, 1906, 1907, 7, 16, 0, 0, 1907, 1908, 3, 224, 112, 0, 1908, 209, 1, 0, 0, 0, 1909, 1910, 7, 17, 0, 0, 1910, 1911, 3, 226, 113, 0, 1911, 211, 1, 0, 0, 0, 1912, 1913, 7, 18, 0, 0, 1913, 1914, 3, 228, 114, 0, 1914, 213, 1, 0, 0, 0, 1915, 1920, 3, 216, 108, 0, 1916, 1917, 5, 200, 0, 0, 1917, 1919, 3, 232, 116, 0, 1918, 1916, 1, 0, 0, 0, 1919, 1922, 1, 0, 0, 0, 1920, 1918, 1, 0, 0, 0, 1920, 1921, 1, 0, 0, 0, 1921, 215, 1, 0, 0, 0, 1922, 1920, 1, 0, 0, 0, 1923, 1924, 7, 19, 0, 0, 1924, 1925, 3, 232, 116, 0, 1925, 217, 1, 0, 0, 0, 1926, 1928, 5, 138, 0, 0, 1927, 1929, 3, 44, 22, 0, 1928, 1927, 1, 0, 0, 0, 1928, 1929, 1, 0, 0, 0, 1929, 1931, 1, 0, 0, 0, 1930, 1926, 1, 0, 0, 0, 1930, 1931, 1, 0, 0, 0, 1931, 1932, 1, 0, 0, 0, 1932, 1933, 5, 159, 0, 0, 1933, 1937, 3, 88, 44, 0, 1934, 1938, 5, 204, 0, 0, 1935, 1936, 5, 158, 0, 0, 1936, 1938, 5, 24, 0, 0, 1937, 1934, 1, 0, 0, 0, 1937, 1935, 1, 0, 0, 0, 1938, 1939, 1, 0, 0, 0, 1939, 1940, 3, 138, 69, 0, 1940, 1941, 3, 46, 23, 0, 1941, 1945, 1, 0, 0, 0, 1942, 1945, 3, 220, 110, 0, 1943, 1945, 3, 504, 252, 0, 1944, 1930, 1, 0, 0, 0, 1944, 1942, 1, 0, 0, 0, 1944, 1943, 1, 0, 0, 0, 1945, 219, 1, 0, 0, 0, 1946, 1951, 3, 88, 44, 0, 1947, 1948, 5, 202, 0, 0, 1948, 1950, 3, 88, 44, 0, 1949, 1947, 1, 0, 0, 0, 1950, 1953, 1, 0, 0, 0, 1951, 1949, 1, 0, 0, 0, 1951, 1952, 1, 0, 0, 0, 1952, 221, 1, 0, 0, 0, 1953, 1951, 1, 0, 0, 0, 1954, 1956, 5, 138, 0, 0, 1955, 1957, 3, 44, 22, 0, 1956, 1955, 1, 0, 0, 0, 1956, 1957, 1, 0, 0, 0, 1957, 1959, 1, 0, 0, 0, 1958, 1954, 1, 0, 0, 0, 1958, 1959, 1, 0, 0, 0, 1959, 1960, 1, 0, 0, 0, 1960, 1961, 5, 147, 0, 0, 1961, 1962, 3, 136, 68, 0, 1962, 1963, 7, 16, 0, 0, 1963, 1964, 3, 138, 69, 0, 1964, 1965, 3, 46, 23, 0, 1965, 223, 1, 0, 0, 0, 1966, 1971, 3, 88, 44, 0, 1967, 1968, 5, 202, 0, 0, 1968, 1970, 3, 88, 44, 0, 1969, 1967, 1, 0, 0, 0, 1970, 1973, 1, 0, 0, 0, 1971, 1969, 1, 0, 0, 0, 1971, 1972, 1, 0, 0, 0, 1972, 225, 1, 0, 0, 0, 1973, 1971, 1, 0, 0, 0, 1974, 1979, 3, 88, 44, 0, 1975, 1976, 5, 202, 0, 0, 1976, 1978, 3, 88, 44, 0, 1977, 1975, 1, 0, 0, 0, 1978, 1981, 1, 0, 0, 0, 1979, 1977, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, 227, 1, 0, 0, 0, 1981, 1979, 1, 0, 0, 0, 1982, 1987, 3, 88, 44, 0, 1983, 1984, 5, 202, 0, 0, 1984, 1986, 3, 88, 44, 0, 1985, 1983, 1, 0, 0, 0, 1986, 1989, 1, 0, 0, 0, 1987, 1985, 1, 0, 0, 0, 1987, 1988, 1, 0, 0, 0, 1988, 229, 1, 0, 0, 0, 1989, 1987, 1, 0, 0, 0, 1990, 1992, 5, 138, 0, 0, 1991, 1993, 3, 44, 22, 0, 1992, 1991, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, 1995, 1, 0, 0, 0, 1994, 1990, 1, 0, 0, 0, 1994, 1995, 1, 0, 0, 0, 1995, 1996, 1, 0, 0, 0, 1996, 1997, 5, 126, 0, 0, 1997, 1998, 3, 136, 68, 0, 1998, 1999, 7, 19, 0, 0, 1999, 2000, 3, 138, 69, 0, 2000, 2001, 3, 46, 23, 0, 2001, 231, 1, 0, 0, 0, 2002, 2007, 3, 88, 44, 0, 2003, 2004, 5, 202, 0, 0, 2004, 2006, 3, 88, 44, 0, 2005, 2003, 1, 0, 0, 0, 2006, 2009, 1, 0, 0, 0, 2007, 2005, 1, 0, 0, 0, 2007, 2008, 1, 0, 0, 0, 2008, 233, 1, 0, 0, 0, 2009, 2007, 1, 0, 0, 0, 2010, 2012, 5, 89, 0, 0, 2011, 2013, 3, 44, 22, 0, 2012, 2011, 1, 0, 0, 0, 2012, 2013, 1, 0, 0, 0, 2013, 2015, 1, 0, 0, 0, 2014, 2010, 1, 0, 0, 0, 2014, 2015, 1, 0, 0, 0, 2015, 2016, 1, 0, 0, 0, 2016, 2017, 5, 88, 0, 0, 2017, 2022, 3, 88, 44, 0, 2018, 2019, 5, 202, 0, 0, 2019, 2021, 3, 88, 44, 0, 2020, 2018, 1, 0, 0, 0, 2021, 2024, 1, 0, 0, 0, 2022, 2020, 1, 0, 0, 0, 2022, 2023, 1, 0, 0, 0, 2023, 2025, 1, 0, 0, 0, 2024, 2022, 1, 0, 0, 0, 2025, 2026, 5, 111, 0, 0, 2026, 2031, 3, 88, 44, 0, 2027, 2028, 5, 202, 0, 0, 2028, 2030, 3, 88, 44, 0, 2029, 2027, 1, 0, 0, 0, 2030, 2033, 1, 0, 0, 0, 2031, 2029, 1, 0, 0, 0, 2031, 2032, 1, 0, 0, 0, 2032, 2034, 1, 0, 0, 0, 2033, 2031, 1, 0, 0, 0, 2034, 2035, 3, 46, 23, 0, 2035, 235, 1, 0, 0, 0, 2036, 2041, 3, 88, 44, 0, 2037, 2038, 5, 202, 0, 0, 2038, 2040, 3, 88, 44, 0, 2039, 2037, 1, 0, 0, 0, 2040, 2043, 1, 0, 0, 0, 2041, 2039, 1, 0, 0, 0, 2041, 2042, 1, 0, 0, 0, 2042, 237, 1, 0, 0, 0, 2043, 2041, 1, 0, 0, 0, 2044, 2049, 5, 67, 0, 0, 2045, 2047, 3, 44, 22, 0, 2046, 2045, 1, 0, 0, 0, 2046, 2047, 1, 0, 0, 0, 2047, 2048, 1, 0, 0, 0, 2048, 2050, 5, 111, 0, 0, 2049, 2046, 1, 0, 0, 0, 2049, 2050, 1, 0, 0, 0, 2050, 2051, 1, 0, 0, 0, 2051, 2052, 3, 88, 44, 0, 2052, 2053, 5, 24, 0, 0, 2053, 2054, 3, 88, 44, 0, 2054, 2055, 3, 46, 23, 0, 2055, 239, 1, 0, 0, 0, 2056, 2057, 3, 88, 44, 0, 2057, 241, 1, 0, 0, 0, 2058, 2059, 3, 110, 55, 0, 2059, 2060, 5, 43, 0, 0, 2060, 2061, 3, 162, 81, 0, 2061, 2062, 3, 128, 64, 0, 2062, 243, 1, 0, 0, 0, 2063, 2064, 3, 110, 55, 0, 2064, 2065, 5, 28, 0, 0, 2065, 2066, 3, 162, 81, 0, 2066, 2067, 3, 128, 64, 0, 2067, 245, 1, 0, 0, 0, 2068, 2069, 3, 110, 55, 0, 2069, 2070, 5, 144, 0, 0, 2070, 2071, 3, 162, 81, 0, 2071, 2072, 3, 128, 64, 0, 2072, 247, 1, 0, 0, 0, 2073, 2074, 3, 110, 55, 0, 2074, 2075, 5, 16, 0, 0, 2075, 2076, 3, 162, 81, 0, 2076, 2077, 3, 128, 64, 0, 2077, 249, 1, 0, 0, 0, 2078, 2079, 3, 110, 55, 0, 2079, 2080, 5, 16, 0, 0, 2080, 2081, 5, 144, 0, 0, 2081, 2082, 3, 162, 81, 0, 2082, 2083, 3, 128, 64, 0, 2083, 251, 1, 0, 0, 0, 2084, 2085, 3, 176, 88, 0, 2085, 2093, 5, 38, 0, 0, 2086, 2088, 3, 184, 92, 0, 2087, 2086, 1, 0, 0, 0, 2087, 2088, 1, 0, 0, 0, 2088, 2090, 1, 0, 0, 0, 2089, 2091, 3, 318, 159, 0, 2090, 2089, 1, 0, 0, 0, 2090, 2091, 1, 0, 0, 0, 2091, 2094, 1, 0, 0, 0, 2092, 2094, 3, 254, 127, 0, 2093, 2087, 1, 0, 0, 0, 2093, 2092, 1, 0, 0, 0, 2094, 2095, 1, 0, 0, 0, 2095, 2096, 3, 128, 64, 0, 2096, 253, 1, 0, 0, 0, 2097, 2100, 3, 256, 128, 0, 2098, 2100, 3, 258, 129, 0, 2099, 2097, 1, 0, 0, 0, 2099, 2098, 1, 0, 0, 0, 2100, 255, 1, 0, 0, 0, 2101, 2103, 3, 184, 92, 0, 2102, 2101, 1, 0, 0, 0, 2102, 2103, 1, 0, 0, 0, 2103, 2104, 1, 0, 0, 0, 2104, 2110, 5, 74, 0, 0, 2105, 2107, 5, 8, 0, 0, 2106, 2108, 5, 74, 0, 0, 2107, 2106, 1, 0, 0, 0, 2107, 2108, 1, 0, 0, 0, 2108, 2110, 1, 0, 0, 0, 2109, 2102, 1, 0, 0, 0, 2109, 2105, 1, 0, 0, 0, 2109, 2110, 1, 0, 0, 0, 2110, 2111, 1, 0, 0, 0, 2111, 2112, 3, 260, 130, 0, 2112, 2113, 5, 154, 0, 0, 2113, 2114, 3, 260, 130, 0, 2114, 257, 1, 0, 0, 0, 2115, 2117, 3, 184, 92, 0, 2116, 2115, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2118, 1, 0, 0, 0, 2118, 2119, 5, 196, 0, 0, 2119, 2120, 3, 260, 130, 0, 2120, 2121, 5, 200, 0, 0, 2121, 2126, 3, 260, 130, 0, 2122, 2123, 5, 200, 0, 0, 2123, 2125, 3, 260, 130, 0, 2124, 2122, 1, 0, 0, 0, 2125, 2128, 1, 0, 0, 0, 2126, 2124, 1, 0, 0, 0, 2126, 2127, 1, 0, 0, 0, 2127, 2129, 1, 0, 0, 0, 2128, 2126, 1, 0, 0, 0, 2129, 2130, 5, 197, 0, 0, 2130, 259, 1, 0, 0, 0, 2131, 2132, 3, 262, 131, 0, 2132, 261, 1, 0, 0, 0, 2133, 2135, 3, 264, 132, 0, 2134, 2133, 1, 0, 0, 0, 2134, 2135, 1, 0, 0, 0, 2135, 2139, 1, 0, 0, 0, 2136, 2137, 3, 40, 20, 0, 2137, 2138, 7, 17, 0, 0, 2138, 2140, 1, 0, 0, 0, 2139, 2136, 1, 0, 0, 0, 2139, 2140, 1, 0, 0, 0, 2140, 2141, 1, 0, 0, 0, 2141, 2142, 3, 226, 113, 0, 2142, 263, 1, 0, 0, 0, 2143, 2144, 3, 266, 133, 0, 2144, 265, 1, 0, 0, 0, 2145, 2146, 3, 328, 164, 0, 2146, 267, 1, 0, 0, 0, 2147, 2148, 3, 176, 88, 0, 2148, 2149, 5, 22, 0, 0, 2149, 2150, 3, 270, 135, 0, 2150, 2151, 3, 128, 64, 0, 2151, 269, 1, 0, 0, 0, 2152, 2158, 3, 184, 92, 0, 2153, 2154, 5, 111, 0, 0, 2154, 2155, 3, 260, 130, 0, 2155, 2156, 5, 207, 0, 0, 2156, 2157, 3, 260, 130, 0, 2157, 2159, 1, 0, 0, 0, 2158, 2153, 1, 0, 0, 0, 2158, 2159, 1, 0, 0, 0, 2159, 2173, 1, 0, 0, 0, 2160, 2162, 5, 8, 0, 0, 2161, 2160, 1, 0, 0, 0, 2161, 2162, 1, 0, 0, 0, 2162, 2170, 1, 0, 0, 0, 2163, 2165, 5, 111, 0, 0, 2164, 2163, 1, 0, 0, 0, 2164, 2165, 1, 0, 0, 0, 2165, 2166, 1, 0, 0, 0, 2166, 2167, 3, 260, 130, 0, 2167, 2168, 5, 207, 0, 0, 2168, 2169, 3, 260, 130, 0, 2169, 2171, 1, 0, 0, 0, 2170, 2164, 1, 0, 0, 0, 2170, 2171, 1, 0, 0, 0, 2171, 2173, 1, 0, 0, 0, 2172, 2152, 1, 0, 0, 0, 2172, 2161, 1, 0, 0, 0, 2173, 271, 1, 0, 0, 0, 2174, 2175, 3, 176, 88, 0, 2175, 2176, 5, 150, 0, 0, 2176, 2177, 3, 274, 137, 0, 2177, 2178, 3, 128, 64, 0, 2178, 273, 1, 0, 0, 0, 2179, 2185, 3, 184, 92, 0, 2180, 2181, 5, 69, 0, 0, 2181, 2182, 3, 260, 130, 0, 2182, 2183, 5, 152, 0, 0, 2183, 2184, 3, 260, 130, 0, 2184, 2186, 1, 0, 0, 0, 2185, 2180, 1, 0, 0, 0, 2185, 2186, 1, 0, 0, 0, 2186, 2200, 1, 0, 0, 0, 2187, 2189, 5, 8, 0, 0, 2188, 2187, 1, 0, 0, 0, 2188, 2189, 1, 0, 0, 0, 2189, 2197, 1, 0, 0, 0, 2190, 2192, 5, 69, 0, 0, 2191, 2190, 1, 0, 0, 0, 2191, 2192, 1, 0, 0, 0, 2192, 2193, 1, 0, 0, 0, 2193, 2194, 3, 260, 130, 0, 2194, 2195, 5, 152, 0, 0, 2195, 2196, 3, 260, 130, 0, 2196, 2198, 1, 0, 0, 0, 2197, 2191, 1, 0, 0, 0, 2197, 2198, 1, 0, 0, 0, 2198, 2200, 1, 0, 0, 0, 2199, 2179, 1, 0, 0, 0, 2199, 2188, 1, 0, 0, 0, 2200, 275, 1, 0, 0, 0, 2201, 2202, 3, 110, 55, 0, 2202, 2203, 5, 20, 0, 0, 2203, 2204, 3, 162, 81, 0, 2204, 2205, 3, 128, 64, 0, 2205, 277, 1, 0, 0, 0, 2206, 2207, 3, 176, 88, 0, 2207, 2208, 5, 143, 0, 0, 2208, 2210, 3, 184, 92, 0, 2209, 2211, 3, 318, 159, 0, 2210, 2209, 1, 0, 0, 0, 2210, 2211, 1, 0, 0, 0, 2211, 2212, 1, 0, 0, 0, 2212, 2213, 3, 128, 64, 0, 2213, 279, 1, 0, 0, 0, 2214, 2215, 3, 110, 55, 0, 2215, 2216, 5, 75, 0, 0, 2216, 2217, 3, 162, 81, 0, 2217, 2218, 3, 282, 141, 0, 2218, 281, 1, 0, 0, 0, 2219, 2225, 5, 205, 0, 0, 2220, 2221, 5, 214, 0, 0, 2221, 2222, 3, 284, 142, 0, 2222, 2223, 5, 216, 0, 0, 2223, 2225, 1, 0, 0, 0, 2224, 2219, 1, 0, 0, 0, 2224, 2220, 1, 0, 0, 0, 2225, 283, 1, 0, 0, 0, 2226, 2230, 3, 390, 195, 0, 2227, 2230, 3, 130, 65, 0, 2228, 2230, 3, 286, 143, 0, 2229, 2226, 1, 0, 0, 0, 2229, 2227, 1, 0, 0, 0, 2229, 2228, 1, 0, 0, 0, 2230, 2233, 1, 0, 0, 0, 2231, 2229, 1, 0, 0, 0, 2231, 2232, 1, 0, 0, 0, 2232, 2235, 1, 0, 0, 0, 2233, 2231, 1, 0, 0, 0, 2234, 2236, 3, 288, 144, 0, 2235, 2234, 1, 0, 0, 0, 2235, 2236, 1, 0, 0, 0, 2236, 285, 1, 0, 0, 0, 2237, 2238, 3, 76, 38, 0, 2238, 2239, 5, 134, 0, 0, 2239, 2240, 3, 106, 53, 0, 2240, 287, 1, 0, 0, 0, 2241, 2242, 3, 76, 38, 0, 2242, 2243, 3, 0, 0, 0, 2243, 289, 1, 0, 0, 0, 2244, 2245, 3, 176, 88, 0, 2245, 2246, 5, 63, 0, 0, 2246, 2248, 3, 184, 92, 0, 2247, 2249, 3, 318, 159, 0, 2248, 2247, 1, 0, 0, 0, 2248, 2249, 1, 0, 0, 0, 2249, 2250, 1, 0, 0, 0, 2250, 2251, 3, 282, 141, 0, 2251, 291, 1, 0, 0, 0, 2252, 2253, 3, 110, 55, 0, 2253, 2254, 5, 121, 0, 0, 2254, 2255, 3, 162, 81, 0, 2255, 2256, 3, 282, 141, 0, 2256, 293, 1, 0, 0, 0, 2257, 2258, 3, 176, 88, 0, 2258, 2259, 5, 23, 0, 0, 2259, 2261, 3, 184, 92, 0, 2260, 2262, 3, 318, 159, 0, 2261, 2260, 1, 0, 0, 0, 2261, 2262, 1, 0, 0, 0, 2262, 2263, 1, 0, 0, 0, 2263, 2264, 3, 282, 141, 0, 2264, 295, 1, 0, 0, 0, 2265, 2266, 3, 176, 88, 0, 2266, 2268, 5, 87, 0, 0, 2267, 2269, 7, 8, 0, 0, 2268, 2267, 1, 0, 0, 0, 2268, 2269, 1, 0, 0, 0, 2269, 2270, 1, 0, 0, 0, 2270, 2272, 3, 184, 92, 0, 2271, 2273, 3, 318, 159, 0, 2272, 2271, 1, 0, 0, 0, 2272, 2273, 1, 0, 0, 0, 2273, 2274, 1, 0, 0, 0, 2274, 2275, 3, 282, 141, 0, 2275, 297, 1, 0, 0, 0, 2276, 2281, 3, 88, 44, 0, 2277, 2278, 5, 202, 0, 0, 2278, 2280, 3, 88, 44, 0, 2279, 2277, 1, 0, 0, 0, 2280, 2283, 1, 0, 0, 0, 2281, 2279, 1, 0, 0, 0, 2281, 2282, 1, 0, 0, 0, 2282, 299, 1, 0, 0, 0, 2283, 2281, 1, 0, 0, 0, 2284, 2285, 3, 110, 55, 0, 2285, 2286, 5, 84, 0, 0, 2286, 2287, 3, 162, 81, 0, 2287, 2288, 3, 128, 64, 0, 2288, 301, 1, 0, 0, 0, 2289, 2290, 3, 176, 88, 0, 2290, 2291, 5, 70, 0, 0, 2291, 2292, 3, 306, 153, 0, 2292, 2293, 3, 128, 64, 0, 2293, 303, 1, 0, 0, 0, 2294, 2295, 3, 176, 88, 0, 2295, 2296, 5, 150, 0, 0, 2296, 2297, 5, 70, 0, 0, 2297, 2298, 3, 306, 153, 0, 2298, 2299, 3, 128, 64, 0, 2299, 305, 1, 0, 0, 0, 2300, 2302, 3, 184, 92, 0, 2301, 2303, 3, 318, 159, 0, 2302, 2301, 1, 0, 0, 0, 2302, 2303, 1, 0, 0, 0, 2303, 2306, 1, 0, 0, 0, 2304, 2305, 5, 111, 0, 0, 2305, 2307, 3, 308, 154, 0, 2306, 2304, 1, 0, 0, 0, 2306, 2307, 1, 0, 0, 0, 2307, 2313, 1, 0, 0, 0, 2308, 2309, 5, 74, 0, 0, 2309, 2310, 3, 314, 157, 0, 2310, 2311, 5, 154, 0, 0, 2311, 2312, 3, 314, 157, 0, 2312, 2314, 1, 0, 0, 0, 2313, 2308, 1, 0, 0, 0, 2313, 2314, 1, 0, 0, 0, 2314, 2340, 1, 0, 0, 0, 2315, 2317, 5, 8, 0, 0, 2316, 2315, 1, 0, 0, 0, 2316, 2317, 1, 0, 0, 0, 2317, 2318, 1, 0, 0, 0, 2318, 2319, 3, 314, 157, 0, 2319, 2320, 5, 154, 0, 0, 2320, 2321, 3, 314, 157, 0, 2321, 2340, 1, 0, 0, 0, 2322, 2324, 3, 418, 209, 0, 2323, 2322, 1, 0, 0, 0, 2323, 2324, 1, 0, 0, 0, 2324, 2326, 1, 0, 0, 0, 2325, 2327, 3, 318, 159, 0, 2326, 2325, 1, 0, 0, 0, 2326, 2327, 1, 0, 0, 0, 2327, 2330, 1, 0, 0, 0, 2328, 2329, 5, 111, 0, 0, 2329, 2331, 3, 570, 285, 0, 2330, 2328, 1, 0, 0, 0, 2330, 2331, 1, 0, 0, 0, 2331, 2337, 1, 0, 0, 0, 2332, 2333, 5, 74, 0, 0, 2333, 2334, 3, 314, 157, 0, 2334, 2335, 5, 154, 0, 0, 2335, 2336, 3, 314, 157, 0, 2336, 2338, 1, 0, 0, 0, 2337, 2332, 1, 0, 0, 0, 2337, 2338, 1, 0, 0, 0, 2338, 2340, 1, 0, 0, 0, 2339, 2300, 1, 0, 0, 0, 2339, 2316, 1, 0, 0, 0, 2339, 2323, 1, 0, 0, 0, 2340, 307, 1, 0, 0, 0, 2341, 2342, 3, 310, 155, 0, 2342, 309, 1, 0, 0, 0, 2343, 2345, 3, 44, 22, 0, 2344, 2343, 1, 0, 0, 0, 2344, 2345, 1, 0, 0, 0, 2345, 2346, 1, 0, 0, 0, 2346, 2363, 3, 318, 159, 0, 2347, 2349, 3, 44, 22, 0, 2348, 2347, 1, 0, 0, 0, 2348, 2349, 1, 0, 0, 0, 2349, 2350, 1, 0, 0, 0, 2350, 2352, 3, 312, 156, 0, 2351, 2353, 3, 318, 159, 0, 2352, 2351, 1, 0, 0, 0, 2352, 2353, 1, 0, 0, 0, 2353, 2363, 1, 0, 0, 0, 2354, 2356, 3, 220, 110, 0, 2355, 2357, 3, 328, 164, 0, 2356, 2355, 1, 0, 0, 0, 2356, 2357, 1, 0, 0, 0, 2357, 2363, 1, 0, 0, 0, 2358, 2360, 3, 328, 164, 0, 2359, 2361, 3, 220, 110, 0, 2360, 2359, 1, 0, 0, 0, 2360, 2361, 1, 0, 0, 0, 2361, 2363, 1, 0, 0, 0, 2362, 2344, 1, 0, 0, 0, 2362, 2348, 1, 0, 0, 0, 2362, 2354, 1, 0, 0, 0, 2362, 2358, 1, 0, 0, 0, 2363, 311, 1, 0, 0, 0, 2364, 2366, 3, 200, 100, 0, 2365, 2364, 1, 0, 0, 0, 2366, 2367, 1, 0, 0, 0, 2367, 2365, 1, 0, 0, 0, 2367, 2368, 1, 0, 0, 0, 2368, 2370, 1, 0, 0, 0, 2369, 2371, 3, 198, 99, 0, 2370, 2369, 1, 0, 0, 0, 2370, 2371, 1, 0, 0, 0, 2371, 2375, 1, 0, 0, 0, 2372, 2374, 3, 200, 100, 0, 2373, 2372, 1, 0, 0, 0, 2374, 2377, 1, 0, 0, 0, 2375, 2373, 1, 0, 0, 0, 2375, 2376, 1, 0, 0, 0, 2376, 2385, 1, 0, 0, 0, 2377, 2375, 1, 0, 0, 0, 2378, 2380, 3, 198, 99, 0, 2379, 2381, 3, 200, 100, 0, 2380, 2379, 1, 0, 0, 0, 2381, 2382, 1, 0, 0, 0, 2382, 2380, 1, 0, 0, 0, 2382, 2383, 1, 0, 0, 0, 2383, 2385, 1, 0, 0, 0, 2384, 2365, 1, 0, 0, 0, 2384, 2378, 1, 0, 0, 0, 2385, 313, 1, 0, 0, 0, 2386, 2387, 3, 316, 158, 0, 2387, 315, 1, 0, 0, 0, 2388, 2393, 3, 88, 44, 0, 2389, 2390, 5, 202, 0, 0, 2390, 2392, 3, 88, 44, 0, 2391, 2389, 1, 0, 0, 0, 2392, 2395, 1, 0, 0, 0, 2393, 2391, 1, 0, 0, 0, 2393, 2394, 1, 0, 0, 0, 2394, 317, 1, 0, 0, 0, 2395, 2393, 1, 0, 0, 0, 2396, 2397, 3, 320, 160, 0, 2397, 319, 1, 0, 0, 0, 2398, 2405, 5, 207, 0, 0, 2399, 2405, 5, 184, 0, 0, 2400, 2402, 5, 46, 0, 0, 2401, 2403, 7, 20, 0, 0, 2402, 2401, 1, 0, 0, 0, 2402, 2403, 1, 0, 0, 0, 2403, 2405, 1, 0, 0, 0, 2404, 2398, 1, 0, 0, 0, 2404, 2399, 1, 0, 0, 0, 2404, 2400, 1, 0, 0, 0, 2405, 2406, 1, 0, 0, 0, 2406, 2407, 3, 0, 0, 0, 2407, 321, 1, 0, 0, 0, 2408, 2411, 3, 324, 162, 0, 2409, 2411, 3, 326, 163, 0, 2410, 2408, 1, 0, 0, 0, 2410, 2409, 1, 0, 0, 0, 2411, 323, 1, 0, 0, 0, 2412, 2414, 5, 103, 0, 0, 2413, 2415, 3, 44, 22, 0, 2414, 2413, 1, 0, 0, 0, 2414, 2415, 1, 0, 0, 0, 2415, 2416, 1, 0, 0, 0, 2416, 2417, 3, 208, 104, 0, 2417, 2418, 3, 128, 64, 0, 2418, 325, 1, 0, 0, 0, 2419, 2421, 5, 103, 0, 0, 2420, 2422, 3, 44, 22, 0, 2421, 2420, 1, 0, 0, 0, 2421, 2422, 1, 0, 0, 0, 2422, 2423, 1, 0, 0, 0, 2423, 2424, 3, 332, 166, 0, 2424, 2425, 3, 128, 64, 0, 2425, 327, 1, 0, 0, 0, 2426, 2427, 3, 330, 165, 0, 2427, 329, 1, 0, 0, 0, 2428, 2429, 3, 332, 166, 0, 2429, 331, 1, 0, 0, 0, 2430, 2434, 5, 211, 0, 0, 2431, 2432, 3, 334, 167, 0, 2432, 2433, 5, 181, 0, 0, 2433, 2435, 1, 0, 0, 0, 2434, 2431, 1, 0, 0, 0, 2434, 2435, 1, 0, 0, 0, 2435, 2436, 1, 0, 0, 0, 2436, 2437, 3, 334, 167, 0, 2437, 2438, 5, 212, 0, 0, 2438, 333, 1, 0, 0, 0, 2439, 2442, 3, 24, 12, 0, 2440, 2442, 3, 10, 5, 0, 2441, 2439, 1, 0, 0, 0, 2441, 2440, 1, 0, 0, 0, 2442, 335, 1, 0, 0, 0, 2443, 2444, 3, 110, 55, 0, 2444, 2445, 5, 101, 0, 0, 2445, 2446, 3, 162, 81, 0, 2446, 2447, 3, 128, 64, 0, 2447, 337, 1, 0, 0, 0, 2448, 2449, 5, 192, 0, 0, 2449, 2453, 3, 342, 171, 0, 2450, 2451, 5, 192, 0, 0, 2451, 2453, 3, 874, 437, 0, 2452, 2448, 1, 0, 0, 0, 2452, 2450, 1, 0, 0, 0, 2453, 339, 1, 0, 0, 0, 2454, 2455, 5, 192, 0, 0, 2455, 2459, 3, 342, 171, 0, 2456, 2457, 5, 192, 0, 0, 2457, 2459, 3, 874, 437, 0, 2458, 2454, 1, 0, 0, 0, 2458, 2456, 1, 0, 0, 0, 2459, 341, 1, 0, 0, 0, 2460, 2461, 3, 220, 110, 0, 2461, 343, 1, 0, 0, 0, 2462, 2464, 3, 340, 170, 0, 2463, 2462, 1, 0, 0, 0, 2464, 2467, 1, 0, 0, 0, 2465, 2463, 1, 0, 0, 0, 2465, 2466, 1, 0, 0, 0, 2466, 2468, 1, 0, 0, 0, 2467, 2465, 1, 0, 0, 0, 2468, 2469, 7, 21, 0, 0, 2469, 2479, 3, 346, 173, 0, 2470, 2471, 5, 1, 0, 0, 2471, 2476, 3, 54, 27, 0, 2472, 2473, 5, 200, 0, 0, 2473, 2475, 3, 54, 27, 0, 2474, 2472, 1, 0, 0, 0, 2475, 2478, 1, 0, 0, 0, 2476, 2474, 1, 0, 0, 0, 2476, 2477, 1, 0, 0, 0, 2477, 2480, 1, 0, 0, 0, 2478, 2476, 1, 0, 0, 0, 2479, 2470, 1, 0, 0, 0, 2479, 2480, 1, 0, 0, 0, 2480, 2481, 1, 0, 0, 0, 2481, 2482, 3, 348, 174, 0, 2482, 345, 1, 0, 0, 0, 2483, 2485, 3, 44, 22, 0, 2484, 2483, 1, 0, 0, 0, 2484, 2485, 1, 0, 0, 0, 2485, 2489, 1, 0, 0, 0, 2486, 2490, 5, 204, 0, 0, 2487, 2488, 5, 158, 0, 0, 2488, 2490, 5, 24, 0, 0, 2489, 2486, 1, 0, 0, 0, 2489, 2487, 1, 0, 0, 0, 2490, 2492, 1, 0, 0, 0, 2491, 2484, 1, 0, 0, 0, 2491, 2492, 1, 0, 0, 0, 2492, 2493, 1, 0, 0, 0, 2493, 2494, 3, 220, 110, 0, 2494, 347, 1, 0, 0, 0, 2495, 2516, 5, 205, 0, 0, 2496, 2500, 5, 214, 0, 0, 2497, 2499, 3, 350, 175, 0, 2498, 2497, 1, 0, 0, 0, 2499, 2502, 1, 0, 0, 0, 2500, 2498, 1, 0, 0, 0, 2500, 2501, 1, 0, 0, 0, 2501, 2503, 1, 0, 0, 0, 2502, 2500, 1, 0, 0, 0, 2503, 2516, 5, 216, 0, 0, 2504, 2511, 5, 214, 0, 0, 2505, 2510, 3, 394, 197, 0, 2506, 2510, 3, 876, 438, 0, 2507, 2510, 3, 86, 43, 0, 2508, 2510, 3, 90, 45, 0, 2509, 2505, 1, 0, 0, 0, 2509, 2506, 1, 0, 0, 0, 2509, 2507, 1, 0, 0, 0, 2509, 2508, 1, 0, 0, 0, 2510, 2513, 1, 0, 0, 0, 2511, 2509, 1, 0, 0, 0, 2511, 2512, 1, 0, 0, 0, 2512, 2514, 1, 0, 0, 0, 2513, 2511, 1, 0, 0, 0, 2514, 2516, 5, 216, 0, 0, 2515, 2495, 1, 0, 0, 0, 2515, 2496, 1, 0, 0, 0, 2515, 2504, 1, 0, 0, 0, 2516, 349, 1, 0, 0, 0, 2517, 2522, 3, 82, 41, 0, 2518, 2522, 3, 352, 176, 0, 2519, 2522, 3, 86, 43, 0, 2520, 2522, 3, 90, 45, 0, 2521, 2517, 1, 0, 0, 0, 2521, 2518, 1, 0, 0, 0, 2521, 2519, 1, 0, 0, 0, 2521, 2520, 1, 0, 0, 0, 2522, 351, 1, 0, 0, 0, 2523, 2524, 3, 354, 177, 0, 2524, 353, 1, 0, 0, 0, 2525, 2527, 5, 65, 0, 0, 2526, 2525, 1, 0, 0, 0, 2526, 2527, 1, 0, 0, 0, 2527, 2529, 1, 0, 0, 0, 2528, 2530, 7, 19, 0, 0, 2529, 2528, 1, 0, 0, 0, 2529, 2530, 1, 0, 0, 0, 2530, 2531, 1, 0, 0, 0, 2531, 2533, 3, 232, 116, 0, 2532, 2534, 3, 196, 98, 0, 2533, 2532, 1, 0, 0, 0, 2533, 2534, 1, 0, 0, 0, 2534, 2536, 1, 0, 0, 0, 2535, 2537, 3, 318, 159, 0, 2536, 2535, 1, 0, 0, 0, 2536, 2537, 1, 0, 0, 0, 2537, 2538, 1, 0, 0, 0, 2538, 2539, 3, 348, 174, 0, 2539, 355, 1, 0, 0, 0, 2540, 2542, 3, 340, 170, 0, 2541, 2540, 1, 0, 0, 0, 2542, 2545, 1, 0, 0, 0, 2543, 2541, 1, 0, 0, 0, 2543, 2544, 1, 0, 0, 0, 2544, 2546, 1, 0, 0, 0, 2545, 2543, 1, 0, 0, 0, 2546, 2547, 3, 360, 180, 0, 2547, 2548, 3, 362, 181, 0, 2548, 357, 1, 0, 0, 0, 2549, 2551, 5, 141, 0, 0, 2550, 2549, 1, 0, 0, 0, 2550, 2551, 1, 0, 0, 0, 2551, 2552, 1, 0, 0, 0, 2552, 2556, 5, 94, 0, 0, 2553, 2555, 3, 340, 170, 0, 2554, 2553, 1, 0, 0, 0, 2555, 2558, 1, 0, 0, 0, 2556, 2554, 1, 0, 0, 0, 2556, 2557, 1, 0, 0, 0, 2557, 2559, 1, 0, 0, 0, 2558, 2556, 1, 0, 0, 0, 2559, 2560, 3, 360, 180, 0, 2560, 2561, 3, 362, 181, 0, 2561, 359, 1, 0, 0, 0, 2562, 2564, 5, 115, 0, 0, 2563, 2565, 3, 44, 22, 0, 2564, 2563, 1, 0, 0, 0, 2564, 2565, 1, 0, 0, 0, 2565, 361, 1, 0, 0, 0, 2566, 2576, 5, 205, 0, 0, 2567, 2571, 5, 214, 0, 0, 2568, 2570, 3, 370, 185, 0, 2569, 2568, 1, 0, 0, 0, 2570, 2573, 1, 0, 0, 0, 2571, 2569, 1, 0, 0, 0, 2571, 2572, 1, 0, 0, 0, 2572, 2574, 1, 0, 0, 0, 2573, 2571, 1, 0, 0, 0, 2574, 2576, 5, 216, 0, 0, 2575, 2566, 1, 0, 0, 0, 2575, 2567, 1, 0, 0, 0, 2576, 363, 1, 0, 0, 0, 2577, 2578, 3, 76, 38, 0, 2578, 2579, 5, 68, 0, 0, 2579, 2580, 3, 0, 0, 0, 2580, 2581, 5, 205, 0, 0, 2581, 365, 1, 0, 0, 0, 2582, 2584, 3, 44, 22, 0, 2583, 2582, 1, 0, 0, 0, 2583, 2584, 1, 0, 0, 0, 2584, 2585, 1, 0, 0, 0, 2585, 2587, 5, 74, 0, 0, 2586, 2583, 1, 0, 0, 0, 2586, 2587, 1, 0, 0, 0, 2587, 2588, 1, 0, 0, 0, 2588, 2593, 3, 88, 44, 0, 2589, 2590, 5, 200, 0, 0, 2590, 2592, 3, 88, 44, 0, 2591, 2589, 1, 0, 0, 0, 2592, 2595, 1, 0, 0, 0, 2593, 2591, 1, 0, 0, 0, 2593, 2594, 1, 0, 0, 0, 2594, 2596, 1, 0, 0, 0, 2595, 2593, 1, 0, 0, 0, 2596, 2597, 5, 154, 0, 0, 2597, 2602, 3, 88, 44, 0, 2598, 2599, 5, 200, 0, 0, 2599, 2601, 3, 88, 44, 0, 2600, 2598, 1, 0, 0, 0, 2601, 2604, 1, 0, 0, 0, 2602, 2600, 1, 0, 0, 0, 2602, 2603, 1, 0, 0, 0, 2603, 367, 1, 0, 0, 0, 2604, 2602, 1, 0, 0, 0, 2605, 2606, 3, 58, 29, 0, 2606, 369, 1, 0, 0, 0, 2607, 2612, 3, 372, 186, 0, 2608, 2612, 3, 364, 182, 0, 2609, 2612, 3, 86, 43, 0, 2610, 2612, 3, 90, 45, 0, 2611, 2607, 1, 0, 0, 0, 2611, 2608, 1, 0, 0, 0, 2611, 2609, 1, 0, 0, 0, 2611, 2610, 1, 0, 0, 0, 2612, 371, 1, 0, 0, 0, 2613, 2616, 3, 76, 38, 0, 2614, 2617, 3, 374, 187, 0, 2615, 2617, 3, 376, 188, 0, 2616, 2614, 1, 0, 0, 0, 2616, 2615, 1, 0, 0, 0, 2617, 373, 1, 0, 0, 0, 2618, 2649, 3, 356, 178, 0, 2619, 2649, 3, 358, 179, 0, 2620, 2649, 3, 58, 29, 0, 2621, 2649, 3, 52, 26, 0, 2622, 2649, 3, 446, 223, 0, 2623, 2649, 3, 450, 225, 0, 2624, 2649, 3, 462, 231, 0, 2625, 2649, 3, 464, 232, 0, 2626, 2649, 3, 488, 244, 0, 2627, 2649, 3, 492, 246, 0, 2628, 2649, 3, 506, 253, 0, 2629, 2649, 3, 556, 278, 0, 2630, 2649, 3, 520, 260, 0, 2631, 2649, 3, 496, 248, 0, 2632, 2649, 3, 574, 287, 0, 2633, 2649, 3, 748, 374, 0, 2634, 2649, 3, 686, 343, 0, 2635, 2649, 3, 760, 380, 0, 2636, 2649, 3, 768, 384, 0, 2637, 2649, 3, 808, 404, 0, 2638, 2649, 3, 812, 406, 0, 2639, 2649, 3, 824, 412, 0, 2640, 2649, 3, 828, 414, 0, 2641, 2649, 3, 836, 418, 0, 2642, 2649, 3, 842, 421, 0, 2643, 2649, 3, 864, 432, 0, 2644, 2649, 3, 868, 434, 0, 2645, 2649, 3, 872, 436, 0, 2646, 2649, 3, 550, 275, 0, 2647, 2649, 3, 880, 440, 0, 2648, 2618, 1, 0, 0, 0, 2648, 2619, 1, 0, 0, 0, 2648, 2620, 1, 0, 0, 0, 2648, 2621, 1, 0, 0, 0, 2648, 2622, 1, 0, 0, 0, 2648, 2623, 1, 0, 0, 0, 2648, 2624, 1, 0, 0, 0, 2648, 2625, 1, 0, 0, 0, 2648, 2626, 1, 0, 0, 0, 2648, 2627, 1, 0, 0, 0, 2648, 2628, 1, 0, 0, 0, 2648, 2629, 1, 0, 0, 0, 2648, 2630, 1, 0, 0, 0, 2648, 2631, 1, 0, 0, 0, 2648, 2632, 1, 0, 0, 0, 2648, 2633, 1, 0, 0, 0, 2648, 2634, 1, 0, 0, 0, 2648, 2635, 1, 0, 0, 0, 2648, 2636, 1, 0, 0, 0, 2648, 2637, 1, 0, 0, 0, 2648, 2638, 1, 0, 0, 0, 2648, 2639, 1, 0, 0, 0, 2648, 2640, 1, 0, 0, 0, 2648, 2641, 1, 0, 0, 0, 2648, 2642, 1, 0, 0, 0, 2648, 2643, 1, 0, 0, 0, 2648, 2644, 1, 0, 0, 0, 2648, 2645, 1, 0, 0, 0, 2648, 2646, 1, 0, 0, 0, 2648, 2647, 1, 0, 0, 0, 2649, 375, 1, 0, 0, 0, 2650, 2653, 3, 432, 216, 0, 2651, 2653, 3, 436, 218, 0, 2652, 2650, 1, 0, 0, 0, 2652, 2651, 1, 0, 0, 0, 2653, 377, 1, 0, 0, 0, 2654, 2655, 7, 22, 0, 0, 2655, 379, 1, 0, 0, 0, 2656, 2657, 3, 340, 170, 0, 2657, 381, 1, 0, 0, 0, 2658, 2660, 3, 378, 189, 0, 2659, 2658, 1, 0, 0, 0, 2659, 2660, 1, 0, 0, 0, 2660, 2664, 1, 0, 0, 0, 2661, 2663, 3, 380, 190, 0, 2662, 2661, 1, 0, 0, 0, 2663, 2666, 1, 0, 0, 0, 2664, 2662, 1, 0, 0, 0, 2664, 2665, 1, 0, 0, 0, 2665, 383, 1, 0, 0, 0, 2666, 2664, 1, 0, 0, 0, 2667, 2668, 3, 386, 193, 0, 2668, 2669, 3, 388, 194, 0, 2669, 385, 1, 0, 0, 0, 2670, 2672, 3, 44, 22, 0, 2671, 2670, 1, 0, 0, 0, 2671, 2672, 1, 0, 0, 0, 2672, 2674, 1, 0, 0, 0, 2673, 2675, 3, 444, 222, 0, 2674, 2673, 1, 0, 0, 0, 2674, 2675, 1, 0, 0, 0, 2675, 387, 1, 0, 0, 0, 2676, 2686, 5, 205, 0, 0, 2677, 2681, 5, 214, 0, 0, 2678, 2680, 3, 390, 195, 0, 2679, 2678, 1, 0, 0, 0, 2680, 2683, 1, 0, 0, 0, 2681, 2679, 1, 0, 0, 0, 2681, 2682, 1, 0, 0, 0, 2682, 2684, 1, 0, 0, 0, 2683, 2681, 1, 0, 0, 0, 2684, 2686, 5, 216, 0, 0, 2685, 2676, 1, 0, 0, 0, 2685, 2677, 1, 0, 0, 0, 2686, 389, 1, 0, 0, 0, 2687, 2704, 3, 90, 45, 0, 2688, 2689, 3, 76, 38, 0, 2689, 2690, 3, 392, 196, 0, 2690, 2704, 1, 0, 0, 0, 2691, 2693, 3, 480, 240, 0, 2692, 2691, 1, 0, 0, 0, 2692, 2693, 1, 0, 0, 0, 2693, 2694, 1, 0, 0, 0, 2694, 2695, 3, 76, 38, 0, 2695, 2696, 3, 434, 217, 0, 2696, 2704, 1, 0, 0, 0, 2697, 2699, 3, 480, 240, 0, 2698, 2697, 1, 0, 0, 0, 2698, 2699, 1, 0, 0, 0, 2699, 2700, 1, 0, 0, 0, 2700, 2701, 3, 76, 38, 0, 2701, 2702, 3, 436, 218, 0, 2702, 2704, 1, 0, 0, 0, 2703, 2687, 1, 0, 0, 0, 2703, 2688, 1, 0, 0, 0, 2703, 2692, 1, 0, 0, 0, 2703, 2698, 1, 0, 0, 0, 2704, 391, 1, 0, 0, 0, 2705, 2710, 5, 7, 0, 0, 2706, 2707, 5, 206, 0, 0, 2707, 2708, 3, 40, 20, 0, 2708, 2709, 5, 208, 0, 0, 2709, 2711, 1, 0, 0, 0, 2710, 2706, 1, 0, 0, 0, 2710, 2711, 1, 0, 0, 0, 2711, 2713, 1, 0, 0, 0, 2712, 2714, 3, 40, 20, 0, 2713, 2712, 1, 0, 0, 0, 2713, 2714, 1, 0, 0, 0, 2714, 2715, 1, 0, 0, 0, 2715, 2716, 5, 71, 0, 0, 2716, 2717, 3, 88, 44, 0, 2717, 2718, 3, 46, 23, 0, 2718, 2724, 1, 0, 0, 0, 2719, 2720, 5, 164, 0, 0, 2720, 2724, 3, 442, 221, 0, 2721, 2724, 3, 374, 187, 0, 2722, 2724, 3, 432, 216, 0, 2723, 2705, 1, 0, 0, 0, 2723, 2719, 1, 0, 0, 0, 2723, 2721, 1, 0, 0, 0, 2723, 2722, 1, 0, 0, 0, 2724, 393, 1, 0, 0, 0, 2725, 2726, 3, 76, 38, 0, 2726, 2727, 3, 374, 187, 0, 2727, 395, 1, 0, 0, 0, 2728, 2729, 3, 76, 38, 0, 2729, 2730, 5, 164, 0, 0, 2730, 2731, 3, 442, 221, 0, 2731, 397, 1, 0, 0, 0, 2732, 2733, 3, 76, 38, 0, 2733, 2734, 3, 432, 216, 0, 2734, 399, 1, 0, 0, 0, 2735, 2736, 3, 76, 38, 0, 2736, 2737, 3, 438, 219, 0, 2737, 401, 1, 0, 0, 0, 2738, 2739, 3, 76, 38, 0, 2739, 2740, 3, 440, 220, 0, 2740, 403, 1, 0, 0, 0, 2741, 2743, 3, 182, 91, 0, 2742, 2741, 1, 0, 0, 0, 2742, 2743, 1, 0, 0, 0, 2743, 2745, 1, 0, 0, 0, 2744, 2746, 5, 49, 0, 0, 2745, 2744, 1, 0, 0, 0, 2745, 2746, 1, 0, 0, 0, 2746, 2748, 1, 0, 0, 0, 2747, 2749, 7, 22, 0, 0, 2748, 2747, 1, 0, 0, 0, 2748, 2749, 1, 0, 0, 0, 2749, 2751, 1, 0, 0, 0, 2750, 2752, 5, 40, 0, 0, 2751, 2750, 1, 0, 0, 0, 2751, 2752, 1, 0, 0, 0, 2752, 405, 1, 0, 0, 0, 2753, 2755, 3, 404, 202, 0, 2754, 2756, 5, 127, 0, 0, 2755, 2754, 1, 0, 0, 0, 2755, 2756, 1, 0, 0, 0, 2756, 407, 1, 0, 0, 0, 2757, 2758, 5, 56, 0, 0, 2758, 2759, 3, 178, 89, 0, 2759, 409, 1, 0, 0, 0, 2760, 2761, 3, 340, 170, 0, 2761, 411, 1, 0, 0, 0, 2762, 2765, 3, 408, 204, 0, 2763, 2765, 3, 406, 203, 0, 2764, 2762, 1, 0, 0, 0, 2764, 2763, 1, 0, 0, 0, 2765, 413, 1, 0, 0, 0, 2766, 2770, 3, 412, 206, 0, 2767, 2769, 3, 410, 205, 0, 2768, 2767, 1, 0, 0, 0, 2769, 2772, 1, 0, 0, 0, 2770, 2768, 1, 0, 0, 0, 2770, 2771, 1, 0, 0, 0, 2771, 415, 1, 0, 0, 0, 2772, 2770, 1, 0, 0, 0, 2773, 2775, 3, 418, 209, 0, 2774, 2773, 1, 0, 0, 0, 2774, 2775, 1, 0, 0, 0, 2775, 2776, 1, 0, 0, 0, 2776, 2777, 3, 420, 210, 0, 2777, 417, 1, 0, 0, 0, 2778, 2780, 3, 44, 22, 0, 2779, 2781, 3, 196, 98, 0, 2780, 2779, 1, 0, 0, 0, 2780, 2781, 1, 0, 0, 0, 2781, 2784, 1, 0, 0, 0, 2782, 2784, 3, 196, 98, 0, 2783, 2778, 1, 0, 0, 0, 2783, 2782, 1, 0, 0, 0, 2784, 419, 1, 0, 0, 0, 2785, 2787, 3, 318, 159, 0, 2786, 2785, 1, 0, 0, 0, 2786, 2787, 1, 0, 0, 0, 2787, 2788, 1, 0, 0, 0, 2788, 2789, 3, 422, 211, 0, 2789, 421, 1, 0, 0, 0, 2790, 2791, 3, 388, 194, 0, 2791, 423, 1, 0, 0, 0, 2792, 2793, 3, 404, 202, 0, 2793, 2794, 3, 416, 208, 0, 2794, 425, 1, 0, 0, 0, 2795, 2798, 3, 408, 204, 0, 2796, 2798, 3, 404, 202, 0, 2797, 2795, 1, 0, 0, 0, 2797, 2796, 1, 0, 0, 0, 2798, 2799, 1, 0, 0, 0, 2799, 2800, 5, 127, 0, 0, 2800, 2801, 3, 416, 208, 0, 2801, 427, 1, 0, 0, 0, 2802, 2803, 3, 408, 204, 0, 2803, 2804, 3, 184, 92, 0, 2804, 2805, 3, 420, 210, 0, 2805, 429, 1, 0, 0, 0, 2806, 2810, 3, 226, 113, 0, 2807, 2809, 3, 200, 100, 0, 2808, 2807, 1, 0, 0, 0, 2809, 2812, 1, 0, 0, 0, 2810, 2808, 1, 0, 0, 0, 2810, 2811, 1, 0, 0, 0, 2811, 2813, 1, 0, 0, 0, 2812, 2810, 1, 0, 0, 0, 2813, 2814, 3, 422, 211, 0, 2814, 431, 1, 0, 0, 0, 2815, 2824, 3, 426, 213, 0, 2816, 2824, 3, 428, 214, 0, 2817, 2824, 3, 448, 224, 0, 2818, 2824, 3, 458, 229, 0, 2819, 2824, 3, 516, 258, 0, 2820, 2824, 3, 518, 259, 0, 2821, 2824, 3, 882, 441, 0, 2822, 2824, 3, 424, 212, 0, 2823, 2815, 1, 0, 0, 0, 2823, 2816, 1, 0, 0, 0, 2823, 2817, 1, 0, 0, 0, 2823, 2818, 1, 0, 0, 0, 2823, 2819, 1, 0, 0, 0, 2823, 2820, 1, 0, 0, 0, 2823, 2821, 1, 0, 0, 0, 2823, 2822, 1, 0, 0, 0, 2824, 433, 1, 0, 0, 0, 2825, 2827, 5, 56, 0, 0, 2826, 2828, 3, 40, 20, 0, 2827, 2826, 1, 0, 0, 0, 2827, 2828, 1, 0, 0, 0, 2828, 2830, 1, 0, 0, 0, 2829, 2831, 3, 264, 132, 0, 2830, 2829, 1, 0, 0, 0, 2830, 2831, 1, 0, 0, 0, 2831, 2833, 1, 0, 0, 0, 2832, 2834, 5, 106, 0, 0, 2833, 2832, 1, 0, 0, 0, 2833, 2834, 1, 0, 0, 0, 2834, 2835, 1, 0, 0, 0, 2835, 2836, 3, 436, 218, 0, 2836, 435, 1, 0, 0, 0, 2837, 2840, 3, 438, 219, 0, 2838, 2840, 3, 440, 220, 0, 2839, 2837, 1, 0, 0, 0, 2839, 2838, 1, 0, 0, 0, 2840, 437, 1, 0, 0, 0, 2841, 2857, 3, 470, 235, 0, 2842, 2857, 3, 472, 236, 0, 2843, 2857, 3, 474, 237, 0, 2844, 2857, 3, 478, 239, 0, 2845, 2857, 3, 490, 245, 0, 2846, 2857, 3, 494, 247, 0, 2847, 2857, 3, 852, 426, 0, 2848, 2857, 3, 870, 435, 0, 2849, 2857, 3, 502, 251, 0, 2850, 2857, 3, 508, 254, 0, 2851, 2857, 3, 536, 268, 0, 2852, 2857, 3, 552, 276, 0, 2853, 2857, 3, 558, 279, 0, 2854, 2857, 3, 566, 283, 0, 2855, 2857, 3, 568, 284, 0, 2856, 2841, 1, 0, 0, 0, 2856, 2842, 1, 0, 0, 0, 2856, 2843, 1, 0, 0, 0, 2856, 2844, 1, 0, 0, 0, 2856, 2845, 1, 0, 0, 0, 2856, 2846, 1, 0, 0, 0, 2856, 2847, 1, 0, 0, 0, 2856, 2848, 1, 0, 0, 0, 2856, 2849, 1, 0, 0, 0, 2856, 2850, 1, 0, 0, 0, 2856, 2851, 1, 0, 0, 0, 2856, 2852, 1, 0, 0, 0, 2856, 2853, 1, 0, 0, 0, 2856, 2854, 1, 0, 0, 0, 2856, 2855, 1, 0, 0, 0, 2857, 439, 1, 0, 0, 0, 2858, 2875, 3, 592, 296, 0, 2859, 2875, 3, 750, 375, 0, 2860, 2875, 3, 714, 357, 0, 2861, 2875, 3, 762, 381, 0, 2862, 2875, 3, 796, 398, 0, 2863, 2875, 3, 810, 405, 0, 2864, 2875, 3, 814, 407, 0, 2865, 2875, 3, 826, 413, 0, 2866, 2875, 3, 830, 415, 0, 2867, 2875, 3, 838, 419, 0, 2868, 2875, 3, 866, 433, 0, 2869, 2875, 3, 596, 298, 0, 2870, 2875, 3, 718, 359, 0, 2871, 2875, 3, 840, 420, 0, 2872, 2875, 3, 764, 382, 0, 2873, 2875, 3, 798, 399, 0, 2874, 2858, 1, 0, 0, 0, 2874, 2859, 1, 0, 0, 0, 2874, 2860, 1, 0, 0, 0, 2874, 2861, 1, 0, 0, 0, 2874, 2862, 1, 0, 0, 0, 2874, 2863, 1, 0, 0, 0, 2874, 2864, 1, 0, 0, 0, 2874, 2865, 1, 0, 0, 0, 2874, 2866, 1, 0, 0, 0, 2874, 2867, 1, 0, 0, 0, 2874, 2868, 1, 0, 0, 0, 2874, 2869, 1, 0, 0, 0, 2874, 2870, 1, 0, 0, 0, 2874, 2871, 1, 0, 0, 0, 2874, 2872, 1, 0, 0, 0, 2874, 2873, 1, 0, 0, 0, 2875, 441, 1, 0, 0, 0, 2876, 2898, 3, 430, 215, 0, 2877, 2898, 3, 426, 213, 0, 2878, 2898, 3, 448, 224, 0, 2879, 2898, 3, 516, 258, 0, 2880, 2898, 3, 518, 259, 0, 2881, 2898, 3, 470, 235, 0, 2882, 2898, 3, 472, 236, 0, 2883, 2898, 3, 474, 237, 0, 2884, 2898, 3, 478, 239, 0, 2885, 2898, 3, 490, 245, 0, 2886, 2898, 3, 494, 247, 0, 2887, 2898, 3, 852, 426, 0, 2888, 2898, 3, 870, 435, 0, 2889, 2898, 3, 502, 251, 0, 2890, 2898, 3, 508, 254, 0, 2891, 2898, 3, 536, 268, 0, 2892, 2898, 3, 552, 276, 0, 2893, 2898, 3, 558, 279, 0, 2894, 2898, 3, 566, 283, 0, 2895, 2898, 3, 568, 284, 0, 2896, 2898, 3, 440, 220, 0, 2897, 2876, 1, 0, 0, 0, 2897, 2877, 1, 0, 0, 0, 2897, 2878, 1, 0, 0, 0, 2897, 2879, 1, 0, 0, 0, 2897, 2880, 1, 0, 0, 0, 2897, 2881, 1, 0, 0, 0, 2897, 2882, 1, 0, 0, 0, 2897, 2883, 1, 0, 0, 0, 2897, 2884, 1, 0, 0, 0, 2897, 2885, 1, 0, 0, 0, 2897, 2886, 1, 0, 0, 0, 2897, 2887, 1, 0, 0, 0, 2897, 2888, 1, 0, 0, 0, 2897, 2889, 1, 0, 0, 0, 2897, 2890, 1, 0, 0, 0, 2897, 2891, 1, 0, 0, 0, 2897, 2892, 1, 0, 0, 0, 2897, 2893, 1, 0, 0, 0, 2897, 2894, 1, 0, 0, 0, 2897, 2895, 1, 0, 0, 0, 2897, 2896, 1, 0, 0, 0, 2898, 443, 1, 0, 0, 0, 2899, 2900, 7, 11, 0, 0, 2900, 2905, 3, 168, 84, 0, 2901, 2902, 5, 200, 0, 0, 2902, 2904, 3, 168, 84, 0, 2903, 2901, 1, 0, 0, 0, 2904, 2907, 1, 0, 0, 0, 2905, 2903, 1, 0, 0, 0, 2905, 2906, 1, 0, 0, 0, 2906, 445, 1, 0, 0, 0, 2907, 2905, 1, 0, 0, 0, 2908, 2909, 3, 382, 191, 0, 2909, 2910, 5, 19, 0, 0, 2910, 2911, 5, 45, 0, 0, 2911, 2912, 3, 384, 192, 0, 2912, 447, 1, 0, 0, 0, 2913, 2914, 3, 414, 207, 0, 2914, 2915, 5, 19, 0, 0, 2915, 2916, 3, 416, 208, 0, 2916, 449, 1, 0, 0, 0, 2917, 2919, 3, 380, 190, 0, 2918, 2917, 1, 0, 0, 0, 2919, 2922, 1, 0, 0, 0, 2920, 2918, 1, 0, 0, 0, 2920, 2921, 1, 0, 0, 0, 2921, 2923, 1, 0, 0, 0, 2922, 2920, 1, 0, 0, 0, 2923, 2924, 5, 58, 0, 0, 2924, 2925, 5, 45, 0, 0, 2925, 2926, 3, 386, 193, 0, 2926, 2927, 3, 452, 226, 0, 2927, 451, 1, 0, 0, 0, 2928, 2939, 5, 205, 0, 0, 2929, 2934, 5, 214, 0, 0, 2930, 2933, 3, 368, 184, 0, 2931, 2933, 3, 454, 227, 0, 2932, 2930, 1, 0, 0, 0, 2932, 2931, 1, 0, 0, 0, 2933, 2936, 1, 0, 0, 0, 2934, 2932, 1, 0, 0, 0, 2934, 2935, 1, 0, 0, 0, 2935, 2937, 1, 0, 0, 0, 2936, 2934, 1, 0, 0, 0, 2937, 2939, 5, 216, 0, 0, 2938, 2928, 1, 0, 0, 0, 2938, 2929, 1, 0, 0, 0, 2939, 453, 1, 0, 0, 0, 2940, 2942, 3, 340, 170, 0, 2941, 2940, 1, 0, 0, 0, 2942, 2945, 1, 0, 0, 0, 2943, 2941, 1, 0, 0, 0, 2943, 2944, 1, 0, 0, 0, 2944, 2946, 1, 0, 0, 0, 2945, 2943, 1, 0, 0, 0, 2946, 2947, 3, 76, 38, 0, 2947, 2948, 3, 456, 228, 0, 2948, 455, 1, 0, 0, 0, 2949, 2951, 5, 58, 0, 0, 2950, 2949, 1, 0, 0, 0, 2950, 2951, 1, 0, 0, 0, 2951, 2952, 1, 0, 0, 0, 2952, 2953, 3, 416, 208, 0, 2953, 457, 1, 0, 0, 0, 2954, 2955, 3, 414, 207, 0, 2955, 2956, 5, 58, 0, 0, 2956, 2957, 3, 416, 208, 0, 2957, 459, 1, 0, 0, 0, 2958, 2960, 3, 378, 189, 0, 2959, 2958, 1, 0, 0, 0, 2959, 2960, 1, 0, 0, 0, 2960, 2963, 1, 0, 0, 0, 2961, 2962, 5, 82, 0, 0, 2962, 2964, 3, 466, 233, 0, 2963, 2961, 1, 0, 0, 0, 2963, 2964, 1, 0, 0, 0, 2964, 2968, 1, 0, 0, 0, 2965, 2967, 3, 380, 190, 0, 2966, 2965, 1, 0, 0, 0, 2967, 2970, 1, 0, 0, 0, 2968, 2966, 1, 0, 0, 0, 2968, 2969, 1, 0, 0, 0, 2969, 461, 1, 0, 0, 0, 2970, 2968, 1, 0, 0, 0, 2971, 2972, 3, 460, 230, 0, 2972, 2973, 5, 110, 0, 0, 2973, 2974, 5, 45, 0, 0, 2974, 2975, 3, 384, 192, 0, 2975, 463, 1, 0, 0, 0, 2976, 2978, 3, 378, 189, 0, 2977, 2976, 1, 0, 0, 0, 2977, 2978, 1, 0, 0, 0, 2978, 2979, 1, 0, 0, 0, 2979, 2983, 5, 82, 0, 0, 2980, 2982, 3, 380, 190, 0, 2981, 2980, 1, 0, 0, 0, 2982, 2985, 1, 0, 0, 0, 2983, 2981, 1, 0, 0, 0, 2983, 2984, 1, 0, 0, 0, 2984, 2986, 1, 0, 0, 0, 2985, 2983, 1, 0, 0, 0, 2986, 2987, 5, 45, 0, 0, 2987, 2988, 3, 384, 192, 0, 2988, 2989, 3, 466, 233, 0, 2989, 465, 1, 0, 0, 0, 2990, 2991, 3, 894, 447, 0, 2991, 467, 1, 0, 0, 0, 2992, 2994, 3, 406, 203, 0, 2993, 2995, 5, 82, 0, 0, 2994, 2993, 1, 0, 0, 0, 2994, 2995, 1, 0, 0, 0, 2995, 2997, 1, 0, 0, 0, 2996, 2998, 3, 476, 238, 0, 2997, 2996, 1, 0, 0, 0, 2997, 2998, 1, 0, 0, 0, 2998, 3002, 1, 0, 0, 0, 2999, 3001, 3, 410, 205, 0, 3000, 2999, 1, 0, 0, 0, 3001, 3004, 1, 0, 0, 0, 3002, 3000, 1, 0, 0, 0, 3002, 3003, 1, 0, 0, 0, 3003, 469, 1, 0, 0, 0, 3004, 3002, 1, 0, 0, 0, 3005, 3006, 3, 468, 234, 0, 3006, 3007, 5, 110, 0, 0, 3007, 3008, 3, 416, 208, 0, 3008, 471, 1, 0, 0, 0, 3009, 3010, 3, 406, 203, 0, 3010, 3014, 5, 82, 0, 0, 3011, 3013, 3, 410, 205, 0, 3012, 3011, 1, 0, 0, 0, 3013, 3016, 1, 0, 0, 0, 3014, 3012, 1, 0, 0, 0, 3014, 3015, 1, 0, 0, 0, 3015, 3017, 1, 0, 0, 0, 3016, 3014, 1, 0, 0, 0, 3017, 3018, 3, 416, 208, 0, 3018, 473, 1, 0, 0, 0, 3019, 3021, 3, 406, 203, 0, 3020, 3022, 5, 82, 0, 0, 3021, 3020, 1, 0, 0, 0, 3021, 3022, 1, 0, 0, 0, 3022, 3023, 1, 0, 0, 0, 3023, 3027, 3, 476, 238, 0, 3024, 3026, 3, 410, 205, 0, 3025, 3024, 1, 0, 0, 0, 3026, 3029, 1, 0, 0, 0, 3027, 3025, 1, 0, 0, 0, 3027, 3028, 1, 0, 0, 0, 3028, 3030, 1, 0, 0, 0, 3029, 3027, 1, 0, 0, 0, 3030, 3031, 3, 416, 208, 0, 3031, 475, 1, 0, 0, 0, 3032, 3033, 7, 23, 0, 0, 3033, 477, 1, 0, 0, 0, 3034, 3035, 3, 468, 234, 0, 3035, 3044, 5, 59, 0, 0, 3036, 3038, 3, 226, 113, 0, 3037, 3039, 3, 196, 98, 0, 3038, 3037, 1, 0, 0, 0, 3038, 3039, 1, 0, 0, 0, 3039, 3045, 1, 0, 0, 0, 3040, 3042, 5, 110, 0, 0, 3041, 3043, 3, 418, 209, 0, 3042, 3041, 1, 0, 0, 0, 3042, 3043, 1, 0, 0, 0, 3043, 3045, 1, 0, 0, 0, 3044, 3036, 1, 0, 0, 0, 3044, 3040, 1, 0, 0, 0, 3045, 3046, 1, 0, 0, 0, 3046, 3047, 3, 420, 210, 0, 3047, 479, 1, 0, 0, 0, 3048, 3049, 5, 152, 0, 0, 3049, 3050, 3, 482, 241, 0, 3050, 481, 1, 0, 0, 0, 3051, 3052, 3, 484, 242, 0, 3052, 483, 1, 0, 0, 0, 3053, 3054, 3, 486, 243, 0, 3054, 485, 1, 0, 0, 0, 3055, 3057, 3, 328, 164, 0, 3056, 3055, 1, 0, 0, 0, 3056, 3057, 1, 0, 0, 0, 3057, 487, 1, 0, 0, 0, 3058, 3059, 3, 460, 230, 0, 3059, 3060, 5, 91, 0, 0, 3060, 3061, 5, 45, 0, 0, 3061, 3062, 3, 384, 192, 0, 3062, 489, 1, 0, 0, 0, 3063, 3064, 3, 468, 234, 0, 3064, 3065, 5, 91, 0, 0, 3065, 3066, 3, 416, 208, 0, 3066, 491, 1, 0, 0, 0, 3067, 3068, 3, 460, 230, 0, 3068, 3069, 5, 117, 0, 0, 3069, 3070, 5, 45, 0, 0, 3070, 3071, 3, 384, 192, 0, 3071, 493, 1, 0, 0, 0, 3072, 3073, 3, 468, 234, 0, 3073, 3074, 5, 117, 0, 0, 3074, 3075, 3, 416, 208, 0, 3075, 495, 1, 0, 0, 0, 3076, 3077, 3, 382, 191, 0, 3077, 3078, 5, 119, 0, 0, 3078, 3079, 5, 45, 0, 0, 3079, 3080, 3, 384, 192, 0, 3080, 3081, 3, 498, 249, 0, 3081, 497, 1, 0, 0, 0, 3082, 3083, 3, 500, 250, 0, 3083, 499, 1, 0, 0, 0, 3084, 3085, 3, 902, 451, 0, 3085, 501, 1, 0, 0, 0, 3086, 3087, 3, 468, 234, 0, 3087, 3088, 5, 119, 0, 0, 3088, 3089, 3, 416, 208, 0, 3089, 503, 1, 0, 0, 0, 3090, 3091, 5, 217, 0, 0, 3091, 3092, 3, 88, 44, 0, 3092, 505, 1, 0, 0, 0, 3093, 3094, 3, 460, 230, 0, 3094, 3095, 5, 37, 0, 0, 3095, 3096, 5, 45, 0, 0, 3096, 3097, 3, 384, 192, 0, 3097, 507, 1, 0, 0, 0, 3098, 3112, 3, 468, 234, 0, 3099, 3101, 5, 37, 0, 0, 3100, 3102, 3, 418, 209, 0, 3101, 3100, 1, 0, 0, 0, 3101, 3102, 1, 0, 0, 0, 3102, 3104, 1, 0, 0, 0, 3103, 3105, 3, 318, 159, 0, 3104, 3103, 1, 0, 0, 0, 3104, 3105, 1, 0, 0, 0, 3105, 3108, 1, 0, 0, 0, 3106, 3107, 5, 36, 0, 0, 3107, 3109, 3, 510, 255, 0, 3108, 3106, 1, 0, 0, 0, 3108, 3109, 1, 0, 0, 0, 3109, 3113, 1, 0, 0, 0, 3110, 3111, 5, 36, 0, 0, 3111, 3113, 3, 510, 255, 0, 3112, 3099, 1, 0, 0, 0, 3112, 3110, 1, 0, 0, 0, 3113, 3114, 1, 0, 0, 0, 3114, 3115, 3, 422, 211, 0, 3115, 509, 1, 0, 0, 0, 3116, 3119, 3, 512, 256, 0, 3117, 3119, 3, 514, 257, 0, 3118, 3116, 1, 0, 0, 0, 3118, 3117, 1, 0, 0, 0, 3119, 511, 1, 0, 0, 0, 3120, 3121, 3, 260, 130, 0, 3121, 3122, 5, 154, 0, 0, 3122, 3123, 3, 260, 130, 0, 3123, 513, 1, 0, 0, 0, 3124, 3125, 5, 196, 0, 0, 3125, 3126, 3, 260, 130, 0, 3126, 3127, 5, 200, 0, 0, 3127, 3132, 3, 260, 130, 0, 3128, 3129, 5, 200, 0, 0, 3129, 3131, 3, 260, 130, 0, 3130, 3128, 1, 0, 0, 0, 3131, 3134, 1, 0, 0, 0, 3132, 3130, 1, 0, 0, 0, 3132, 3133, 1, 0, 0, 0, 3133, 3135, 1, 0, 0, 0, 3134, 3132, 1, 0, 0, 0, 3135, 3136, 5, 197, 0, 0, 3136, 515, 1, 0, 0, 0, 3137, 3142, 3, 414, 207, 0, 3138, 3140, 5, 22, 0, 0, 3139, 3141, 3, 418, 209, 0, 3140, 3139, 1, 0, 0, 0, 3140, 3141, 1, 0, 0, 0, 3141, 3143, 1, 0, 0, 0, 3142, 3138, 1, 0, 0, 0, 3142, 3143, 1, 0, 0, 0, 3143, 3144, 1, 0, 0, 0, 3144, 3145, 5, 21, 0, 0, 3145, 3146, 3, 260, 130, 0, 3146, 3147, 5, 207, 0, 0, 3147, 3148, 3, 260, 130, 0, 3148, 3149, 3, 422, 211, 0, 3149, 517, 1, 0, 0, 0, 3150, 3155, 3, 414, 207, 0, 3151, 3153, 5, 150, 0, 0, 3152, 3154, 3, 418, 209, 0, 3153, 3152, 1, 0, 0, 0, 3153, 3154, 1, 0, 0, 0, 3154, 3156, 1, 0, 0, 0, 3155, 3151, 1, 0, 0, 0, 3155, 3156, 1, 0, 0, 0, 3156, 3157, 1, 0, 0, 0, 3157, 3158, 5, 69, 0, 0, 3158, 3159, 3, 260, 130, 0, 3159, 3160, 5, 152, 0, 0, 3160, 3161, 3, 260, 130, 0, 3161, 3162, 3, 422, 211, 0, 3162, 519, 1, 0, 0, 0, 3163, 3164, 3, 460, 230, 0, 3164, 3165, 5, 85, 0, 0, 3165, 3166, 5, 45, 0, 0, 3166, 3167, 3, 386, 193, 0, 3167, 3168, 3, 522, 261, 0, 3168, 521, 1, 0, 0, 0, 3169, 3179, 5, 205, 0, 0, 3170, 3174, 5, 214, 0, 0, 3171, 3173, 3, 524, 262, 0, 3172, 3171, 1, 0, 0, 0, 3173, 3176, 1, 0, 0, 0, 3174, 3172, 1, 0, 0, 0, 3174, 3175, 1, 0, 0, 0, 3175, 3177, 1, 0, 0, 0, 3176, 3174, 1, 0, 0, 0, 3177, 3179, 5, 216, 0, 0, 3178, 3169, 1, 0, 0, 0, 3178, 3170, 1, 0, 0, 0, 3179, 523, 1, 0, 0, 0, 3180, 3190, 3, 394, 197, 0, 3181, 3190, 3, 396, 198, 0, 3182, 3190, 3, 526, 263, 0, 3183, 3185, 3, 480, 240, 0, 3184, 3183, 1, 0, 0, 0, 3184, 3185, 1, 0, 0, 0, 3185, 3186, 1, 0, 0, 0, 3186, 3190, 3, 530, 265, 0, 3187, 3190, 3, 86, 43, 0, 3188, 3190, 3, 90, 45, 0, 3189, 3180, 1, 0, 0, 0, 3189, 3181, 1, 0, 0, 0, 3189, 3182, 1, 0, 0, 0, 3189, 3184, 1, 0, 0, 0, 3189, 3187, 1, 0, 0, 0, 3189, 3188, 1, 0, 0, 0, 3190, 525, 1, 0, 0, 0, 3191, 3192, 3, 76, 38, 0, 3192, 3193, 3, 528, 264, 0, 3193, 527, 1, 0, 0, 0, 3194, 3200, 3, 426, 213, 0, 3195, 3200, 3, 448, 224, 0, 3196, 3200, 3, 458, 229, 0, 3197, 3200, 3, 516, 258, 0, 3198, 3200, 3, 518, 259, 0, 3199, 3194, 1, 0, 0, 0, 3199, 3195, 1, 0, 0, 0, 3199, 3196, 1, 0, 0, 0, 3199, 3197, 1, 0, 0, 0, 3199, 3198, 1, 0, 0, 0, 3200, 529, 1, 0, 0, 0, 3201, 3202, 3, 76, 38, 0, 3202, 3203, 3, 532, 266, 0, 3203, 531, 1, 0, 0, 0, 3204, 3209, 3, 534, 267, 0, 3205, 3209, 3, 434, 217, 0, 3206, 3209, 3, 438, 219, 0, 3207, 3209, 3, 440, 220, 0, 3208, 3204, 1, 0, 0, 0, 3208, 3205, 1, 0, 0, 0, 3208, 3206, 1, 0, 0, 0, 3208, 3207, 1, 0, 0, 0, 3209, 533, 1, 0, 0, 0, 3210, 3211, 5, 56, 0, 0, 3211, 3212, 3, 416, 208, 0, 3212, 535, 1, 0, 0, 0, 3213, 3214, 3, 468, 234, 0, 3214, 3215, 5, 85, 0, 0, 3215, 3216, 3, 538, 269, 0, 3216, 3217, 3, 522, 261, 0, 3217, 537, 1, 0, 0, 0, 3218, 3220, 3, 418, 209, 0, 3219, 3218, 1, 0, 0, 0, 3219, 3220, 1, 0, 0, 0, 3220, 3222, 1, 0, 0, 0, 3221, 3223, 3, 318, 159, 0, 3222, 3221, 1, 0, 0, 0, 3222, 3223, 1, 0, 0, 0, 3223, 3226, 1, 0, 0, 0, 3224, 3225, 5, 36, 0, 0, 3225, 3227, 3, 540, 270, 0, 3226, 3224, 1, 0, 0, 0, 3226, 3227, 1, 0, 0, 0, 3227, 3230, 1, 0, 0, 0, 3228, 3230, 3, 540, 270, 0, 3229, 3219, 1, 0, 0, 0, 3229, 3228, 1, 0, 0, 0, 3230, 539, 1, 0, 0, 0, 3231, 3234, 3, 542, 271, 0, 3232, 3234, 3, 544, 272, 0, 3233, 3231, 1, 0, 0, 0, 3233, 3232, 1, 0, 0, 0, 3234, 541, 1, 0, 0, 0, 3235, 3236, 3, 546, 273, 0, 3236, 3237, 5, 154, 0, 0, 3237, 3238, 3, 546, 273, 0, 3238, 543, 1, 0, 0, 0, 3239, 3240, 5, 196, 0, 0, 3240, 3241, 3, 546, 273, 0, 3241, 3242, 5, 200, 0, 0, 3242, 3247, 3, 546, 273, 0, 3243, 3244, 5, 200, 0, 0, 3244, 3246, 3, 546, 273, 0, 3245, 3243, 1, 0, 0, 0, 3246, 3249, 1, 0, 0, 0, 3247, 3245, 1, 0, 0, 0, 3247, 3248, 1, 0, 0, 0, 3248, 3250, 1, 0, 0, 0, 3249, 3247, 1, 0, 0, 0, 3250, 3251, 5, 197, 0, 0, 3251, 545, 1, 0, 0, 0, 3252, 3253, 3, 548, 274, 0, 3253, 547, 1, 0, 0, 0, 3254, 3256, 3, 264, 132, 0, 3255, 3254, 1, 0, 0, 0, 3255, 3256, 1, 0, 0, 0, 3256, 3260, 1, 0, 0, 0, 3257, 3258, 3, 40, 20, 0, 3258, 3259, 7, 17, 0, 0, 3259, 3261, 1, 0, 0, 0, 3260, 3257, 1, 0, 0, 0, 3260, 3261, 1, 0, 0, 0, 3261, 3262, 1, 0, 0, 0, 3262, 3263, 3, 226, 113, 0, 3263, 549, 1, 0, 0, 0, 3264, 3265, 3, 460, 230, 0, 3265, 3266, 5, 10, 0, 0, 3266, 3267, 5, 45, 0, 0, 3267, 3268, 3, 384, 192, 0, 3268, 551, 1, 0, 0, 0, 3269, 3270, 3, 468, 234, 0, 3270, 3271, 3, 554, 277, 0, 3271, 3272, 3, 422, 211, 0, 3272, 553, 1, 0, 0, 0, 3273, 3275, 5, 10, 0, 0, 3274, 3276, 3, 418, 209, 0, 3275, 3274, 1, 0, 0, 0, 3275, 3276, 1, 0, 0, 0, 3276, 3279, 1, 0, 0, 0, 3277, 3278, 5, 9, 0, 0, 3278, 3280, 3, 510, 255, 0, 3279, 3277, 1, 0, 0, 0, 3279, 3280, 1, 0, 0, 0, 3280, 3284, 1, 0, 0, 0, 3281, 3282, 5, 9, 0, 0, 3282, 3284, 3, 510, 255, 0, 3283, 3273, 1, 0, 0, 0, 3283, 3281, 1, 0, 0, 0, 3284, 555, 1, 0, 0, 0, 3285, 3286, 3, 460, 230, 0, 3286, 3287, 5, 70, 0, 0, 3287, 3288, 5, 45, 0, 0, 3288, 3289, 3, 384, 192, 0, 3289, 557, 1, 0, 0, 0, 3290, 3291, 3, 468, 234, 0, 3291, 3292, 5, 99, 0, 0, 3292, 3293, 3, 560, 280, 0, 3293, 3294, 3, 388, 194, 0, 3294, 559, 1, 0, 0, 0, 3295, 3297, 3, 418, 209, 0, 3296, 3295, 1, 0, 0, 0, 3296, 3297, 1, 0, 0, 0, 3297, 3299, 1, 0, 0, 0, 3298, 3300, 3, 318, 159, 0, 3299, 3298, 1, 0, 0, 0, 3299, 3300, 1, 0, 0, 0, 3300, 3303, 1, 0, 0, 0, 3301, 3302, 5, 111, 0, 0, 3302, 3304, 3, 570, 285, 0, 3303, 3301, 1, 0, 0, 0, 3303, 3304, 1, 0, 0, 0, 3304, 3310, 1, 0, 0, 0, 3305, 3306, 5, 74, 0, 0, 3306, 3307, 3, 562, 281, 0, 3307, 3308, 5, 154, 0, 0, 3308, 3309, 3, 562, 281, 0, 3309, 3311, 1, 0, 0, 0, 3310, 3305, 1, 0, 0, 0, 3310, 3311, 1, 0, 0, 0, 3311, 3317, 1, 0, 0, 0, 3312, 3313, 3, 562, 281, 0, 3313, 3314, 5, 154, 0, 0, 3314, 3315, 3, 562, 281, 0, 3315, 3317, 1, 0, 0, 0, 3316, 3296, 1, 0, 0, 0, 3316, 3312, 1, 0, 0, 0, 3317, 561, 1, 0, 0, 0, 3318, 3319, 3, 564, 282, 0, 3319, 563, 1, 0, 0, 0, 3320, 3321, 3, 226, 113, 0, 3321, 565, 1, 0, 0, 0, 3322, 3323, 3, 468, 234, 0, 3323, 3324, 5, 70, 0, 0, 3324, 3325, 3, 306, 153, 0, 3325, 3326, 3, 388, 194, 0, 3326, 567, 1, 0, 0, 0, 3327, 3328, 3, 468, 234, 0, 3328, 3329, 5, 150, 0, 0, 3329, 3330, 5, 70, 0, 0, 3330, 3331, 3, 306, 153, 0, 3331, 3332, 3, 388, 194, 0, 3332, 569, 1, 0, 0, 0, 3333, 3334, 3, 572, 286, 0, 3334, 571, 1, 0, 0, 0, 3335, 3336, 3, 310, 155, 0, 3336, 573, 1, 0, 0, 0, 3337, 3338, 3, 460, 230, 0, 3338, 3339, 5, 4, 0, 0, 3339, 3340, 5, 45, 0, 0, 3340, 3341, 3, 386, 193, 0, 3341, 3342, 3, 576, 288, 0, 3342, 575, 1, 0, 0, 0, 3343, 3353, 5, 205, 0, 0, 3344, 3348, 5, 214, 0, 0, 3345, 3347, 3, 578, 289, 0, 3346, 3345, 1, 0, 0, 0, 3347, 3350, 1, 0, 0, 0, 3348, 3346, 1, 0, 0, 0, 3348, 3349, 1, 0, 0, 0, 3349, 3351, 1, 0, 0, 0, 3350, 3348, 1, 0, 0, 0, 3351, 3353, 5, 216, 0, 0, 3352, 3343, 1, 0, 0, 0, 3352, 3344, 1, 0, 0, 0, 3353, 577, 1, 0, 0, 0, 3354, 3374, 3, 580, 290, 0, 3355, 3359, 3, 584, 292, 0, 3356, 3358, 3, 588, 294, 0, 3357, 3356, 1, 0, 0, 0, 3358, 3361, 1, 0, 0, 0, 3359, 3357, 1, 0, 0, 0, 3359, 3360, 1, 0, 0, 0, 3360, 3374, 1, 0, 0, 0, 3361, 3359, 1, 0, 0, 0, 3362, 3364, 3, 480, 240, 0, 3363, 3362, 1, 0, 0, 0, 3363, 3364, 1, 0, 0, 0, 3364, 3365, 1, 0, 0, 0, 3365, 3369, 3, 582, 291, 0, 3366, 3368, 3, 588, 294, 0, 3367, 3366, 1, 0, 0, 0, 3368, 3371, 1, 0, 0, 0, 3369, 3367, 1, 0, 0, 0, 3369, 3370, 1, 0, 0, 0, 3370, 3374, 1, 0, 0, 0, 3371, 3369, 1, 0, 0, 0, 3372, 3374, 3, 590, 295, 0, 3373, 3354, 1, 0, 0, 0, 3373, 3355, 1, 0, 0, 0, 3373, 3363, 1, 0, 0, 0, 3373, 3372, 1, 0, 0, 0, 3374, 579, 1, 0, 0, 0, 3375, 3385, 3, 90, 45, 0, 3376, 3385, 3, 86, 43, 0, 3377, 3385, 3, 394, 197, 0, 3378, 3385, 3, 396, 198, 0, 3379, 3385, 3, 398, 199, 0, 3380, 3382, 3, 480, 240, 0, 3381, 3380, 1, 0, 0, 0, 3381, 3382, 1, 0, 0, 0, 3382, 3383, 1, 0, 0, 0, 3383, 3385, 3, 400, 200, 0, 3384, 3375, 1, 0, 0, 0, 3384, 3376, 1, 0, 0, 0, 3384, 3377, 1, 0, 0, 0, 3384, 3378, 1, 0, 0, 0, 3384, 3379, 1, 0, 0, 0, 3384, 3381, 1, 0, 0, 0, 3385, 581, 1, 0, 0, 0, 3386, 3389, 3, 586, 293, 0, 3387, 3389, 3, 402, 201, 0, 3388, 3386, 1, 0, 0, 0, 3388, 3387, 1, 0, 0, 0, 3389, 583, 1, 0, 0, 0, 3390, 3391, 3, 76, 38, 0, 3391, 3392, 5, 69, 0, 0, 3392, 3393, 3, 88, 44, 0, 3393, 3394, 3, 46, 23, 0, 3394, 585, 1, 0, 0, 0, 3395, 3396, 3, 76, 38, 0, 3396, 3397, 3, 600, 300, 0, 3397, 587, 1, 0, 0, 0, 3398, 3399, 3, 76, 38, 0, 3399, 3400, 3, 676, 338, 0, 3400, 589, 1, 0, 0, 0, 3401, 3402, 3, 76, 38, 0, 3402, 3403, 3, 684, 342, 0, 3403, 591, 1, 0, 0, 0, 3404, 3405, 3, 468, 234, 0, 3405, 3406, 5, 4, 0, 0, 3406, 3407, 3, 594, 297, 0, 3407, 3408, 3, 576, 288, 0, 3408, 593, 1, 0, 0, 0, 3409, 3411, 3, 418, 209, 0, 3410, 3409, 1, 0, 0, 0, 3410, 3411, 1, 0, 0, 0, 3411, 3413, 1, 0, 0, 0, 3412, 3414, 3, 318, 159, 0, 3413, 3412, 1, 0, 0, 0, 3413, 3414, 1, 0, 0, 0, 3414, 595, 1, 0, 0, 0, 3415, 3416, 3, 468, 234, 0, 3416, 3417, 5, 118, 0, 0, 3417, 3418, 3, 598, 299, 0, 3418, 3419, 3, 576, 288, 0, 3419, 597, 1, 0, 0, 0, 3420, 3422, 3, 226, 113, 0, 3421, 3423, 3, 196, 98, 0, 3422, 3421, 1, 0, 0, 0, 3422, 3423, 1, 0, 0, 0, 3423, 3429, 1, 0, 0, 0, 3424, 3426, 5, 4, 0, 0, 3425, 3427, 3, 418, 209, 0, 3426, 3425, 1, 0, 0, 0, 3426, 3427, 1, 0, 0, 0, 3427, 3429, 1, 0, 0, 0, 3428, 3420, 1, 0, 0, 0, 3428, 3424, 1, 0, 0, 0, 3429, 3431, 1, 0, 0, 0, 3430, 3432, 3, 318, 159, 0, 3431, 3430, 1, 0, 0, 0, 3431, 3432, 1, 0, 0, 0, 3432, 599, 1, 0, 0, 0, 3433, 3442, 3, 606, 303, 0, 3434, 3442, 3, 634, 317, 0, 3435, 3442, 3, 618, 309, 0, 3436, 3442, 3, 648, 324, 0, 3437, 3442, 3, 658, 329, 0, 3438, 3442, 3, 660, 330, 0, 3439, 3442, 3, 670, 335, 0, 3440, 3442, 3, 672, 336, 0, 3441, 3433, 1, 0, 0, 0, 3441, 3434, 1, 0, 0, 0, 3441, 3435, 1, 0, 0, 0, 3441, 3436, 1, 0, 0, 0, 3441, 3437, 1, 0, 0, 0, 3441, 3438, 1, 0, 0, 0, 3441, 3439, 1, 0, 0, 0, 3441, 3440, 1, 0, 0, 0, 3442, 601, 1, 0, 0, 0, 3443, 3445, 5, 4, 0, 0, 3444, 3446, 3, 418, 209, 0, 3445, 3444, 1, 0, 0, 0, 3445, 3446, 1, 0, 0, 0, 3446, 603, 1, 0, 0, 0, 3447, 3449, 3, 468, 234, 0, 3448, 3450, 3, 602, 301, 0, 3449, 3448, 1, 0, 0, 0, 3449, 3450, 1, 0, 0, 0, 3450, 605, 1, 0, 0, 0, 3451, 3456, 3, 610, 305, 0, 3452, 3456, 3, 612, 306, 0, 3453, 3456, 3, 614, 307, 0, 3454, 3456, 3, 616, 308, 0, 3455, 3451, 1, 0, 0, 0, 3455, 3452, 1, 0, 0, 0, 3455, 3453, 1, 0, 0, 0, 3455, 3454, 1, 0, 0, 0, 3456, 607, 1, 0, 0, 0, 3457, 3459, 3, 404, 202, 0, 3458, 3460, 5, 82, 0, 0, 3459, 3458, 1, 0, 0, 0, 3459, 3460, 1, 0, 0, 0, 3460, 3462, 1, 0, 0, 0, 3461, 3463, 3, 476, 238, 0, 3462, 3461, 1, 0, 0, 0, 3462, 3463, 1, 0, 0, 0, 3463, 3467, 1, 0, 0, 0, 3464, 3466, 3, 410, 205, 0, 3465, 3464, 1, 0, 0, 0, 3466, 3469, 1, 0, 0, 0, 3467, 3465, 1, 0, 0, 0, 3467, 3468, 1, 0, 0, 0, 3468, 609, 1, 0, 0, 0, 3469, 3467, 1, 0, 0, 0, 3470, 3471, 3, 608, 304, 0, 3471, 3473, 5, 98, 0, 0, 3472, 3474, 3, 418, 209, 0, 3473, 3472, 1, 0, 0, 0, 3473, 3474, 1, 0, 0, 0, 3474, 3475, 1, 0, 0, 0, 3475, 3476, 3, 576, 288, 0, 3476, 611, 1, 0, 0, 0, 3477, 3478, 3, 608, 304, 0, 3478, 3480, 5, 44, 0, 0, 3479, 3481, 3, 418, 209, 0, 3480, 3479, 1, 0, 0, 0, 3480, 3481, 1, 0, 0, 0, 3481, 3482, 1, 0, 0, 0, 3482, 3483, 3, 576, 288, 0, 3483, 613, 1, 0, 0, 0, 3484, 3485, 3, 608, 304, 0, 3485, 3487, 5, 92, 0, 0, 3486, 3488, 3, 418, 209, 0, 3487, 3486, 1, 0, 0, 0, 3487, 3488, 1, 0, 0, 0, 3488, 3489, 1, 0, 0, 0, 3489, 3490, 3, 576, 288, 0, 3490, 615, 1, 0, 0, 0, 3491, 3492, 3, 608, 304, 0, 3492, 3494, 5, 72, 0, 0, 3493, 3495, 3, 418, 209, 0, 3494, 3493, 1, 0, 0, 0, 3494, 3495, 1, 0, 0, 0, 3495, 3496, 1, 0, 0, 0, 3496, 3497, 3, 576, 288, 0, 3497, 617, 1, 0, 0, 0, 3498, 3499, 3, 468, 234, 0, 3499, 3500, 3, 620, 310, 0, 3500, 3501, 3, 576, 288, 0, 3501, 619, 1, 0, 0, 0, 3502, 3504, 3, 602, 301, 0, 3503, 3502, 1, 0, 0, 0, 3503, 3504, 1, 0, 0, 0, 3504, 3505, 1, 0, 0, 0, 3505, 3506, 5, 3, 0, 0, 3506, 3507, 3, 622, 311, 0, 3507, 621, 1, 0, 0, 0, 3508, 3511, 3, 624, 312, 0, 3509, 3510, 5, 168, 0, 0, 3510, 3512, 3, 640, 320, 0, 3511, 3509, 1, 0, 0, 0, 3511, 3512, 1, 0, 0, 0, 3512, 623, 1, 0, 0, 0, 3513, 3514, 3, 626, 313, 0, 3514, 625, 1, 0, 0, 0, 3515, 3524, 3, 310, 155, 0, 3516, 3518, 3, 44, 22, 0, 3517, 3516, 1, 0, 0, 0, 3517, 3518, 1, 0, 0, 0, 3518, 3520, 1, 0, 0, 0, 3519, 3521, 3, 312, 156, 0, 3520, 3519, 1, 0, 0, 0, 3520, 3521, 1, 0, 0, 0, 3521, 3522, 1, 0, 0, 0, 3522, 3524, 3, 628, 314, 0, 3523, 3515, 1, 0, 0, 0, 3523, 3517, 1, 0, 0, 0, 3524, 627, 1, 0, 0, 0, 3525, 3526, 3, 630, 315, 0, 3526, 629, 1, 0, 0, 0, 3527, 3528, 3, 632, 316, 0, 3528, 631, 1, 0, 0, 0, 3529, 3530, 7, 24, 0, 0, 3530, 3534, 3, 36, 18, 0, 3531, 3532, 5, 171, 0, 0, 3532, 3534, 3, 38, 19, 0, 3533, 3529, 1, 0, 0, 0, 3533, 3531, 1, 0, 0, 0, 3534, 633, 1, 0, 0, 0, 3535, 3538, 3, 468, 234, 0, 3536, 3539, 3, 602, 301, 0, 3537, 3539, 3, 594, 297, 0, 3538, 3536, 1, 0, 0, 0, 3538, 3537, 1, 0, 0, 0, 3539, 3540, 1, 0, 0, 0, 3540, 3549, 5, 136, 0, 0, 3541, 3543, 3, 640, 320, 0, 3542, 3544, 3, 638, 319, 0, 3543, 3542, 1, 0, 0, 0, 3543, 3544, 1, 0, 0, 0, 3544, 3550, 1, 0, 0, 0, 3545, 3547, 3, 646, 323, 0, 3546, 3548, 3, 638, 319, 0, 3547, 3546, 1, 0, 0, 0, 3547, 3548, 1, 0, 0, 0, 3548, 3550, 1, 0, 0, 0, 3549, 3541, 1, 0, 0, 0, 3549, 3545, 1, 0, 0, 0, 3550, 3551, 1, 0, 0, 0, 3551, 3552, 3, 576, 288, 0, 3552, 635, 1, 0, 0, 0, 3553, 3555, 3, 602, 301, 0, 3554, 3553, 1, 0, 0, 0, 3554, 3555, 1, 0, 0, 0, 3555, 3556, 1, 0, 0, 0, 3556, 3557, 5, 136, 0, 0, 3557, 3559, 3, 640, 320, 0, 3558, 3560, 3, 638, 319, 0, 3559, 3558, 1, 0, 0, 0, 3559, 3560, 1, 0, 0, 0, 3560, 637, 1, 0, 0, 0, 3561, 3562, 5, 168, 0, 0, 3562, 3565, 3, 640, 320, 0, 3563, 3564, 5, 154, 0, 0, 3564, 3566, 3, 640, 320, 0, 3565, 3563, 1, 0, 0, 0, 3565, 3566, 1, 0, 0, 0, 3566, 3572, 1, 0, 0, 0, 3567, 3568, 3, 646, 323, 0, 3568, 3569, 5, 154, 0, 0, 3569, 3570, 3, 640, 320, 0, 3570, 3572, 1, 0, 0, 0, 3571, 3561, 1, 0, 0, 0, 3571, 3567, 1, 0, 0, 0, 3572, 639, 1, 0, 0, 0, 3573, 3574, 3, 642, 321, 0, 3574, 641, 1, 0, 0, 0, 3575, 3576, 3, 644, 322, 0, 3576, 643, 1, 0, 0, 0, 3577, 3578, 3, 0, 0, 0, 3578, 645, 1, 0, 0, 0, 3579, 3580, 3, 896, 448, 0, 3580, 647, 1, 0, 0, 0, 3581, 3582, 3, 468, 234, 0, 3582, 3583, 3, 650, 325, 0, 3583, 3584, 3, 576, 288, 0, 3584, 649, 1, 0, 0, 0, 3585, 3587, 3, 602, 301, 0, 3586, 3585, 1, 0, 0, 0, 3586, 3587, 1, 0, 0, 0, 3587, 3588, 1, 0, 0, 0, 3588, 3589, 5, 15, 0, 0, 3589, 3590, 3, 652, 326, 0, 3590, 3591, 3, 298, 149, 0, 3591, 3592, 5, 184, 0, 0, 3592, 3593, 3, 640, 320, 0, 3593, 651, 1, 0, 0, 0, 3594, 3595, 3, 654, 327, 0, 3595, 653, 1, 0, 0, 0, 3596, 3597, 3, 656, 328, 0, 3597, 3598, 5, 202, 0, 0, 3598, 3600, 1, 0, 0, 0, 3599, 3596, 1, 0, 0, 0, 3599, 3600, 1, 0, 0, 0, 3600, 655, 1, 0, 0, 0, 3601, 3602, 3, 900, 450, 0, 3602, 657, 1, 0, 0, 0, 3603, 3605, 3, 468, 234, 0, 3604, 3606, 3, 602, 301, 0, 3605, 3604, 1, 0, 0, 0, 3605, 3606, 1, 0, 0, 0, 3606, 3607, 1, 0, 0, 0, 3607, 3609, 5, 151, 0, 0, 3608, 3610, 3, 640, 320, 0, 3609, 3608, 1, 0, 0, 0, 3609, 3610, 1, 0, 0, 0, 3610, 3611, 1, 0, 0, 0, 3611, 3612, 3, 576, 288, 0, 3612, 659, 1, 0, 0, 0, 3613, 3614, 3, 604, 302, 0, 3614, 3615, 5, 77, 0, 0, 3615, 3616, 3, 662, 331, 0, 3616, 3622, 3, 664, 332, 0, 3617, 3620, 5, 55, 0, 0, 3618, 3621, 3, 664, 332, 0, 3619, 3621, 3, 668, 334, 0, 3620, 3618, 1, 0, 0, 0, 3620, 3619, 1, 0, 0, 0, 3621, 3623, 1, 0, 0, 0, 3622, 3617, 1, 0, 0, 0, 3622, 3623, 1, 0, 0, 0, 3623, 661, 1, 0, 0, 0, 3624, 3625, 3, 0, 0, 0, 3625, 663, 1, 0, 0, 0, 3626, 3627, 3, 666, 333, 0, 3627, 665, 1, 0, 0, 0, 3628, 3630, 5, 4, 0, 0, 3629, 3631, 3, 418, 209, 0, 3630, 3629, 1, 0, 0, 0, 3630, 3631, 1, 0, 0, 0, 3631, 3633, 1, 0, 0, 0, 3632, 3628, 1, 0, 0, 0, 3632, 3633, 1, 0, 0, 0, 3633, 3634, 1, 0, 0, 0, 3634, 3638, 5, 214, 0, 0, 3635, 3637, 3, 578, 289, 0, 3636, 3635, 1, 0, 0, 0, 3637, 3640, 1, 0, 0, 0, 3638, 3636, 1, 0, 0, 0, 3638, 3639, 1, 0, 0, 0, 3639, 3641, 1, 0, 0, 0, 3640, 3638, 1, 0, 0, 0, 3641, 3642, 5, 216, 0, 0, 3642, 667, 1, 0, 0, 0, 3643, 3644, 3, 660, 330, 0, 3644, 669, 1, 0, 0, 0, 3645, 3650, 3, 604, 302, 0, 3646, 3647, 5, 172, 0, 0, 3647, 3651, 3, 662, 331, 0, 3648, 3649, 5, 96, 0, 0, 3649, 3651, 3, 646, 323, 0, 3650, 3646, 1, 0, 0, 0, 3650, 3648, 1, 0, 0, 0, 3651, 3652, 1, 0, 0, 0, 3652, 3657, 3, 664, 332, 0, 3653, 3654, 5, 161, 0, 0, 3654, 3655, 3, 662, 331, 0, 3655, 3656, 5, 205, 0, 0, 3656, 3658, 1, 0, 0, 0, 3657, 3653, 1, 0, 0, 0, 3657, 3658, 1, 0, 0, 0, 3658, 671, 1, 0, 0, 0, 3659, 3660, 3, 604, 302, 0, 3660, 3661, 5, 71, 0, 0, 3661, 3662, 3, 674, 337, 0, 3662, 3663, 5, 80, 0, 0, 3663, 3664, 3, 640, 320, 0, 3664, 3665, 3, 664, 332, 0, 3665, 673, 1, 0, 0, 0, 3666, 3668, 3, 418, 209, 0, 3667, 3666, 1, 0, 0, 0, 3667, 3668, 1, 0, 0, 0, 3668, 675, 1, 0, 0, 0, 3669, 3673, 3, 678, 339, 0, 3670, 3673, 3, 680, 340, 0, 3671, 3673, 3, 682, 341, 0, 3672, 3669, 1, 0, 0, 0, 3672, 3670, 1, 0, 0, 0, 3672, 3671, 1, 0, 0, 0, 3673, 3674, 1, 0, 0, 0, 3674, 3675, 3, 422, 211, 0, 3675, 677, 1, 0, 0, 0, 3676, 3677, 3, 484, 242, 0, 3677, 3678, 5, 152, 0, 0, 3678, 3679, 3, 260, 130, 0, 3679, 679, 1, 0, 0, 0, 3680, 3681, 3, 728, 364, 0, 3681, 3682, 5, 152, 0, 0, 3682, 3683, 3, 742, 371, 0, 3683, 681, 1, 0, 0, 0, 3684, 3685, 5, 55, 0, 0, 3685, 3686, 3, 742, 371, 0, 3686, 683, 1, 0, 0, 0, 3687, 3689, 5, 150, 0, 0, 3688, 3690, 3, 418, 209, 0, 3689, 3688, 1, 0, 0, 0, 3689, 3690, 1, 0, 0, 0, 3690, 3692, 1, 0, 0, 0, 3691, 3687, 1, 0, 0, 0, 3691, 3692, 1, 0, 0, 0, 3692, 3693, 1, 0, 0, 0, 3693, 3694, 5, 69, 0, 0, 3694, 3695, 3, 298, 149, 0, 3695, 3696, 3, 728, 364, 0, 3696, 3697, 5, 152, 0, 0, 3697, 3698, 3, 742, 371, 0, 3698, 3699, 3, 422, 211, 0, 3699, 685, 1, 0, 0, 0, 3700, 3701, 3, 460, 230, 0, 3701, 3702, 5, 142, 0, 0, 3702, 3703, 5, 45, 0, 0, 3703, 3704, 3, 386, 193, 0, 3704, 3705, 3, 688, 344, 0, 3705, 687, 1, 0, 0, 0, 3706, 3719, 5, 205, 0, 0, 3707, 3709, 5, 116, 0, 0, 3708, 3707, 1, 0, 0, 0, 3708, 3709, 1, 0, 0, 0, 3709, 3710, 1, 0, 0, 0, 3710, 3714, 5, 214, 0, 0, 3711, 3713, 3, 690, 345, 0, 3712, 3711, 1, 0, 0, 0, 3713, 3716, 1, 0, 0, 0, 3714, 3712, 1, 0, 0, 0, 3714, 3715, 1, 0, 0, 0, 3715, 3717, 1, 0, 0, 0, 3716, 3714, 1, 0, 0, 0, 3717, 3719, 5, 216, 0, 0, 3718, 3706, 1, 0, 0, 0, 3718, 3708, 1, 0, 0, 0, 3719, 689, 1, 0, 0, 0, 3720, 3742, 3, 580, 290, 0, 3721, 3723, 3, 480, 240, 0, 3722, 3721, 1, 0, 0, 0, 3722, 3723, 1, 0, 0, 0, 3723, 3724, 1, 0, 0, 0, 3724, 3728, 3, 402, 201, 0, 3725, 3727, 3, 712, 356, 0, 3726, 3725, 1, 0, 0, 0, 3727, 3730, 1, 0, 0, 0, 3728, 3726, 1, 0, 0, 0, 3728, 3729, 1, 0, 0, 0, 3729, 3742, 1, 0, 0, 0, 3730, 3728, 1, 0, 0, 0, 3731, 3742, 3, 710, 355, 0, 3732, 3736, 3, 692, 346, 0, 3733, 3735, 3, 698, 349, 0, 3734, 3733, 1, 0, 0, 0, 3735, 3738, 1, 0, 0, 0, 3736, 3734, 1, 0, 0, 0, 3736, 3737, 1, 0, 0, 0, 3737, 3742, 1, 0, 0, 0, 3738, 3736, 1, 0, 0, 0, 3739, 3742, 3, 694, 347, 0, 3740, 3742, 3, 696, 348, 0, 3741, 3720, 1, 0, 0, 0, 3741, 3722, 1, 0, 0, 0, 3741, 3731, 1, 0, 0, 0, 3741, 3732, 1, 0, 0, 0, 3741, 3739, 1, 0, 0, 0, 3741, 3740, 1, 0, 0, 0, 3742, 691, 1, 0, 0, 0, 3743, 3744, 3, 76, 38, 0, 3744, 3745, 5, 57, 0, 0, 3745, 3746, 3, 700, 350, 0, 3746, 693, 1, 0, 0, 0, 3747, 3748, 3, 76, 38, 0, 3748, 3749, 5, 53, 0, 0, 3749, 3750, 3, 700, 350, 0, 3750, 695, 1, 0, 0, 0, 3751, 3752, 3, 76, 38, 0, 3752, 3753, 5, 61, 0, 0, 3753, 3754, 3, 700, 350, 0, 3754, 697, 1, 0, 0, 0, 3755, 3759, 3, 76, 38, 0, 3756, 3760, 3, 680, 340, 0, 3757, 3758, 5, 152, 0, 0, 3758, 3760, 3, 742, 371, 0, 3759, 3756, 1, 0, 0, 0, 3759, 3757, 1, 0, 0, 0, 3760, 3761, 1, 0, 0, 0, 3761, 3762, 5, 205, 0, 0, 3762, 699, 1, 0, 0, 0, 3763, 3764, 3, 890, 445, 0, 3764, 3765, 5, 205, 0, 0, 3765, 3771, 1, 0, 0, 0, 3766, 3771, 3, 702, 351, 0, 3767, 3771, 3, 704, 352, 0, 3768, 3771, 3, 706, 353, 0, 3769, 3771, 3, 708, 354, 0, 3770, 3763, 1, 0, 0, 0, 3770, 3766, 1, 0, 0, 0, 3770, 3767, 1, 0, 0, 0, 3770, 3768, 1, 0, 0, 0, 3770, 3769, 1, 0, 0, 0, 3771, 701, 1, 0, 0, 0, 3772, 3773, 3, 598, 299, 0, 3773, 3774, 3, 576, 288, 0, 3774, 703, 1, 0, 0, 0, 3775, 3776, 3, 620, 310, 0, 3776, 3777, 3, 576, 288, 0, 3777, 705, 1, 0, 0, 0, 3778, 3779, 3, 636, 318, 0, 3779, 3780, 3, 576, 288, 0, 3780, 707, 1, 0, 0, 0, 3781, 3782, 3, 650, 325, 0, 3782, 3783, 3, 576, 288, 0, 3783, 709, 1, 0, 0, 0, 3784, 3785, 3, 76, 38, 0, 3785, 3786, 3, 720, 360, 0, 3786, 711, 1, 0, 0, 0, 3787, 3788, 3, 76, 38, 0, 3788, 3789, 3, 722, 361, 0, 3789, 713, 1, 0, 0, 0, 3790, 3791, 3, 468, 234, 0, 3791, 3792, 5, 142, 0, 0, 3792, 3793, 3, 594, 297, 0, 3793, 3794, 3, 716, 358, 0, 3794, 715, 1, 0, 0, 0, 3795, 3808, 5, 205, 0, 0, 3796, 3798, 5, 116, 0, 0, 3797, 3796, 1, 0, 0, 0, 3797, 3798, 1, 0, 0, 0, 3798, 3799, 1, 0, 0, 0, 3799, 3803, 5, 214, 0, 0, 3800, 3802, 3, 690, 345, 0, 3801, 3800, 1, 0, 0, 0, 3802, 3805, 1, 0, 0, 0, 3803, 3801, 1, 0, 0, 0, 3803, 3804, 1, 0, 0, 0, 3804, 3806, 1, 0, 0, 0, 3805, 3803, 1, 0, 0, 0, 3806, 3808, 5, 216, 0, 0, 3807, 3795, 1, 0, 0, 0, 3807, 3797, 1, 0, 0, 0, 3808, 717, 1, 0, 0, 0, 3809, 3810, 3, 468, 234, 0, 3810, 3819, 5, 60, 0, 0, 3811, 3813, 3, 226, 113, 0, 3812, 3814, 3, 196, 98, 0, 3813, 3812, 1, 0, 0, 0, 3813, 3814, 1, 0, 0, 0, 3814, 3820, 1, 0, 0, 0, 3815, 3817, 5, 142, 0, 0, 3816, 3818, 3, 418, 209, 0, 3817, 3816, 1, 0, 0, 0, 3817, 3818, 1, 0, 0, 0, 3818, 3820, 1, 0, 0, 0, 3819, 3811, 1, 0, 0, 0, 3819, 3815, 1, 0, 0, 0, 3820, 3822, 1, 0, 0, 0, 3821, 3823, 3, 318, 159, 0, 3822, 3821, 1, 0, 0, 0, 3822, 3823, 1, 0, 0, 0, 3823, 3824, 1, 0, 0, 0, 3824, 3825, 3, 716, 358, 0, 3825, 719, 1, 0, 0, 0, 3826, 3831, 5, 155, 0, 0, 3827, 3829, 3, 418, 209, 0, 3828, 3827, 1, 0, 0, 0, 3828, 3829, 1, 0, 0, 0, 3829, 3830, 1, 0, 0, 0, 3830, 3832, 5, 69, 0, 0, 3831, 3828, 1, 0, 0, 0, 3831, 3832, 1, 0, 0, 0, 3832, 3833, 1, 0, 0, 0, 3833, 3834, 3, 298, 149, 0, 3834, 3838, 3, 646, 323, 0, 3835, 3836, 3, 646, 323, 0, 3836, 3837, 3, 724, 362, 0, 3837, 3839, 1, 0, 0, 0, 3838, 3835, 1, 0, 0, 0, 3838, 3839, 1, 0, 0, 0, 3839, 3841, 1, 0, 0, 0, 3840, 3842, 3, 728, 364, 0, 3841, 3840, 1, 0, 0, 0, 3841, 3842, 1, 0, 0, 0, 3842, 3844, 1, 0, 0, 0, 3843, 3845, 3, 730, 365, 0, 3844, 3843, 1, 0, 0, 0, 3844, 3845, 1, 0, 0, 0, 3845, 3846, 1, 0, 0, 0, 3846, 3847, 5, 152, 0, 0, 3847, 3848, 3, 742, 371, 0, 3848, 3849, 3, 576, 288, 0, 3849, 721, 1, 0, 0, 0, 3850, 3875, 3, 646, 323, 0, 3851, 3855, 5, 155, 0, 0, 3852, 3853, 3, 646, 323, 0, 3853, 3854, 3, 724, 362, 0, 3854, 3856, 1, 0, 0, 0, 3855, 3852, 1, 0, 0, 0, 3855, 3856, 1, 0, 0, 0, 3856, 3858, 1, 0, 0, 0, 3857, 3859, 3, 728, 364, 0, 3858, 3857, 1, 0, 0, 0, 3858, 3859, 1, 0, 0, 0, 3859, 3861, 1, 0, 0, 0, 3860, 3862, 3, 730, 365, 0, 3861, 3860, 1, 0, 0, 0, 3861, 3862, 1, 0, 0, 0, 3862, 3876, 1, 0, 0, 0, 3863, 3864, 3, 646, 323, 0, 3864, 3866, 3, 724, 362, 0, 3865, 3867, 3, 728, 364, 0, 3866, 3865, 1, 0, 0, 0, 3866, 3867, 1, 0, 0, 0, 3867, 3869, 1, 0, 0, 0, 3868, 3870, 3, 730, 365, 0, 3869, 3868, 1, 0, 0, 0, 3869, 3870, 1, 0, 0, 0, 3870, 3876, 1, 0, 0, 0, 3871, 3873, 3, 728, 364, 0, 3872, 3874, 3, 730, 365, 0, 3873, 3872, 1, 0, 0, 0, 3873, 3874, 1, 0, 0, 0, 3874, 3876, 1, 0, 0, 0, 3875, 3851, 1, 0, 0, 0, 3875, 3863, 1, 0, 0, 0, 3875, 3871, 1, 0, 0, 0, 3875, 3876, 1, 0, 0, 0, 3876, 3877, 1, 0, 0, 0, 3877, 3878, 5, 152, 0, 0, 3878, 3879, 3, 742, 371, 0, 3879, 3880, 3, 576, 288, 0, 3880, 723, 1, 0, 0, 0, 3881, 3882, 5, 3, 0, 0, 3882, 3883, 3, 726, 363, 0, 3883, 725, 1, 0, 0, 0, 3884, 3885, 3, 622, 311, 0, 3885, 727, 1, 0, 0, 0, 3886, 3887, 5, 77, 0, 0, 3887, 3888, 3, 0, 0, 0, 3888, 729, 1, 0, 0, 0, 3889, 3890, 5, 53, 0, 0, 3890, 3891, 3, 732, 366, 0, 3891, 731, 1, 0, 0, 0, 3892, 3898, 3, 890, 445, 0, 3893, 3898, 3, 734, 367, 0, 3894, 3898, 3, 736, 368, 0, 3895, 3898, 3, 738, 369, 0, 3896, 3898, 3, 740, 370, 0, 3897, 3892, 1, 0, 0, 0, 3897, 3893, 1, 0, 0, 0, 3897, 3894, 1, 0, 0, 0, 3897, 3895, 1, 0, 0, 0, 3897, 3896, 1, 0, 0, 0, 3898, 733, 1, 0, 0, 0, 3899, 3908, 3, 598, 299, 0, 3900, 3904, 5, 214, 0, 0, 3901, 3903, 3, 578, 289, 0, 3902, 3901, 1, 0, 0, 0, 3903, 3906, 1, 0, 0, 0, 3904, 3902, 1, 0, 0, 0, 3904, 3905, 1, 0, 0, 0, 3905, 3907, 1, 0, 0, 0, 3906, 3904, 1, 0, 0, 0, 3907, 3909, 5, 216, 0, 0, 3908, 3900, 1, 0, 0, 0, 3908, 3909, 1, 0, 0, 0, 3909, 735, 1, 0, 0, 0, 3910, 3919, 3, 620, 310, 0, 3911, 3915, 5, 214, 0, 0, 3912, 3914, 3, 578, 289, 0, 3913, 3912, 1, 0, 0, 0, 3914, 3917, 1, 0, 0, 0, 3915, 3913, 1, 0, 0, 0, 3915, 3916, 1, 0, 0, 0, 3916, 3918, 1, 0, 0, 0, 3917, 3915, 1, 0, 0, 0, 3918, 3920, 5, 216, 0, 0, 3919, 3911, 1, 0, 0, 0, 3919, 3920, 1, 0, 0, 0, 3920, 737, 1, 0, 0, 0, 3921, 3930, 3, 636, 318, 0, 3922, 3926, 5, 214, 0, 0, 3923, 3925, 3, 578, 289, 0, 3924, 3923, 1, 0, 0, 0, 3925, 3928, 1, 0, 0, 0, 3926, 3924, 1, 0, 0, 0, 3926, 3927, 1, 0, 0, 0, 3927, 3929, 1, 0, 0, 0, 3928, 3926, 1, 0, 0, 0, 3929, 3931, 5, 216, 0, 0, 3930, 3922, 1, 0, 0, 0, 3930, 3931, 1, 0, 0, 0, 3931, 739, 1, 0, 0, 0, 3932, 3941, 3, 650, 325, 0, 3933, 3937, 5, 214, 0, 0, 3934, 3936, 3, 578, 289, 0, 3935, 3934, 1, 0, 0, 0, 3936, 3939, 1, 0, 0, 0, 3937, 3935, 1, 0, 0, 0, 3937, 3938, 1, 0, 0, 0, 3938, 3940, 1, 0, 0, 0, 3939, 3937, 1, 0, 0, 0, 3940, 3942, 5, 216, 0, 0, 3941, 3933, 1, 0, 0, 0, 3941, 3942, 1, 0, 0, 0, 3942, 741, 1, 0, 0, 0, 3943, 3944, 3, 744, 372, 0, 3944, 743, 1, 0, 0, 0, 3945, 3946, 3, 746, 373, 0, 3946, 3947, 3, 260, 130, 0, 3947, 745, 1, 0, 0, 0, 3948, 3949, 3, 892, 446, 0, 3949, 747, 1, 0, 0, 0, 3950, 3951, 3, 460, 230, 0, 3951, 3952, 5, 25, 0, 0, 3952, 3953, 5, 45, 0, 0, 3953, 3954, 3, 386, 193, 0, 3954, 3955, 3, 752, 376, 0, 3955, 749, 1, 0, 0, 0, 3956, 3957, 3, 468, 234, 0, 3957, 3958, 5, 25, 0, 0, 3958, 3959, 3, 594, 297, 0, 3959, 3960, 3, 752, 376, 0, 3960, 751, 1, 0, 0, 0, 3961, 3967, 5, 205, 0, 0, 3962, 3963, 5, 214, 0, 0, 3963, 3964, 3, 754, 377, 0, 3964, 3965, 5, 216, 0, 0, 3965, 3967, 1, 0, 0, 0, 3966, 3961, 1, 0, 0, 0, 3966, 3962, 1, 0, 0, 0, 3967, 753, 1, 0, 0, 0, 3968, 3970, 3, 756, 378, 0, 3969, 3968, 1, 0, 0, 0, 3970, 3973, 1, 0, 0, 0, 3971, 3969, 1, 0, 0, 0, 3971, 3972, 1, 0, 0, 0, 3972, 3975, 1, 0, 0, 0, 3973, 3971, 1, 0, 0, 0, 3974, 3976, 3, 288, 144, 0, 3975, 3974, 1, 0, 0, 0, 3975, 3976, 1, 0, 0, 0, 3976, 755, 1, 0, 0, 0, 3977, 3980, 3, 578, 289, 0, 3978, 3980, 3, 758, 379, 0, 3979, 3977, 1, 0, 0, 0, 3979, 3978, 1, 0, 0, 0, 3980, 757, 1, 0, 0, 0, 3981, 3982, 3, 76, 38, 0, 3982, 3983, 5, 134, 0, 0, 3983, 3984, 3, 376, 188, 0, 3984, 759, 1, 0, 0, 0, 3985, 3986, 3, 460, 230, 0, 3986, 3987, 5, 41, 0, 0, 3987, 3988, 5, 45, 0, 0, 3988, 3989, 3, 386, 193, 0, 3989, 3990, 3, 752, 376, 0, 3990, 761, 1, 0, 0, 0, 3991, 3992, 3, 468, 234, 0, 3992, 3993, 5, 41, 0, 0, 3993, 3994, 3, 766, 383, 0, 3994, 3995, 3, 752, 376, 0, 3995, 763, 1, 0, 0, 0, 3996, 3997, 3, 468, 234, 0, 3997, 3999, 5, 14, 0, 0, 3998, 4000, 5, 107, 0, 0, 3999, 3998, 1, 0, 0, 0, 3999, 4000, 1, 0, 0, 0, 4000, 4007, 1, 0, 0, 0, 4001, 4003, 3, 226, 113, 0, 4002, 4004, 3, 196, 98, 0, 4003, 4002, 1, 0, 0, 0, 4003, 4004, 1, 0, 0, 0, 4004, 4008, 1, 0, 0, 0, 4005, 4006, 5, 41, 0, 0, 4006, 4008, 3, 766, 383, 0, 4007, 4001, 1, 0, 0, 0, 4007, 4005, 1, 0, 0, 0, 4008, 4009, 1, 0, 0, 0, 4009, 4010, 3, 752, 376, 0, 4010, 765, 1, 0, 0, 0, 4011, 4013, 3, 418, 209, 0, 4012, 4011, 1, 0, 0, 0, 4012, 4013, 1, 0, 0, 0, 4013, 4015, 1, 0, 0, 0, 4014, 4016, 3, 318, 159, 0, 4015, 4014, 1, 0, 0, 0, 4015, 4016, 1, 0, 0, 0, 4016, 767, 1, 0, 0, 0, 4017, 4018, 3, 460, 230, 0, 4018, 4019, 5, 133, 0, 0, 4019, 4020, 5, 45, 0, 0, 4020, 4021, 3, 386, 193, 0, 4021, 4022, 3, 770, 385, 0, 4022, 769, 1, 0, 0, 0, 4023, 4033, 5, 205, 0, 0, 4024, 4028, 5, 214, 0, 0, 4025, 4027, 3, 772, 386, 0, 4026, 4025, 1, 0, 0, 0, 4027, 4030, 1, 0, 0, 0, 4028, 4026, 1, 0, 0, 0, 4028, 4029, 1, 0, 0, 0, 4029, 4031, 1, 0, 0, 0, 4030, 4028, 1, 0, 0, 0, 4031, 4033, 5, 216, 0, 0, 4032, 4023, 1, 0, 0, 0, 4032, 4024, 1, 0, 0, 0, 4033, 771, 1, 0, 0, 0, 4034, 4042, 3, 390, 195, 0, 4035, 4042, 3, 774, 387, 0, 4036, 4042, 3, 778, 389, 0, 4037, 4042, 3, 784, 392, 0, 4038, 4042, 3, 832, 416, 0, 4039, 4042, 3, 788, 394, 0, 4040, 4042, 3, 792, 396, 0, 4041, 4034, 1, 0, 0, 0, 4041, 4035, 1, 0, 0, 0, 4041, 4036, 1, 0, 0, 0, 4041, 4037, 1, 0, 0, 0, 4041, 4038, 1, 0, 0, 0, 4041, 4039, 1, 0, 0, 0, 4041, 4040, 1, 0, 0, 0, 4042, 773, 1, 0, 0, 0, 4043, 4044, 3, 76, 38, 0, 4044, 4045, 3, 776, 388, 0, 4045, 775, 1, 0, 0, 0, 4046, 4050, 5, 146, 0, 0, 4047, 4049, 3, 410, 205, 0, 4048, 4047, 1, 0, 0, 0, 4049, 4052, 1, 0, 0, 0, 4050, 4048, 1, 0, 0, 0, 4050, 4051, 1, 0, 0, 0, 4051, 4053, 1, 0, 0, 0, 4052, 4050, 1, 0, 0, 0, 4053, 4054, 3, 416, 208, 0, 4054, 777, 1, 0, 0, 0, 4055, 4056, 3, 76, 38, 0, 4056, 4057, 3, 780, 390, 0, 4057, 4058, 3, 782, 391, 0, 4058, 779, 1, 0, 0, 0, 4059, 4060, 7, 25, 0, 0, 4060, 781, 1, 0, 0, 0, 4061, 4063, 3, 226, 113, 0, 4062, 4064, 3, 196, 98, 0, 4063, 4062, 1, 0, 0, 0, 4063, 4064, 1, 0, 0, 0, 4064, 4065, 1, 0, 0, 0, 4065, 4066, 3, 770, 385, 0, 4066, 4085, 1, 0, 0, 0, 4067, 4069, 3, 410, 205, 0, 4068, 4067, 1, 0, 0, 0, 4069, 4072, 1, 0, 0, 0, 4070, 4068, 1, 0, 0, 0, 4070, 4071, 1, 0, 0, 0, 4071, 4073, 1, 0, 0, 0, 4072, 4070, 1, 0, 0, 0, 4073, 4080, 5, 41, 0, 0, 4074, 4076, 3, 410, 205, 0, 4075, 4074, 1, 0, 0, 0, 4076, 4077, 1, 0, 0, 0, 4077, 4075, 1, 0, 0, 0, 4077, 4078, 1, 0, 0, 0, 4078, 4080, 1, 0, 0, 0, 4079, 4070, 1, 0, 0, 0, 4079, 4075, 1, 0, 0, 0, 4080, 4081, 1, 0, 0, 0, 4081, 4082, 3, 766, 383, 0, 4082, 4083, 3, 752, 376, 0, 4083, 4085, 1, 0, 0, 0, 4084, 4061, 1, 0, 0, 0, 4084, 4079, 1, 0, 0, 0, 4085, 783, 1, 0, 0, 0, 4086, 4087, 3, 76, 38, 0, 4087, 4088, 5, 73, 0, 0, 4088, 4089, 3, 786, 393, 0, 4089, 785, 1, 0, 0, 0, 4090, 4092, 3, 226, 113, 0, 4091, 4093, 3, 196, 98, 0, 4092, 4091, 1, 0, 0, 0, 4092, 4093, 1, 0, 0, 0, 4093, 4094, 1, 0, 0, 0, 4094, 4095, 3, 752, 376, 0, 4095, 4114, 1, 0, 0, 0, 4096, 4098, 3, 410, 205, 0, 4097, 4096, 1, 0, 0, 0, 4098, 4101, 1, 0, 0, 0, 4099, 4097, 1, 0, 0, 0, 4099, 4100, 1, 0, 0, 0, 4100, 4102, 1, 0, 0, 0, 4101, 4099, 1, 0, 0, 0, 4102, 4109, 5, 32, 0, 0, 4103, 4105, 3, 410, 205, 0, 4104, 4103, 1, 0, 0, 0, 4105, 4106, 1, 0, 0, 0, 4106, 4104, 1, 0, 0, 0, 4106, 4107, 1, 0, 0, 0, 4107, 4109, 1, 0, 0, 0, 4108, 4099, 1, 0, 0, 0, 4108, 4104, 1, 0, 0, 0, 4109, 4110, 1, 0, 0, 0, 4110, 4111, 3, 888, 444, 0, 4111, 4112, 3, 752, 376, 0, 4112, 4114, 1, 0, 0, 0, 4113, 4090, 1, 0, 0, 0, 4113, 4108, 1, 0, 0, 0, 4114, 787, 1, 0, 0, 0, 4115, 4116, 3, 76, 38, 0, 4116, 4117, 3, 790, 395, 0, 4117, 789, 1, 0, 0, 0, 4118, 4122, 5, 5, 0, 0, 4119, 4121, 3, 410, 205, 0, 4120, 4119, 1, 0, 0, 0, 4121, 4124, 1, 0, 0, 0, 4122, 4120, 1, 0, 0, 0, 4122, 4123, 1, 0, 0, 0, 4123, 4125, 1, 0, 0, 0, 4124, 4122, 1, 0, 0, 0, 4125, 4126, 3, 416, 208, 0, 4126, 791, 1, 0, 0, 0, 4127, 4128, 3, 76, 38, 0, 4128, 4129, 3, 794, 397, 0, 4129, 793, 1, 0, 0, 0, 4130, 4134, 5, 140, 0, 0, 4131, 4133, 3, 410, 205, 0, 4132, 4131, 1, 0, 0, 0, 4133, 4136, 1, 0, 0, 0, 4134, 4132, 1, 0, 0, 0, 4134, 4135, 1, 0, 0, 0, 4135, 4137, 1, 0, 0, 0, 4136, 4134, 1, 0, 0, 0, 4137, 4138, 3, 416, 208, 0, 4138, 795, 1, 0, 0, 0, 4139, 4140, 3, 468, 234, 0, 4140, 4141, 5, 133, 0, 0, 4141, 4142, 3, 766, 383, 0, 4142, 4143, 3, 770, 385, 0, 4143, 797, 1, 0, 0, 0, 4144, 4150, 3, 468, 234, 0, 4145, 4147, 5, 14, 0, 0, 4146, 4148, 5, 107, 0, 0, 4147, 4146, 1, 0, 0, 0, 4147, 4148, 1, 0, 0, 0, 4148, 4151, 1, 0, 0, 0, 4149, 4151, 5, 107, 0, 0, 4150, 4145, 1, 0, 0, 0, 4150, 4149, 1, 0, 0, 0, 4150, 4151, 1, 0, 0, 0, 4151, 4152, 1, 0, 0, 0, 4152, 4161, 5, 135, 0, 0, 4153, 4155, 3, 226, 113, 0, 4154, 4156, 3, 196, 98, 0, 4155, 4154, 1, 0, 0, 0, 4155, 4156, 1, 0, 0, 0, 4156, 4162, 1, 0, 0, 0, 4157, 4159, 5, 133, 0, 0, 4158, 4160, 3, 418, 209, 0, 4159, 4158, 1, 0, 0, 0, 4159, 4160, 1, 0, 0, 0, 4160, 4162, 1, 0, 0, 0, 4161, 4153, 1, 0, 0, 0, 4161, 4157, 1, 0, 0, 0, 4162, 4164, 1, 0, 0, 0, 4163, 4165, 3, 318, 159, 0, 4164, 4163, 1, 0, 0, 0, 4164, 4165, 1, 0, 0, 0, 4165, 4168, 1, 0, 0, 0, 4166, 4167, 5, 24, 0, 0, 4167, 4169, 3, 800, 400, 0, 4168, 4166, 1, 0, 0, 0, 4168, 4169, 1, 0, 0, 0, 4169, 4170, 1, 0, 0, 0, 4170, 4171, 3, 770, 385, 0, 4171, 799, 1, 0, 0, 0, 4172, 4173, 3, 802, 401, 0, 4173, 801, 1, 0, 0, 0, 4174, 4175, 3, 804, 402, 0, 4175, 803, 1, 0, 0, 0, 4176, 4177, 3, 806, 403, 0, 4177, 805, 1, 0, 0, 0, 4178, 4179, 3, 298, 149, 0, 4179, 807, 1, 0, 0, 0, 4180, 4181, 3, 460, 230, 0, 4181, 4182, 5, 32, 0, 0, 4182, 4183, 5, 45, 0, 0, 4183, 4184, 3, 386, 193, 0, 4184, 4185, 3, 770, 385, 0, 4185, 809, 1, 0, 0, 0, 4186, 4187, 3, 468, 234, 0, 4187, 4188, 5, 32, 0, 0, 4188, 4189, 3, 766, 383, 0, 4189, 4190, 3, 770, 385, 0, 4190, 811, 1, 0, 0, 0, 4191, 4192, 3, 460, 230, 0, 4192, 4193, 5, 26, 0, 0, 4193, 4194, 5, 45, 0, 0, 4194, 4195, 3, 386, 193, 0, 4195, 4196, 3, 816, 408, 0, 4196, 813, 1, 0, 0, 0, 4197, 4198, 3, 468, 234, 0, 4198, 4199, 5, 26, 0, 0, 4199, 4200, 3, 766, 383, 0, 4200, 4201, 3, 816, 408, 0, 4201, 815, 1, 0, 0, 0, 4202, 4215, 5, 205, 0, 0, 4203, 4207, 5, 214, 0, 0, 4204, 4206, 3, 818, 409, 0, 4205, 4204, 1, 0, 0, 0, 4206, 4209, 1, 0, 0, 0, 4207, 4205, 1, 0, 0, 0, 4207, 4208, 1, 0, 0, 0, 4208, 4211, 1, 0, 0, 0, 4209, 4207, 1, 0, 0, 0, 4210, 4212, 3, 288, 144, 0, 4211, 4210, 1, 0, 0, 0, 4211, 4212, 1, 0, 0, 0, 4212, 4213, 1, 0, 0, 0, 4213, 4215, 5, 216, 0, 0, 4214, 4202, 1, 0, 0, 0, 4214, 4203, 1, 0, 0, 0, 4215, 817, 1, 0, 0, 0, 4216, 4222, 3, 578, 289, 0, 4217, 4222, 3, 758, 379, 0, 4218, 4222, 3, 774, 387, 0, 4219, 4222, 3, 788, 394, 0, 4220, 4222, 3, 820, 410, 0, 4221, 4216, 1, 0, 0, 0, 4221, 4217, 1, 0, 0, 0, 4221, 4218, 1, 0, 0, 0, 4221, 4219, 1, 0, 0, 0, 4221, 4220, 1, 0, 0, 0, 4222, 819, 1, 0, 0, 0, 4223, 4224, 3, 76, 38, 0, 4224, 4225, 5, 109, 0, 0, 4225, 4226, 3, 822, 411, 0, 4226, 821, 1, 0, 0, 0, 4227, 4229, 3, 410, 205, 0, 4228, 4227, 1, 0, 0, 0, 4229, 4232, 1, 0, 0, 0, 4230, 4228, 1, 0, 0, 0, 4230, 4231, 1, 0, 0, 0, 4231, 4233, 1, 0, 0, 0, 4232, 4230, 1, 0, 0, 0, 4233, 4234, 3, 766, 383, 0, 4234, 4235, 3, 770, 385, 0, 4235, 823, 1, 0, 0, 0, 4236, 4237, 3, 460, 230, 0, 4237, 4238, 5, 11, 0, 0, 4238, 4239, 5, 45, 0, 0, 4239, 4240, 3, 386, 193, 0, 4240, 4241, 3, 816, 408, 0, 4241, 825, 1, 0, 0, 0, 4242, 4243, 3, 468, 234, 0, 4243, 4244, 5, 11, 0, 0, 4244, 4245, 3, 766, 383, 0, 4245, 4246, 3, 816, 408, 0, 4246, 827, 1, 0, 0, 0, 4247, 4248, 3, 460, 230, 0, 4248, 4249, 5, 166, 0, 0, 4249, 4250, 5, 45, 0, 0, 4250, 4251, 3, 386, 193, 0, 4251, 4252, 3, 816, 408, 0, 4252, 829, 1, 0, 0, 0, 4253, 4254, 3, 468, 234, 0, 4254, 4255, 5, 166, 0, 0, 4255, 4256, 3, 766, 383, 0, 4256, 4257, 3, 816, 408, 0, 4257, 831, 1, 0, 0, 0, 4258, 4259, 3, 76, 38, 0, 4259, 4260, 5, 167, 0, 0, 4260, 4261, 3, 834, 417, 0, 4261, 833, 1, 0, 0, 0, 4262, 4266, 3, 226, 113, 0, 4263, 4265, 3, 200, 100, 0, 4264, 4263, 1, 0, 0, 0, 4265, 4268, 1, 0, 0, 0, 4266, 4264, 1, 0, 0, 0, 4266, 4267, 1, 0, 0, 0, 4267, 4269, 1, 0, 0, 0, 4268, 4266, 1, 0, 0, 0, 4269, 4270, 3, 770, 385, 0, 4270, 4289, 1, 0, 0, 0, 4271, 4273, 3, 410, 205, 0, 4272, 4271, 1, 0, 0, 0, 4273, 4276, 1, 0, 0, 0, 4274, 4272, 1, 0, 0, 0, 4274, 4275, 1, 0, 0, 0, 4275, 4277, 1, 0, 0, 0, 4276, 4274, 1, 0, 0, 0, 4277, 4284, 5, 133, 0, 0, 4278, 4280, 3, 410, 205, 0, 4279, 4278, 1, 0, 0, 0, 4280, 4281, 1, 0, 0, 0, 4281, 4279, 1, 0, 0, 0, 4281, 4282, 1, 0, 0, 0, 4282, 4284, 1, 0, 0, 0, 4283, 4274, 1, 0, 0, 0, 4283, 4279, 1, 0, 0, 0, 4284, 4285, 1, 0, 0, 0, 4285, 4286, 3, 766, 383, 0, 4286, 4287, 3, 770, 385, 0, 4287, 4289, 1, 0, 0, 0, 4288, 4262, 1, 0, 0, 0, 4288, 4283, 1, 0, 0, 0, 4289, 835, 1, 0, 0, 0, 4290, 4291, 3, 460, 230, 0, 4291, 4292, 5, 162, 0, 0, 4292, 4293, 5, 26, 0, 0, 4293, 4294, 5, 45, 0, 0, 4294, 4295, 3, 386, 193, 0, 4295, 4296, 3, 816, 408, 0, 4296, 837, 1, 0, 0, 0, 4297, 4298, 3, 468, 234, 0, 4298, 4299, 5, 162, 0, 0, 4299, 4300, 5, 26, 0, 0, 4300, 4301, 3, 766, 383, 0, 4301, 4302, 3, 816, 408, 0, 4302, 839, 1, 0, 0, 0, 4303, 4304, 3, 468, 234, 0, 4304, 4314, 5, 81, 0, 0, 4305, 4307, 3, 226, 113, 0, 4306, 4308, 3, 196, 98, 0, 4307, 4306, 1, 0, 0, 0, 4307, 4308, 1, 0, 0, 0, 4308, 4315, 1, 0, 0, 0, 4309, 4310, 5, 162, 0, 0, 4310, 4312, 5, 26, 0, 0, 4311, 4313, 3, 418, 209, 0, 4312, 4311, 1, 0, 0, 0, 4312, 4313, 1, 0, 0, 0, 4313, 4315, 1, 0, 0, 0, 4314, 4305, 1, 0, 0, 0, 4314, 4309, 1, 0, 0, 0, 4315, 4317, 1, 0, 0, 0, 4316, 4318, 3, 318, 159, 0, 4317, 4316, 1, 0, 0, 0, 4317, 4318, 1, 0, 0, 0, 4318, 4319, 1, 0, 0, 0, 4319, 4320, 3, 816, 408, 0, 4320, 841, 1, 0, 0, 0, 4321, 4322, 3, 460, 230, 0, 4322, 4323, 5, 169, 0, 0, 4323, 4324, 5, 45, 0, 0, 4324, 4325, 3, 386, 193, 0, 4325, 4326, 3, 844, 422, 0, 4326, 843, 1, 0, 0, 0, 4327, 4337, 5, 205, 0, 0, 4328, 4332, 5, 214, 0, 0, 4329, 4331, 3, 846, 423, 0, 4330, 4329, 1, 0, 0, 0, 4331, 4334, 1, 0, 0, 0, 4332, 4330, 1, 0, 0, 0, 4332, 4333, 1, 0, 0, 0, 4333, 4335, 1, 0, 0, 0, 4334, 4332, 1, 0, 0, 0, 4335, 4337, 5, 216, 0, 0, 4336, 4327, 1, 0, 0, 0, 4336, 4328, 1, 0, 0, 0, 4337, 845, 1, 0, 0, 0, 4338, 4342, 3, 390, 195, 0, 4339, 4342, 3, 364, 182, 0, 4340, 4342, 3, 848, 424, 0, 4341, 4338, 1, 0, 0, 0, 4341, 4339, 1, 0, 0, 0, 4341, 4340, 1, 0, 0, 0, 4342, 847, 1, 0, 0, 0, 4343, 4344, 3, 76, 38, 0, 4344, 4345, 5, 129, 0, 0, 4345, 4346, 3, 850, 425, 0, 4346, 849, 1, 0, 0, 0, 4347, 4349, 3, 226, 113, 0, 4348, 4350, 3, 196, 98, 0, 4349, 4348, 1, 0, 0, 0, 4349, 4350, 1, 0, 0, 0, 4350, 4351, 1, 0, 0, 0, 4351, 4352, 3, 422, 211, 0, 4352, 4369, 1, 0, 0, 0, 4353, 4355, 3, 410, 205, 0, 4354, 4353, 1, 0, 0, 0, 4355, 4358, 1, 0, 0, 0, 4356, 4354, 1, 0, 0, 0, 4356, 4357, 1, 0, 0, 0, 4357, 4359, 1, 0, 0, 0, 4358, 4356, 1, 0, 0, 0, 4359, 4366, 5, 130, 0, 0, 4360, 4362, 3, 410, 205, 0, 4361, 4360, 1, 0, 0, 0, 4362, 4363, 1, 0, 0, 0, 4363, 4361, 1, 0, 0, 0, 4363, 4364, 1, 0, 0, 0, 4364, 4366, 1, 0, 0, 0, 4365, 4356, 1, 0, 0, 0, 4365, 4361, 1, 0, 0, 0, 4366, 4367, 1, 0, 0, 0, 4367, 4369, 3, 416, 208, 0, 4368, 4347, 1, 0, 0, 0, 4368, 4365, 1, 0, 0, 0, 4369, 851, 1, 0, 0, 0, 4370, 4371, 3, 468, 234, 0, 4371, 4373, 5, 169, 0, 0, 4372, 4374, 3, 418, 209, 0, 4373, 4372, 1, 0, 0, 0, 4373, 4374, 1, 0, 0, 0, 4374, 4376, 1, 0, 0, 0, 4375, 4377, 3, 318, 159, 0, 4376, 4375, 1, 0, 0, 0, 4376, 4377, 1, 0, 0, 0, 4377, 4378, 1, 0, 0, 0, 4378, 4379, 3, 854, 427, 0, 4379, 853, 1, 0, 0, 0, 4380, 4390, 5, 205, 0, 0, 4381, 4385, 5, 214, 0, 0, 4382, 4384, 3, 856, 428, 0, 4383, 4382, 1, 0, 0, 0, 4384, 4387, 1, 0, 0, 0, 4385, 4383, 1, 0, 0, 0, 4385, 4386, 1, 0, 0, 0, 4386, 4388, 1, 0, 0, 0, 4387, 4385, 1, 0, 0, 0, 4388, 4390, 5, 216, 0, 0, 4389, 4380, 1, 0, 0, 0, 4389, 4381, 1, 0, 0, 0, 4390, 855, 1, 0, 0, 0, 4391, 4396, 3, 390, 195, 0, 4392, 4396, 3, 364, 182, 0, 4393, 4396, 3, 848, 424, 0, 4394, 4396, 3, 858, 429, 0, 4395, 4391, 1, 0, 0, 0, 4395, 4392, 1, 0, 0, 0, 4395, 4393, 1, 0, 0, 0, 4395, 4394, 1, 0, 0, 0, 4396, 857, 1, 0, 0, 0, 4397, 4400, 5, 62, 0, 0, 4398, 4401, 3, 860, 430, 0, 4399, 4401, 3, 862, 431, 0, 4400, 4398, 1, 0, 0, 0, 4400, 4399, 1, 0, 0, 0, 4401, 4402, 1, 0, 0, 0, 4402, 4403, 3, 46, 23, 0, 4403, 859, 1, 0, 0, 0, 4404, 4405, 3, 94, 47, 0, 4405, 861, 1, 0, 0, 0, 4406, 4407, 3, 96, 48, 0, 4407, 863, 1, 0, 0, 0, 4408, 4409, 3, 460, 230, 0, 4409, 4410, 5, 170, 0, 0, 4410, 4411, 5, 45, 0, 0, 4411, 4412, 3, 386, 193, 0, 4412, 4413, 3, 770, 385, 0, 4413, 865, 1, 0, 0, 0, 4414, 4415, 3, 468, 234, 0, 4415, 4416, 5, 170, 0, 0, 4416, 4417, 3, 766, 383, 0, 4417, 4418, 3, 770, 385, 0, 4418, 867, 1, 0, 0, 0, 4419, 4420, 3, 460, 230, 0, 4420, 4421, 5, 130, 0, 0, 4421, 4422, 5, 45, 0, 0, 4422, 4423, 3, 384, 192, 0, 4423, 869, 1, 0, 0, 0, 4424, 4425, 3, 468, 234, 0, 4425, 4426, 5, 130, 0, 0, 4426, 4427, 3, 416, 208, 0, 4427, 871, 1, 0, 0, 0, 4428, 4430, 5, 2, 0, 0, 4429, 4428, 1, 0, 0, 0, 4429, 4430, 1, 0, 0, 0, 4430, 4434, 1, 0, 0, 0, 4431, 4433, 3, 380, 190, 0, 4432, 4431, 1, 0, 0, 0, 4433, 4436, 1, 0, 0, 0, 4434, 4432, 1, 0, 0, 0, 4434, 4435, 1, 0, 0, 0, 4435, 4437, 1, 0, 0, 0, 4436, 4434, 1, 0, 0, 0, 4437, 4438, 5, 102, 0, 0, 4438, 4439, 5, 45, 0, 0, 4439, 4440, 3, 384, 192, 0, 4440, 873, 1, 0, 0, 0, 4441, 4442, 3, 220, 110, 0, 4442, 875, 1, 0, 0, 0, 4443, 4444, 3, 878, 439, 0, 4444, 877, 1, 0, 0, 0, 4445, 4447, 5, 127, 0, 0, 4446, 4445, 1, 0, 0, 0, 4446, 4447, 1, 0, 0, 0, 4447, 4449, 1, 0, 0, 0, 4448, 4450, 7, 19, 0, 0, 4449, 4448, 1, 0, 0, 0, 4449, 4450, 1, 0, 0, 0, 4450, 4451, 1, 0, 0, 0, 4451, 4453, 3, 232, 116, 0, 4452, 4454, 3, 196, 98, 0, 4453, 4452, 1, 0, 0, 0, 4453, 4454, 1, 0, 0, 0, 4454, 4456, 1, 0, 0, 0, 4455, 4457, 3, 318, 159, 0, 4456, 4455, 1, 0, 0, 0, 4456, 4457, 1, 0, 0, 0, 4457, 4458, 1, 0, 0, 0, 4458, 4459, 3, 348, 174, 0, 4459, 879, 1, 0, 0, 0, 4460, 4462, 3, 378, 189, 0, 4461, 4460, 1, 0, 0, 0, 4461, 4462, 1, 0, 0, 0, 4462, 4464, 1, 0, 0, 0, 4463, 4465, 3, 380, 190, 0, 4464, 4463, 1, 0, 0, 0, 4465, 4466, 1, 0, 0, 0, 4466, 4464, 1, 0, 0, 0, 4466, 4467, 1, 0, 0, 0, 4467, 4468, 1, 0, 0, 0, 4468, 4469, 5, 45, 0, 0, 4469, 4470, 3, 384, 192, 0, 4470, 881, 1, 0, 0, 0, 4471, 4473, 3, 412, 206, 0, 4472, 4474, 3, 410, 205, 0, 4473, 4472, 1, 0, 0, 0, 4474, 4475, 1, 0, 0, 0, 4475, 4473, 1, 0, 0, 0, 4475, 4476, 1, 0, 0, 0, 4476, 4477, 1, 0, 0, 0, 4477, 4478, 3, 416, 208, 0, 4478, 883, 1, 0, 0, 0, 4479, 4482, 3, 94, 47, 0, 4480, 4482, 3, 886, 443, 0, 4481, 4479, 1, 0, 0, 0, 4481, 4480, 1, 0, 0, 0, 4482, 885, 1, 0, 0, 0, 4483, 4484, 3, 88, 44, 0, 4484, 4485, 5, 183, 0, 0, 4485, 4488, 5, 198, 0, 0, 4486, 4487, 5, 183, 0, 0, 4487, 4489, 5, 179, 0, 0, 4488, 4486, 1, 0, 0, 0, 4488, 4489, 1, 0, 0, 0, 4489, 887, 1, 0, 0, 0, 4490, 4492, 3, 418, 209, 0, 4491, 4490, 1, 0, 0, 0, 4491, 4492, 1, 0, 0, 0, 4492, 4494, 1, 0, 0, 0, 4493, 4495, 3, 318, 159, 0, 4494, 4493, 1, 0, 0, 0, 4494, 4495, 1, 0, 0, 0, 4495, 889, 1, 0, 0, 0, 4496, 4497, 1, 0, 0, 0, 4497, 891, 1, 0, 0, 0, 4498, 4499, 1, 0, 0, 0, 4499, 893, 1, 0, 0, 0, 4500, 4501, 1, 0, 0, 0, 4501, 895, 1, 0, 0, 0, 4502, 4503, 1, 0, 0, 0, 4503, 897, 1, 0, 0, 0, 4504, 4505, 5, 218, 0, 0, 4505, 899, 1, 0, 0, 0, 4506, 4507, 5, 218, 0, 0, 4507, 901, 1, 0, 0, 0, 4508, 4509, 1, 0, 0, 0, 4509, 903, 1, 0, 0, 0, 510, 919, 975, 982, 998, 1000, 1002, 1012, 1022, 1033, 1036, 1041, 1056, 1065, 1073, 1085, 1104, 1118, 1125, 1133, 1137, 1141, 1145, 1150, 1155, 1158, 1165, 1174, 1182, 1189, 1199, 1203, 1211, 1214, 1216, 1220, 1226, 1230, 1236, 1238, 1247, 1255, 1263, 1270, 1274, 1279, 1282, 1288, 1302, 1305, 1313, 1320, 1326, 1330, 1337, 1342, 1349, 1352, 1358, 1364, 1366, 1374, 1402, 1414, 1422, 1427, 1431, 1434, 1437, 1441, 1443, 1448, 1457, 1467, 1476, 1485, 1494, 1503, 1511, 1515, 1521, 1525, 1527, 1542, 1550, 1555, 1557, 1565, 1574, 1584, 1589, 1591, 1599, 1608, 1618, 1626, 1634, 1642, 1647, 1662, 1665, 1668, 1672, 1677, 1686, 1691, 1693, 1706, 1709, 1713, 1716, 1720, 1723, 1728, 1733, 1736, 1739, 1742, 1745, 1751, 1756, 1766, 1768, 1773, 1778, 1782, 1787, 1794, 1797, 1803, 1811, 1825, 1831, 1834, 1839, 1846, 1849, 1854, 1858, 1860, 1864, 1868, 1870, 1872, 1879, 1886, 1894, 1903, 1920, 1928, 1930, 1937, 1944, 1951, 1956, 1958, 1971, 1979, 1987, 1992, 1994, 2007, 2012, 2014, 2022, 2031, 2041, 2046, 2049, 2087, 2090, 2093, 2099, 2102, 2107, 2109, 2116, 2126, 2134, 2139, 2158, 2161, 2164, 2170, 2172, 2185, 2188, 2191, 2197, 2199, 2210, 2224, 2229, 2231, 2235, 2248, 2261, 2268, 2272, 2281, 2302, 2306, 2313, 2316, 2323, 2326, 2330, 2337, 2339, 2344, 2348, 2352, 2356, 2360, 2362, 2367, 2370, 2375, 2382, 2384, 2393, 2402, 2404, 2410, 2414, 2421, 2434, 2441, 2452, 2458, 2465, 2476, 2479, 2484, 2489, 2491, 2500, 2509, 2511, 2515, 2521, 2526, 2529, 2533, 2536, 2543, 2550, 2556, 2564, 2571, 2575, 2583, 2586, 2593, 2602, 2611, 2616, 2648, 2652, 2659, 2664, 2671, 2674, 2681, 2685, 2692, 2698, 2703, 2710, 2713, 2723, 2742, 2745, 2748, 2751, 2755, 2764, 2770, 2774, 2780, 2783, 2786, 2797, 2810, 2823, 2827, 2830, 2833, 2839, 2856, 2874, 2897, 2905, 2920, 2932, 2934, 2938, 2943, 2950, 2959, 2963, 2968, 2977, 2983, 2994, 2997, 3002, 3014, 3021, 3027, 3038, 3042, 3044, 3056, 3101, 3104, 3108, 3112, 3118, 3132, 3140, 3142, 3153, 3155, 3174, 3178, 3184, 3189, 3199, 3208, 3219, 3222, 3226, 3229, 3233, 3247, 3255, 3260, 3275, 3279, 3283, 3296, 3299, 3303, 3310, 3316, 3348, 3352, 3359, 3363, 3369, 3373, 3381, 3384, 3388, 3410, 3413, 3422, 3426, 3428, 3431, 3441, 3445, 3449, 3455, 3459, 3462, 3467, 3473, 3480, 3487, 3494, 3503, 3511, 3517, 3520, 3523, 3533, 3538, 3543, 3547, 3549, 3554, 3559, 3565, 3571, 3586, 3599, 3605, 3609, 3620, 3622, 3630, 3632, 3638, 3650, 3657, 3667, 3672, 3689, 3691, 3708, 3714, 3718, 3722, 3728, 3736, 3741, 3759, 3770, 3797, 3803, 3807, 3813, 3817, 3819, 3822, 3828, 3831, 3838, 3841, 3844, 3855, 3858, 3861, 3866, 3869, 3873, 3875, 3897, 3904, 3908, 3915, 3919, 3926, 3930, 3937, 3941, 3966, 3971, 3975, 3979, 3999, 4003, 4007, 4012, 4015, 4028, 4032, 4041, 4050, 4063, 4070, 4077, 4079, 4084, 4092, 4099, 4106, 4108, 4113, 4122, 4134, 4147, 4150, 4155, 4159, 4161, 4164, 4168, 4207, 4211, 4214, 4221, 4230, 4266, 4274, 4281, 4283, 4288, 4307, 4312, 4314, 4317, 4332, 4336, 4341, 4349, 4356, 4363, 4365, 4368, 4373, 4376, 4385, 4389, 4395, 4400, 4429, 4434, 4446, 4449, 4453, 4456, 4461, 4466, 4475, 4481, 4488, 4491, 4494] \ No newline at end of file diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.tokens b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.tokens new file mode 100644 index 00000000..691d2df3 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2Parser.tokens @@ -0,0 +1,444 @@ +ABOUT=1 +ABSTRACT=2 +ACCEPT=3 +ACTION=4 +ACTOR=5 +AFTER=6 +ALIAS=7 +ALL=8 +ALLOCATE=9 +ALLOCATION=10 +ANALYSIS=11 +AND=12 +AS=13 +ASSERT=14 +ASSIGN=15 +ASSOC=16 +ASSUME=17 +AT=18 +ATTRIBUTE=19 +BEHAVIOR=20 +BIND=21 +BINDING=22 +BOOL=23 +BY=24 +CALC=25 +CASE=26 +CHAINS=27 +CLASS=28 +CLASSIFIER=29 +COMMENT=30 +COMPOSITE=31 +CONCERN=32 +CONJUGATE=33 +CONJUGATES=34 +CONJUGATION=35 +CONNECT=36 +CONNECTION=37 +CONNECTOR=38 +CONST=39 +CONSTANT=40 +CONSTRAINT=41 +CROSSES=42 +DATATYPE=43 +DECIDE=44 +DEF=45 +DEFAULT=46 +DEFINED=47 +DEPENDENCY=48 +DERIVED=49 +DIFFERENCES=50 +DISJOINING=51 +DISJOINT=52 +DO=53 +DOC=54 +ELSE=55 +END=56 +ENTRY=57 +ENUM=58 +EVENT=59 +EXHIBIT=60 +EXIT=61 +EXPOSE=62 +EXPR=63 +FALSE=64 +FEATURE=65 +FEATURED=66 +FEATURING=67 +FILTER=68 +FIRST=69 +FLOW=70 +FOR=71 +FORK=72 +FRAME=73 +FROM=74 +FUNCTION=75 +HASTYPE=76 +IF=77 +IMPLIES=78 +IMPORT=79 +IN=80 +INCLUDE=81 +INDIVIDUAL=82 +INOUT=83 +INTERACTION=84 +INTERFACE=85 +INTERSECTS=86 +INV=87 +INVERSE=88 +INVERTING=89 +ISTYPE=90 +ITEM=91 +JOIN=92 +LANGUAGE=93 +LIBRARY=94 +LOCALE=95 +LOOP=96 +MEMBER=97 +MERGE=98 +MESSAGE=99 +META=100 +METACLASS=101 +METADATA=102 +MULTIPLICITY=103 +NAMESPACE=104 +NEW=105 +NONUNIQUE=106 +NOT=107 +NULL=108 +OBJECTIVE=109 +OCCURRENCE=110 +OF=111 +OR=112 +ORDERED=113 +OUT=114 +PACKAGE=115 +PARALLEL=116 +PART=117 +PERFORM=118 +PORT=119 +PORTION=120 +PREDICATE=121 +PRIVATE=122 +PROTECTED=123 +PUBLIC=124 +REDEFINES=125 +REDEFINITION=126 +REF=127 +REFERENCES=128 +RENDER=129 +RENDERING=130 +REP=131 +REQUIRE=132 +REQUIREMENT=133 +RETURN=134 +SATISFY=135 +SEND=136 +SNAPSHOT=137 +SPECIALIZATION=138 +SPECIALIZES=139 +STAKEHOLDER=140 +STANDARD=141 +STATE=142 +STEP=143 +STRUCT=144 +SUBCLASSIFIER=145 +SUBJECT=146 +SUBSET=147 +SUBSETS=148 +SUBTYPE=149 +SUCCESSION=150 +TERMINATE=151 +THEN=152 +TIMESLICE=153 +TO=154 +TRANSITION=155 +TRUE=156 +TYPE=157 +TYPED=158 +TYPING=159 +UNIONS=160 +UNTIL=161 +USE=162 +VAR=163 +VARIANT=164 +VARIATION=165 +VERIFICATION=166 +VERIFY=167 +VIA=168 +VIEW=169 +VIEWPOINT=170 +WHEN=171 +WHILE=172 +XOR=173 +BANG_EQ_EQ=174 +COLON_COLON_GT=175 +COLON_GT_GT=176 +EQ_EQ_EQ=177 +BANG_EQ=178 +STAR_STAR=179 +ARROW=180 +DOT_DOT=181 +DOT_QUESTION=182 +COLON_COLON=183 +COLON_EQ=184 +COLON_GT=185 +LE=186 +EQ_EQ=187 +FAT_ARROW=188 +GE=189 +QUESTION_QUESTION=190 +AT_AT=191 +HASH=192 +DOLLAR=193 +PERCENT=194 +AMP=195 +LPAREN=196 +RPAREN=197 +STAR=198 +PLUS=199 +COMMA=200 +MINUS=201 +DOT=202 +SLASH=203 +COLON=204 +SEMI=205 +LT=206 +EQ=207 +GT=208 +QUESTION=209 +AT_SIGN=210 +LBRACK=211 +RBRACK=212 +CARET=213 +LBRACE=214 +PIPE=215 +RBRACE=216 +TILDE=217 +IDENTIFIER=218 +STRING=219 +DOUBLE_STRING=220 +INTEGER=221 +REAL=222 +REGULAR_COMMENT=223 +SINGLE_LINE_NOTE=224 +BARE_LINE_COMMENT=225 +WS=226 +'about'=1 +'abstract'=2 +'accept'=3 +'action'=4 +'actor'=5 +'after'=6 +'alias'=7 +'all'=8 +'allocate'=9 +'allocation'=10 +'analysis'=11 +'and'=12 +'as'=13 +'assert'=14 +'assign'=15 +'assoc'=16 +'assume'=17 +'at'=18 +'attribute'=19 +'behavior'=20 +'bind'=21 +'binding'=22 +'bool'=23 +'by'=24 +'calc'=25 +'case'=26 +'chains'=27 +'class'=28 +'classifier'=29 +'comment'=30 +'composite'=31 +'concern'=32 +'conjugate'=33 +'conjugates'=34 +'conjugation'=35 +'connect'=36 +'connection'=37 +'connector'=38 +'const'=39 +'constant'=40 +'constraint'=41 +'crosses'=42 +'datatype'=43 +'decide'=44 +'def'=45 +'default'=46 +'defined'=47 +'dependency'=48 +'derived'=49 +'differences'=50 +'disjoining'=51 +'disjoint'=52 +'do'=53 +'doc'=54 +'else'=55 +'end'=56 +'entry'=57 +'enum'=58 +'event'=59 +'exhibit'=60 +'exit'=61 +'expose'=62 +'expr'=63 +'false'=64 +'feature'=65 +'featured'=66 +'featuring'=67 +'filter'=68 +'first'=69 +'flow'=70 +'for'=71 +'fork'=72 +'frame'=73 +'from'=74 +'function'=75 +'hastype'=76 +'if'=77 +'implies'=78 +'import'=79 +'in'=80 +'include'=81 +'individual'=82 +'inout'=83 +'interaction'=84 +'interface'=85 +'intersects'=86 +'inv'=87 +'inverse'=88 +'inverting'=89 +'istype'=90 +'item'=91 +'join'=92 +'language'=93 +'library'=94 +'locale'=95 +'loop'=96 +'member'=97 +'merge'=98 +'message'=99 +'meta'=100 +'metaclass'=101 +'metadata'=102 +'multiplicity'=103 +'namespace'=104 +'new'=105 +'nonunique'=106 +'not'=107 +'null'=108 +'objective'=109 +'occurrence'=110 +'of'=111 +'or'=112 +'ordered'=113 +'out'=114 +'package'=115 +'parallel'=116 +'part'=117 +'perform'=118 +'port'=119 +'portion'=120 +'predicate'=121 +'private'=122 +'protected'=123 +'public'=124 +'redefines'=125 +'redefinition'=126 +'ref'=127 +'references'=128 +'render'=129 +'rendering'=130 +'rep'=131 +'require'=132 +'requirement'=133 +'return'=134 +'satisfy'=135 +'send'=136 +'snapshot'=137 +'specialization'=138 +'specializes'=139 +'stakeholder'=140 +'standard'=141 +'state'=142 +'step'=143 +'struct'=144 +'subclassifier'=145 +'subject'=146 +'subset'=147 +'subsets'=148 +'subtype'=149 +'succession'=150 +'terminate'=151 +'then'=152 +'timeslice'=153 +'to'=154 +'transition'=155 +'true'=156 +'type'=157 +'typed'=158 +'typing'=159 +'unions'=160 +'until'=161 +'use'=162 +'var'=163 +'variant'=164 +'variation'=165 +'verification'=166 +'verify'=167 +'via'=168 +'view'=169 +'viewpoint'=170 +'when'=171 +'while'=172 +'xor'=173 +'!=='=174 +'::>'=175 +':>>'=176 +'==='=177 +'!='=178 +'**'=179 +'->'=180 +'..'=181 +'.?'=182 +'::'=183 +':='=184 +':>'=185 +'<='=186 +'=='=187 +'=>'=188 +'>='=189 +'??'=190 +'@@'=191 +'#'=192 +'$'=193 +'%'=194 +'&'=195 +'('=196 +')'=197 +'*'=198 +'+'=199 +','=200 +'-'=201 +'.'=202 +'/'=203 +':'=204 +';'=205 +'<'=206 +'='=207 +'>'=208 +'?'=209 +'@'=210 +'['=211 +']'=212 +'^'=213 +'{'=214 +'|'=215 +'}'=216 +'~'=217 +'//'=225 diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseListener.cs b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseListener.cs new file mode 100644 index 00000000..9b6e800f --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseListener.cs @@ -0,0 +1,5477 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/work/DemaConsulting/BuildTools/SysML2Tools/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace DemaConsulting.SysML2Tools.Parser.Antlr { + +using Antlr4.Runtime.Misc; +using IErrorNode = Antlr4.Runtime.Tree.IErrorNode; +using ITerminalNode = Antlr4.Runtime.Tree.ITerminalNode; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a listener which only needs to handle a subset +/// of the available methods. +/// +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class SysMLv2ParserBaseListener : ISysMLv2ParserListener { + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedExpression([NotNull] SysMLv2Parser.OwnedExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedExpression([NotNull] SysMLv2Parser.OwnedExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeReference([NotNull] SysMLv2Parser.TypeReferenceContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeReference([NotNull] SysMLv2Parser.TypeReferenceContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSequenceExpressionList([NotNull] SysMLv2Parser.SequenceExpressionListContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSequenceExpressionList([NotNull] SysMLv2Parser.SequenceExpressionListContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBaseExpression([NotNull] SysMLv2Parser.BaseExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBaseExpression([NotNull] SysMLv2Parser.BaseExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNullExpression([NotNull] SysMLv2Parser.NullExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNullExpression([NotNull] SysMLv2Parser.NullExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureReferenceExpression([NotNull] SysMLv2Parser.FeatureReferenceExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureReferenceExpression([NotNull] SysMLv2Parser.FeatureReferenceExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConstructorExpression([NotNull] SysMLv2Parser.ConstructorExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConstructorExpression([NotNull] SysMLv2Parser.ConstructorExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBodyExpression([NotNull] SysMLv2Parser.BodyExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBodyExpression([NotNull] SysMLv2Parser.BodyExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterArgumentList([NotNull] SysMLv2Parser.ArgumentListContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitArgumentList([NotNull] SysMLv2Parser.ArgumentListContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPositionalArgumentList([NotNull] SysMLv2Parser.PositionalArgumentListContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPositionalArgumentList([NotNull] SysMLv2Parser.PositionalArgumentListContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamedArgumentList([NotNull] SysMLv2Parser.NamedArgumentListContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamedArgumentList([NotNull] SysMLv2Parser.NamedArgumentListContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamedArgument([NotNull] SysMLv2Parser.NamedArgumentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamedArgument([NotNull] SysMLv2Parser.NamedArgumentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLiteralExpression([NotNull] SysMLv2Parser.LiteralExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLiteralExpression([NotNull] SysMLv2Parser.LiteralExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLiteralBoolean([NotNull] SysMLv2Parser.LiteralBooleanContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLiteralBoolean([NotNull] SysMLv2Parser.LiteralBooleanContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLiteralString([NotNull] SysMLv2Parser.LiteralStringContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLiteralString([NotNull] SysMLv2Parser.LiteralStringContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLiteralInteger([NotNull] SysMLv2Parser.LiteralIntegerContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLiteralInteger([NotNull] SysMLv2Parser.LiteralIntegerContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLiteralReal([NotNull] SysMLv2Parser.LiteralRealContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLiteralReal([NotNull] SysMLv2Parser.LiteralRealContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLiteralInfinity([NotNull] SysMLv2Parser.LiteralInfinityContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLiteralInfinity([NotNull] SysMLv2Parser.LiteralInfinityContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterArgumentMember([NotNull] SysMLv2Parser.ArgumentMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitArgumentMember([NotNull] SysMLv2Parser.ArgumentMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterArgumentExpressionMember([NotNull] SysMLv2Parser.ArgumentExpressionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitArgumentExpressionMember([NotNull] SysMLv2Parser.ArgumentExpressionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterName([NotNull] SysMLv2Parser.NameContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitName([NotNull] SysMLv2Parser.NameContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUnreservedKeyword([NotNull] SysMLv2Parser.UnreservedKeywordContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUnreservedKeyword([NotNull] SysMLv2Parser.UnreservedKeywordContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIdentification([NotNull] SysMLv2Parser.IdentificationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIdentification([NotNull] SysMLv2Parser.IdentificationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRelationshipBody([NotNull] SysMLv2Parser.RelationshipBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRelationshipBody([NotNull] SysMLv2Parser.RelationshipBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRelationshipOwnedElement([NotNull] SysMLv2Parser.RelationshipOwnedElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRelationshipOwnedElement([NotNull] SysMLv2Parser.RelationshipOwnedElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedRelatedElement([NotNull] SysMLv2Parser.OwnedRelatedElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedRelatedElement([NotNull] SysMLv2Parser.OwnedRelatedElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDependency([NotNull] SysMLv2Parser.DependencyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDependency([NotNull] SysMLv2Parser.DependencyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAnnotation([NotNull] SysMLv2Parser.AnnotationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAnnotation([NotNull] SysMLv2Parser.AnnotationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedAnnotation([NotNull] SysMLv2Parser.OwnedAnnotationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedAnnotation([NotNull] SysMLv2Parser.OwnedAnnotationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAnnotatingElement([NotNull] SysMLv2Parser.AnnotatingElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAnnotatingElement([NotNull] SysMLv2Parser.AnnotatingElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterComment([NotNull] SysMLv2Parser.CommentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitComment([NotNull] SysMLv2Parser.CommentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDocumentation([NotNull] SysMLv2Parser.DocumentationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDocumentation([NotNull] SysMLv2Parser.DocumentationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTextualRepresentation([NotNull] SysMLv2Parser.TextualRepresentationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTextualRepresentation([NotNull] SysMLv2Parser.TextualRepresentationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRootNamespace([NotNull] SysMLv2Parser.RootNamespaceContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRootNamespace([NotNull] SysMLv2Parser.RootNamespaceContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespace([NotNull] SysMLv2Parser.NamespaceContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespace([NotNull] SysMLv2Parser.NamespaceContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceDeclaration([NotNull] SysMLv2Parser.NamespaceDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceDeclaration([NotNull] SysMLv2Parser.NamespaceDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceBody([NotNull] SysMLv2Parser.NamespaceBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceBody([NotNull] SysMLv2Parser.NamespaceBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceBodyElement([NotNull] SysMLv2Parser.NamespaceBodyElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceBodyElement([NotNull] SysMLv2Parser.NamespaceBodyElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMemberPrefix([NotNull] SysMLv2Parser.MemberPrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMemberPrefix([NotNull] SysMLv2Parser.MemberPrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterVisibilityIndicator([NotNull] SysMLv2Parser.VisibilityIndicatorContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitVisibilityIndicator([NotNull] SysMLv2Parser.VisibilityIndicatorContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceMember([NotNull] SysMLv2Parser.NamespaceMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceMember([NotNull] SysMLv2Parser.NamespaceMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNonFeatureMember([NotNull] SysMLv2Parser.NonFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNonFeatureMember([NotNull] SysMLv2Parser.NonFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceFeatureMember([NotNull] SysMLv2Parser.NamespaceFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceFeatureMember([NotNull] SysMLv2Parser.NamespaceFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAliasMember([NotNull] SysMLv2Parser.AliasMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAliasMember([NotNull] SysMLv2Parser.AliasMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterQualifiedName([NotNull] SysMLv2Parser.QualifiedNameContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitQualifiedName([NotNull] SysMLv2Parser.QualifiedNameContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterImportRule([NotNull] SysMLv2Parser.ImportRuleContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitImportRule([NotNull] SysMLv2Parser.ImportRuleContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterImportDeclaration([NotNull] SysMLv2Parser.ImportDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitImportDeclaration([NotNull] SysMLv2Parser.ImportDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMembershipImport([NotNull] SysMLv2Parser.MembershipImportContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMembershipImport([NotNull] SysMLv2Parser.MembershipImportContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceImport([NotNull] SysMLv2Parser.NamespaceImportContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceImport([NotNull] SysMLv2Parser.NamespaceImportContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFilterPackage([NotNull] SysMLv2Parser.FilterPackageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFilterPackage([NotNull] SysMLv2Parser.FilterPackageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFilterPackageMember([NotNull] SysMLv2Parser.FilterPackageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFilterPackageMember([NotNull] SysMLv2Parser.FilterPackageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMemberElement([NotNull] SysMLv2Parser.MemberElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMemberElement([NotNull] SysMLv2Parser.MemberElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNonFeatureElement([NotNull] SysMLv2Parser.NonFeatureElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNonFeatureElement([NotNull] SysMLv2Parser.NonFeatureElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureElement([NotNull] SysMLv2Parser.FeatureElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureElement([NotNull] SysMLv2Parser.FeatureElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterType([NotNull] SysMLv2Parser.TypeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitType([NotNull] SysMLv2Parser.TypeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypePrefix([NotNull] SysMLv2Parser.TypePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypePrefix([NotNull] SysMLv2Parser.TypePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeDeclaration([NotNull] SysMLv2Parser.TypeDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeDeclaration([NotNull] SysMLv2Parser.TypeDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSpecializationPart([NotNull] SysMLv2Parser.SpecializationPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSpecializationPart([NotNull] SysMLv2Parser.SpecializationPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConjugationPart([NotNull] SysMLv2Parser.ConjugationPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConjugationPart([NotNull] SysMLv2Parser.ConjugationPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeRelationshipPart([NotNull] SysMLv2Parser.TypeRelationshipPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeRelationshipPart([NotNull] SysMLv2Parser.TypeRelationshipPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDisjoiningPart([NotNull] SysMLv2Parser.DisjoiningPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDisjoiningPart([NotNull] SysMLv2Parser.DisjoiningPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUnioningPart([NotNull] SysMLv2Parser.UnioningPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUnioningPart([NotNull] SysMLv2Parser.UnioningPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIntersectingPart([NotNull] SysMLv2Parser.IntersectingPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIntersectingPart([NotNull] SysMLv2Parser.IntersectingPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDifferencingPart([NotNull] SysMLv2Parser.DifferencingPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDifferencingPart([NotNull] SysMLv2Parser.DifferencingPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeBody([NotNull] SysMLv2Parser.TypeBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeBody([NotNull] SysMLv2Parser.TypeBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeBodyElement([NotNull] SysMLv2Parser.TypeBodyElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeBodyElement([NotNull] SysMLv2Parser.TypeBodyElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSpecialization([NotNull] SysMLv2Parser.SpecializationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSpecialization([NotNull] SysMLv2Parser.SpecializationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedSpecialization([NotNull] SysMLv2Parser.OwnedSpecializationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedSpecialization([NotNull] SysMLv2Parser.OwnedSpecializationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSpecificType([NotNull] SysMLv2Parser.SpecificTypeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSpecificType([NotNull] SysMLv2Parser.SpecificTypeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGeneralType([NotNull] SysMLv2Parser.GeneralTypeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGeneralType([NotNull] SysMLv2Parser.GeneralTypeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConjugation([NotNull] SysMLv2Parser.ConjugationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConjugation([NotNull] SysMLv2Parser.ConjugationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedConjugation([NotNull] SysMLv2Parser.OwnedConjugationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedConjugation([NotNull] SysMLv2Parser.OwnedConjugationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDisjoining([NotNull] SysMLv2Parser.DisjoiningContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDisjoining([NotNull] SysMLv2Parser.DisjoiningContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedDisjoining([NotNull] SysMLv2Parser.OwnedDisjoiningContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedDisjoining([NotNull] SysMLv2Parser.OwnedDisjoiningContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUnioning([NotNull] SysMLv2Parser.UnioningContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUnioning([NotNull] SysMLv2Parser.UnioningContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIntersecting([NotNull] SysMLv2Parser.IntersectingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIntersecting([NotNull] SysMLv2Parser.IntersectingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDifferencing([NotNull] SysMLv2Parser.DifferencingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDifferencing([NotNull] SysMLv2Parser.DifferencingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureMember([NotNull] SysMLv2Parser.FeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureMember([NotNull] SysMLv2Parser.FeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeFeatureMember([NotNull] SysMLv2Parser.TypeFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeFeatureMember([NotNull] SysMLv2Parser.TypeFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedFeatureMember([NotNull] SysMLv2Parser.OwnedFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedFeatureMember([NotNull] SysMLv2Parser.OwnedFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterClassifier([NotNull] SysMLv2Parser.ClassifierContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitClassifier([NotNull] SysMLv2Parser.ClassifierContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterClassifierDeclaration([NotNull] SysMLv2Parser.ClassifierDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitClassifierDeclaration([NotNull] SysMLv2Parser.ClassifierDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuperclassingPart([NotNull] SysMLv2Parser.SuperclassingPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuperclassingPart([NotNull] SysMLv2Parser.SuperclassingPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubclassification([NotNull] SysMLv2Parser.SubclassificationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubclassification([NotNull] SysMLv2Parser.SubclassificationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedSubclassification([NotNull] SysMLv2Parser.OwnedSubclassificationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedSubclassification([NotNull] SysMLv2Parser.OwnedSubclassificationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeature([NotNull] SysMLv2Parser.FeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeature([NotNull] SysMLv2Parser.FeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEndFeaturePrefix([NotNull] SysMLv2Parser.EndFeaturePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEndFeaturePrefix([NotNull] SysMLv2Parser.EndFeaturePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBasicFeaturePrefix([NotNull] SysMLv2Parser.BasicFeaturePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBasicFeaturePrefix([NotNull] SysMLv2Parser.BasicFeaturePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeaturePrefix([NotNull] SysMLv2Parser.FeaturePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeaturePrefix([NotNull] SysMLv2Parser.FeaturePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedCrossFeatureMember([NotNull] SysMLv2Parser.OwnedCrossFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedCrossFeatureMember([NotNull] SysMLv2Parser.OwnedCrossFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedCrossFeature([NotNull] SysMLv2Parser.OwnedCrossFeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedCrossFeature([NotNull] SysMLv2Parser.OwnedCrossFeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureDirection([NotNull] SysMLv2Parser.FeatureDirectionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureDirection([NotNull] SysMLv2Parser.FeatureDirectionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureDeclaration([NotNull] SysMLv2Parser.FeatureDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureDeclaration([NotNull] SysMLv2Parser.FeatureDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureIdentification([NotNull] SysMLv2Parser.FeatureIdentificationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureIdentification([NotNull] SysMLv2Parser.FeatureIdentificationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureRelationshipPart([NotNull] SysMLv2Parser.FeatureRelationshipPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureRelationshipPart([NotNull] SysMLv2Parser.FeatureRelationshipPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterChainingPart([NotNull] SysMLv2Parser.ChainingPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitChainingPart([NotNull] SysMLv2Parser.ChainingPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInvertingPart([NotNull] SysMLv2Parser.InvertingPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInvertingPart([NotNull] SysMLv2Parser.InvertingPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeFeaturingPart([NotNull] SysMLv2Parser.TypeFeaturingPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeFeaturingPart([NotNull] SysMLv2Parser.TypeFeaturingPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureSpecializationPart([NotNull] SysMLv2Parser.FeatureSpecializationPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureSpecializationPart([NotNull] SysMLv2Parser.FeatureSpecializationPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMultiplicityPart([NotNull] SysMLv2Parser.MultiplicityPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMultiplicityPart([NotNull] SysMLv2Parser.MultiplicityPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureSpecialization([NotNull] SysMLv2Parser.FeatureSpecializationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureSpecialization([NotNull] SysMLv2Parser.FeatureSpecializationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypings([NotNull] SysMLv2Parser.TypingsContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypings([NotNull] SysMLv2Parser.TypingsContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypedBy([NotNull] SysMLv2Parser.TypedByContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypedBy([NotNull] SysMLv2Parser.TypedByContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubsettings([NotNull] SysMLv2Parser.SubsettingsContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubsettings([NotNull] SysMLv2Parser.SubsettingsContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubsets([NotNull] SysMLv2Parser.SubsetsContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubsets([NotNull] SysMLv2Parser.SubsetsContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterReferences([NotNull] SysMLv2Parser.ReferencesContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitReferences([NotNull] SysMLv2Parser.ReferencesContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCrosses([NotNull] SysMLv2Parser.CrossesContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCrosses([NotNull] SysMLv2Parser.CrossesContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRedefinitions([NotNull] SysMLv2Parser.RedefinitionsContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRedefinitions([NotNull] SysMLv2Parser.RedefinitionsContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRedefines([NotNull] SysMLv2Parser.RedefinesContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRedefines([NotNull] SysMLv2Parser.RedefinesContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureTyping([NotNull] SysMLv2Parser.FeatureTypingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureTyping([NotNull] SysMLv2Parser.FeatureTypingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedFeatureTyping([NotNull] SysMLv2Parser.OwnedFeatureTypingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedFeatureTyping([NotNull] SysMLv2Parser.OwnedFeatureTypingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubsetting([NotNull] SysMLv2Parser.SubsettingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubsetting([NotNull] SysMLv2Parser.SubsettingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedSubsetting([NotNull] SysMLv2Parser.OwnedSubsettingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedSubsetting([NotNull] SysMLv2Parser.OwnedSubsettingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedReferenceSubsetting([NotNull] SysMLv2Parser.OwnedReferenceSubsettingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedReferenceSubsetting([NotNull] SysMLv2Parser.OwnedReferenceSubsettingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedCrossSubsetting([NotNull] SysMLv2Parser.OwnedCrossSubsettingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedCrossSubsetting([NotNull] SysMLv2Parser.OwnedCrossSubsettingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRedefinition([NotNull] SysMLv2Parser.RedefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRedefinition([NotNull] SysMLv2Parser.RedefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedRedefinition([NotNull] SysMLv2Parser.OwnedRedefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedRedefinition([NotNull] SysMLv2Parser.OwnedRedefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureInverting([NotNull] SysMLv2Parser.FeatureInvertingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureInverting([NotNull] SysMLv2Parser.FeatureInvertingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedFeatureInverting([NotNull] SysMLv2Parser.OwnedFeatureInvertingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedFeatureInverting([NotNull] SysMLv2Parser.OwnedFeatureInvertingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTypeFeaturing([NotNull] SysMLv2Parser.TypeFeaturingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTypeFeaturing([NotNull] SysMLv2Parser.TypeFeaturingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedTypeFeaturing([NotNull] SysMLv2Parser.OwnedTypeFeaturingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedTypeFeaturing([NotNull] SysMLv2Parser.OwnedTypeFeaturingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDataType([NotNull] SysMLv2Parser.DataTypeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDataType([NotNull] SysMLv2Parser.DataTypeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterClass([NotNull] SysMLv2Parser.ClassContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitClass([NotNull] SysMLv2Parser.ClassContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStructure([NotNull] SysMLv2Parser.StructureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStructure([NotNull] SysMLv2Parser.StructureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssociation([NotNull] SysMLv2Parser.AssociationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssociation([NotNull] SysMLv2Parser.AssociationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssociationStructure([NotNull] SysMLv2Parser.AssociationStructureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssociationStructure([NotNull] SysMLv2Parser.AssociationStructureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnector([NotNull] SysMLv2Parser.ConnectorContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnector([NotNull] SysMLv2Parser.ConnectorContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnectorDeclaration([NotNull] SysMLv2Parser.ConnectorDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnectorDeclaration([NotNull] SysMLv2Parser.ConnectorDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBinaryConnectorDeclaration([NotNull] SysMLv2Parser.BinaryConnectorDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBinaryConnectorDeclaration([NotNull] SysMLv2Parser.BinaryConnectorDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNaryConnectorDeclaration([NotNull] SysMLv2Parser.NaryConnectorDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNaryConnectorDeclaration([NotNull] SysMLv2Parser.NaryConnectorDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnectorEndMember([NotNull] SysMLv2Parser.ConnectorEndMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnectorEndMember([NotNull] SysMLv2Parser.ConnectorEndMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnectorEnd([NotNull] SysMLv2Parser.ConnectorEndContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnectorEnd([NotNull] SysMLv2Parser.ConnectorEndContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedCrossMultiplicityMember([NotNull] SysMLv2Parser.OwnedCrossMultiplicityMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedCrossMultiplicityMember([NotNull] SysMLv2Parser.OwnedCrossMultiplicityMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedCrossMultiplicity([NotNull] SysMLv2Parser.OwnedCrossMultiplicityContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedCrossMultiplicity([NotNull] SysMLv2Parser.OwnedCrossMultiplicityContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBindingConnector([NotNull] SysMLv2Parser.BindingConnectorContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBindingConnector([NotNull] SysMLv2Parser.BindingConnectorContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBindingConnectorDeclaration([NotNull] SysMLv2Parser.BindingConnectorDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBindingConnectorDeclaration([NotNull] SysMLv2Parser.BindingConnectorDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuccession([NotNull] SysMLv2Parser.SuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuccession([NotNull] SysMLv2Parser.SuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuccessionDeclaration([NotNull] SysMLv2Parser.SuccessionDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuccessionDeclaration([NotNull] SysMLv2Parser.SuccessionDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBehavior([NotNull] SysMLv2Parser.BehaviorContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBehavior([NotNull] SysMLv2Parser.BehaviorContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStep([NotNull] SysMLv2Parser.StepContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStep([NotNull] SysMLv2Parser.StepContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFunction([NotNull] SysMLv2Parser.FunctionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFunction([NotNull] SysMLv2Parser.FunctionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFunctionBody([NotNull] SysMLv2Parser.FunctionBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFunctionBody([NotNull] SysMLv2Parser.FunctionBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFunctionBodyPart([NotNull] SysMLv2Parser.FunctionBodyPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFunctionBodyPart([NotNull] SysMLv2Parser.FunctionBodyPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterReturnFeatureMember([NotNull] SysMLv2Parser.ReturnFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitReturnFeatureMember([NotNull] SysMLv2Parser.ReturnFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterResultExpressionMember([NotNull] SysMLv2Parser.ResultExpressionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitResultExpressionMember([NotNull] SysMLv2Parser.ResultExpressionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExpression([NotNull] SysMLv2Parser.ExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExpression([NotNull] SysMLv2Parser.ExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPredicate([NotNull] SysMLv2Parser.PredicateContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPredicate([NotNull] SysMLv2Parser.PredicateContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBooleanExpression([NotNull] SysMLv2Parser.BooleanExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBooleanExpression([NotNull] SysMLv2Parser.BooleanExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInvariant([NotNull] SysMLv2Parser.InvariantContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInvariant([NotNull] SysMLv2Parser.InvariantContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureChainMember([NotNull] SysMLv2Parser.FeatureChainMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureChainMember([NotNull] SysMLv2Parser.FeatureChainMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInteraction([NotNull] SysMLv2Parser.InteractionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInteraction([NotNull] SysMLv2Parser.InteractionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlow([NotNull] SysMLv2Parser.FlowContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlow([NotNull] SysMLv2Parser.FlowContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuccessionFlow([NotNull] SysMLv2Parser.SuccessionFlowContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuccessionFlow([NotNull] SysMLv2Parser.SuccessionFlowContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowDeclaration([NotNull] SysMLv2Parser.FlowDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowDeclaration([NotNull] SysMLv2Parser.FlowDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPayloadFeatureMember([NotNull] SysMLv2Parser.PayloadFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPayloadFeatureMember([NotNull] SysMLv2Parser.PayloadFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPayloadFeature([NotNull] SysMLv2Parser.PayloadFeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPayloadFeature([NotNull] SysMLv2Parser.PayloadFeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPayloadFeatureSpecializationPart([NotNull] SysMLv2Parser.PayloadFeatureSpecializationPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPayloadFeatureSpecializationPart([NotNull] SysMLv2Parser.PayloadFeatureSpecializationPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowEndMember([NotNull] SysMLv2Parser.FlowEndMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowEndMember([NotNull] SysMLv2Parser.FlowEndMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowEnd([NotNull] SysMLv2Parser.FlowEndContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowEnd([NotNull] SysMLv2Parser.FlowEndContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterValuePart([NotNull] SysMLv2Parser.ValuePartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitValuePart([NotNull] SysMLv2Parser.ValuePartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureValue([NotNull] SysMLv2Parser.FeatureValueContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureValue([NotNull] SysMLv2Parser.FeatureValueContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMultiplicity([NotNull] SysMLv2Parser.MultiplicityContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMultiplicity([NotNull] SysMLv2Parser.MultiplicityContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMultiplicitySubset([NotNull] SysMLv2Parser.MultiplicitySubsetContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMultiplicitySubset([NotNull] SysMLv2Parser.MultiplicitySubsetContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMultiplicityRange([NotNull] SysMLv2Parser.MultiplicityRangeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMultiplicityRange([NotNull] SysMLv2Parser.MultiplicityRangeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedMultiplicity([NotNull] SysMLv2Parser.OwnedMultiplicityContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedMultiplicity([NotNull] SysMLv2Parser.OwnedMultiplicityContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOwnedMultiplicityRange([NotNull] SysMLv2Parser.OwnedMultiplicityRangeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOwnedMultiplicityRange([NotNull] SysMLv2Parser.OwnedMultiplicityRangeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMultiplicityBounds([NotNull] SysMLv2Parser.MultiplicityBoundsContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMultiplicityBounds([NotNull] SysMLv2Parser.MultiplicityBoundsContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMultiplicityExpressionMember([NotNull] SysMLv2Parser.MultiplicityExpressionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMultiplicityExpressionMember([NotNull] SysMLv2Parser.MultiplicityExpressionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetaclass([NotNull] SysMLv2Parser.MetaclassContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetaclass([NotNull] SysMLv2Parser.MetaclassContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPrefixMetadataAnnotation([NotNull] SysMLv2Parser.PrefixMetadataAnnotationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPrefixMetadataAnnotation([NotNull] SysMLv2Parser.PrefixMetadataAnnotationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPrefixMetadataMember([NotNull] SysMLv2Parser.PrefixMetadataMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPrefixMetadataMember([NotNull] SysMLv2Parser.PrefixMetadataMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPrefixMetadataFeature([NotNull] SysMLv2Parser.PrefixMetadataFeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPrefixMetadataFeature([NotNull] SysMLv2Parser.PrefixMetadataFeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataFeature([NotNull] SysMLv2Parser.MetadataFeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataFeature([NotNull] SysMLv2Parser.MetadataFeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataFeatureDeclaration([NotNull] SysMLv2Parser.MetadataFeatureDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataFeatureDeclaration([NotNull] SysMLv2Parser.MetadataFeatureDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataBody([NotNull] SysMLv2Parser.MetadataBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataBody([NotNull] SysMLv2Parser.MetadataBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataBodyElement([NotNull] SysMLv2Parser.MetadataBodyElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataBodyElement([NotNull] SysMLv2Parser.MetadataBodyElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataBodyFeatureMember([NotNull] SysMLv2Parser.MetadataBodyFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataBodyFeatureMember([NotNull] SysMLv2Parser.MetadataBodyFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataBodyFeature([NotNull] SysMLv2Parser.MetadataBodyFeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataBodyFeature([NotNull] SysMLv2Parser.MetadataBodyFeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPackage([NotNull] SysMLv2Parser.PackageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPackage([NotNull] SysMLv2Parser.PackageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLibraryPackage([NotNull] SysMLv2Parser.LibraryPackageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLibraryPackage([NotNull] SysMLv2Parser.LibraryPackageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPackageDeclaration([NotNull] SysMLv2Parser.PackageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPackageDeclaration([NotNull] SysMLv2Parser.PackageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPackageBody([NotNull] SysMLv2Parser.PackageBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPackageBody([NotNull] SysMLv2Parser.PackageBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterElementFilterMember([NotNull] SysMLv2Parser.ElementFilterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitElementFilterMember([NotNull] SysMLv2Parser.ElementFilterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDependencyDeclaration([NotNull] SysMLv2Parser.DependencyDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDependencyDeclaration([NotNull] SysMLv2Parser.DependencyDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAnnotatingMember([NotNull] SysMLv2Parser.AnnotatingMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAnnotatingMember([NotNull] SysMLv2Parser.AnnotatingMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPackageBodyElement([NotNull] SysMLv2Parser.PackageBodyElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPackageBodyElement([NotNull] SysMLv2Parser.PackageBodyElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPackageMember([NotNull] SysMLv2Parser.PackageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPackageMember([NotNull] SysMLv2Parser.PackageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionElement([NotNull] SysMLv2Parser.DefinitionElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionElement([NotNull] SysMLv2Parser.DefinitionElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsageElement([NotNull] SysMLv2Parser.UsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsageElement([NotNull] SysMLv2Parser.UsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBasicDefinitionPrefix([NotNull] SysMLv2Parser.BasicDefinitionPrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBasicDefinitionPrefix([NotNull] SysMLv2Parser.BasicDefinitionPrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionExtensionKeyword([NotNull] SysMLv2Parser.DefinitionExtensionKeywordContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionExtensionKeyword([NotNull] SysMLv2Parser.DefinitionExtensionKeywordContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionPrefix([NotNull] SysMLv2Parser.DefinitionPrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionPrefix([NotNull] SysMLv2Parser.DefinitionPrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinition([NotNull] SysMLv2Parser.DefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinition([NotNull] SysMLv2Parser.DefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionDeclaration([NotNull] SysMLv2Parser.DefinitionDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionDeclaration([NotNull] SysMLv2Parser.DefinitionDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionBody([NotNull] SysMLv2Parser.DefinitionBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionBody([NotNull] SysMLv2Parser.DefinitionBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionBodyItem([NotNull] SysMLv2Parser.DefinitionBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionBodyItem([NotNull] SysMLv2Parser.DefinitionBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionBodyItemContent([NotNull] SysMLv2Parser.DefinitionBodyItemContentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionBodyItemContent([NotNull] SysMLv2Parser.DefinitionBodyItemContentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefinitionMember([NotNull] SysMLv2Parser.DefinitionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefinitionMember([NotNull] SysMLv2Parser.DefinitionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterVariantUsageMember([NotNull] SysMLv2Parser.VariantUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitVariantUsageMember([NotNull] SysMLv2Parser.VariantUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNonOccurrenceUsageMember([NotNull] SysMLv2Parser.NonOccurrenceUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNonOccurrenceUsageMember([NotNull] SysMLv2Parser.NonOccurrenceUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStructureUsageMember([NotNull] SysMLv2Parser.StructureUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStructureUsageMember([NotNull] SysMLv2Parser.StructureUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBehaviorUsageMember([NotNull] SysMLv2Parser.BehaviorUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBehaviorUsageMember([NotNull] SysMLv2Parser.BehaviorUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRefPrefix([NotNull] SysMLv2Parser.RefPrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRefPrefix([NotNull] SysMLv2Parser.RefPrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBasicUsagePrefix([NotNull] SysMLv2Parser.BasicUsagePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBasicUsagePrefix([NotNull] SysMLv2Parser.BasicUsagePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEndUsagePrefix([NotNull] SysMLv2Parser.EndUsagePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEndUsagePrefix([NotNull] SysMLv2Parser.EndUsagePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsageExtensionKeyword([NotNull] SysMLv2Parser.UsageExtensionKeywordContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsageExtensionKeyword([NotNull] SysMLv2Parser.UsageExtensionKeywordContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUnextendedUsagePrefix([NotNull] SysMLv2Parser.UnextendedUsagePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUnextendedUsagePrefix([NotNull] SysMLv2Parser.UnextendedUsagePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsagePrefix([NotNull] SysMLv2Parser.UsagePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsagePrefix([NotNull] SysMLv2Parser.UsagePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsage([NotNull] SysMLv2Parser.UsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsage([NotNull] SysMLv2Parser.UsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsageDeclaration([NotNull] SysMLv2Parser.UsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsageDeclaration([NotNull] SysMLv2Parser.UsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsageCompletion([NotNull] SysMLv2Parser.UsageCompletionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsageCompletion([NotNull] SysMLv2Parser.UsageCompletionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUsageBody([NotNull] SysMLv2Parser.UsageBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUsageBody([NotNull] SysMLv2Parser.UsageBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefaultReferenceUsage([NotNull] SysMLv2Parser.DefaultReferenceUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefaultReferenceUsage([NotNull] SysMLv2Parser.DefaultReferenceUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterReferenceUsage([NotNull] SysMLv2Parser.ReferenceUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitReferenceUsage([NotNull] SysMLv2Parser.ReferenceUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEndFeatureUsage([NotNull] SysMLv2Parser.EndFeatureUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEndFeatureUsage([NotNull] SysMLv2Parser.EndFeatureUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterVariantReference([NotNull] SysMLv2Parser.VariantReferenceContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitVariantReference([NotNull] SysMLv2Parser.VariantReferenceContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNonOccurrenceUsageElement([NotNull] SysMLv2Parser.NonOccurrenceUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNonOccurrenceUsageElement([NotNull] SysMLv2Parser.NonOccurrenceUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEndOccurrenceUsageElement([NotNull] SysMLv2Parser.EndOccurrenceUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEndOccurrenceUsageElement([NotNull] SysMLv2Parser.EndOccurrenceUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOccurrenceUsageElement([NotNull] SysMLv2Parser.OccurrenceUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOccurrenceUsageElement([NotNull] SysMLv2Parser.OccurrenceUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStructureUsageElement([NotNull] SysMLv2Parser.StructureUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStructureUsageElement([NotNull] SysMLv2Parser.StructureUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBehaviorUsageElement([NotNull] SysMLv2Parser.BehaviorUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBehaviorUsageElement([NotNull] SysMLv2Parser.BehaviorUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterVariantUsageElement([NotNull] SysMLv2Parser.VariantUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitVariantUsageElement([NotNull] SysMLv2Parser.VariantUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubclassificationPart([NotNull] SysMLv2Parser.SubclassificationPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubclassificationPart([NotNull] SysMLv2Parser.SubclassificationPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAttributeDefinition([NotNull] SysMLv2Parser.AttributeDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAttributeDefinition([NotNull] SysMLv2Parser.AttributeDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAttributeUsage([NotNull] SysMLv2Parser.AttributeUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAttributeUsage([NotNull] SysMLv2Parser.AttributeUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEnumerationDefinition([NotNull] SysMLv2Parser.EnumerationDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEnumerationDefinition([NotNull] SysMLv2Parser.EnumerationDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEnumerationBody([NotNull] SysMLv2Parser.EnumerationBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEnumerationBody([NotNull] SysMLv2Parser.EnumerationBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEnumerationUsageMember([NotNull] SysMLv2Parser.EnumerationUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEnumerationUsageMember([NotNull] SysMLv2Parser.EnumerationUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEnumeratedValue([NotNull] SysMLv2Parser.EnumeratedValueContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEnumeratedValue([NotNull] SysMLv2Parser.EnumeratedValueContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEnumerationUsage([NotNull] SysMLv2Parser.EnumerationUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEnumerationUsage([NotNull] SysMLv2Parser.EnumerationUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOccurrenceDefinitionPrefix([NotNull] SysMLv2Parser.OccurrenceDefinitionPrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOccurrenceDefinitionPrefix([NotNull] SysMLv2Parser.OccurrenceDefinitionPrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOccurrenceDefinition([NotNull] SysMLv2Parser.OccurrenceDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOccurrenceDefinition([NotNull] SysMLv2Parser.OccurrenceDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIndividualDefinition([NotNull] SysMLv2Parser.IndividualDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIndividualDefinition([NotNull] SysMLv2Parser.IndividualDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyMultiplicityMember([NotNull] SysMLv2Parser.EmptyMultiplicityMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyMultiplicityMember([NotNull] SysMLv2Parser.EmptyMultiplicityMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOccurrenceUsagePrefix([NotNull] SysMLv2Parser.OccurrenceUsagePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOccurrenceUsagePrefix([NotNull] SysMLv2Parser.OccurrenceUsagePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterOccurrenceUsage([NotNull] SysMLv2Parser.OccurrenceUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitOccurrenceUsage([NotNull] SysMLv2Parser.OccurrenceUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIndividualUsage([NotNull] SysMLv2Parser.IndividualUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIndividualUsage([NotNull] SysMLv2Parser.IndividualUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPortionUsage([NotNull] SysMLv2Parser.PortionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPortionUsage([NotNull] SysMLv2Parser.PortionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPortionKind([NotNull] SysMLv2Parser.PortionKindContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPortionKind([NotNull] SysMLv2Parser.PortionKindContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEventOccurrenceUsage([NotNull] SysMLv2Parser.EventOccurrenceUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEventOccurrenceUsage([NotNull] SysMLv2Parser.EventOccurrenceUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSourceSuccessionMember([NotNull] SysMLv2Parser.SourceSuccessionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSourceSuccessionMember([NotNull] SysMLv2Parser.SourceSuccessionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSourceSuccession([NotNull] SysMLv2Parser.SourceSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSourceSuccession([NotNull] SysMLv2Parser.SourceSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSourceEndMember([NotNull] SysMLv2Parser.SourceEndMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSourceEndMember([NotNull] SysMLv2Parser.SourceEndMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSourceEnd([NotNull] SysMLv2Parser.SourceEndContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSourceEnd([NotNull] SysMLv2Parser.SourceEndContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterItemDefinition([NotNull] SysMLv2Parser.ItemDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitItemDefinition([NotNull] SysMLv2Parser.ItemDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterItemUsage([NotNull] SysMLv2Parser.ItemUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitItemUsage([NotNull] SysMLv2Parser.ItemUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPartDefinition([NotNull] SysMLv2Parser.PartDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPartDefinition([NotNull] SysMLv2Parser.PartDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPartUsage([NotNull] SysMLv2Parser.PartUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPartUsage([NotNull] SysMLv2Parser.PartUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPortDefinition([NotNull] SysMLv2Parser.PortDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPortDefinition([NotNull] SysMLv2Parser.PortDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConjugatedPortDefinitionMember([NotNull] SysMLv2Parser.ConjugatedPortDefinitionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConjugatedPortDefinitionMember([NotNull] SysMLv2Parser.ConjugatedPortDefinitionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConjugatedPortDefinition([NotNull] SysMLv2Parser.ConjugatedPortDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConjugatedPortDefinition([NotNull] SysMLv2Parser.ConjugatedPortDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPortUsage([NotNull] SysMLv2Parser.PortUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPortUsage([NotNull] SysMLv2Parser.PortUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConjugatedPortTyping([NotNull] SysMLv2Parser.ConjugatedPortTypingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConjugatedPortTyping([NotNull] SysMLv2Parser.ConjugatedPortTypingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnectionDefinition([NotNull] SysMLv2Parser.ConnectionDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnectionDefinition([NotNull] SysMLv2Parser.ConnectionDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnectionUsage([NotNull] SysMLv2Parser.ConnectionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnectionUsage([NotNull] SysMLv2Parser.ConnectionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConnectorPart([NotNull] SysMLv2Parser.ConnectorPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConnectorPart([NotNull] SysMLv2Parser.ConnectorPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBinaryConnectorPart([NotNull] SysMLv2Parser.BinaryConnectorPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBinaryConnectorPart([NotNull] SysMLv2Parser.BinaryConnectorPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNaryConnectorPart([NotNull] SysMLv2Parser.NaryConnectorPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNaryConnectorPart([NotNull] SysMLv2Parser.NaryConnectorPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBindingConnectorAsUsage([NotNull] SysMLv2Parser.BindingConnectorAsUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBindingConnectorAsUsage([NotNull] SysMLv2Parser.BindingConnectorAsUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuccessionAsUsage([NotNull] SysMLv2Parser.SuccessionAsUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuccessionAsUsage([NotNull] SysMLv2Parser.SuccessionAsUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceDefinition([NotNull] SysMLv2Parser.InterfaceDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceDefinition([NotNull] SysMLv2Parser.InterfaceDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceBody([NotNull] SysMLv2Parser.InterfaceBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceBody([NotNull] SysMLv2Parser.InterfaceBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceBodyItem([NotNull] SysMLv2Parser.InterfaceBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceBodyItem([NotNull] SysMLv2Parser.InterfaceBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceNonOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceNonOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceNonOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceNonOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefaultInterfaceEnd([NotNull] SysMLv2Parser.DefaultInterfaceEndContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefaultInterfaceEnd([NotNull] SysMLv2Parser.DefaultInterfaceEndContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceUsage([NotNull] SysMLv2Parser.InterfaceUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceUsage([NotNull] SysMLv2Parser.InterfaceUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceUsageDeclaration([NotNull] SysMLv2Parser.InterfaceUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceUsageDeclaration([NotNull] SysMLv2Parser.InterfaceUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfacePart([NotNull] SysMLv2Parser.InterfacePartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfacePart([NotNull] SysMLv2Parser.InterfacePartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterBinaryInterfacePart([NotNull] SysMLv2Parser.BinaryInterfacePartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitBinaryInterfacePart([NotNull] SysMLv2Parser.BinaryInterfacePartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNaryInterfacePart([NotNull] SysMLv2Parser.NaryInterfacePartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNaryInterfacePart([NotNull] SysMLv2Parser.NaryInterfacePartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceEndMember([NotNull] SysMLv2Parser.InterfaceEndMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceEndMember([NotNull] SysMLv2Parser.InterfaceEndMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInterfaceEnd([NotNull] SysMLv2Parser.InterfaceEndContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInterfaceEnd([NotNull] SysMLv2Parser.InterfaceEndContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAllocationDefinition([NotNull] SysMLv2Parser.AllocationDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAllocationDefinition([NotNull] SysMLv2Parser.AllocationDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAllocationUsage([NotNull] SysMLv2Parser.AllocationUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAllocationUsage([NotNull] SysMLv2Parser.AllocationUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAllocationUsageDeclaration([NotNull] SysMLv2Parser.AllocationUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAllocationUsageDeclaration([NotNull] SysMLv2Parser.AllocationUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowDefinition([NotNull] SysMLv2Parser.FlowDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowDefinition([NotNull] SysMLv2Parser.FlowDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMessage([NotNull] SysMLv2Parser.MessageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMessage([NotNull] SysMLv2Parser.MessageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMessageDeclaration([NotNull] SysMLv2Parser.MessageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMessageDeclaration([NotNull] SysMLv2Parser.MessageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMessageEventMember([NotNull] SysMLv2Parser.MessageEventMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMessageEventMember([NotNull] SysMLv2Parser.MessageEventMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMessageEvent([NotNull] SysMLv2Parser.MessageEventContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMessageEvent([NotNull] SysMLv2Parser.MessageEventContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowUsage([NotNull] SysMLv2Parser.FlowUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowUsage([NotNull] SysMLv2Parser.FlowUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuccessionFlowUsage([NotNull] SysMLv2Parser.SuccessionFlowUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuccessionFlowUsage([NotNull] SysMLv2Parser.SuccessionFlowUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowPayloadFeatureMember([NotNull] SysMLv2Parser.FlowPayloadFeatureMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowPayloadFeatureMember([NotNull] SysMLv2Parser.FlowPayloadFeatureMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFlowPayloadFeature([NotNull] SysMLv2Parser.FlowPayloadFeatureContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFlowPayloadFeature([NotNull] SysMLv2Parser.FlowPayloadFeatureContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionDefinition([NotNull] SysMLv2Parser.ActionDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionDefinition([NotNull] SysMLv2Parser.ActionDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionBody([NotNull] SysMLv2Parser.ActionBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionBody([NotNull] SysMLv2Parser.ActionBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionBodyItem([NotNull] SysMLv2Parser.ActionBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionBodyItem([NotNull] SysMLv2Parser.ActionBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNonBehaviorBodyItem([NotNull] SysMLv2Parser.NonBehaviorBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNonBehaviorBodyItem([NotNull] SysMLv2Parser.NonBehaviorBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionBehaviorMember([NotNull] SysMLv2Parser.ActionBehaviorMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionBehaviorMember([NotNull] SysMLv2Parser.ActionBehaviorMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterInitialNodeMember([NotNull] SysMLv2Parser.InitialNodeMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitInitialNodeMember([NotNull] SysMLv2Parser.InitialNodeMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionNodeMember([NotNull] SysMLv2Parser.ActionNodeMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionNodeMember([NotNull] SysMLv2Parser.ActionNodeMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionTargetSuccessionMember([NotNull] SysMLv2Parser.ActionTargetSuccessionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionTargetSuccessionMember([NotNull] SysMLv2Parser.ActionTargetSuccessionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGuardedSuccessionMember([NotNull] SysMLv2Parser.GuardedSuccessionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGuardedSuccessionMember([NotNull] SysMLv2Parser.GuardedSuccessionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionUsage([NotNull] SysMLv2Parser.ActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionUsage([NotNull] SysMLv2Parser.ActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionUsageDeclaration([NotNull] SysMLv2Parser.ActionUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionUsageDeclaration([NotNull] SysMLv2Parser.ActionUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPerformActionUsage([NotNull] SysMLv2Parser.PerformActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPerformActionUsage([NotNull] SysMLv2Parser.PerformActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPerformActionUsageDeclaration([NotNull] SysMLv2Parser.PerformActionUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPerformActionUsageDeclaration([NotNull] SysMLv2Parser.PerformActionUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionNode([NotNull] SysMLv2Parser.ActionNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionNode([NotNull] SysMLv2Parser.ActionNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionNodeUsageDeclaration([NotNull] SysMLv2Parser.ActionNodeUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionNodeUsageDeclaration([NotNull] SysMLv2Parser.ActionNodeUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionNodePrefix([NotNull] SysMLv2Parser.ActionNodePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionNodePrefix([NotNull] SysMLv2Parser.ActionNodePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterControlNode([NotNull] SysMLv2Parser.ControlNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitControlNode([NotNull] SysMLv2Parser.ControlNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterControlNodePrefix([NotNull] SysMLv2Parser.ControlNodePrefixContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitControlNodePrefix([NotNull] SysMLv2Parser.ControlNodePrefixContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMergeNode([NotNull] SysMLv2Parser.MergeNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMergeNode([NotNull] SysMLv2Parser.MergeNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDecisionNode([NotNull] SysMLv2Parser.DecisionNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDecisionNode([NotNull] SysMLv2Parser.DecisionNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterJoinNode([NotNull] SysMLv2Parser.JoinNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitJoinNode([NotNull] SysMLv2Parser.JoinNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterForkNode([NotNull] SysMLv2Parser.ForkNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitForkNode([NotNull] SysMLv2Parser.ForkNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAcceptNode([NotNull] SysMLv2Parser.AcceptNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAcceptNode([NotNull] SysMLv2Parser.AcceptNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAcceptNodeDeclaration([NotNull] SysMLv2Parser.AcceptNodeDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAcceptNodeDeclaration([NotNull] SysMLv2Parser.AcceptNodeDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAcceptParameterPart([NotNull] SysMLv2Parser.AcceptParameterPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAcceptParameterPart([NotNull] SysMLv2Parser.AcceptParameterPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPayloadParameterMember([NotNull] SysMLv2Parser.PayloadParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPayloadParameterMember([NotNull] SysMLv2Parser.PayloadParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPayloadParameter([NotNull] SysMLv2Parser.PayloadParameterContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPayloadParameter([NotNull] SysMLv2Parser.PayloadParameterContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTriggerValuePart([NotNull] SysMLv2Parser.TriggerValuePartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTriggerValuePart([NotNull] SysMLv2Parser.TriggerValuePartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTriggerFeatureValue([NotNull] SysMLv2Parser.TriggerFeatureValueContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTriggerFeatureValue([NotNull] SysMLv2Parser.TriggerFeatureValueContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTriggerExpression([NotNull] SysMLv2Parser.TriggerExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTriggerExpression([NotNull] SysMLv2Parser.TriggerExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSendNode([NotNull] SysMLv2Parser.SendNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSendNode([NotNull] SysMLv2Parser.SendNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSendNodeDeclaration([NotNull] SysMLv2Parser.SendNodeDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSendNodeDeclaration([NotNull] SysMLv2Parser.SendNodeDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSenderReceiverPart([NotNull] SysMLv2Parser.SenderReceiverPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSenderReceiverPart([NotNull] SysMLv2Parser.SenderReceiverPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNodeParameterMember([NotNull] SysMLv2Parser.NodeParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNodeParameterMember([NotNull] SysMLv2Parser.NodeParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNodeParameter([NotNull] SysMLv2Parser.NodeParameterContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNodeParameter([NotNull] SysMLv2Parser.NodeParameterContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFeatureBinding([NotNull] SysMLv2Parser.FeatureBindingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFeatureBinding([NotNull] SysMLv2Parser.FeatureBindingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyParameterMember([NotNull] SysMLv2Parser.EmptyParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyParameterMember([NotNull] SysMLv2Parser.EmptyParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignmentNode([NotNull] SysMLv2Parser.AssignmentNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignmentNode([NotNull] SysMLv2Parser.AssignmentNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignmentNodeDeclaration([NotNull] SysMLv2Parser.AssignmentNodeDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignmentNodeDeclaration([NotNull] SysMLv2Parser.AssignmentNodeDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignmentTargetMember([NotNull] SysMLv2Parser.AssignmentTargetMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignmentTargetMember([NotNull] SysMLv2Parser.AssignmentTargetMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignmentTargetParameter([NotNull] SysMLv2Parser.AssignmentTargetParameterContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignmentTargetParameter([NotNull] SysMLv2Parser.AssignmentTargetParameterContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignmentTargetBinding([NotNull] SysMLv2Parser.AssignmentTargetBindingContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignmentTargetBinding([NotNull] SysMLv2Parser.AssignmentTargetBindingContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTerminateNode([NotNull] SysMLv2Parser.TerminateNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTerminateNode([NotNull] SysMLv2Parser.TerminateNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIfNode([NotNull] SysMLv2Parser.IfNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIfNode([NotNull] SysMLv2Parser.IfNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExpressionParameterMember([NotNull] SysMLv2Parser.ExpressionParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExpressionParameterMember([NotNull] SysMLv2Parser.ExpressionParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionBodyParameterMember([NotNull] SysMLv2Parser.ActionBodyParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionBodyParameterMember([NotNull] SysMLv2Parser.ActionBodyParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionBodyParameter([NotNull] SysMLv2Parser.ActionBodyParameterContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionBodyParameter([NotNull] SysMLv2Parser.ActionBodyParameterContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIfNodeParameterMember([NotNull] SysMLv2Parser.IfNodeParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIfNodeParameterMember([NotNull] SysMLv2Parser.IfNodeParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterWhileLoopNode([NotNull] SysMLv2Parser.WhileLoopNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitWhileLoopNode([NotNull] SysMLv2Parser.WhileLoopNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterForLoopNode([NotNull] SysMLv2Parser.ForLoopNodeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitForLoopNode([NotNull] SysMLv2Parser.ForLoopNodeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterForVariableDeclarationMember([NotNull] SysMLv2Parser.ForVariableDeclarationMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitForVariableDeclarationMember([NotNull] SysMLv2Parser.ForVariableDeclarationMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActionTargetSuccession([NotNull] SysMLv2Parser.ActionTargetSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActionTargetSuccession([NotNull] SysMLv2Parser.ActionTargetSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTargetSuccession([NotNull] SysMLv2Parser.TargetSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTargetSuccession([NotNull] SysMLv2Parser.TargetSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGuardedTargetSuccession([NotNull] SysMLv2Parser.GuardedTargetSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGuardedTargetSuccession([NotNull] SysMLv2Parser.GuardedTargetSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDefaultTargetSuccession([NotNull] SysMLv2Parser.DefaultTargetSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDefaultTargetSuccession([NotNull] SysMLv2Parser.DefaultTargetSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGuardedSuccession([NotNull] SysMLv2Parser.GuardedSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGuardedSuccession([NotNull] SysMLv2Parser.GuardedSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateDefinition([NotNull] SysMLv2Parser.StateDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateDefinition([NotNull] SysMLv2Parser.StateDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateDefBody([NotNull] SysMLv2Parser.StateDefBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateDefBody([NotNull] SysMLv2Parser.StateDefBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateBodyItem([NotNull] SysMLv2Parser.StateBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateBodyItem([NotNull] SysMLv2Parser.StateBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEntryActionMember([NotNull] SysMLv2Parser.EntryActionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEntryActionMember([NotNull] SysMLv2Parser.EntryActionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDoActionMember([NotNull] SysMLv2Parser.DoActionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDoActionMember([NotNull] SysMLv2Parser.DoActionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExitActionMember([NotNull] SysMLv2Parser.ExitActionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExitActionMember([NotNull] SysMLv2Parser.ExitActionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEntryTransitionMember([NotNull] SysMLv2Parser.EntryTransitionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEntryTransitionMember([NotNull] SysMLv2Parser.EntryTransitionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateActionUsage([NotNull] SysMLv2Parser.StateActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateActionUsage([NotNull] SysMLv2Parser.StateActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStatePerformActionUsage([NotNull] SysMLv2Parser.StatePerformActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStatePerformActionUsage([NotNull] SysMLv2Parser.StatePerformActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateAcceptActionUsage([NotNull] SysMLv2Parser.StateAcceptActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateAcceptActionUsage([NotNull] SysMLv2Parser.StateAcceptActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateSendActionUsage([NotNull] SysMLv2Parser.StateSendActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateSendActionUsage([NotNull] SysMLv2Parser.StateSendActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateAssignmentActionUsage([NotNull] SysMLv2Parser.StateAssignmentActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateAssignmentActionUsage([NotNull] SysMLv2Parser.StateAssignmentActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionUsageMember([NotNull] SysMLv2Parser.TransitionUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionUsageMember([NotNull] SysMLv2Parser.TransitionUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTargetTransitionUsageMember([NotNull] SysMLv2Parser.TargetTransitionUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTargetTransitionUsageMember([NotNull] SysMLv2Parser.TargetTransitionUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateUsage([NotNull] SysMLv2Parser.StateUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateUsage([NotNull] SysMLv2Parser.StateUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStateUsageBody([NotNull] SysMLv2Parser.StateUsageBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStateUsageBody([NotNull] SysMLv2Parser.StateUsageBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExhibitStateUsage([NotNull] SysMLv2Parser.ExhibitStateUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExhibitStateUsage([NotNull] SysMLv2Parser.ExhibitStateUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionUsage([NotNull] SysMLv2Parser.TransitionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionUsage([NotNull] SysMLv2Parser.TransitionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTargetTransitionUsage([NotNull] SysMLv2Parser.TargetTransitionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTargetTransitionUsage([NotNull] SysMLv2Parser.TargetTransitionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTriggerActionMember([NotNull] SysMLv2Parser.TriggerActionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTriggerActionMember([NotNull] SysMLv2Parser.TriggerActionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTriggerAction([NotNull] SysMLv2Parser.TriggerActionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTriggerAction([NotNull] SysMLv2Parser.TriggerActionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGuardExpressionMember([NotNull] SysMLv2Parser.GuardExpressionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGuardExpressionMember([NotNull] SysMLv2Parser.GuardExpressionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEffectBehaviorMember([NotNull] SysMLv2Parser.EffectBehaviorMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEffectBehaviorMember([NotNull] SysMLv2Parser.EffectBehaviorMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEffectBehaviorUsage([NotNull] SysMLv2Parser.EffectBehaviorUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEffectBehaviorUsage([NotNull] SysMLv2Parser.EffectBehaviorUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionPerformActionUsage([NotNull] SysMLv2Parser.TransitionPerformActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionPerformActionUsage([NotNull] SysMLv2Parser.TransitionPerformActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionAcceptActionUsage([NotNull] SysMLv2Parser.TransitionAcceptActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionAcceptActionUsage([NotNull] SysMLv2Parser.TransitionAcceptActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionSendActionUsage([NotNull] SysMLv2Parser.TransitionSendActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionSendActionUsage([NotNull] SysMLv2Parser.TransitionSendActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionAssignmentActionUsage([NotNull] SysMLv2Parser.TransitionAssignmentActionUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionAssignmentActionUsage([NotNull] SysMLv2Parser.TransitionAssignmentActionUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionSuccessionMember([NotNull] SysMLv2Parser.TransitionSuccessionMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionSuccessionMember([NotNull] SysMLv2Parser.TransitionSuccessionMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTransitionSuccession([NotNull] SysMLv2Parser.TransitionSuccessionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTransitionSuccession([NotNull] SysMLv2Parser.TransitionSuccessionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyEndMember([NotNull] SysMLv2Parser.EmptyEndMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyEndMember([NotNull] SysMLv2Parser.EmptyEndMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCalculationDefinition([NotNull] SysMLv2Parser.CalculationDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCalculationDefinition([NotNull] SysMLv2Parser.CalculationDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCalculationUsage([NotNull] SysMLv2Parser.CalculationUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCalculationUsage([NotNull] SysMLv2Parser.CalculationUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCalculationBody([NotNull] SysMLv2Parser.CalculationBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCalculationBody([NotNull] SysMLv2Parser.CalculationBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCalculationBodyPart([NotNull] SysMLv2Parser.CalculationBodyPartContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCalculationBodyPart([NotNull] SysMLv2Parser.CalculationBodyPartContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCalculationBodyItem([NotNull] SysMLv2Parser.CalculationBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCalculationBodyItem([NotNull] SysMLv2Parser.CalculationBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterReturnParameterMember([NotNull] SysMLv2Parser.ReturnParameterMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitReturnParameterMember([NotNull] SysMLv2Parser.ReturnParameterMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConstraintDefinition([NotNull] SysMLv2Parser.ConstraintDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConstraintDefinition([NotNull] SysMLv2Parser.ConstraintDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConstraintUsage([NotNull] SysMLv2Parser.ConstraintUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConstraintUsage([NotNull] SysMLv2Parser.ConstraintUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssertConstraintUsage([NotNull] SysMLv2Parser.AssertConstraintUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssertConstraintUsage([NotNull] SysMLv2Parser.AssertConstraintUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConstraintUsageDeclaration([NotNull] SysMLv2Parser.ConstraintUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConstraintUsageDeclaration([NotNull] SysMLv2Parser.ConstraintUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementDefinition([NotNull] SysMLv2Parser.RequirementDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementDefinition([NotNull] SysMLv2Parser.RequirementDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementBody([NotNull] SysMLv2Parser.RequirementBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementBody([NotNull] SysMLv2Parser.RequirementBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementBodyItem([NotNull] SysMLv2Parser.RequirementBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementBodyItem([NotNull] SysMLv2Parser.RequirementBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubjectMember([NotNull] SysMLv2Parser.SubjectMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubjectMember([NotNull] SysMLv2Parser.SubjectMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSubjectUsage([NotNull] SysMLv2Parser.SubjectUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSubjectUsage([NotNull] SysMLv2Parser.SubjectUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementConstraintMember([NotNull] SysMLv2Parser.RequirementConstraintMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementConstraintMember([NotNull] SysMLv2Parser.RequirementConstraintMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementKind([NotNull] SysMLv2Parser.RequirementKindContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementKind([NotNull] SysMLv2Parser.RequirementKindContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementConstraintUsage([NotNull] SysMLv2Parser.RequirementConstraintUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementConstraintUsage([NotNull] SysMLv2Parser.RequirementConstraintUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFramedConcernMember([NotNull] SysMLv2Parser.FramedConcernMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFramedConcernMember([NotNull] SysMLv2Parser.FramedConcernMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFramedConcernUsage([NotNull] SysMLv2Parser.FramedConcernUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFramedConcernUsage([NotNull] SysMLv2Parser.FramedConcernUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActorMember([NotNull] SysMLv2Parser.ActorMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActorMember([NotNull] SysMLv2Parser.ActorMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterActorUsage([NotNull] SysMLv2Parser.ActorUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitActorUsage([NotNull] SysMLv2Parser.ActorUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStakeholderMember([NotNull] SysMLv2Parser.StakeholderMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStakeholderMember([NotNull] SysMLv2Parser.StakeholderMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterStakeholderUsage([NotNull] SysMLv2Parser.StakeholderUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitStakeholderUsage([NotNull] SysMLv2Parser.StakeholderUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementUsage([NotNull] SysMLv2Parser.RequirementUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementUsage([NotNull] SysMLv2Parser.RequirementUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSatisfyRequirementUsage([NotNull] SysMLv2Parser.SatisfyRequirementUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSatisfyRequirementUsage([NotNull] SysMLv2Parser.SatisfyRequirementUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSatisfactionSubjectMember([NotNull] SysMLv2Parser.SatisfactionSubjectMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSatisfactionSubjectMember([NotNull] SysMLv2Parser.SatisfactionSubjectMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSatisfactionParameter([NotNull] SysMLv2Parser.SatisfactionParameterContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSatisfactionParameter([NotNull] SysMLv2Parser.SatisfactionParameterContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSatisfactionFeatureValue([NotNull] SysMLv2Parser.SatisfactionFeatureValueContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSatisfactionFeatureValue([NotNull] SysMLv2Parser.SatisfactionFeatureValueContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSatisfactionReferenceExpression([NotNull] SysMLv2Parser.SatisfactionReferenceExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSatisfactionReferenceExpression([NotNull] SysMLv2Parser.SatisfactionReferenceExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConcernDefinition([NotNull] SysMLv2Parser.ConcernDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConcernDefinition([NotNull] SysMLv2Parser.ConcernDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterConcernUsage([NotNull] SysMLv2Parser.ConcernUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitConcernUsage([NotNull] SysMLv2Parser.ConcernUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCaseDefinition([NotNull] SysMLv2Parser.CaseDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCaseDefinition([NotNull] SysMLv2Parser.CaseDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCaseUsage([NotNull] SysMLv2Parser.CaseUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCaseUsage([NotNull] SysMLv2Parser.CaseUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCaseBody([NotNull] SysMLv2Parser.CaseBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCaseBody([NotNull] SysMLv2Parser.CaseBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCaseBodyItem([NotNull] SysMLv2Parser.CaseBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCaseBodyItem([NotNull] SysMLv2Parser.CaseBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterObjectiveMember([NotNull] SysMLv2Parser.ObjectiveMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitObjectiveMember([NotNull] SysMLv2Parser.ObjectiveMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterObjectiveRequirementUsage([NotNull] SysMLv2Parser.ObjectiveRequirementUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitObjectiveRequirementUsage([NotNull] SysMLv2Parser.ObjectiveRequirementUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAnalysisCaseDefinition([NotNull] SysMLv2Parser.AnalysisCaseDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAnalysisCaseDefinition([NotNull] SysMLv2Parser.AnalysisCaseDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAnalysisCaseUsage([NotNull] SysMLv2Parser.AnalysisCaseUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAnalysisCaseUsage([NotNull] SysMLv2Parser.AnalysisCaseUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterVerificationCaseDefinition([NotNull] SysMLv2Parser.VerificationCaseDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitVerificationCaseDefinition([NotNull] SysMLv2Parser.VerificationCaseDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterVerificationCaseUsage([NotNull] SysMLv2Parser.VerificationCaseUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitVerificationCaseUsage([NotNull] SysMLv2Parser.VerificationCaseUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementVerificationMember([NotNull] SysMLv2Parser.RequirementVerificationMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementVerificationMember([NotNull] SysMLv2Parser.RequirementVerificationMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRequirementVerificationUsage([NotNull] SysMLv2Parser.RequirementVerificationUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRequirementVerificationUsage([NotNull] SysMLv2Parser.RequirementVerificationUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUseCaseDefinition([NotNull] SysMLv2Parser.UseCaseDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUseCaseDefinition([NotNull] SysMLv2Parser.UseCaseDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterUseCaseUsage([NotNull] SysMLv2Parser.UseCaseUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitUseCaseUsage([NotNull] SysMLv2Parser.UseCaseUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIncludeUseCaseUsage([NotNull] SysMLv2Parser.IncludeUseCaseUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIncludeUseCaseUsage([NotNull] SysMLv2Parser.IncludeUseCaseUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewDefinition([NotNull] SysMLv2Parser.ViewDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewDefinition([NotNull] SysMLv2Parser.ViewDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewDefinitionBody([NotNull] SysMLv2Parser.ViewDefinitionBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewDefinitionBody([NotNull] SysMLv2Parser.ViewDefinitionBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewDefinitionBodyItem([NotNull] SysMLv2Parser.ViewDefinitionBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewDefinitionBodyItem([NotNull] SysMLv2Parser.ViewDefinitionBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewRenderingMember([NotNull] SysMLv2Parser.ViewRenderingMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewRenderingMember([NotNull] SysMLv2Parser.ViewRenderingMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewRenderingUsage([NotNull] SysMLv2Parser.ViewRenderingUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewRenderingUsage([NotNull] SysMLv2Parser.ViewRenderingUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewUsage([NotNull] SysMLv2Parser.ViewUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewUsage([NotNull] SysMLv2Parser.ViewUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewBody([NotNull] SysMLv2Parser.ViewBodyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewBody([NotNull] SysMLv2Parser.ViewBodyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewBodyItem([NotNull] SysMLv2Parser.ViewBodyItemContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewBodyItem([NotNull] SysMLv2Parser.ViewBodyItemContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExpose([NotNull] SysMLv2Parser.ExposeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExpose([NotNull] SysMLv2Parser.ExposeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMembershipExpose([NotNull] SysMLv2Parser.MembershipExposeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMembershipExpose([NotNull] SysMLv2Parser.MembershipExposeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceExpose([NotNull] SysMLv2Parser.NamespaceExposeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceExpose([NotNull] SysMLv2Parser.NamespaceExposeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewpointDefinition([NotNull] SysMLv2Parser.ViewpointDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewpointDefinition([NotNull] SysMLv2Parser.ViewpointDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterViewpointUsage([NotNull] SysMLv2Parser.ViewpointUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitViewpointUsage([NotNull] SysMLv2Parser.ViewpointUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRenderingDefinition([NotNull] SysMLv2Parser.RenderingDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRenderingDefinition([NotNull] SysMLv2Parser.RenderingDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRenderingUsage([NotNull] SysMLv2Parser.RenderingUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRenderingUsage([NotNull] SysMLv2Parser.RenderingUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataDefinition([NotNull] SysMLv2Parser.MetadataDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataDefinition([NotNull] SysMLv2Parser.MetadataDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPrefixMetadataUsage([NotNull] SysMLv2Parser.PrefixMetadataUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPrefixMetadataUsage([NotNull] SysMLv2Parser.PrefixMetadataUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataBodyUsageMember([NotNull] SysMLv2Parser.MetadataBodyUsageMemberContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataBodyUsageMember([NotNull] SysMLv2Parser.MetadataBodyUsageMemberContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterMetadataBodyUsage([NotNull] SysMLv2Parser.MetadataBodyUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitMetadataBodyUsage([NotNull] SysMLv2Parser.MetadataBodyUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExtendedDefinition([NotNull] SysMLv2Parser.ExtendedDefinitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExtendedDefinition([NotNull] SysMLv2Parser.ExtendedDefinitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterExtendedUsage([NotNull] SysMLv2Parser.ExtendedUsageContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitExtendedUsage([NotNull] SysMLv2Parser.ExtendedUsageContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFilterPackageImportDeclaration([NotNull] SysMLv2Parser.FilterPackageImportDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFilterPackageImportDeclaration([NotNull] SysMLv2Parser.FilterPackageImportDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNamespaceImportDirect([NotNull] SysMLv2Parser.NamespaceImportDirectContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNamespaceImportDirect([NotNull] SysMLv2Parser.NamespaceImportDirectContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCalculationUsageDeclaration([NotNull] SysMLv2Parser.CalculationUsageDeclarationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCalculationUsageDeclaration([NotNull] SysMLv2Parser.CalculationUsageDeclarationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyActionUsage_([NotNull] SysMLv2Parser.EmptyActionUsage_Context context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyActionUsage_([NotNull] SysMLv2Parser.EmptyActionUsage_Context context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyFeature_([NotNull] SysMLv2Parser.EmptyFeature_Context context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyFeature_([NotNull] SysMLv2Parser.EmptyFeature_Context context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyMultiplicity_([NotNull] SysMLv2Parser.EmptyMultiplicity_Context context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyMultiplicity_([NotNull] SysMLv2Parser.EmptyMultiplicity_Context context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterEmptyUsage_([NotNull] SysMLv2Parser.EmptyUsage_Context context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitEmptyUsage_([NotNull] SysMLv2Parser.EmptyUsage_Context context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFilterPackageImport([NotNull] SysMLv2Parser.FilterPackageImportContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFilterPackageImport([NotNull] SysMLv2Parser.FilterPackageImportContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNonFeatureChainPrimaryExpression([NotNull] SysMLv2Parser.NonFeatureChainPrimaryExpressionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNonFeatureChainPrimaryExpression([NotNull] SysMLv2Parser.NonFeatureChainPrimaryExpressionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterPortConjugation([NotNull] SysMLv2Parser.PortConjugationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitPortConjugation([NotNull] SysMLv2Parser.PortConjugationContext context) { } + + /// + /// The default implementation does nothing. + public virtual void EnterEveryRule([NotNull] ParserRuleContext context) { } + /// + /// The default implementation does nothing. + public virtual void ExitEveryRule([NotNull] ParserRuleContext context) { } + /// + /// The default implementation does nothing. + public virtual void VisitTerminal([NotNull] ITerminalNode node) { } + /// + /// The default implementation does nothing. + public virtual void VisitErrorNode([NotNull] IErrorNode node) { } +} +} // namespace DemaConsulting.SysML2Tools.Parser.Antlr diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseVisitor.cs b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseVisitor.cs new file mode 100644 index 00000000..48c345d6 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserBaseVisitor.cs @@ -0,0 +1,4559 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/work/DemaConsulting/BuildTools/SysML2Tools/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace DemaConsulting.SysML2Tools.Parser.Antlr { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a visitor which only needs to handle a subset +/// of the available methods. +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class SysMLv2ParserBaseVisitor : AbstractParseTreeVisitor, ISysMLv2ParserVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedExpression([NotNull] SysMLv2Parser.OwnedExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeReference([NotNull] SysMLv2Parser.TypeReferenceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSequenceExpressionList([NotNull] SysMLv2Parser.SequenceExpressionListContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBaseExpression([NotNull] SysMLv2Parser.BaseExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNullExpression([NotNull] SysMLv2Parser.NullExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureReferenceExpression([NotNull] SysMLv2Parser.FeatureReferenceExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstructorExpression([NotNull] SysMLv2Parser.ConstructorExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBodyExpression([NotNull] SysMLv2Parser.BodyExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArgumentList([NotNull] SysMLv2Parser.ArgumentListContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPositionalArgumentList([NotNull] SysMLv2Parser.PositionalArgumentListContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamedArgumentList([NotNull] SysMLv2Parser.NamedArgumentListContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamedArgument([NotNull] SysMLv2Parser.NamedArgumentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteralExpression([NotNull] SysMLv2Parser.LiteralExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteralBoolean([NotNull] SysMLv2Parser.LiteralBooleanContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteralString([NotNull] SysMLv2Parser.LiteralStringContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteralInteger([NotNull] SysMLv2Parser.LiteralIntegerContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteralReal([NotNull] SysMLv2Parser.LiteralRealContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLiteralInfinity([NotNull] SysMLv2Parser.LiteralInfinityContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArgumentMember([NotNull] SysMLv2Parser.ArgumentMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitArgumentExpressionMember([NotNull] SysMLv2Parser.ArgumentExpressionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitName([NotNull] SysMLv2Parser.NameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUnreservedKeyword([NotNull] SysMLv2Parser.UnreservedKeywordContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIdentification([NotNull] SysMLv2Parser.IdentificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRelationshipBody([NotNull] SysMLv2Parser.RelationshipBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRelationshipOwnedElement([NotNull] SysMLv2Parser.RelationshipOwnedElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedRelatedElement([NotNull] SysMLv2Parser.OwnedRelatedElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDependency([NotNull] SysMLv2Parser.DependencyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAnnotation([NotNull] SysMLv2Parser.AnnotationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedAnnotation([NotNull] SysMLv2Parser.OwnedAnnotationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAnnotatingElement([NotNull] SysMLv2Parser.AnnotatingElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitComment([NotNull] SysMLv2Parser.CommentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDocumentation([NotNull] SysMLv2Parser.DocumentationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTextualRepresentation([NotNull] SysMLv2Parser.TextualRepresentationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRootNamespace([NotNull] SysMLv2Parser.RootNamespaceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespace([NotNull] SysMLv2Parser.NamespaceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceDeclaration([NotNull] SysMLv2Parser.NamespaceDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceBody([NotNull] SysMLv2Parser.NamespaceBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceBodyElement([NotNull] SysMLv2Parser.NamespaceBodyElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMemberPrefix([NotNull] SysMLv2Parser.MemberPrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVisibilityIndicator([NotNull] SysMLv2Parser.VisibilityIndicatorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceMember([NotNull] SysMLv2Parser.NamespaceMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNonFeatureMember([NotNull] SysMLv2Parser.NonFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceFeatureMember([NotNull] SysMLv2Parser.NamespaceFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAliasMember([NotNull] SysMLv2Parser.AliasMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitQualifiedName([NotNull] SysMLv2Parser.QualifiedNameContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitImportRule([NotNull] SysMLv2Parser.ImportRuleContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitImportDeclaration([NotNull] SysMLv2Parser.ImportDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMembershipImport([NotNull] SysMLv2Parser.MembershipImportContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceImport([NotNull] SysMLv2Parser.NamespaceImportContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFilterPackage([NotNull] SysMLv2Parser.FilterPackageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFilterPackageMember([NotNull] SysMLv2Parser.FilterPackageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMemberElement([NotNull] SysMLv2Parser.MemberElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNonFeatureElement([NotNull] SysMLv2Parser.NonFeatureElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureElement([NotNull] SysMLv2Parser.FeatureElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitType([NotNull] SysMLv2Parser.TypeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypePrefix([NotNull] SysMLv2Parser.TypePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeDeclaration([NotNull] SysMLv2Parser.TypeDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSpecializationPart([NotNull] SysMLv2Parser.SpecializationPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConjugationPart([NotNull] SysMLv2Parser.ConjugationPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeRelationshipPart([NotNull] SysMLv2Parser.TypeRelationshipPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDisjoiningPart([NotNull] SysMLv2Parser.DisjoiningPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUnioningPart([NotNull] SysMLv2Parser.UnioningPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIntersectingPart([NotNull] SysMLv2Parser.IntersectingPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDifferencingPart([NotNull] SysMLv2Parser.DifferencingPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeBody([NotNull] SysMLv2Parser.TypeBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeBodyElement([NotNull] SysMLv2Parser.TypeBodyElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSpecialization([NotNull] SysMLv2Parser.SpecializationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedSpecialization([NotNull] SysMLv2Parser.OwnedSpecializationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSpecificType([NotNull] SysMLv2Parser.SpecificTypeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGeneralType([NotNull] SysMLv2Parser.GeneralTypeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConjugation([NotNull] SysMLv2Parser.ConjugationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedConjugation([NotNull] SysMLv2Parser.OwnedConjugationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDisjoining([NotNull] SysMLv2Parser.DisjoiningContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedDisjoining([NotNull] SysMLv2Parser.OwnedDisjoiningContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUnioning([NotNull] SysMLv2Parser.UnioningContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIntersecting([NotNull] SysMLv2Parser.IntersectingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDifferencing([NotNull] SysMLv2Parser.DifferencingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureMember([NotNull] SysMLv2Parser.FeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeFeatureMember([NotNull] SysMLv2Parser.TypeFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedFeatureMember([NotNull] SysMLv2Parser.OwnedFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitClassifier([NotNull] SysMLv2Parser.ClassifierContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitClassifierDeclaration([NotNull] SysMLv2Parser.ClassifierDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuperclassingPart([NotNull] SysMLv2Parser.SuperclassingPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubclassification([NotNull] SysMLv2Parser.SubclassificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedSubclassification([NotNull] SysMLv2Parser.OwnedSubclassificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeature([NotNull] SysMLv2Parser.FeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEndFeaturePrefix([NotNull] SysMLv2Parser.EndFeaturePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBasicFeaturePrefix([NotNull] SysMLv2Parser.BasicFeaturePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeaturePrefix([NotNull] SysMLv2Parser.FeaturePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedCrossFeatureMember([NotNull] SysMLv2Parser.OwnedCrossFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedCrossFeature([NotNull] SysMLv2Parser.OwnedCrossFeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureDirection([NotNull] SysMLv2Parser.FeatureDirectionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureDeclaration([NotNull] SysMLv2Parser.FeatureDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureIdentification([NotNull] SysMLv2Parser.FeatureIdentificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureRelationshipPart([NotNull] SysMLv2Parser.FeatureRelationshipPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitChainingPart([NotNull] SysMLv2Parser.ChainingPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInvertingPart([NotNull] SysMLv2Parser.InvertingPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeFeaturingPart([NotNull] SysMLv2Parser.TypeFeaturingPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureSpecializationPart([NotNull] SysMLv2Parser.FeatureSpecializationPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplicityPart([NotNull] SysMLv2Parser.MultiplicityPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureSpecialization([NotNull] SysMLv2Parser.FeatureSpecializationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypings([NotNull] SysMLv2Parser.TypingsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypedBy([NotNull] SysMLv2Parser.TypedByContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubsettings([NotNull] SysMLv2Parser.SubsettingsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubsets([NotNull] SysMLv2Parser.SubsetsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitReferences([NotNull] SysMLv2Parser.ReferencesContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCrosses([NotNull] SysMLv2Parser.CrossesContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRedefinitions([NotNull] SysMLv2Parser.RedefinitionsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRedefines([NotNull] SysMLv2Parser.RedefinesContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureTyping([NotNull] SysMLv2Parser.FeatureTypingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedFeatureTyping([NotNull] SysMLv2Parser.OwnedFeatureTypingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubsetting([NotNull] SysMLv2Parser.SubsettingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedSubsetting([NotNull] SysMLv2Parser.OwnedSubsettingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedReferenceSubsetting([NotNull] SysMLv2Parser.OwnedReferenceSubsettingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedCrossSubsetting([NotNull] SysMLv2Parser.OwnedCrossSubsettingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRedefinition([NotNull] SysMLv2Parser.RedefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedRedefinition([NotNull] SysMLv2Parser.OwnedRedefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureInverting([NotNull] SysMLv2Parser.FeatureInvertingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedFeatureInverting([NotNull] SysMLv2Parser.OwnedFeatureInvertingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTypeFeaturing([NotNull] SysMLv2Parser.TypeFeaturingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedTypeFeaturing([NotNull] SysMLv2Parser.OwnedTypeFeaturingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDataType([NotNull] SysMLv2Parser.DataTypeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitClass([NotNull] SysMLv2Parser.ClassContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStructure([NotNull] SysMLv2Parser.StructureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssociation([NotNull] SysMLv2Parser.AssociationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssociationStructure([NotNull] SysMLv2Parser.AssociationStructureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnector([NotNull] SysMLv2Parser.ConnectorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnectorDeclaration([NotNull] SysMLv2Parser.ConnectorDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBinaryConnectorDeclaration([NotNull] SysMLv2Parser.BinaryConnectorDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNaryConnectorDeclaration([NotNull] SysMLv2Parser.NaryConnectorDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnectorEndMember([NotNull] SysMLv2Parser.ConnectorEndMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnectorEnd([NotNull] SysMLv2Parser.ConnectorEndContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedCrossMultiplicityMember([NotNull] SysMLv2Parser.OwnedCrossMultiplicityMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedCrossMultiplicity([NotNull] SysMLv2Parser.OwnedCrossMultiplicityContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBindingConnector([NotNull] SysMLv2Parser.BindingConnectorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBindingConnectorDeclaration([NotNull] SysMLv2Parser.BindingConnectorDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuccession([NotNull] SysMLv2Parser.SuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuccessionDeclaration([NotNull] SysMLv2Parser.SuccessionDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBehavior([NotNull] SysMLv2Parser.BehaviorContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStep([NotNull] SysMLv2Parser.StepContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFunction([NotNull] SysMLv2Parser.FunctionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFunctionBody([NotNull] SysMLv2Parser.FunctionBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFunctionBodyPart([NotNull] SysMLv2Parser.FunctionBodyPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitReturnFeatureMember([NotNull] SysMLv2Parser.ReturnFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitResultExpressionMember([NotNull] SysMLv2Parser.ResultExpressionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExpression([NotNull] SysMLv2Parser.ExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPredicate([NotNull] SysMLv2Parser.PredicateContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBooleanExpression([NotNull] SysMLv2Parser.BooleanExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInvariant([NotNull] SysMLv2Parser.InvariantContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureChainMember([NotNull] SysMLv2Parser.FeatureChainMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInteraction([NotNull] SysMLv2Parser.InteractionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlow([NotNull] SysMLv2Parser.FlowContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuccessionFlow([NotNull] SysMLv2Parser.SuccessionFlowContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowDeclaration([NotNull] SysMLv2Parser.FlowDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPayloadFeatureMember([NotNull] SysMLv2Parser.PayloadFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPayloadFeature([NotNull] SysMLv2Parser.PayloadFeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPayloadFeatureSpecializationPart([NotNull] SysMLv2Parser.PayloadFeatureSpecializationPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowEndMember([NotNull] SysMLv2Parser.FlowEndMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowEnd([NotNull] SysMLv2Parser.FlowEndContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitValuePart([NotNull] SysMLv2Parser.ValuePartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureValue([NotNull] SysMLv2Parser.FeatureValueContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplicity([NotNull] SysMLv2Parser.MultiplicityContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplicitySubset([NotNull] SysMLv2Parser.MultiplicitySubsetContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplicityRange([NotNull] SysMLv2Parser.MultiplicityRangeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedMultiplicity([NotNull] SysMLv2Parser.OwnedMultiplicityContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOwnedMultiplicityRange([NotNull] SysMLv2Parser.OwnedMultiplicityRangeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplicityBounds([NotNull] SysMLv2Parser.MultiplicityBoundsContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMultiplicityExpressionMember([NotNull] SysMLv2Parser.MultiplicityExpressionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetaclass([NotNull] SysMLv2Parser.MetaclassContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrefixMetadataAnnotation([NotNull] SysMLv2Parser.PrefixMetadataAnnotationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrefixMetadataMember([NotNull] SysMLv2Parser.PrefixMetadataMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrefixMetadataFeature([NotNull] SysMLv2Parser.PrefixMetadataFeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataFeature([NotNull] SysMLv2Parser.MetadataFeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataFeatureDeclaration([NotNull] SysMLv2Parser.MetadataFeatureDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataBody([NotNull] SysMLv2Parser.MetadataBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataBodyElement([NotNull] SysMLv2Parser.MetadataBodyElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataBodyFeatureMember([NotNull] SysMLv2Parser.MetadataBodyFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataBodyFeature([NotNull] SysMLv2Parser.MetadataBodyFeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackage([NotNull] SysMLv2Parser.PackageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLibraryPackage([NotNull] SysMLv2Parser.LibraryPackageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackageDeclaration([NotNull] SysMLv2Parser.PackageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackageBody([NotNull] SysMLv2Parser.PackageBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElementFilterMember([NotNull] SysMLv2Parser.ElementFilterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDependencyDeclaration([NotNull] SysMLv2Parser.DependencyDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAnnotatingMember([NotNull] SysMLv2Parser.AnnotatingMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackageBodyElement([NotNull] SysMLv2Parser.PackageBodyElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPackageMember([NotNull] SysMLv2Parser.PackageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionElement([NotNull] SysMLv2Parser.DefinitionElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsageElement([NotNull] SysMLv2Parser.UsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBasicDefinitionPrefix([NotNull] SysMLv2Parser.BasicDefinitionPrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionExtensionKeyword([NotNull] SysMLv2Parser.DefinitionExtensionKeywordContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionPrefix([NotNull] SysMLv2Parser.DefinitionPrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinition([NotNull] SysMLv2Parser.DefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionDeclaration([NotNull] SysMLv2Parser.DefinitionDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionBody([NotNull] SysMLv2Parser.DefinitionBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionBodyItem([NotNull] SysMLv2Parser.DefinitionBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionBodyItemContent([NotNull] SysMLv2Parser.DefinitionBodyItemContentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefinitionMember([NotNull] SysMLv2Parser.DefinitionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVariantUsageMember([NotNull] SysMLv2Parser.VariantUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNonOccurrenceUsageMember([NotNull] SysMLv2Parser.NonOccurrenceUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStructureUsageMember([NotNull] SysMLv2Parser.StructureUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBehaviorUsageMember([NotNull] SysMLv2Parser.BehaviorUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRefPrefix([NotNull] SysMLv2Parser.RefPrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBasicUsagePrefix([NotNull] SysMLv2Parser.BasicUsagePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEndUsagePrefix([NotNull] SysMLv2Parser.EndUsagePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsageExtensionKeyword([NotNull] SysMLv2Parser.UsageExtensionKeywordContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUnextendedUsagePrefix([NotNull] SysMLv2Parser.UnextendedUsagePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsagePrefix([NotNull] SysMLv2Parser.UsagePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsage([NotNull] SysMLv2Parser.UsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsageDeclaration([NotNull] SysMLv2Parser.UsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsageCompletion([NotNull] SysMLv2Parser.UsageCompletionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUsageBody([NotNull] SysMLv2Parser.UsageBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefaultReferenceUsage([NotNull] SysMLv2Parser.DefaultReferenceUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitReferenceUsage([NotNull] SysMLv2Parser.ReferenceUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEndFeatureUsage([NotNull] SysMLv2Parser.EndFeatureUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVariantReference([NotNull] SysMLv2Parser.VariantReferenceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNonOccurrenceUsageElement([NotNull] SysMLv2Parser.NonOccurrenceUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEndOccurrenceUsageElement([NotNull] SysMLv2Parser.EndOccurrenceUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOccurrenceUsageElement([NotNull] SysMLv2Parser.OccurrenceUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStructureUsageElement([NotNull] SysMLv2Parser.StructureUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBehaviorUsageElement([NotNull] SysMLv2Parser.BehaviorUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVariantUsageElement([NotNull] SysMLv2Parser.VariantUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubclassificationPart([NotNull] SysMLv2Parser.SubclassificationPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAttributeDefinition([NotNull] SysMLv2Parser.AttributeDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAttributeUsage([NotNull] SysMLv2Parser.AttributeUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumerationDefinition([NotNull] SysMLv2Parser.EnumerationDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumerationBody([NotNull] SysMLv2Parser.EnumerationBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumerationUsageMember([NotNull] SysMLv2Parser.EnumerationUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumeratedValue([NotNull] SysMLv2Parser.EnumeratedValueContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEnumerationUsage([NotNull] SysMLv2Parser.EnumerationUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOccurrenceDefinitionPrefix([NotNull] SysMLv2Parser.OccurrenceDefinitionPrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOccurrenceDefinition([NotNull] SysMLv2Parser.OccurrenceDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIndividualDefinition([NotNull] SysMLv2Parser.IndividualDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyMultiplicityMember([NotNull] SysMLv2Parser.EmptyMultiplicityMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOccurrenceUsagePrefix([NotNull] SysMLv2Parser.OccurrenceUsagePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitOccurrenceUsage([NotNull] SysMLv2Parser.OccurrenceUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIndividualUsage([NotNull] SysMLv2Parser.IndividualUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPortionUsage([NotNull] SysMLv2Parser.PortionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPortionKind([NotNull] SysMLv2Parser.PortionKindContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEventOccurrenceUsage([NotNull] SysMLv2Parser.EventOccurrenceUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSourceSuccessionMember([NotNull] SysMLv2Parser.SourceSuccessionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSourceSuccession([NotNull] SysMLv2Parser.SourceSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSourceEndMember([NotNull] SysMLv2Parser.SourceEndMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSourceEnd([NotNull] SysMLv2Parser.SourceEndContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitItemDefinition([NotNull] SysMLv2Parser.ItemDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitItemUsage([NotNull] SysMLv2Parser.ItemUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPartDefinition([NotNull] SysMLv2Parser.PartDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPartUsage([NotNull] SysMLv2Parser.PartUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPortDefinition([NotNull] SysMLv2Parser.PortDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConjugatedPortDefinitionMember([NotNull] SysMLv2Parser.ConjugatedPortDefinitionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConjugatedPortDefinition([NotNull] SysMLv2Parser.ConjugatedPortDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPortUsage([NotNull] SysMLv2Parser.PortUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConjugatedPortTyping([NotNull] SysMLv2Parser.ConjugatedPortTypingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnectionDefinition([NotNull] SysMLv2Parser.ConnectionDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnectionUsage([NotNull] SysMLv2Parser.ConnectionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConnectorPart([NotNull] SysMLv2Parser.ConnectorPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBinaryConnectorPart([NotNull] SysMLv2Parser.BinaryConnectorPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNaryConnectorPart([NotNull] SysMLv2Parser.NaryConnectorPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBindingConnectorAsUsage([NotNull] SysMLv2Parser.BindingConnectorAsUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuccessionAsUsage([NotNull] SysMLv2Parser.SuccessionAsUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceDefinition([NotNull] SysMLv2Parser.InterfaceDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceBody([NotNull] SysMLv2Parser.InterfaceBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceBodyItem([NotNull] SysMLv2Parser.InterfaceBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceNonOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceNonOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefaultInterfaceEnd([NotNull] SysMLv2Parser.DefaultInterfaceEndContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceUsage([NotNull] SysMLv2Parser.InterfaceUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceUsageDeclaration([NotNull] SysMLv2Parser.InterfaceUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfacePart([NotNull] SysMLv2Parser.InterfacePartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitBinaryInterfacePart([NotNull] SysMLv2Parser.BinaryInterfacePartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNaryInterfacePart([NotNull] SysMLv2Parser.NaryInterfacePartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceEndMember([NotNull] SysMLv2Parser.InterfaceEndMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInterfaceEnd([NotNull] SysMLv2Parser.InterfaceEndContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAllocationDefinition([NotNull] SysMLv2Parser.AllocationDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAllocationUsage([NotNull] SysMLv2Parser.AllocationUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAllocationUsageDeclaration([NotNull] SysMLv2Parser.AllocationUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowDefinition([NotNull] SysMLv2Parser.FlowDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMessage([NotNull] SysMLv2Parser.MessageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMessageDeclaration([NotNull] SysMLv2Parser.MessageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMessageEventMember([NotNull] SysMLv2Parser.MessageEventMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMessageEvent([NotNull] SysMLv2Parser.MessageEventContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowUsage([NotNull] SysMLv2Parser.FlowUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuccessionFlowUsage([NotNull] SysMLv2Parser.SuccessionFlowUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowPayloadFeatureMember([NotNull] SysMLv2Parser.FlowPayloadFeatureMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFlowPayloadFeature([NotNull] SysMLv2Parser.FlowPayloadFeatureContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionDefinition([NotNull] SysMLv2Parser.ActionDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionBody([NotNull] SysMLv2Parser.ActionBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionBodyItem([NotNull] SysMLv2Parser.ActionBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNonBehaviorBodyItem([NotNull] SysMLv2Parser.NonBehaviorBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionBehaviorMember([NotNull] SysMLv2Parser.ActionBehaviorMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitInitialNodeMember([NotNull] SysMLv2Parser.InitialNodeMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionNodeMember([NotNull] SysMLv2Parser.ActionNodeMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionTargetSuccessionMember([NotNull] SysMLv2Parser.ActionTargetSuccessionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGuardedSuccessionMember([NotNull] SysMLv2Parser.GuardedSuccessionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionUsage([NotNull] SysMLv2Parser.ActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionUsageDeclaration([NotNull] SysMLv2Parser.ActionUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPerformActionUsage([NotNull] SysMLv2Parser.PerformActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPerformActionUsageDeclaration([NotNull] SysMLv2Parser.PerformActionUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionNode([NotNull] SysMLv2Parser.ActionNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionNodeUsageDeclaration([NotNull] SysMLv2Parser.ActionNodeUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionNodePrefix([NotNull] SysMLv2Parser.ActionNodePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitControlNode([NotNull] SysMLv2Parser.ControlNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitControlNodePrefix([NotNull] SysMLv2Parser.ControlNodePrefixContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMergeNode([NotNull] SysMLv2Parser.MergeNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDecisionNode([NotNull] SysMLv2Parser.DecisionNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitJoinNode([NotNull] SysMLv2Parser.JoinNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitForkNode([NotNull] SysMLv2Parser.ForkNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAcceptNode([NotNull] SysMLv2Parser.AcceptNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAcceptNodeDeclaration([NotNull] SysMLv2Parser.AcceptNodeDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAcceptParameterPart([NotNull] SysMLv2Parser.AcceptParameterPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPayloadParameterMember([NotNull] SysMLv2Parser.PayloadParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPayloadParameter([NotNull] SysMLv2Parser.PayloadParameterContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTriggerValuePart([NotNull] SysMLv2Parser.TriggerValuePartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTriggerFeatureValue([NotNull] SysMLv2Parser.TriggerFeatureValueContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTriggerExpression([NotNull] SysMLv2Parser.TriggerExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSendNode([NotNull] SysMLv2Parser.SendNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSendNodeDeclaration([NotNull] SysMLv2Parser.SendNodeDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSenderReceiverPart([NotNull] SysMLv2Parser.SenderReceiverPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNodeParameterMember([NotNull] SysMLv2Parser.NodeParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNodeParameter([NotNull] SysMLv2Parser.NodeParameterContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFeatureBinding([NotNull] SysMLv2Parser.FeatureBindingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyParameterMember([NotNull] SysMLv2Parser.EmptyParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignmentNode([NotNull] SysMLv2Parser.AssignmentNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignmentNodeDeclaration([NotNull] SysMLv2Parser.AssignmentNodeDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignmentTargetMember([NotNull] SysMLv2Parser.AssignmentTargetMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignmentTargetParameter([NotNull] SysMLv2Parser.AssignmentTargetParameterContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignmentTargetBinding([NotNull] SysMLv2Parser.AssignmentTargetBindingContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTerminateNode([NotNull] SysMLv2Parser.TerminateNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIfNode([NotNull] SysMLv2Parser.IfNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExpressionParameterMember([NotNull] SysMLv2Parser.ExpressionParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionBodyParameterMember([NotNull] SysMLv2Parser.ActionBodyParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionBodyParameter([NotNull] SysMLv2Parser.ActionBodyParameterContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIfNodeParameterMember([NotNull] SysMLv2Parser.IfNodeParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitWhileLoopNode([NotNull] SysMLv2Parser.WhileLoopNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitForLoopNode([NotNull] SysMLv2Parser.ForLoopNodeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitForVariableDeclarationMember([NotNull] SysMLv2Parser.ForVariableDeclarationMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActionTargetSuccession([NotNull] SysMLv2Parser.ActionTargetSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTargetSuccession([NotNull] SysMLv2Parser.TargetSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGuardedTargetSuccession([NotNull] SysMLv2Parser.GuardedTargetSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDefaultTargetSuccession([NotNull] SysMLv2Parser.DefaultTargetSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGuardedSuccession([NotNull] SysMLv2Parser.GuardedSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateDefinition([NotNull] SysMLv2Parser.StateDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateDefBody([NotNull] SysMLv2Parser.StateDefBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateBodyItem([NotNull] SysMLv2Parser.StateBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntryActionMember([NotNull] SysMLv2Parser.EntryActionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDoActionMember([NotNull] SysMLv2Parser.DoActionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExitActionMember([NotNull] SysMLv2Parser.ExitActionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEntryTransitionMember([NotNull] SysMLv2Parser.EntryTransitionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateActionUsage([NotNull] SysMLv2Parser.StateActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStatePerformActionUsage([NotNull] SysMLv2Parser.StatePerformActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateAcceptActionUsage([NotNull] SysMLv2Parser.StateAcceptActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateSendActionUsage([NotNull] SysMLv2Parser.StateSendActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateAssignmentActionUsage([NotNull] SysMLv2Parser.StateAssignmentActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionUsageMember([NotNull] SysMLv2Parser.TransitionUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTargetTransitionUsageMember([NotNull] SysMLv2Parser.TargetTransitionUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateUsage([NotNull] SysMLv2Parser.StateUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStateUsageBody([NotNull] SysMLv2Parser.StateUsageBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExhibitStateUsage([NotNull] SysMLv2Parser.ExhibitStateUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionUsage([NotNull] SysMLv2Parser.TransitionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTargetTransitionUsage([NotNull] SysMLv2Parser.TargetTransitionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTriggerActionMember([NotNull] SysMLv2Parser.TriggerActionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTriggerAction([NotNull] SysMLv2Parser.TriggerActionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGuardExpressionMember([NotNull] SysMLv2Parser.GuardExpressionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEffectBehaviorMember([NotNull] SysMLv2Parser.EffectBehaviorMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEffectBehaviorUsage([NotNull] SysMLv2Parser.EffectBehaviorUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionPerformActionUsage([NotNull] SysMLv2Parser.TransitionPerformActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionAcceptActionUsage([NotNull] SysMLv2Parser.TransitionAcceptActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionSendActionUsage([NotNull] SysMLv2Parser.TransitionSendActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionAssignmentActionUsage([NotNull] SysMLv2Parser.TransitionAssignmentActionUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionSuccessionMember([NotNull] SysMLv2Parser.TransitionSuccessionMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTransitionSuccession([NotNull] SysMLv2Parser.TransitionSuccessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyEndMember([NotNull] SysMLv2Parser.EmptyEndMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCalculationDefinition([NotNull] SysMLv2Parser.CalculationDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCalculationUsage([NotNull] SysMLv2Parser.CalculationUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCalculationBody([NotNull] SysMLv2Parser.CalculationBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCalculationBodyPart([NotNull] SysMLv2Parser.CalculationBodyPartContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCalculationBodyItem([NotNull] SysMLv2Parser.CalculationBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitReturnParameterMember([NotNull] SysMLv2Parser.ReturnParameterMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstraintDefinition([NotNull] SysMLv2Parser.ConstraintDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstraintUsage([NotNull] SysMLv2Parser.ConstraintUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssertConstraintUsage([NotNull] SysMLv2Parser.AssertConstraintUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConstraintUsageDeclaration([NotNull] SysMLv2Parser.ConstraintUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementDefinition([NotNull] SysMLv2Parser.RequirementDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementBody([NotNull] SysMLv2Parser.RequirementBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementBodyItem([NotNull] SysMLv2Parser.RequirementBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubjectMember([NotNull] SysMLv2Parser.SubjectMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSubjectUsage([NotNull] SysMLv2Parser.SubjectUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementConstraintMember([NotNull] SysMLv2Parser.RequirementConstraintMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementKind([NotNull] SysMLv2Parser.RequirementKindContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementConstraintUsage([NotNull] SysMLv2Parser.RequirementConstraintUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFramedConcernMember([NotNull] SysMLv2Parser.FramedConcernMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFramedConcernUsage([NotNull] SysMLv2Parser.FramedConcernUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActorMember([NotNull] SysMLv2Parser.ActorMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitActorUsage([NotNull] SysMLv2Parser.ActorUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStakeholderMember([NotNull] SysMLv2Parser.StakeholderMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitStakeholderUsage([NotNull] SysMLv2Parser.StakeholderUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementUsage([NotNull] SysMLv2Parser.RequirementUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSatisfyRequirementUsage([NotNull] SysMLv2Parser.SatisfyRequirementUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSatisfactionSubjectMember([NotNull] SysMLv2Parser.SatisfactionSubjectMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSatisfactionParameter([NotNull] SysMLv2Parser.SatisfactionParameterContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSatisfactionFeatureValue([NotNull] SysMLv2Parser.SatisfactionFeatureValueContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSatisfactionReferenceExpression([NotNull] SysMLv2Parser.SatisfactionReferenceExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcernDefinition([NotNull] SysMLv2Parser.ConcernDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitConcernUsage([NotNull] SysMLv2Parser.ConcernUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCaseDefinition([NotNull] SysMLv2Parser.CaseDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCaseUsage([NotNull] SysMLv2Parser.CaseUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCaseBody([NotNull] SysMLv2Parser.CaseBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCaseBodyItem([NotNull] SysMLv2Parser.CaseBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitObjectiveMember([NotNull] SysMLv2Parser.ObjectiveMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitObjectiveRequirementUsage([NotNull] SysMLv2Parser.ObjectiveRequirementUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAnalysisCaseDefinition([NotNull] SysMLv2Parser.AnalysisCaseDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAnalysisCaseUsage([NotNull] SysMLv2Parser.AnalysisCaseUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVerificationCaseDefinition([NotNull] SysMLv2Parser.VerificationCaseDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitVerificationCaseUsage([NotNull] SysMLv2Parser.VerificationCaseUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementVerificationMember([NotNull] SysMLv2Parser.RequirementVerificationMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRequirementVerificationUsage([NotNull] SysMLv2Parser.RequirementVerificationUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUseCaseDefinition([NotNull] SysMLv2Parser.UseCaseDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitUseCaseUsage([NotNull] SysMLv2Parser.UseCaseUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIncludeUseCaseUsage([NotNull] SysMLv2Parser.IncludeUseCaseUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewDefinition([NotNull] SysMLv2Parser.ViewDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewDefinitionBody([NotNull] SysMLv2Parser.ViewDefinitionBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewDefinitionBodyItem([NotNull] SysMLv2Parser.ViewDefinitionBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewRenderingMember([NotNull] SysMLv2Parser.ViewRenderingMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewRenderingUsage([NotNull] SysMLv2Parser.ViewRenderingUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewUsage([NotNull] SysMLv2Parser.ViewUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewBody([NotNull] SysMLv2Parser.ViewBodyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewBodyItem([NotNull] SysMLv2Parser.ViewBodyItemContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExpose([NotNull] SysMLv2Parser.ExposeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMembershipExpose([NotNull] SysMLv2Parser.MembershipExposeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceExpose([NotNull] SysMLv2Parser.NamespaceExposeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewpointDefinition([NotNull] SysMLv2Parser.ViewpointDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitViewpointUsage([NotNull] SysMLv2Parser.ViewpointUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRenderingDefinition([NotNull] SysMLv2Parser.RenderingDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRenderingUsage([NotNull] SysMLv2Parser.RenderingUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataDefinition([NotNull] SysMLv2Parser.MetadataDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPrefixMetadataUsage([NotNull] SysMLv2Parser.PrefixMetadataUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataBodyUsageMember([NotNull] SysMLv2Parser.MetadataBodyUsageMemberContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitMetadataBodyUsage([NotNull] SysMLv2Parser.MetadataBodyUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExtendedDefinition([NotNull] SysMLv2Parser.ExtendedDefinitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitExtendedUsage([NotNull] SysMLv2Parser.ExtendedUsageContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFilterPackageImportDeclaration([NotNull] SysMLv2Parser.FilterPackageImportDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNamespaceImportDirect([NotNull] SysMLv2Parser.NamespaceImportDirectContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCalculationUsageDeclaration([NotNull] SysMLv2Parser.CalculationUsageDeclarationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyActionUsage_([NotNull] SysMLv2Parser.EmptyActionUsage_Context context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyFeature_([NotNull] SysMLv2Parser.EmptyFeature_Context context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyMultiplicity_([NotNull] SysMLv2Parser.EmptyMultiplicity_Context context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitEmptyUsage_([NotNull] SysMLv2Parser.EmptyUsage_Context context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFilterPackageImport([NotNull] SysMLv2Parser.FilterPackageImportContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNonFeatureChainPrimaryExpression([NotNull] SysMLv2Parser.NonFeatureChainPrimaryExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitPortConjugation([NotNull] SysMLv2Parser.PortConjugationContext context) { return VisitChildren(context); } +} +} // namespace DemaConsulting.SysML2Tools.Parser.Antlr diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserListener.cs b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserListener.cs new file mode 100644 index 00000000..db8bdee2 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserListener.cs @@ -0,0 +1,4555 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/work/DemaConsulting/BuildTools/SysML2Tools/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace DemaConsulting.SysML2Tools.Parser.Antlr { +using Antlr4.Runtime.Misc; +using IParseTreeListener = Antlr4.Runtime.Tree.IParseTreeListener; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete listener for a parse tree produced by +/// . +/// +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public interface ISysMLv2ParserListener : IParseTreeListener { + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedExpression([NotNull] SysMLv2Parser.OwnedExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedExpression([NotNull] SysMLv2Parser.OwnedExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeReference([NotNull] SysMLv2Parser.TypeReferenceContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeReference([NotNull] SysMLv2Parser.TypeReferenceContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSequenceExpressionList([NotNull] SysMLv2Parser.SequenceExpressionListContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSequenceExpressionList([NotNull] SysMLv2Parser.SequenceExpressionListContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBaseExpression([NotNull] SysMLv2Parser.BaseExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBaseExpression([NotNull] SysMLv2Parser.BaseExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNullExpression([NotNull] SysMLv2Parser.NullExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNullExpression([NotNull] SysMLv2Parser.NullExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureReferenceExpression([NotNull] SysMLv2Parser.FeatureReferenceExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureReferenceExpression([NotNull] SysMLv2Parser.FeatureReferenceExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConstructorExpression([NotNull] SysMLv2Parser.ConstructorExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConstructorExpression([NotNull] SysMLv2Parser.ConstructorExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBodyExpression([NotNull] SysMLv2Parser.BodyExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBodyExpression([NotNull] SysMLv2Parser.BodyExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterArgumentList([NotNull] SysMLv2Parser.ArgumentListContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitArgumentList([NotNull] SysMLv2Parser.ArgumentListContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPositionalArgumentList([NotNull] SysMLv2Parser.PositionalArgumentListContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPositionalArgumentList([NotNull] SysMLv2Parser.PositionalArgumentListContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamedArgumentList([NotNull] SysMLv2Parser.NamedArgumentListContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamedArgumentList([NotNull] SysMLv2Parser.NamedArgumentListContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamedArgument([NotNull] SysMLv2Parser.NamedArgumentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamedArgument([NotNull] SysMLv2Parser.NamedArgumentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLiteralExpression([NotNull] SysMLv2Parser.LiteralExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLiteralExpression([NotNull] SysMLv2Parser.LiteralExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLiteralBoolean([NotNull] SysMLv2Parser.LiteralBooleanContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLiteralBoolean([NotNull] SysMLv2Parser.LiteralBooleanContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLiteralString([NotNull] SysMLv2Parser.LiteralStringContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLiteralString([NotNull] SysMLv2Parser.LiteralStringContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLiteralInteger([NotNull] SysMLv2Parser.LiteralIntegerContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLiteralInteger([NotNull] SysMLv2Parser.LiteralIntegerContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLiteralReal([NotNull] SysMLv2Parser.LiteralRealContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLiteralReal([NotNull] SysMLv2Parser.LiteralRealContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLiteralInfinity([NotNull] SysMLv2Parser.LiteralInfinityContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLiteralInfinity([NotNull] SysMLv2Parser.LiteralInfinityContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterArgumentMember([NotNull] SysMLv2Parser.ArgumentMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitArgumentMember([NotNull] SysMLv2Parser.ArgumentMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterArgumentExpressionMember([NotNull] SysMLv2Parser.ArgumentExpressionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitArgumentExpressionMember([NotNull] SysMLv2Parser.ArgumentExpressionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterName([NotNull] SysMLv2Parser.NameContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitName([NotNull] SysMLv2Parser.NameContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUnreservedKeyword([NotNull] SysMLv2Parser.UnreservedKeywordContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUnreservedKeyword([NotNull] SysMLv2Parser.UnreservedKeywordContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIdentification([NotNull] SysMLv2Parser.IdentificationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIdentification([NotNull] SysMLv2Parser.IdentificationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRelationshipBody([NotNull] SysMLv2Parser.RelationshipBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRelationshipBody([NotNull] SysMLv2Parser.RelationshipBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRelationshipOwnedElement([NotNull] SysMLv2Parser.RelationshipOwnedElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRelationshipOwnedElement([NotNull] SysMLv2Parser.RelationshipOwnedElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedRelatedElement([NotNull] SysMLv2Parser.OwnedRelatedElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedRelatedElement([NotNull] SysMLv2Parser.OwnedRelatedElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDependency([NotNull] SysMLv2Parser.DependencyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDependency([NotNull] SysMLv2Parser.DependencyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAnnotation([NotNull] SysMLv2Parser.AnnotationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAnnotation([NotNull] SysMLv2Parser.AnnotationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedAnnotation([NotNull] SysMLv2Parser.OwnedAnnotationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedAnnotation([NotNull] SysMLv2Parser.OwnedAnnotationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAnnotatingElement([NotNull] SysMLv2Parser.AnnotatingElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAnnotatingElement([NotNull] SysMLv2Parser.AnnotatingElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterComment([NotNull] SysMLv2Parser.CommentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitComment([NotNull] SysMLv2Parser.CommentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDocumentation([NotNull] SysMLv2Parser.DocumentationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDocumentation([NotNull] SysMLv2Parser.DocumentationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTextualRepresentation([NotNull] SysMLv2Parser.TextualRepresentationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTextualRepresentation([NotNull] SysMLv2Parser.TextualRepresentationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRootNamespace([NotNull] SysMLv2Parser.RootNamespaceContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRootNamespace([NotNull] SysMLv2Parser.RootNamespaceContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespace([NotNull] SysMLv2Parser.NamespaceContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespace([NotNull] SysMLv2Parser.NamespaceContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceDeclaration([NotNull] SysMLv2Parser.NamespaceDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceDeclaration([NotNull] SysMLv2Parser.NamespaceDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceBody([NotNull] SysMLv2Parser.NamespaceBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceBody([NotNull] SysMLv2Parser.NamespaceBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceBodyElement([NotNull] SysMLv2Parser.NamespaceBodyElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceBodyElement([NotNull] SysMLv2Parser.NamespaceBodyElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMemberPrefix([NotNull] SysMLv2Parser.MemberPrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMemberPrefix([NotNull] SysMLv2Parser.MemberPrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterVisibilityIndicator([NotNull] SysMLv2Parser.VisibilityIndicatorContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitVisibilityIndicator([NotNull] SysMLv2Parser.VisibilityIndicatorContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceMember([NotNull] SysMLv2Parser.NamespaceMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceMember([NotNull] SysMLv2Parser.NamespaceMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNonFeatureMember([NotNull] SysMLv2Parser.NonFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNonFeatureMember([NotNull] SysMLv2Parser.NonFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceFeatureMember([NotNull] SysMLv2Parser.NamespaceFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceFeatureMember([NotNull] SysMLv2Parser.NamespaceFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAliasMember([NotNull] SysMLv2Parser.AliasMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAliasMember([NotNull] SysMLv2Parser.AliasMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterQualifiedName([NotNull] SysMLv2Parser.QualifiedNameContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitQualifiedName([NotNull] SysMLv2Parser.QualifiedNameContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterImportRule([NotNull] SysMLv2Parser.ImportRuleContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitImportRule([NotNull] SysMLv2Parser.ImportRuleContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterImportDeclaration([NotNull] SysMLv2Parser.ImportDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitImportDeclaration([NotNull] SysMLv2Parser.ImportDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMembershipImport([NotNull] SysMLv2Parser.MembershipImportContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMembershipImport([NotNull] SysMLv2Parser.MembershipImportContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceImport([NotNull] SysMLv2Parser.NamespaceImportContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceImport([NotNull] SysMLv2Parser.NamespaceImportContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFilterPackage([NotNull] SysMLv2Parser.FilterPackageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFilterPackage([NotNull] SysMLv2Parser.FilterPackageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFilterPackageMember([NotNull] SysMLv2Parser.FilterPackageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFilterPackageMember([NotNull] SysMLv2Parser.FilterPackageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMemberElement([NotNull] SysMLv2Parser.MemberElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMemberElement([NotNull] SysMLv2Parser.MemberElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNonFeatureElement([NotNull] SysMLv2Parser.NonFeatureElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNonFeatureElement([NotNull] SysMLv2Parser.NonFeatureElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureElement([NotNull] SysMLv2Parser.FeatureElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureElement([NotNull] SysMLv2Parser.FeatureElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterType([NotNull] SysMLv2Parser.TypeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitType([NotNull] SysMLv2Parser.TypeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypePrefix([NotNull] SysMLv2Parser.TypePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypePrefix([NotNull] SysMLv2Parser.TypePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeDeclaration([NotNull] SysMLv2Parser.TypeDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeDeclaration([NotNull] SysMLv2Parser.TypeDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSpecializationPart([NotNull] SysMLv2Parser.SpecializationPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSpecializationPart([NotNull] SysMLv2Parser.SpecializationPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConjugationPart([NotNull] SysMLv2Parser.ConjugationPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConjugationPart([NotNull] SysMLv2Parser.ConjugationPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeRelationshipPart([NotNull] SysMLv2Parser.TypeRelationshipPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeRelationshipPart([NotNull] SysMLv2Parser.TypeRelationshipPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDisjoiningPart([NotNull] SysMLv2Parser.DisjoiningPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDisjoiningPart([NotNull] SysMLv2Parser.DisjoiningPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUnioningPart([NotNull] SysMLv2Parser.UnioningPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUnioningPart([NotNull] SysMLv2Parser.UnioningPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIntersectingPart([NotNull] SysMLv2Parser.IntersectingPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIntersectingPart([NotNull] SysMLv2Parser.IntersectingPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDifferencingPart([NotNull] SysMLv2Parser.DifferencingPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDifferencingPart([NotNull] SysMLv2Parser.DifferencingPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeBody([NotNull] SysMLv2Parser.TypeBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeBody([NotNull] SysMLv2Parser.TypeBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeBodyElement([NotNull] SysMLv2Parser.TypeBodyElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeBodyElement([NotNull] SysMLv2Parser.TypeBodyElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSpecialization([NotNull] SysMLv2Parser.SpecializationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSpecialization([NotNull] SysMLv2Parser.SpecializationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedSpecialization([NotNull] SysMLv2Parser.OwnedSpecializationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedSpecialization([NotNull] SysMLv2Parser.OwnedSpecializationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSpecificType([NotNull] SysMLv2Parser.SpecificTypeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSpecificType([NotNull] SysMLv2Parser.SpecificTypeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGeneralType([NotNull] SysMLv2Parser.GeneralTypeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGeneralType([NotNull] SysMLv2Parser.GeneralTypeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConjugation([NotNull] SysMLv2Parser.ConjugationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConjugation([NotNull] SysMLv2Parser.ConjugationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedConjugation([NotNull] SysMLv2Parser.OwnedConjugationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedConjugation([NotNull] SysMLv2Parser.OwnedConjugationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDisjoining([NotNull] SysMLv2Parser.DisjoiningContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDisjoining([NotNull] SysMLv2Parser.DisjoiningContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedDisjoining([NotNull] SysMLv2Parser.OwnedDisjoiningContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedDisjoining([NotNull] SysMLv2Parser.OwnedDisjoiningContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUnioning([NotNull] SysMLv2Parser.UnioningContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUnioning([NotNull] SysMLv2Parser.UnioningContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIntersecting([NotNull] SysMLv2Parser.IntersectingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIntersecting([NotNull] SysMLv2Parser.IntersectingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDifferencing([NotNull] SysMLv2Parser.DifferencingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDifferencing([NotNull] SysMLv2Parser.DifferencingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureMember([NotNull] SysMLv2Parser.FeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureMember([NotNull] SysMLv2Parser.FeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeFeatureMember([NotNull] SysMLv2Parser.TypeFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeFeatureMember([NotNull] SysMLv2Parser.TypeFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedFeatureMember([NotNull] SysMLv2Parser.OwnedFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedFeatureMember([NotNull] SysMLv2Parser.OwnedFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterClassifier([NotNull] SysMLv2Parser.ClassifierContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitClassifier([NotNull] SysMLv2Parser.ClassifierContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterClassifierDeclaration([NotNull] SysMLv2Parser.ClassifierDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitClassifierDeclaration([NotNull] SysMLv2Parser.ClassifierDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuperclassingPart([NotNull] SysMLv2Parser.SuperclassingPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuperclassingPart([NotNull] SysMLv2Parser.SuperclassingPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubclassification([NotNull] SysMLv2Parser.SubclassificationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubclassification([NotNull] SysMLv2Parser.SubclassificationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedSubclassification([NotNull] SysMLv2Parser.OwnedSubclassificationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedSubclassification([NotNull] SysMLv2Parser.OwnedSubclassificationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeature([NotNull] SysMLv2Parser.FeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeature([NotNull] SysMLv2Parser.FeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEndFeaturePrefix([NotNull] SysMLv2Parser.EndFeaturePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEndFeaturePrefix([NotNull] SysMLv2Parser.EndFeaturePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBasicFeaturePrefix([NotNull] SysMLv2Parser.BasicFeaturePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBasicFeaturePrefix([NotNull] SysMLv2Parser.BasicFeaturePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeaturePrefix([NotNull] SysMLv2Parser.FeaturePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeaturePrefix([NotNull] SysMLv2Parser.FeaturePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedCrossFeatureMember([NotNull] SysMLv2Parser.OwnedCrossFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedCrossFeatureMember([NotNull] SysMLv2Parser.OwnedCrossFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedCrossFeature([NotNull] SysMLv2Parser.OwnedCrossFeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedCrossFeature([NotNull] SysMLv2Parser.OwnedCrossFeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureDirection([NotNull] SysMLv2Parser.FeatureDirectionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureDirection([NotNull] SysMLv2Parser.FeatureDirectionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureDeclaration([NotNull] SysMLv2Parser.FeatureDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureDeclaration([NotNull] SysMLv2Parser.FeatureDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureIdentification([NotNull] SysMLv2Parser.FeatureIdentificationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureIdentification([NotNull] SysMLv2Parser.FeatureIdentificationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureRelationshipPart([NotNull] SysMLv2Parser.FeatureRelationshipPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureRelationshipPart([NotNull] SysMLv2Parser.FeatureRelationshipPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterChainingPart([NotNull] SysMLv2Parser.ChainingPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitChainingPart([NotNull] SysMLv2Parser.ChainingPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInvertingPart([NotNull] SysMLv2Parser.InvertingPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInvertingPart([NotNull] SysMLv2Parser.InvertingPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeFeaturingPart([NotNull] SysMLv2Parser.TypeFeaturingPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeFeaturingPart([NotNull] SysMLv2Parser.TypeFeaturingPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureSpecializationPart([NotNull] SysMLv2Parser.FeatureSpecializationPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureSpecializationPart([NotNull] SysMLv2Parser.FeatureSpecializationPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMultiplicityPart([NotNull] SysMLv2Parser.MultiplicityPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMultiplicityPart([NotNull] SysMLv2Parser.MultiplicityPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureSpecialization([NotNull] SysMLv2Parser.FeatureSpecializationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureSpecialization([NotNull] SysMLv2Parser.FeatureSpecializationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypings([NotNull] SysMLv2Parser.TypingsContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypings([NotNull] SysMLv2Parser.TypingsContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypedBy([NotNull] SysMLv2Parser.TypedByContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypedBy([NotNull] SysMLv2Parser.TypedByContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubsettings([NotNull] SysMLv2Parser.SubsettingsContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubsettings([NotNull] SysMLv2Parser.SubsettingsContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubsets([NotNull] SysMLv2Parser.SubsetsContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubsets([NotNull] SysMLv2Parser.SubsetsContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterReferences([NotNull] SysMLv2Parser.ReferencesContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitReferences([NotNull] SysMLv2Parser.ReferencesContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCrosses([NotNull] SysMLv2Parser.CrossesContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCrosses([NotNull] SysMLv2Parser.CrossesContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRedefinitions([NotNull] SysMLv2Parser.RedefinitionsContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRedefinitions([NotNull] SysMLv2Parser.RedefinitionsContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRedefines([NotNull] SysMLv2Parser.RedefinesContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRedefines([NotNull] SysMLv2Parser.RedefinesContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureTyping([NotNull] SysMLv2Parser.FeatureTypingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureTyping([NotNull] SysMLv2Parser.FeatureTypingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedFeatureTyping([NotNull] SysMLv2Parser.OwnedFeatureTypingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedFeatureTyping([NotNull] SysMLv2Parser.OwnedFeatureTypingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubsetting([NotNull] SysMLv2Parser.SubsettingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubsetting([NotNull] SysMLv2Parser.SubsettingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedSubsetting([NotNull] SysMLv2Parser.OwnedSubsettingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedSubsetting([NotNull] SysMLv2Parser.OwnedSubsettingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedReferenceSubsetting([NotNull] SysMLv2Parser.OwnedReferenceSubsettingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedReferenceSubsetting([NotNull] SysMLv2Parser.OwnedReferenceSubsettingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedCrossSubsetting([NotNull] SysMLv2Parser.OwnedCrossSubsettingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedCrossSubsetting([NotNull] SysMLv2Parser.OwnedCrossSubsettingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRedefinition([NotNull] SysMLv2Parser.RedefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRedefinition([NotNull] SysMLv2Parser.RedefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedRedefinition([NotNull] SysMLv2Parser.OwnedRedefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedRedefinition([NotNull] SysMLv2Parser.OwnedRedefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureInverting([NotNull] SysMLv2Parser.FeatureInvertingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureInverting([NotNull] SysMLv2Parser.FeatureInvertingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedFeatureInverting([NotNull] SysMLv2Parser.OwnedFeatureInvertingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedFeatureInverting([NotNull] SysMLv2Parser.OwnedFeatureInvertingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTypeFeaturing([NotNull] SysMLv2Parser.TypeFeaturingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTypeFeaturing([NotNull] SysMLv2Parser.TypeFeaturingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedTypeFeaturing([NotNull] SysMLv2Parser.OwnedTypeFeaturingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedTypeFeaturing([NotNull] SysMLv2Parser.OwnedTypeFeaturingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDataType([NotNull] SysMLv2Parser.DataTypeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDataType([NotNull] SysMLv2Parser.DataTypeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterClass([NotNull] SysMLv2Parser.ClassContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitClass([NotNull] SysMLv2Parser.ClassContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStructure([NotNull] SysMLv2Parser.StructureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStructure([NotNull] SysMLv2Parser.StructureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssociation([NotNull] SysMLv2Parser.AssociationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssociation([NotNull] SysMLv2Parser.AssociationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssociationStructure([NotNull] SysMLv2Parser.AssociationStructureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssociationStructure([NotNull] SysMLv2Parser.AssociationStructureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnector([NotNull] SysMLv2Parser.ConnectorContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnector([NotNull] SysMLv2Parser.ConnectorContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnectorDeclaration([NotNull] SysMLv2Parser.ConnectorDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnectorDeclaration([NotNull] SysMLv2Parser.ConnectorDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBinaryConnectorDeclaration([NotNull] SysMLv2Parser.BinaryConnectorDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBinaryConnectorDeclaration([NotNull] SysMLv2Parser.BinaryConnectorDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNaryConnectorDeclaration([NotNull] SysMLv2Parser.NaryConnectorDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNaryConnectorDeclaration([NotNull] SysMLv2Parser.NaryConnectorDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnectorEndMember([NotNull] SysMLv2Parser.ConnectorEndMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnectorEndMember([NotNull] SysMLv2Parser.ConnectorEndMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnectorEnd([NotNull] SysMLv2Parser.ConnectorEndContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnectorEnd([NotNull] SysMLv2Parser.ConnectorEndContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedCrossMultiplicityMember([NotNull] SysMLv2Parser.OwnedCrossMultiplicityMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedCrossMultiplicityMember([NotNull] SysMLv2Parser.OwnedCrossMultiplicityMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedCrossMultiplicity([NotNull] SysMLv2Parser.OwnedCrossMultiplicityContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedCrossMultiplicity([NotNull] SysMLv2Parser.OwnedCrossMultiplicityContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBindingConnector([NotNull] SysMLv2Parser.BindingConnectorContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBindingConnector([NotNull] SysMLv2Parser.BindingConnectorContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBindingConnectorDeclaration([NotNull] SysMLv2Parser.BindingConnectorDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBindingConnectorDeclaration([NotNull] SysMLv2Parser.BindingConnectorDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuccession([NotNull] SysMLv2Parser.SuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuccession([NotNull] SysMLv2Parser.SuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuccessionDeclaration([NotNull] SysMLv2Parser.SuccessionDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuccessionDeclaration([NotNull] SysMLv2Parser.SuccessionDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBehavior([NotNull] SysMLv2Parser.BehaviorContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBehavior([NotNull] SysMLv2Parser.BehaviorContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStep([NotNull] SysMLv2Parser.StepContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStep([NotNull] SysMLv2Parser.StepContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFunction([NotNull] SysMLv2Parser.FunctionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFunction([NotNull] SysMLv2Parser.FunctionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFunctionBody([NotNull] SysMLv2Parser.FunctionBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFunctionBody([NotNull] SysMLv2Parser.FunctionBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFunctionBodyPart([NotNull] SysMLv2Parser.FunctionBodyPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFunctionBodyPart([NotNull] SysMLv2Parser.FunctionBodyPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterReturnFeatureMember([NotNull] SysMLv2Parser.ReturnFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitReturnFeatureMember([NotNull] SysMLv2Parser.ReturnFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterResultExpressionMember([NotNull] SysMLv2Parser.ResultExpressionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitResultExpressionMember([NotNull] SysMLv2Parser.ResultExpressionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExpression([NotNull] SysMLv2Parser.ExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExpression([NotNull] SysMLv2Parser.ExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPredicate([NotNull] SysMLv2Parser.PredicateContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPredicate([NotNull] SysMLv2Parser.PredicateContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBooleanExpression([NotNull] SysMLv2Parser.BooleanExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBooleanExpression([NotNull] SysMLv2Parser.BooleanExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInvariant([NotNull] SysMLv2Parser.InvariantContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInvariant([NotNull] SysMLv2Parser.InvariantContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureChainMember([NotNull] SysMLv2Parser.FeatureChainMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureChainMember([NotNull] SysMLv2Parser.FeatureChainMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInteraction([NotNull] SysMLv2Parser.InteractionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInteraction([NotNull] SysMLv2Parser.InteractionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlow([NotNull] SysMLv2Parser.FlowContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlow([NotNull] SysMLv2Parser.FlowContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuccessionFlow([NotNull] SysMLv2Parser.SuccessionFlowContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuccessionFlow([NotNull] SysMLv2Parser.SuccessionFlowContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowDeclaration([NotNull] SysMLv2Parser.FlowDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowDeclaration([NotNull] SysMLv2Parser.FlowDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPayloadFeatureMember([NotNull] SysMLv2Parser.PayloadFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPayloadFeatureMember([NotNull] SysMLv2Parser.PayloadFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPayloadFeature([NotNull] SysMLv2Parser.PayloadFeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPayloadFeature([NotNull] SysMLv2Parser.PayloadFeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPayloadFeatureSpecializationPart([NotNull] SysMLv2Parser.PayloadFeatureSpecializationPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPayloadFeatureSpecializationPart([NotNull] SysMLv2Parser.PayloadFeatureSpecializationPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowEndMember([NotNull] SysMLv2Parser.FlowEndMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowEndMember([NotNull] SysMLv2Parser.FlowEndMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowEnd([NotNull] SysMLv2Parser.FlowEndContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowEnd([NotNull] SysMLv2Parser.FlowEndContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterValuePart([NotNull] SysMLv2Parser.ValuePartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitValuePart([NotNull] SysMLv2Parser.ValuePartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureValue([NotNull] SysMLv2Parser.FeatureValueContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureValue([NotNull] SysMLv2Parser.FeatureValueContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMultiplicity([NotNull] SysMLv2Parser.MultiplicityContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMultiplicity([NotNull] SysMLv2Parser.MultiplicityContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMultiplicitySubset([NotNull] SysMLv2Parser.MultiplicitySubsetContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMultiplicitySubset([NotNull] SysMLv2Parser.MultiplicitySubsetContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMultiplicityRange([NotNull] SysMLv2Parser.MultiplicityRangeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMultiplicityRange([NotNull] SysMLv2Parser.MultiplicityRangeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedMultiplicity([NotNull] SysMLv2Parser.OwnedMultiplicityContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedMultiplicity([NotNull] SysMLv2Parser.OwnedMultiplicityContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOwnedMultiplicityRange([NotNull] SysMLv2Parser.OwnedMultiplicityRangeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOwnedMultiplicityRange([NotNull] SysMLv2Parser.OwnedMultiplicityRangeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMultiplicityBounds([NotNull] SysMLv2Parser.MultiplicityBoundsContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMultiplicityBounds([NotNull] SysMLv2Parser.MultiplicityBoundsContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMultiplicityExpressionMember([NotNull] SysMLv2Parser.MultiplicityExpressionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMultiplicityExpressionMember([NotNull] SysMLv2Parser.MultiplicityExpressionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetaclass([NotNull] SysMLv2Parser.MetaclassContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetaclass([NotNull] SysMLv2Parser.MetaclassContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPrefixMetadataAnnotation([NotNull] SysMLv2Parser.PrefixMetadataAnnotationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPrefixMetadataAnnotation([NotNull] SysMLv2Parser.PrefixMetadataAnnotationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPrefixMetadataMember([NotNull] SysMLv2Parser.PrefixMetadataMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPrefixMetadataMember([NotNull] SysMLv2Parser.PrefixMetadataMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPrefixMetadataFeature([NotNull] SysMLv2Parser.PrefixMetadataFeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPrefixMetadataFeature([NotNull] SysMLv2Parser.PrefixMetadataFeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataFeature([NotNull] SysMLv2Parser.MetadataFeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataFeature([NotNull] SysMLv2Parser.MetadataFeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataFeatureDeclaration([NotNull] SysMLv2Parser.MetadataFeatureDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataFeatureDeclaration([NotNull] SysMLv2Parser.MetadataFeatureDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataBody([NotNull] SysMLv2Parser.MetadataBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataBody([NotNull] SysMLv2Parser.MetadataBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataBodyElement([NotNull] SysMLv2Parser.MetadataBodyElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataBodyElement([NotNull] SysMLv2Parser.MetadataBodyElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataBodyFeatureMember([NotNull] SysMLv2Parser.MetadataBodyFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataBodyFeatureMember([NotNull] SysMLv2Parser.MetadataBodyFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataBodyFeature([NotNull] SysMLv2Parser.MetadataBodyFeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataBodyFeature([NotNull] SysMLv2Parser.MetadataBodyFeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPackage([NotNull] SysMLv2Parser.PackageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPackage([NotNull] SysMLv2Parser.PackageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterLibraryPackage([NotNull] SysMLv2Parser.LibraryPackageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitLibraryPackage([NotNull] SysMLv2Parser.LibraryPackageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPackageDeclaration([NotNull] SysMLv2Parser.PackageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPackageDeclaration([NotNull] SysMLv2Parser.PackageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPackageBody([NotNull] SysMLv2Parser.PackageBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPackageBody([NotNull] SysMLv2Parser.PackageBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterElementFilterMember([NotNull] SysMLv2Parser.ElementFilterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitElementFilterMember([NotNull] SysMLv2Parser.ElementFilterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDependencyDeclaration([NotNull] SysMLv2Parser.DependencyDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDependencyDeclaration([NotNull] SysMLv2Parser.DependencyDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAnnotatingMember([NotNull] SysMLv2Parser.AnnotatingMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAnnotatingMember([NotNull] SysMLv2Parser.AnnotatingMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPackageBodyElement([NotNull] SysMLv2Parser.PackageBodyElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPackageBodyElement([NotNull] SysMLv2Parser.PackageBodyElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPackageMember([NotNull] SysMLv2Parser.PackageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPackageMember([NotNull] SysMLv2Parser.PackageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionElement([NotNull] SysMLv2Parser.DefinitionElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionElement([NotNull] SysMLv2Parser.DefinitionElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsageElement([NotNull] SysMLv2Parser.UsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsageElement([NotNull] SysMLv2Parser.UsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBasicDefinitionPrefix([NotNull] SysMLv2Parser.BasicDefinitionPrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBasicDefinitionPrefix([NotNull] SysMLv2Parser.BasicDefinitionPrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionExtensionKeyword([NotNull] SysMLv2Parser.DefinitionExtensionKeywordContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionExtensionKeyword([NotNull] SysMLv2Parser.DefinitionExtensionKeywordContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionPrefix([NotNull] SysMLv2Parser.DefinitionPrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionPrefix([NotNull] SysMLv2Parser.DefinitionPrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinition([NotNull] SysMLv2Parser.DefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinition([NotNull] SysMLv2Parser.DefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionDeclaration([NotNull] SysMLv2Parser.DefinitionDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionDeclaration([NotNull] SysMLv2Parser.DefinitionDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionBody([NotNull] SysMLv2Parser.DefinitionBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionBody([NotNull] SysMLv2Parser.DefinitionBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionBodyItem([NotNull] SysMLv2Parser.DefinitionBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionBodyItem([NotNull] SysMLv2Parser.DefinitionBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionBodyItemContent([NotNull] SysMLv2Parser.DefinitionBodyItemContentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionBodyItemContent([NotNull] SysMLv2Parser.DefinitionBodyItemContentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefinitionMember([NotNull] SysMLv2Parser.DefinitionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefinitionMember([NotNull] SysMLv2Parser.DefinitionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterVariantUsageMember([NotNull] SysMLv2Parser.VariantUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitVariantUsageMember([NotNull] SysMLv2Parser.VariantUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNonOccurrenceUsageMember([NotNull] SysMLv2Parser.NonOccurrenceUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNonOccurrenceUsageMember([NotNull] SysMLv2Parser.NonOccurrenceUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStructureUsageMember([NotNull] SysMLv2Parser.StructureUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStructureUsageMember([NotNull] SysMLv2Parser.StructureUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBehaviorUsageMember([NotNull] SysMLv2Parser.BehaviorUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBehaviorUsageMember([NotNull] SysMLv2Parser.BehaviorUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRefPrefix([NotNull] SysMLv2Parser.RefPrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRefPrefix([NotNull] SysMLv2Parser.RefPrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBasicUsagePrefix([NotNull] SysMLv2Parser.BasicUsagePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBasicUsagePrefix([NotNull] SysMLv2Parser.BasicUsagePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEndUsagePrefix([NotNull] SysMLv2Parser.EndUsagePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEndUsagePrefix([NotNull] SysMLv2Parser.EndUsagePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsageExtensionKeyword([NotNull] SysMLv2Parser.UsageExtensionKeywordContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsageExtensionKeyword([NotNull] SysMLv2Parser.UsageExtensionKeywordContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUnextendedUsagePrefix([NotNull] SysMLv2Parser.UnextendedUsagePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUnextendedUsagePrefix([NotNull] SysMLv2Parser.UnextendedUsagePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsagePrefix([NotNull] SysMLv2Parser.UsagePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsagePrefix([NotNull] SysMLv2Parser.UsagePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsage([NotNull] SysMLv2Parser.UsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsage([NotNull] SysMLv2Parser.UsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsageDeclaration([NotNull] SysMLv2Parser.UsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsageDeclaration([NotNull] SysMLv2Parser.UsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsageCompletion([NotNull] SysMLv2Parser.UsageCompletionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsageCompletion([NotNull] SysMLv2Parser.UsageCompletionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUsageBody([NotNull] SysMLv2Parser.UsageBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUsageBody([NotNull] SysMLv2Parser.UsageBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefaultReferenceUsage([NotNull] SysMLv2Parser.DefaultReferenceUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefaultReferenceUsage([NotNull] SysMLv2Parser.DefaultReferenceUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterReferenceUsage([NotNull] SysMLv2Parser.ReferenceUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitReferenceUsage([NotNull] SysMLv2Parser.ReferenceUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEndFeatureUsage([NotNull] SysMLv2Parser.EndFeatureUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEndFeatureUsage([NotNull] SysMLv2Parser.EndFeatureUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterVariantReference([NotNull] SysMLv2Parser.VariantReferenceContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitVariantReference([NotNull] SysMLv2Parser.VariantReferenceContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNonOccurrenceUsageElement([NotNull] SysMLv2Parser.NonOccurrenceUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNonOccurrenceUsageElement([NotNull] SysMLv2Parser.NonOccurrenceUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEndOccurrenceUsageElement([NotNull] SysMLv2Parser.EndOccurrenceUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEndOccurrenceUsageElement([NotNull] SysMLv2Parser.EndOccurrenceUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOccurrenceUsageElement([NotNull] SysMLv2Parser.OccurrenceUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOccurrenceUsageElement([NotNull] SysMLv2Parser.OccurrenceUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStructureUsageElement([NotNull] SysMLv2Parser.StructureUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStructureUsageElement([NotNull] SysMLv2Parser.StructureUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBehaviorUsageElement([NotNull] SysMLv2Parser.BehaviorUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBehaviorUsageElement([NotNull] SysMLv2Parser.BehaviorUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterVariantUsageElement([NotNull] SysMLv2Parser.VariantUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitVariantUsageElement([NotNull] SysMLv2Parser.VariantUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubclassificationPart([NotNull] SysMLv2Parser.SubclassificationPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubclassificationPart([NotNull] SysMLv2Parser.SubclassificationPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAttributeDefinition([NotNull] SysMLv2Parser.AttributeDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAttributeDefinition([NotNull] SysMLv2Parser.AttributeDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAttributeUsage([NotNull] SysMLv2Parser.AttributeUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAttributeUsage([NotNull] SysMLv2Parser.AttributeUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEnumerationDefinition([NotNull] SysMLv2Parser.EnumerationDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEnumerationDefinition([NotNull] SysMLv2Parser.EnumerationDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEnumerationBody([NotNull] SysMLv2Parser.EnumerationBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEnumerationBody([NotNull] SysMLv2Parser.EnumerationBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEnumerationUsageMember([NotNull] SysMLv2Parser.EnumerationUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEnumerationUsageMember([NotNull] SysMLv2Parser.EnumerationUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEnumeratedValue([NotNull] SysMLv2Parser.EnumeratedValueContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEnumeratedValue([NotNull] SysMLv2Parser.EnumeratedValueContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEnumerationUsage([NotNull] SysMLv2Parser.EnumerationUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEnumerationUsage([NotNull] SysMLv2Parser.EnumerationUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOccurrenceDefinitionPrefix([NotNull] SysMLv2Parser.OccurrenceDefinitionPrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOccurrenceDefinitionPrefix([NotNull] SysMLv2Parser.OccurrenceDefinitionPrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOccurrenceDefinition([NotNull] SysMLv2Parser.OccurrenceDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOccurrenceDefinition([NotNull] SysMLv2Parser.OccurrenceDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIndividualDefinition([NotNull] SysMLv2Parser.IndividualDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIndividualDefinition([NotNull] SysMLv2Parser.IndividualDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyMultiplicityMember([NotNull] SysMLv2Parser.EmptyMultiplicityMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyMultiplicityMember([NotNull] SysMLv2Parser.EmptyMultiplicityMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOccurrenceUsagePrefix([NotNull] SysMLv2Parser.OccurrenceUsagePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOccurrenceUsagePrefix([NotNull] SysMLv2Parser.OccurrenceUsagePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterOccurrenceUsage([NotNull] SysMLv2Parser.OccurrenceUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitOccurrenceUsage([NotNull] SysMLv2Parser.OccurrenceUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIndividualUsage([NotNull] SysMLv2Parser.IndividualUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIndividualUsage([NotNull] SysMLv2Parser.IndividualUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPortionUsage([NotNull] SysMLv2Parser.PortionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPortionUsage([NotNull] SysMLv2Parser.PortionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPortionKind([NotNull] SysMLv2Parser.PortionKindContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPortionKind([NotNull] SysMLv2Parser.PortionKindContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEventOccurrenceUsage([NotNull] SysMLv2Parser.EventOccurrenceUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEventOccurrenceUsage([NotNull] SysMLv2Parser.EventOccurrenceUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSourceSuccessionMember([NotNull] SysMLv2Parser.SourceSuccessionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSourceSuccessionMember([NotNull] SysMLv2Parser.SourceSuccessionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSourceSuccession([NotNull] SysMLv2Parser.SourceSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSourceSuccession([NotNull] SysMLv2Parser.SourceSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSourceEndMember([NotNull] SysMLv2Parser.SourceEndMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSourceEndMember([NotNull] SysMLv2Parser.SourceEndMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSourceEnd([NotNull] SysMLv2Parser.SourceEndContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSourceEnd([NotNull] SysMLv2Parser.SourceEndContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterItemDefinition([NotNull] SysMLv2Parser.ItemDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitItemDefinition([NotNull] SysMLv2Parser.ItemDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterItemUsage([NotNull] SysMLv2Parser.ItemUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitItemUsage([NotNull] SysMLv2Parser.ItemUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPartDefinition([NotNull] SysMLv2Parser.PartDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPartDefinition([NotNull] SysMLv2Parser.PartDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPartUsage([NotNull] SysMLv2Parser.PartUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPartUsage([NotNull] SysMLv2Parser.PartUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPortDefinition([NotNull] SysMLv2Parser.PortDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPortDefinition([NotNull] SysMLv2Parser.PortDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConjugatedPortDefinitionMember([NotNull] SysMLv2Parser.ConjugatedPortDefinitionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConjugatedPortDefinitionMember([NotNull] SysMLv2Parser.ConjugatedPortDefinitionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConjugatedPortDefinition([NotNull] SysMLv2Parser.ConjugatedPortDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConjugatedPortDefinition([NotNull] SysMLv2Parser.ConjugatedPortDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPortUsage([NotNull] SysMLv2Parser.PortUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPortUsage([NotNull] SysMLv2Parser.PortUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConjugatedPortTyping([NotNull] SysMLv2Parser.ConjugatedPortTypingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConjugatedPortTyping([NotNull] SysMLv2Parser.ConjugatedPortTypingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnectionDefinition([NotNull] SysMLv2Parser.ConnectionDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnectionDefinition([NotNull] SysMLv2Parser.ConnectionDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnectionUsage([NotNull] SysMLv2Parser.ConnectionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnectionUsage([NotNull] SysMLv2Parser.ConnectionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConnectorPart([NotNull] SysMLv2Parser.ConnectorPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConnectorPart([NotNull] SysMLv2Parser.ConnectorPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBinaryConnectorPart([NotNull] SysMLv2Parser.BinaryConnectorPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBinaryConnectorPart([NotNull] SysMLv2Parser.BinaryConnectorPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNaryConnectorPart([NotNull] SysMLv2Parser.NaryConnectorPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNaryConnectorPart([NotNull] SysMLv2Parser.NaryConnectorPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBindingConnectorAsUsage([NotNull] SysMLv2Parser.BindingConnectorAsUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBindingConnectorAsUsage([NotNull] SysMLv2Parser.BindingConnectorAsUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuccessionAsUsage([NotNull] SysMLv2Parser.SuccessionAsUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuccessionAsUsage([NotNull] SysMLv2Parser.SuccessionAsUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceDefinition([NotNull] SysMLv2Parser.InterfaceDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceDefinition([NotNull] SysMLv2Parser.InterfaceDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceBody([NotNull] SysMLv2Parser.InterfaceBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceBody([NotNull] SysMLv2Parser.InterfaceBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceBodyItem([NotNull] SysMLv2Parser.InterfaceBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceBodyItem([NotNull] SysMLv2Parser.InterfaceBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceNonOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceNonOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceNonOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceNonOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefaultInterfaceEnd([NotNull] SysMLv2Parser.DefaultInterfaceEndContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefaultInterfaceEnd([NotNull] SysMLv2Parser.DefaultInterfaceEndContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceUsage([NotNull] SysMLv2Parser.InterfaceUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceUsage([NotNull] SysMLv2Parser.InterfaceUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceUsageDeclaration([NotNull] SysMLv2Parser.InterfaceUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceUsageDeclaration([NotNull] SysMLv2Parser.InterfaceUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfacePart([NotNull] SysMLv2Parser.InterfacePartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfacePart([NotNull] SysMLv2Parser.InterfacePartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterBinaryInterfacePart([NotNull] SysMLv2Parser.BinaryInterfacePartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitBinaryInterfacePart([NotNull] SysMLv2Parser.BinaryInterfacePartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNaryInterfacePart([NotNull] SysMLv2Parser.NaryInterfacePartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNaryInterfacePart([NotNull] SysMLv2Parser.NaryInterfacePartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceEndMember([NotNull] SysMLv2Parser.InterfaceEndMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceEndMember([NotNull] SysMLv2Parser.InterfaceEndMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInterfaceEnd([NotNull] SysMLv2Parser.InterfaceEndContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInterfaceEnd([NotNull] SysMLv2Parser.InterfaceEndContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAllocationDefinition([NotNull] SysMLv2Parser.AllocationDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAllocationDefinition([NotNull] SysMLv2Parser.AllocationDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAllocationUsage([NotNull] SysMLv2Parser.AllocationUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAllocationUsage([NotNull] SysMLv2Parser.AllocationUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAllocationUsageDeclaration([NotNull] SysMLv2Parser.AllocationUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAllocationUsageDeclaration([NotNull] SysMLv2Parser.AllocationUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowDefinition([NotNull] SysMLv2Parser.FlowDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowDefinition([NotNull] SysMLv2Parser.FlowDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMessage([NotNull] SysMLv2Parser.MessageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMessage([NotNull] SysMLv2Parser.MessageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMessageDeclaration([NotNull] SysMLv2Parser.MessageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMessageDeclaration([NotNull] SysMLv2Parser.MessageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMessageEventMember([NotNull] SysMLv2Parser.MessageEventMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMessageEventMember([NotNull] SysMLv2Parser.MessageEventMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMessageEvent([NotNull] SysMLv2Parser.MessageEventContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMessageEvent([NotNull] SysMLv2Parser.MessageEventContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowUsage([NotNull] SysMLv2Parser.FlowUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowUsage([NotNull] SysMLv2Parser.FlowUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuccessionFlowUsage([NotNull] SysMLv2Parser.SuccessionFlowUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuccessionFlowUsage([NotNull] SysMLv2Parser.SuccessionFlowUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowPayloadFeatureMember([NotNull] SysMLv2Parser.FlowPayloadFeatureMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowPayloadFeatureMember([NotNull] SysMLv2Parser.FlowPayloadFeatureMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFlowPayloadFeature([NotNull] SysMLv2Parser.FlowPayloadFeatureContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFlowPayloadFeature([NotNull] SysMLv2Parser.FlowPayloadFeatureContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionDefinition([NotNull] SysMLv2Parser.ActionDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionDefinition([NotNull] SysMLv2Parser.ActionDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionBody([NotNull] SysMLv2Parser.ActionBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionBody([NotNull] SysMLv2Parser.ActionBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionBodyItem([NotNull] SysMLv2Parser.ActionBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionBodyItem([NotNull] SysMLv2Parser.ActionBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNonBehaviorBodyItem([NotNull] SysMLv2Parser.NonBehaviorBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNonBehaviorBodyItem([NotNull] SysMLv2Parser.NonBehaviorBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionBehaviorMember([NotNull] SysMLv2Parser.ActionBehaviorMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionBehaviorMember([NotNull] SysMLv2Parser.ActionBehaviorMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterInitialNodeMember([NotNull] SysMLv2Parser.InitialNodeMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitInitialNodeMember([NotNull] SysMLv2Parser.InitialNodeMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionNodeMember([NotNull] SysMLv2Parser.ActionNodeMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionNodeMember([NotNull] SysMLv2Parser.ActionNodeMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionTargetSuccessionMember([NotNull] SysMLv2Parser.ActionTargetSuccessionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionTargetSuccessionMember([NotNull] SysMLv2Parser.ActionTargetSuccessionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGuardedSuccessionMember([NotNull] SysMLv2Parser.GuardedSuccessionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGuardedSuccessionMember([NotNull] SysMLv2Parser.GuardedSuccessionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionUsage([NotNull] SysMLv2Parser.ActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionUsage([NotNull] SysMLv2Parser.ActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionUsageDeclaration([NotNull] SysMLv2Parser.ActionUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionUsageDeclaration([NotNull] SysMLv2Parser.ActionUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPerformActionUsage([NotNull] SysMLv2Parser.PerformActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPerformActionUsage([NotNull] SysMLv2Parser.PerformActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPerformActionUsageDeclaration([NotNull] SysMLv2Parser.PerformActionUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPerformActionUsageDeclaration([NotNull] SysMLv2Parser.PerformActionUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionNode([NotNull] SysMLv2Parser.ActionNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionNode([NotNull] SysMLv2Parser.ActionNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionNodeUsageDeclaration([NotNull] SysMLv2Parser.ActionNodeUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionNodeUsageDeclaration([NotNull] SysMLv2Parser.ActionNodeUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionNodePrefix([NotNull] SysMLv2Parser.ActionNodePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionNodePrefix([NotNull] SysMLv2Parser.ActionNodePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterControlNode([NotNull] SysMLv2Parser.ControlNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitControlNode([NotNull] SysMLv2Parser.ControlNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterControlNodePrefix([NotNull] SysMLv2Parser.ControlNodePrefixContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitControlNodePrefix([NotNull] SysMLv2Parser.ControlNodePrefixContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMergeNode([NotNull] SysMLv2Parser.MergeNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMergeNode([NotNull] SysMLv2Parser.MergeNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDecisionNode([NotNull] SysMLv2Parser.DecisionNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDecisionNode([NotNull] SysMLv2Parser.DecisionNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterJoinNode([NotNull] SysMLv2Parser.JoinNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitJoinNode([NotNull] SysMLv2Parser.JoinNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterForkNode([NotNull] SysMLv2Parser.ForkNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitForkNode([NotNull] SysMLv2Parser.ForkNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAcceptNode([NotNull] SysMLv2Parser.AcceptNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAcceptNode([NotNull] SysMLv2Parser.AcceptNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAcceptNodeDeclaration([NotNull] SysMLv2Parser.AcceptNodeDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAcceptNodeDeclaration([NotNull] SysMLv2Parser.AcceptNodeDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAcceptParameterPart([NotNull] SysMLv2Parser.AcceptParameterPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAcceptParameterPart([NotNull] SysMLv2Parser.AcceptParameterPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPayloadParameterMember([NotNull] SysMLv2Parser.PayloadParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPayloadParameterMember([NotNull] SysMLv2Parser.PayloadParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPayloadParameter([NotNull] SysMLv2Parser.PayloadParameterContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPayloadParameter([NotNull] SysMLv2Parser.PayloadParameterContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTriggerValuePart([NotNull] SysMLv2Parser.TriggerValuePartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTriggerValuePart([NotNull] SysMLv2Parser.TriggerValuePartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTriggerFeatureValue([NotNull] SysMLv2Parser.TriggerFeatureValueContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTriggerFeatureValue([NotNull] SysMLv2Parser.TriggerFeatureValueContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTriggerExpression([NotNull] SysMLv2Parser.TriggerExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTriggerExpression([NotNull] SysMLv2Parser.TriggerExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSendNode([NotNull] SysMLv2Parser.SendNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSendNode([NotNull] SysMLv2Parser.SendNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSendNodeDeclaration([NotNull] SysMLv2Parser.SendNodeDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSendNodeDeclaration([NotNull] SysMLv2Parser.SendNodeDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSenderReceiverPart([NotNull] SysMLv2Parser.SenderReceiverPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSenderReceiverPart([NotNull] SysMLv2Parser.SenderReceiverPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNodeParameterMember([NotNull] SysMLv2Parser.NodeParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNodeParameterMember([NotNull] SysMLv2Parser.NodeParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNodeParameter([NotNull] SysMLv2Parser.NodeParameterContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNodeParameter([NotNull] SysMLv2Parser.NodeParameterContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFeatureBinding([NotNull] SysMLv2Parser.FeatureBindingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFeatureBinding([NotNull] SysMLv2Parser.FeatureBindingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyParameterMember([NotNull] SysMLv2Parser.EmptyParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyParameterMember([NotNull] SysMLv2Parser.EmptyParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignmentNode([NotNull] SysMLv2Parser.AssignmentNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignmentNode([NotNull] SysMLv2Parser.AssignmentNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignmentNodeDeclaration([NotNull] SysMLv2Parser.AssignmentNodeDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignmentNodeDeclaration([NotNull] SysMLv2Parser.AssignmentNodeDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignmentTargetMember([NotNull] SysMLv2Parser.AssignmentTargetMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignmentTargetMember([NotNull] SysMLv2Parser.AssignmentTargetMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignmentTargetParameter([NotNull] SysMLv2Parser.AssignmentTargetParameterContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignmentTargetParameter([NotNull] SysMLv2Parser.AssignmentTargetParameterContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignmentTargetBinding([NotNull] SysMLv2Parser.AssignmentTargetBindingContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignmentTargetBinding([NotNull] SysMLv2Parser.AssignmentTargetBindingContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTerminateNode([NotNull] SysMLv2Parser.TerminateNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTerminateNode([NotNull] SysMLv2Parser.TerminateNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIfNode([NotNull] SysMLv2Parser.IfNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIfNode([NotNull] SysMLv2Parser.IfNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExpressionParameterMember([NotNull] SysMLv2Parser.ExpressionParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExpressionParameterMember([NotNull] SysMLv2Parser.ExpressionParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionBodyParameterMember([NotNull] SysMLv2Parser.ActionBodyParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionBodyParameterMember([NotNull] SysMLv2Parser.ActionBodyParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionBodyParameter([NotNull] SysMLv2Parser.ActionBodyParameterContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionBodyParameter([NotNull] SysMLv2Parser.ActionBodyParameterContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIfNodeParameterMember([NotNull] SysMLv2Parser.IfNodeParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIfNodeParameterMember([NotNull] SysMLv2Parser.IfNodeParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterWhileLoopNode([NotNull] SysMLv2Parser.WhileLoopNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitWhileLoopNode([NotNull] SysMLv2Parser.WhileLoopNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterForLoopNode([NotNull] SysMLv2Parser.ForLoopNodeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitForLoopNode([NotNull] SysMLv2Parser.ForLoopNodeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterForVariableDeclarationMember([NotNull] SysMLv2Parser.ForVariableDeclarationMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitForVariableDeclarationMember([NotNull] SysMLv2Parser.ForVariableDeclarationMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActionTargetSuccession([NotNull] SysMLv2Parser.ActionTargetSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActionTargetSuccession([NotNull] SysMLv2Parser.ActionTargetSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTargetSuccession([NotNull] SysMLv2Parser.TargetSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTargetSuccession([NotNull] SysMLv2Parser.TargetSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGuardedTargetSuccession([NotNull] SysMLv2Parser.GuardedTargetSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGuardedTargetSuccession([NotNull] SysMLv2Parser.GuardedTargetSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDefaultTargetSuccession([NotNull] SysMLv2Parser.DefaultTargetSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDefaultTargetSuccession([NotNull] SysMLv2Parser.DefaultTargetSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGuardedSuccession([NotNull] SysMLv2Parser.GuardedSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGuardedSuccession([NotNull] SysMLv2Parser.GuardedSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateDefinition([NotNull] SysMLv2Parser.StateDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateDefinition([NotNull] SysMLv2Parser.StateDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateDefBody([NotNull] SysMLv2Parser.StateDefBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateDefBody([NotNull] SysMLv2Parser.StateDefBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateBodyItem([NotNull] SysMLv2Parser.StateBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateBodyItem([NotNull] SysMLv2Parser.StateBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEntryActionMember([NotNull] SysMLv2Parser.EntryActionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEntryActionMember([NotNull] SysMLv2Parser.EntryActionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDoActionMember([NotNull] SysMLv2Parser.DoActionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDoActionMember([NotNull] SysMLv2Parser.DoActionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExitActionMember([NotNull] SysMLv2Parser.ExitActionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExitActionMember([NotNull] SysMLv2Parser.ExitActionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEntryTransitionMember([NotNull] SysMLv2Parser.EntryTransitionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEntryTransitionMember([NotNull] SysMLv2Parser.EntryTransitionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateActionUsage([NotNull] SysMLv2Parser.StateActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateActionUsage([NotNull] SysMLv2Parser.StateActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStatePerformActionUsage([NotNull] SysMLv2Parser.StatePerformActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStatePerformActionUsage([NotNull] SysMLv2Parser.StatePerformActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateAcceptActionUsage([NotNull] SysMLv2Parser.StateAcceptActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateAcceptActionUsage([NotNull] SysMLv2Parser.StateAcceptActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateSendActionUsage([NotNull] SysMLv2Parser.StateSendActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateSendActionUsage([NotNull] SysMLv2Parser.StateSendActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateAssignmentActionUsage([NotNull] SysMLv2Parser.StateAssignmentActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateAssignmentActionUsage([NotNull] SysMLv2Parser.StateAssignmentActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionUsageMember([NotNull] SysMLv2Parser.TransitionUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionUsageMember([NotNull] SysMLv2Parser.TransitionUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTargetTransitionUsageMember([NotNull] SysMLv2Parser.TargetTransitionUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTargetTransitionUsageMember([NotNull] SysMLv2Parser.TargetTransitionUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateUsage([NotNull] SysMLv2Parser.StateUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateUsage([NotNull] SysMLv2Parser.StateUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStateUsageBody([NotNull] SysMLv2Parser.StateUsageBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStateUsageBody([NotNull] SysMLv2Parser.StateUsageBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExhibitStateUsage([NotNull] SysMLv2Parser.ExhibitStateUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExhibitStateUsage([NotNull] SysMLv2Parser.ExhibitStateUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionUsage([NotNull] SysMLv2Parser.TransitionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionUsage([NotNull] SysMLv2Parser.TransitionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTargetTransitionUsage([NotNull] SysMLv2Parser.TargetTransitionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTargetTransitionUsage([NotNull] SysMLv2Parser.TargetTransitionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTriggerActionMember([NotNull] SysMLv2Parser.TriggerActionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTriggerActionMember([NotNull] SysMLv2Parser.TriggerActionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTriggerAction([NotNull] SysMLv2Parser.TriggerActionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTriggerAction([NotNull] SysMLv2Parser.TriggerActionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGuardExpressionMember([NotNull] SysMLv2Parser.GuardExpressionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGuardExpressionMember([NotNull] SysMLv2Parser.GuardExpressionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEffectBehaviorMember([NotNull] SysMLv2Parser.EffectBehaviorMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEffectBehaviorMember([NotNull] SysMLv2Parser.EffectBehaviorMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEffectBehaviorUsage([NotNull] SysMLv2Parser.EffectBehaviorUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEffectBehaviorUsage([NotNull] SysMLv2Parser.EffectBehaviorUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionPerformActionUsage([NotNull] SysMLv2Parser.TransitionPerformActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionPerformActionUsage([NotNull] SysMLv2Parser.TransitionPerformActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionAcceptActionUsage([NotNull] SysMLv2Parser.TransitionAcceptActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionAcceptActionUsage([NotNull] SysMLv2Parser.TransitionAcceptActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionSendActionUsage([NotNull] SysMLv2Parser.TransitionSendActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionSendActionUsage([NotNull] SysMLv2Parser.TransitionSendActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionAssignmentActionUsage([NotNull] SysMLv2Parser.TransitionAssignmentActionUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionAssignmentActionUsage([NotNull] SysMLv2Parser.TransitionAssignmentActionUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionSuccessionMember([NotNull] SysMLv2Parser.TransitionSuccessionMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionSuccessionMember([NotNull] SysMLv2Parser.TransitionSuccessionMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTransitionSuccession([NotNull] SysMLv2Parser.TransitionSuccessionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTransitionSuccession([NotNull] SysMLv2Parser.TransitionSuccessionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyEndMember([NotNull] SysMLv2Parser.EmptyEndMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyEndMember([NotNull] SysMLv2Parser.EmptyEndMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCalculationDefinition([NotNull] SysMLv2Parser.CalculationDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCalculationDefinition([NotNull] SysMLv2Parser.CalculationDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCalculationUsage([NotNull] SysMLv2Parser.CalculationUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCalculationUsage([NotNull] SysMLv2Parser.CalculationUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCalculationBody([NotNull] SysMLv2Parser.CalculationBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCalculationBody([NotNull] SysMLv2Parser.CalculationBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCalculationBodyPart([NotNull] SysMLv2Parser.CalculationBodyPartContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCalculationBodyPart([NotNull] SysMLv2Parser.CalculationBodyPartContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCalculationBodyItem([NotNull] SysMLv2Parser.CalculationBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCalculationBodyItem([NotNull] SysMLv2Parser.CalculationBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterReturnParameterMember([NotNull] SysMLv2Parser.ReturnParameterMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitReturnParameterMember([NotNull] SysMLv2Parser.ReturnParameterMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConstraintDefinition([NotNull] SysMLv2Parser.ConstraintDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConstraintDefinition([NotNull] SysMLv2Parser.ConstraintDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConstraintUsage([NotNull] SysMLv2Parser.ConstraintUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConstraintUsage([NotNull] SysMLv2Parser.ConstraintUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssertConstraintUsage([NotNull] SysMLv2Parser.AssertConstraintUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssertConstraintUsage([NotNull] SysMLv2Parser.AssertConstraintUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConstraintUsageDeclaration([NotNull] SysMLv2Parser.ConstraintUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConstraintUsageDeclaration([NotNull] SysMLv2Parser.ConstraintUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementDefinition([NotNull] SysMLv2Parser.RequirementDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementDefinition([NotNull] SysMLv2Parser.RequirementDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementBody([NotNull] SysMLv2Parser.RequirementBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementBody([NotNull] SysMLv2Parser.RequirementBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementBodyItem([NotNull] SysMLv2Parser.RequirementBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementBodyItem([NotNull] SysMLv2Parser.RequirementBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubjectMember([NotNull] SysMLv2Parser.SubjectMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubjectMember([NotNull] SysMLv2Parser.SubjectMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSubjectUsage([NotNull] SysMLv2Parser.SubjectUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSubjectUsage([NotNull] SysMLv2Parser.SubjectUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementConstraintMember([NotNull] SysMLv2Parser.RequirementConstraintMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementConstraintMember([NotNull] SysMLv2Parser.RequirementConstraintMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementKind([NotNull] SysMLv2Parser.RequirementKindContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementKind([NotNull] SysMLv2Parser.RequirementKindContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementConstraintUsage([NotNull] SysMLv2Parser.RequirementConstraintUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementConstraintUsage([NotNull] SysMLv2Parser.RequirementConstraintUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFramedConcernMember([NotNull] SysMLv2Parser.FramedConcernMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFramedConcernMember([NotNull] SysMLv2Parser.FramedConcernMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFramedConcernUsage([NotNull] SysMLv2Parser.FramedConcernUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFramedConcernUsage([NotNull] SysMLv2Parser.FramedConcernUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActorMember([NotNull] SysMLv2Parser.ActorMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActorMember([NotNull] SysMLv2Parser.ActorMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterActorUsage([NotNull] SysMLv2Parser.ActorUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitActorUsage([NotNull] SysMLv2Parser.ActorUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStakeholderMember([NotNull] SysMLv2Parser.StakeholderMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStakeholderMember([NotNull] SysMLv2Parser.StakeholderMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterStakeholderUsage([NotNull] SysMLv2Parser.StakeholderUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitStakeholderUsage([NotNull] SysMLv2Parser.StakeholderUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementUsage([NotNull] SysMLv2Parser.RequirementUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementUsage([NotNull] SysMLv2Parser.RequirementUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSatisfyRequirementUsage([NotNull] SysMLv2Parser.SatisfyRequirementUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSatisfyRequirementUsage([NotNull] SysMLv2Parser.SatisfyRequirementUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSatisfactionSubjectMember([NotNull] SysMLv2Parser.SatisfactionSubjectMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSatisfactionSubjectMember([NotNull] SysMLv2Parser.SatisfactionSubjectMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSatisfactionParameter([NotNull] SysMLv2Parser.SatisfactionParameterContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSatisfactionParameter([NotNull] SysMLv2Parser.SatisfactionParameterContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSatisfactionFeatureValue([NotNull] SysMLv2Parser.SatisfactionFeatureValueContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSatisfactionFeatureValue([NotNull] SysMLv2Parser.SatisfactionFeatureValueContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSatisfactionReferenceExpression([NotNull] SysMLv2Parser.SatisfactionReferenceExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSatisfactionReferenceExpression([NotNull] SysMLv2Parser.SatisfactionReferenceExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConcernDefinition([NotNull] SysMLv2Parser.ConcernDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConcernDefinition([NotNull] SysMLv2Parser.ConcernDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterConcernUsage([NotNull] SysMLv2Parser.ConcernUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitConcernUsage([NotNull] SysMLv2Parser.ConcernUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCaseDefinition([NotNull] SysMLv2Parser.CaseDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCaseDefinition([NotNull] SysMLv2Parser.CaseDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCaseUsage([NotNull] SysMLv2Parser.CaseUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCaseUsage([NotNull] SysMLv2Parser.CaseUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCaseBody([NotNull] SysMLv2Parser.CaseBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCaseBody([NotNull] SysMLv2Parser.CaseBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCaseBodyItem([NotNull] SysMLv2Parser.CaseBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCaseBodyItem([NotNull] SysMLv2Parser.CaseBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterObjectiveMember([NotNull] SysMLv2Parser.ObjectiveMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitObjectiveMember([NotNull] SysMLv2Parser.ObjectiveMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterObjectiveRequirementUsage([NotNull] SysMLv2Parser.ObjectiveRequirementUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitObjectiveRequirementUsage([NotNull] SysMLv2Parser.ObjectiveRequirementUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAnalysisCaseDefinition([NotNull] SysMLv2Parser.AnalysisCaseDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAnalysisCaseDefinition([NotNull] SysMLv2Parser.AnalysisCaseDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAnalysisCaseUsage([NotNull] SysMLv2Parser.AnalysisCaseUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAnalysisCaseUsage([NotNull] SysMLv2Parser.AnalysisCaseUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterVerificationCaseDefinition([NotNull] SysMLv2Parser.VerificationCaseDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitVerificationCaseDefinition([NotNull] SysMLv2Parser.VerificationCaseDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterVerificationCaseUsage([NotNull] SysMLv2Parser.VerificationCaseUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitVerificationCaseUsage([NotNull] SysMLv2Parser.VerificationCaseUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementVerificationMember([NotNull] SysMLv2Parser.RequirementVerificationMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementVerificationMember([NotNull] SysMLv2Parser.RequirementVerificationMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRequirementVerificationUsage([NotNull] SysMLv2Parser.RequirementVerificationUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRequirementVerificationUsage([NotNull] SysMLv2Parser.RequirementVerificationUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUseCaseDefinition([NotNull] SysMLv2Parser.UseCaseDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUseCaseDefinition([NotNull] SysMLv2Parser.UseCaseDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterUseCaseUsage([NotNull] SysMLv2Parser.UseCaseUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitUseCaseUsage([NotNull] SysMLv2Parser.UseCaseUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIncludeUseCaseUsage([NotNull] SysMLv2Parser.IncludeUseCaseUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIncludeUseCaseUsage([NotNull] SysMLv2Parser.IncludeUseCaseUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewDefinition([NotNull] SysMLv2Parser.ViewDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewDefinition([NotNull] SysMLv2Parser.ViewDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewDefinitionBody([NotNull] SysMLv2Parser.ViewDefinitionBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewDefinitionBody([NotNull] SysMLv2Parser.ViewDefinitionBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewDefinitionBodyItem([NotNull] SysMLv2Parser.ViewDefinitionBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewDefinitionBodyItem([NotNull] SysMLv2Parser.ViewDefinitionBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewRenderingMember([NotNull] SysMLv2Parser.ViewRenderingMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewRenderingMember([NotNull] SysMLv2Parser.ViewRenderingMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewRenderingUsage([NotNull] SysMLv2Parser.ViewRenderingUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewRenderingUsage([NotNull] SysMLv2Parser.ViewRenderingUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewUsage([NotNull] SysMLv2Parser.ViewUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewUsage([NotNull] SysMLv2Parser.ViewUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewBody([NotNull] SysMLv2Parser.ViewBodyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewBody([NotNull] SysMLv2Parser.ViewBodyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewBodyItem([NotNull] SysMLv2Parser.ViewBodyItemContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewBodyItem([NotNull] SysMLv2Parser.ViewBodyItemContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExpose([NotNull] SysMLv2Parser.ExposeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExpose([NotNull] SysMLv2Parser.ExposeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMembershipExpose([NotNull] SysMLv2Parser.MembershipExposeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMembershipExpose([NotNull] SysMLv2Parser.MembershipExposeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceExpose([NotNull] SysMLv2Parser.NamespaceExposeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceExpose([NotNull] SysMLv2Parser.NamespaceExposeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewpointDefinition([NotNull] SysMLv2Parser.ViewpointDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewpointDefinition([NotNull] SysMLv2Parser.ViewpointDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterViewpointUsage([NotNull] SysMLv2Parser.ViewpointUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitViewpointUsage([NotNull] SysMLv2Parser.ViewpointUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRenderingDefinition([NotNull] SysMLv2Parser.RenderingDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRenderingDefinition([NotNull] SysMLv2Parser.RenderingDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRenderingUsage([NotNull] SysMLv2Parser.RenderingUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRenderingUsage([NotNull] SysMLv2Parser.RenderingUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataDefinition([NotNull] SysMLv2Parser.MetadataDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataDefinition([NotNull] SysMLv2Parser.MetadataDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPrefixMetadataUsage([NotNull] SysMLv2Parser.PrefixMetadataUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPrefixMetadataUsage([NotNull] SysMLv2Parser.PrefixMetadataUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataBodyUsageMember([NotNull] SysMLv2Parser.MetadataBodyUsageMemberContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataBodyUsageMember([NotNull] SysMLv2Parser.MetadataBodyUsageMemberContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterMetadataBodyUsage([NotNull] SysMLv2Parser.MetadataBodyUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitMetadataBodyUsage([NotNull] SysMLv2Parser.MetadataBodyUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExtendedDefinition([NotNull] SysMLv2Parser.ExtendedDefinitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExtendedDefinition([NotNull] SysMLv2Parser.ExtendedDefinitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterExtendedUsage([NotNull] SysMLv2Parser.ExtendedUsageContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitExtendedUsage([NotNull] SysMLv2Parser.ExtendedUsageContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFilterPackageImportDeclaration([NotNull] SysMLv2Parser.FilterPackageImportDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFilterPackageImportDeclaration([NotNull] SysMLv2Parser.FilterPackageImportDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNamespaceImportDirect([NotNull] SysMLv2Parser.NamespaceImportDirectContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNamespaceImportDirect([NotNull] SysMLv2Parser.NamespaceImportDirectContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCalculationUsageDeclaration([NotNull] SysMLv2Parser.CalculationUsageDeclarationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCalculationUsageDeclaration([NotNull] SysMLv2Parser.CalculationUsageDeclarationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyActionUsage_([NotNull] SysMLv2Parser.EmptyActionUsage_Context context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyActionUsage_([NotNull] SysMLv2Parser.EmptyActionUsage_Context context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyFeature_([NotNull] SysMLv2Parser.EmptyFeature_Context context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyFeature_([NotNull] SysMLv2Parser.EmptyFeature_Context context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyMultiplicity_([NotNull] SysMLv2Parser.EmptyMultiplicity_Context context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyMultiplicity_([NotNull] SysMLv2Parser.EmptyMultiplicity_Context context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterEmptyUsage_([NotNull] SysMLv2Parser.EmptyUsage_Context context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitEmptyUsage_([NotNull] SysMLv2Parser.EmptyUsage_Context context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterFilterPackageImport([NotNull] SysMLv2Parser.FilterPackageImportContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitFilterPackageImport([NotNull] SysMLv2Parser.FilterPackageImportContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNonFeatureChainPrimaryExpression([NotNull] SysMLv2Parser.NonFeatureChainPrimaryExpressionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNonFeatureChainPrimaryExpression([NotNull] SysMLv2Parser.NonFeatureChainPrimaryExpressionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterPortConjugation([NotNull] SysMLv2Parser.PortConjugationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitPortConjugation([NotNull] SysMLv2Parser.PortConjugationContext context); +} +} // namespace DemaConsulting.SysML2Tools.Parser.Antlr diff --git a/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserVisitor.cs b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserVisitor.cs new file mode 100644 index 00000000..35062e5a --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Parser/Antlr/SysMLv2ParserVisitor.cs @@ -0,0 +1,2748 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/work/DemaConsulting/BuildTools/SysML2Tools/src/DemaConsulting.SysML2Tools/Grammar/SysMLv2Parser.g4 by ANTLR 4.13.1 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace DemaConsulting.SysML2Tools.Parser.Antlr { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete generic visitor for a parse tree produced +/// by . +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")] +[System.CLSCompliant(false)] +public interface ISysMLv2ParserVisitor : IParseTreeVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedExpression([NotNull] SysMLv2Parser.OwnedExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeReference([NotNull] SysMLv2Parser.TypeReferenceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSequenceExpressionList([NotNull] SysMLv2Parser.SequenceExpressionListContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBaseExpression([NotNull] SysMLv2Parser.BaseExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNullExpression([NotNull] SysMLv2Parser.NullExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureReferenceExpression([NotNull] SysMLv2Parser.FeatureReferenceExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstructorExpression([NotNull] SysMLv2Parser.ConstructorExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBodyExpression([NotNull] SysMLv2Parser.BodyExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArgumentList([NotNull] SysMLv2Parser.ArgumentListContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPositionalArgumentList([NotNull] SysMLv2Parser.PositionalArgumentListContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamedArgumentList([NotNull] SysMLv2Parser.NamedArgumentListContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamedArgument([NotNull] SysMLv2Parser.NamedArgumentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteralExpression([NotNull] SysMLv2Parser.LiteralExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteralBoolean([NotNull] SysMLv2Parser.LiteralBooleanContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteralString([NotNull] SysMLv2Parser.LiteralStringContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteralInteger([NotNull] SysMLv2Parser.LiteralIntegerContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteralReal([NotNull] SysMLv2Parser.LiteralRealContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLiteralInfinity([NotNull] SysMLv2Parser.LiteralInfinityContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArgumentMember([NotNull] SysMLv2Parser.ArgumentMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitArgumentExpressionMember([NotNull] SysMLv2Parser.ArgumentExpressionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitName([NotNull] SysMLv2Parser.NameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUnreservedKeyword([NotNull] SysMLv2Parser.UnreservedKeywordContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIdentification([NotNull] SysMLv2Parser.IdentificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRelationshipBody([NotNull] SysMLv2Parser.RelationshipBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRelationshipOwnedElement([NotNull] SysMLv2Parser.RelationshipOwnedElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedRelatedElement([NotNull] SysMLv2Parser.OwnedRelatedElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDependency([NotNull] SysMLv2Parser.DependencyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAnnotation([NotNull] SysMLv2Parser.AnnotationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedAnnotation([NotNull] SysMLv2Parser.OwnedAnnotationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAnnotatingElement([NotNull] SysMLv2Parser.AnnotatingElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitComment([NotNull] SysMLv2Parser.CommentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDocumentation([NotNull] SysMLv2Parser.DocumentationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTextualRepresentation([NotNull] SysMLv2Parser.TextualRepresentationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRootNamespace([NotNull] SysMLv2Parser.RootNamespaceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespace([NotNull] SysMLv2Parser.NamespaceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceDeclaration([NotNull] SysMLv2Parser.NamespaceDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceBody([NotNull] SysMLv2Parser.NamespaceBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceBodyElement([NotNull] SysMLv2Parser.NamespaceBodyElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMemberPrefix([NotNull] SysMLv2Parser.MemberPrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVisibilityIndicator([NotNull] SysMLv2Parser.VisibilityIndicatorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceMember([NotNull] SysMLv2Parser.NamespaceMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNonFeatureMember([NotNull] SysMLv2Parser.NonFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceFeatureMember([NotNull] SysMLv2Parser.NamespaceFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAliasMember([NotNull] SysMLv2Parser.AliasMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitQualifiedName([NotNull] SysMLv2Parser.QualifiedNameContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitImportRule([NotNull] SysMLv2Parser.ImportRuleContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitImportDeclaration([NotNull] SysMLv2Parser.ImportDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMembershipImport([NotNull] SysMLv2Parser.MembershipImportContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceImport([NotNull] SysMLv2Parser.NamespaceImportContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFilterPackage([NotNull] SysMLv2Parser.FilterPackageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFilterPackageMember([NotNull] SysMLv2Parser.FilterPackageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMemberElement([NotNull] SysMLv2Parser.MemberElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNonFeatureElement([NotNull] SysMLv2Parser.NonFeatureElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureElement([NotNull] SysMLv2Parser.FeatureElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitType([NotNull] SysMLv2Parser.TypeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypePrefix([NotNull] SysMLv2Parser.TypePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeDeclaration([NotNull] SysMLv2Parser.TypeDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSpecializationPart([NotNull] SysMLv2Parser.SpecializationPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConjugationPart([NotNull] SysMLv2Parser.ConjugationPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeRelationshipPart([NotNull] SysMLv2Parser.TypeRelationshipPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDisjoiningPart([NotNull] SysMLv2Parser.DisjoiningPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUnioningPart([NotNull] SysMLv2Parser.UnioningPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIntersectingPart([NotNull] SysMLv2Parser.IntersectingPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDifferencingPart([NotNull] SysMLv2Parser.DifferencingPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeBody([NotNull] SysMLv2Parser.TypeBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeBodyElement([NotNull] SysMLv2Parser.TypeBodyElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSpecialization([NotNull] SysMLv2Parser.SpecializationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedSpecialization([NotNull] SysMLv2Parser.OwnedSpecializationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSpecificType([NotNull] SysMLv2Parser.SpecificTypeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGeneralType([NotNull] SysMLv2Parser.GeneralTypeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConjugation([NotNull] SysMLv2Parser.ConjugationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedConjugation([NotNull] SysMLv2Parser.OwnedConjugationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDisjoining([NotNull] SysMLv2Parser.DisjoiningContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedDisjoining([NotNull] SysMLv2Parser.OwnedDisjoiningContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUnioning([NotNull] SysMLv2Parser.UnioningContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIntersecting([NotNull] SysMLv2Parser.IntersectingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDifferencing([NotNull] SysMLv2Parser.DifferencingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureMember([NotNull] SysMLv2Parser.FeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeFeatureMember([NotNull] SysMLv2Parser.TypeFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedFeatureMember([NotNull] SysMLv2Parser.OwnedFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitClassifier([NotNull] SysMLv2Parser.ClassifierContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitClassifierDeclaration([NotNull] SysMLv2Parser.ClassifierDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuperclassingPart([NotNull] SysMLv2Parser.SuperclassingPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubclassification([NotNull] SysMLv2Parser.SubclassificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedSubclassification([NotNull] SysMLv2Parser.OwnedSubclassificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeature([NotNull] SysMLv2Parser.FeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEndFeaturePrefix([NotNull] SysMLv2Parser.EndFeaturePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBasicFeaturePrefix([NotNull] SysMLv2Parser.BasicFeaturePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeaturePrefix([NotNull] SysMLv2Parser.FeaturePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedCrossFeatureMember([NotNull] SysMLv2Parser.OwnedCrossFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedCrossFeature([NotNull] SysMLv2Parser.OwnedCrossFeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureDirection([NotNull] SysMLv2Parser.FeatureDirectionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureDeclaration([NotNull] SysMLv2Parser.FeatureDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureIdentification([NotNull] SysMLv2Parser.FeatureIdentificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureRelationshipPart([NotNull] SysMLv2Parser.FeatureRelationshipPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitChainingPart([NotNull] SysMLv2Parser.ChainingPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInvertingPart([NotNull] SysMLv2Parser.InvertingPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeFeaturingPart([NotNull] SysMLv2Parser.TypeFeaturingPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureSpecializationPart([NotNull] SysMLv2Parser.FeatureSpecializationPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplicityPart([NotNull] SysMLv2Parser.MultiplicityPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureSpecialization([NotNull] SysMLv2Parser.FeatureSpecializationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypings([NotNull] SysMLv2Parser.TypingsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypedBy([NotNull] SysMLv2Parser.TypedByContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubsettings([NotNull] SysMLv2Parser.SubsettingsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubsets([NotNull] SysMLv2Parser.SubsetsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitReferences([NotNull] SysMLv2Parser.ReferencesContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCrosses([NotNull] SysMLv2Parser.CrossesContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRedefinitions([NotNull] SysMLv2Parser.RedefinitionsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRedefines([NotNull] SysMLv2Parser.RedefinesContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureTyping([NotNull] SysMLv2Parser.FeatureTypingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedFeatureTyping([NotNull] SysMLv2Parser.OwnedFeatureTypingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubsetting([NotNull] SysMLv2Parser.SubsettingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedSubsetting([NotNull] SysMLv2Parser.OwnedSubsettingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedReferenceSubsetting([NotNull] SysMLv2Parser.OwnedReferenceSubsettingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedCrossSubsetting([NotNull] SysMLv2Parser.OwnedCrossSubsettingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRedefinition([NotNull] SysMLv2Parser.RedefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedRedefinition([NotNull] SysMLv2Parser.OwnedRedefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureInverting([NotNull] SysMLv2Parser.FeatureInvertingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedFeatureInverting([NotNull] SysMLv2Parser.OwnedFeatureInvertingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTypeFeaturing([NotNull] SysMLv2Parser.TypeFeaturingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedTypeFeaturing([NotNull] SysMLv2Parser.OwnedTypeFeaturingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDataType([NotNull] SysMLv2Parser.DataTypeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitClass([NotNull] SysMLv2Parser.ClassContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStructure([NotNull] SysMLv2Parser.StructureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssociation([NotNull] SysMLv2Parser.AssociationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssociationStructure([NotNull] SysMLv2Parser.AssociationStructureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnector([NotNull] SysMLv2Parser.ConnectorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnectorDeclaration([NotNull] SysMLv2Parser.ConnectorDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBinaryConnectorDeclaration([NotNull] SysMLv2Parser.BinaryConnectorDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNaryConnectorDeclaration([NotNull] SysMLv2Parser.NaryConnectorDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnectorEndMember([NotNull] SysMLv2Parser.ConnectorEndMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnectorEnd([NotNull] SysMLv2Parser.ConnectorEndContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedCrossMultiplicityMember([NotNull] SysMLv2Parser.OwnedCrossMultiplicityMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedCrossMultiplicity([NotNull] SysMLv2Parser.OwnedCrossMultiplicityContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBindingConnector([NotNull] SysMLv2Parser.BindingConnectorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBindingConnectorDeclaration([NotNull] SysMLv2Parser.BindingConnectorDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuccession([NotNull] SysMLv2Parser.SuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuccessionDeclaration([NotNull] SysMLv2Parser.SuccessionDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBehavior([NotNull] SysMLv2Parser.BehaviorContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStep([NotNull] SysMLv2Parser.StepContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunction([NotNull] SysMLv2Parser.FunctionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunctionBody([NotNull] SysMLv2Parser.FunctionBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunctionBodyPart([NotNull] SysMLv2Parser.FunctionBodyPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitReturnFeatureMember([NotNull] SysMLv2Parser.ReturnFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitResultExpressionMember([NotNull] SysMLv2Parser.ResultExpressionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExpression([NotNull] SysMLv2Parser.ExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPredicate([NotNull] SysMLv2Parser.PredicateContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBooleanExpression([NotNull] SysMLv2Parser.BooleanExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInvariant([NotNull] SysMLv2Parser.InvariantContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureChainMember([NotNull] SysMLv2Parser.FeatureChainMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInteraction([NotNull] SysMLv2Parser.InteractionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlow([NotNull] SysMLv2Parser.FlowContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuccessionFlow([NotNull] SysMLv2Parser.SuccessionFlowContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowDeclaration([NotNull] SysMLv2Parser.FlowDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPayloadFeatureMember([NotNull] SysMLv2Parser.PayloadFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPayloadFeature([NotNull] SysMLv2Parser.PayloadFeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPayloadFeatureSpecializationPart([NotNull] SysMLv2Parser.PayloadFeatureSpecializationPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowEndMember([NotNull] SysMLv2Parser.FlowEndMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowEnd([NotNull] SysMLv2Parser.FlowEndContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitValuePart([NotNull] SysMLv2Parser.ValuePartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureValue([NotNull] SysMLv2Parser.FeatureValueContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplicity([NotNull] SysMLv2Parser.MultiplicityContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplicitySubset([NotNull] SysMLv2Parser.MultiplicitySubsetContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplicityRange([NotNull] SysMLv2Parser.MultiplicityRangeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedMultiplicity([NotNull] SysMLv2Parser.OwnedMultiplicityContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOwnedMultiplicityRange([NotNull] SysMLv2Parser.OwnedMultiplicityRangeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplicityBounds([NotNull] SysMLv2Parser.MultiplicityBoundsContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMultiplicityExpressionMember([NotNull] SysMLv2Parser.MultiplicityExpressionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetaclass([NotNull] SysMLv2Parser.MetaclassContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrefixMetadataAnnotation([NotNull] SysMLv2Parser.PrefixMetadataAnnotationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrefixMetadataMember([NotNull] SysMLv2Parser.PrefixMetadataMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrefixMetadataFeature([NotNull] SysMLv2Parser.PrefixMetadataFeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataFeature([NotNull] SysMLv2Parser.MetadataFeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataFeatureDeclaration([NotNull] SysMLv2Parser.MetadataFeatureDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataBody([NotNull] SysMLv2Parser.MetadataBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataBodyElement([NotNull] SysMLv2Parser.MetadataBodyElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataBodyFeatureMember([NotNull] SysMLv2Parser.MetadataBodyFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataBodyFeature([NotNull] SysMLv2Parser.MetadataBodyFeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackage([NotNull] SysMLv2Parser.PackageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitLibraryPackage([NotNull] SysMLv2Parser.LibraryPackageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackageDeclaration([NotNull] SysMLv2Parser.PackageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackageBody([NotNull] SysMLv2Parser.PackageBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElementFilterMember([NotNull] SysMLv2Parser.ElementFilterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDependencyDeclaration([NotNull] SysMLv2Parser.DependencyDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAnnotatingMember([NotNull] SysMLv2Parser.AnnotatingMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackageBodyElement([NotNull] SysMLv2Parser.PackageBodyElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPackageMember([NotNull] SysMLv2Parser.PackageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionElement([NotNull] SysMLv2Parser.DefinitionElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsageElement([NotNull] SysMLv2Parser.UsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBasicDefinitionPrefix([NotNull] SysMLv2Parser.BasicDefinitionPrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionExtensionKeyword([NotNull] SysMLv2Parser.DefinitionExtensionKeywordContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionPrefix([NotNull] SysMLv2Parser.DefinitionPrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinition([NotNull] SysMLv2Parser.DefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionDeclaration([NotNull] SysMLv2Parser.DefinitionDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionBody([NotNull] SysMLv2Parser.DefinitionBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionBodyItem([NotNull] SysMLv2Parser.DefinitionBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionBodyItemContent([NotNull] SysMLv2Parser.DefinitionBodyItemContentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefinitionMember([NotNull] SysMLv2Parser.DefinitionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVariantUsageMember([NotNull] SysMLv2Parser.VariantUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNonOccurrenceUsageMember([NotNull] SysMLv2Parser.NonOccurrenceUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStructureUsageMember([NotNull] SysMLv2Parser.StructureUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBehaviorUsageMember([NotNull] SysMLv2Parser.BehaviorUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRefPrefix([NotNull] SysMLv2Parser.RefPrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBasicUsagePrefix([NotNull] SysMLv2Parser.BasicUsagePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEndUsagePrefix([NotNull] SysMLv2Parser.EndUsagePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsageExtensionKeyword([NotNull] SysMLv2Parser.UsageExtensionKeywordContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUnextendedUsagePrefix([NotNull] SysMLv2Parser.UnextendedUsagePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsagePrefix([NotNull] SysMLv2Parser.UsagePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsage([NotNull] SysMLv2Parser.UsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsageDeclaration([NotNull] SysMLv2Parser.UsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsageCompletion([NotNull] SysMLv2Parser.UsageCompletionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUsageBody([NotNull] SysMLv2Parser.UsageBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefaultReferenceUsage([NotNull] SysMLv2Parser.DefaultReferenceUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitReferenceUsage([NotNull] SysMLv2Parser.ReferenceUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEndFeatureUsage([NotNull] SysMLv2Parser.EndFeatureUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVariantReference([NotNull] SysMLv2Parser.VariantReferenceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNonOccurrenceUsageElement([NotNull] SysMLv2Parser.NonOccurrenceUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEndOccurrenceUsageElement([NotNull] SysMLv2Parser.EndOccurrenceUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOccurrenceUsageElement([NotNull] SysMLv2Parser.OccurrenceUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStructureUsageElement([NotNull] SysMLv2Parser.StructureUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBehaviorUsageElement([NotNull] SysMLv2Parser.BehaviorUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVariantUsageElement([NotNull] SysMLv2Parser.VariantUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubclassificationPart([NotNull] SysMLv2Parser.SubclassificationPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAttributeDefinition([NotNull] SysMLv2Parser.AttributeDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAttributeUsage([NotNull] SysMLv2Parser.AttributeUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumerationDefinition([NotNull] SysMLv2Parser.EnumerationDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumerationBody([NotNull] SysMLv2Parser.EnumerationBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumerationUsageMember([NotNull] SysMLv2Parser.EnumerationUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumeratedValue([NotNull] SysMLv2Parser.EnumeratedValueContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEnumerationUsage([NotNull] SysMLv2Parser.EnumerationUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOccurrenceDefinitionPrefix([NotNull] SysMLv2Parser.OccurrenceDefinitionPrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOccurrenceDefinition([NotNull] SysMLv2Parser.OccurrenceDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIndividualDefinition([NotNull] SysMLv2Parser.IndividualDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyMultiplicityMember([NotNull] SysMLv2Parser.EmptyMultiplicityMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOccurrenceUsagePrefix([NotNull] SysMLv2Parser.OccurrenceUsagePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitOccurrenceUsage([NotNull] SysMLv2Parser.OccurrenceUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIndividualUsage([NotNull] SysMLv2Parser.IndividualUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPortionUsage([NotNull] SysMLv2Parser.PortionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPortionKind([NotNull] SysMLv2Parser.PortionKindContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEventOccurrenceUsage([NotNull] SysMLv2Parser.EventOccurrenceUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSourceSuccessionMember([NotNull] SysMLv2Parser.SourceSuccessionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSourceSuccession([NotNull] SysMLv2Parser.SourceSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSourceEndMember([NotNull] SysMLv2Parser.SourceEndMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSourceEnd([NotNull] SysMLv2Parser.SourceEndContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitItemDefinition([NotNull] SysMLv2Parser.ItemDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitItemUsage([NotNull] SysMLv2Parser.ItemUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPartDefinition([NotNull] SysMLv2Parser.PartDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPartUsage([NotNull] SysMLv2Parser.PartUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPortDefinition([NotNull] SysMLv2Parser.PortDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConjugatedPortDefinitionMember([NotNull] SysMLv2Parser.ConjugatedPortDefinitionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConjugatedPortDefinition([NotNull] SysMLv2Parser.ConjugatedPortDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPortUsage([NotNull] SysMLv2Parser.PortUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConjugatedPortTyping([NotNull] SysMLv2Parser.ConjugatedPortTypingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnectionDefinition([NotNull] SysMLv2Parser.ConnectionDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnectionUsage([NotNull] SysMLv2Parser.ConnectionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConnectorPart([NotNull] SysMLv2Parser.ConnectorPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBinaryConnectorPart([NotNull] SysMLv2Parser.BinaryConnectorPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNaryConnectorPart([NotNull] SysMLv2Parser.NaryConnectorPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBindingConnectorAsUsage([NotNull] SysMLv2Parser.BindingConnectorAsUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuccessionAsUsage([NotNull] SysMLv2Parser.SuccessionAsUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceDefinition([NotNull] SysMLv2Parser.InterfaceDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceBody([NotNull] SysMLv2Parser.InterfaceBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceBodyItem([NotNull] SysMLv2Parser.InterfaceBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceNonOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceNonOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceNonOccurrenceUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceOccurrenceUsageMember([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceOccurrenceUsageElement([NotNull] SysMLv2Parser.InterfaceOccurrenceUsageElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefaultInterfaceEnd([NotNull] SysMLv2Parser.DefaultInterfaceEndContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceUsage([NotNull] SysMLv2Parser.InterfaceUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceUsageDeclaration([NotNull] SysMLv2Parser.InterfaceUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfacePart([NotNull] SysMLv2Parser.InterfacePartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitBinaryInterfacePart([NotNull] SysMLv2Parser.BinaryInterfacePartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNaryInterfacePart([NotNull] SysMLv2Parser.NaryInterfacePartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceEndMember([NotNull] SysMLv2Parser.InterfaceEndMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInterfaceEnd([NotNull] SysMLv2Parser.InterfaceEndContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAllocationDefinition([NotNull] SysMLv2Parser.AllocationDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAllocationUsage([NotNull] SysMLv2Parser.AllocationUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAllocationUsageDeclaration([NotNull] SysMLv2Parser.AllocationUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowDefinition([NotNull] SysMLv2Parser.FlowDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMessage([NotNull] SysMLv2Parser.MessageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMessageDeclaration([NotNull] SysMLv2Parser.MessageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMessageEventMember([NotNull] SysMLv2Parser.MessageEventMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMessageEvent([NotNull] SysMLv2Parser.MessageEventContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowUsage([NotNull] SysMLv2Parser.FlowUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuccessionFlowUsage([NotNull] SysMLv2Parser.SuccessionFlowUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowPayloadFeatureMember([NotNull] SysMLv2Parser.FlowPayloadFeatureMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFlowPayloadFeature([NotNull] SysMLv2Parser.FlowPayloadFeatureContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionDefinition([NotNull] SysMLv2Parser.ActionDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionBody([NotNull] SysMLv2Parser.ActionBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionBodyItem([NotNull] SysMLv2Parser.ActionBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNonBehaviorBodyItem([NotNull] SysMLv2Parser.NonBehaviorBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionBehaviorMember([NotNull] SysMLv2Parser.ActionBehaviorMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitInitialNodeMember([NotNull] SysMLv2Parser.InitialNodeMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionNodeMember([NotNull] SysMLv2Parser.ActionNodeMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionTargetSuccessionMember([NotNull] SysMLv2Parser.ActionTargetSuccessionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGuardedSuccessionMember([NotNull] SysMLv2Parser.GuardedSuccessionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionUsage([NotNull] SysMLv2Parser.ActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionUsageDeclaration([NotNull] SysMLv2Parser.ActionUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPerformActionUsage([NotNull] SysMLv2Parser.PerformActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPerformActionUsageDeclaration([NotNull] SysMLv2Parser.PerformActionUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionNode([NotNull] SysMLv2Parser.ActionNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionNodeUsageDeclaration([NotNull] SysMLv2Parser.ActionNodeUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionNodePrefix([NotNull] SysMLv2Parser.ActionNodePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitControlNode([NotNull] SysMLv2Parser.ControlNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitControlNodePrefix([NotNull] SysMLv2Parser.ControlNodePrefixContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMergeNode([NotNull] SysMLv2Parser.MergeNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDecisionNode([NotNull] SysMLv2Parser.DecisionNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitJoinNode([NotNull] SysMLv2Parser.JoinNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitForkNode([NotNull] SysMLv2Parser.ForkNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAcceptNode([NotNull] SysMLv2Parser.AcceptNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAcceptNodeDeclaration([NotNull] SysMLv2Parser.AcceptNodeDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAcceptParameterPart([NotNull] SysMLv2Parser.AcceptParameterPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPayloadParameterMember([NotNull] SysMLv2Parser.PayloadParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPayloadParameter([NotNull] SysMLv2Parser.PayloadParameterContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTriggerValuePart([NotNull] SysMLv2Parser.TriggerValuePartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTriggerFeatureValue([NotNull] SysMLv2Parser.TriggerFeatureValueContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTriggerExpression([NotNull] SysMLv2Parser.TriggerExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSendNode([NotNull] SysMLv2Parser.SendNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSendNodeDeclaration([NotNull] SysMLv2Parser.SendNodeDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSenderReceiverPart([NotNull] SysMLv2Parser.SenderReceiverPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNodeParameterMember([NotNull] SysMLv2Parser.NodeParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNodeParameter([NotNull] SysMLv2Parser.NodeParameterContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFeatureBinding([NotNull] SysMLv2Parser.FeatureBindingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyParameterMember([NotNull] SysMLv2Parser.EmptyParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignmentNode([NotNull] SysMLv2Parser.AssignmentNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignmentNodeDeclaration([NotNull] SysMLv2Parser.AssignmentNodeDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignmentTargetMember([NotNull] SysMLv2Parser.AssignmentTargetMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignmentTargetParameter([NotNull] SysMLv2Parser.AssignmentTargetParameterContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignmentTargetBinding([NotNull] SysMLv2Parser.AssignmentTargetBindingContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTerminateNode([NotNull] SysMLv2Parser.TerminateNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIfNode([NotNull] SysMLv2Parser.IfNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExpressionParameterMember([NotNull] SysMLv2Parser.ExpressionParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionBodyParameterMember([NotNull] SysMLv2Parser.ActionBodyParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionBodyParameter([NotNull] SysMLv2Parser.ActionBodyParameterContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIfNodeParameterMember([NotNull] SysMLv2Parser.IfNodeParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitWhileLoopNode([NotNull] SysMLv2Parser.WhileLoopNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitForLoopNode([NotNull] SysMLv2Parser.ForLoopNodeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitForVariableDeclarationMember([NotNull] SysMLv2Parser.ForVariableDeclarationMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActionTargetSuccession([NotNull] SysMLv2Parser.ActionTargetSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTargetSuccession([NotNull] SysMLv2Parser.TargetSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGuardedTargetSuccession([NotNull] SysMLv2Parser.GuardedTargetSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDefaultTargetSuccession([NotNull] SysMLv2Parser.DefaultTargetSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGuardedSuccession([NotNull] SysMLv2Parser.GuardedSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateDefinition([NotNull] SysMLv2Parser.StateDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateDefBody([NotNull] SysMLv2Parser.StateDefBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateBodyItem([NotNull] SysMLv2Parser.StateBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntryActionMember([NotNull] SysMLv2Parser.EntryActionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDoActionMember([NotNull] SysMLv2Parser.DoActionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExitActionMember([NotNull] SysMLv2Parser.ExitActionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEntryTransitionMember([NotNull] SysMLv2Parser.EntryTransitionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateActionUsage([NotNull] SysMLv2Parser.StateActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStatePerformActionUsage([NotNull] SysMLv2Parser.StatePerformActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateAcceptActionUsage([NotNull] SysMLv2Parser.StateAcceptActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateSendActionUsage([NotNull] SysMLv2Parser.StateSendActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateAssignmentActionUsage([NotNull] SysMLv2Parser.StateAssignmentActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionUsageMember([NotNull] SysMLv2Parser.TransitionUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTargetTransitionUsageMember([NotNull] SysMLv2Parser.TargetTransitionUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateUsage([NotNull] SysMLv2Parser.StateUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStateUsageBody([NotNull] SysMLv2Parser.StateUsageBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExhibitStateUsage([NotNull] SysMLv2Parser.ExhibitStateUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionUsage([NotNull] SysMLv2Parser.TransitionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTargetTransitionUsage([NotNull] SysMLv2Parser.TargetTransitionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTriggerActionMember([NotNull] SysMLv2Parser.TriggerActionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTriggerAction([NotNull] SysMLv2Parser.TriggerActionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGuardExpressionMember([NotNull] SysMLv2Parser.GuardExpressionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEffectBehaviorMember([NotNull] SysMLv2Parser.EffectBehaviorMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEffectBehaviorUsage([NotNull] SysMLv2Parser.EffectBehaviorUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionPerformActionUsage([NotNull] SysMLv2Parser.TransitionPerformActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionAcceptActionUsage([NotNull] SysMLv2Parser.TransitionAcceptActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionSendActionUsage([NotNull] SysMLv2Parser.TransitionSendActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionAssignmentActionUsage([NotNull] SysMLv2Parser.TransitionAssignmentActionUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionSuccessionMember([NotNull] SysMLv2Parser.TransitionSuccessionMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTransitionSuccession([NotNull] SysMLv2Parser.TransitionSuccessionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyEndMember([NotNull] SysMLv2Parser.EmptyEndMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCalculationDefinition([NotNull] SysMLv2Parser.CalculationDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCalculationUsage([NotNull] SysMLv2Parser.CalculationUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCalculationBody([NotNull] SysMLv2Parser.CalculationBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCalculationBodyPart([NotNull] SysMLv2Parser.CalculationBodyPartContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCalculationBodyItem([NotNull] SysMLv2Parser.CalculationBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitReturnParameterMember([NotNull] SysMLv2Parser.ReturnParameterMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstraintDefinition([NotNull] SysMLv2Parser.ConstraintDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstraintUsage([NotNull] SysMLv2Parser.ConstraintUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssertConstraintUsage([NotNull] SysMLv2Parser.AssertConstraintUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConstraintUsageDeclaration([NotNull] SysMLv2Parser.ConstraintUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementDefinition([NotNull] SysMLv2Parser.RequirementDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementBody([NotNull] SysMLv2Parser.RequirementBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementBodyItem([NotNull] SysMLv2Parser.RequirementBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubjectMember([NotNull] SysMLv2Parser.SubjectMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSubjectUsage([NotNull] SysMLv2Parser.SubjectUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementConstraintMember([NotNull] SysMLv2Parser.RequirementConstraintMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementKind([NotNull] SysMLv2Parser.RequirementKindContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementConstraintUsage([NotNull] SysMLv2Parser.RequirementConstraintUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFramedConcernMember([NotNull] SysMLv2Parser.FramedConcernMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFramedConcernUsage([NotNull] SysMLv2Parser.FramedConcernUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActorMember([NotNull] SysMLv2Parser.ActorMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitActorUsage([NotNull] SysMLv2Parser.ActorUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStakeholderMember([NotNull] SysMLv2Parser.StakeholderMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitStakeholderUsage([NotNull] SysMLv2Parser.StakeholderUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementUsage([NotNull] SysMLv2Parser.RequirementUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSatisfyRequirementUsage([NotNull] SysMLv2Parser.SatisfyRequirementUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSatisfactionSubjectMember([NotNull] SysMLv2Parser.SatisfactionSubjectMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSatisfactionParameter([NotNull] SysMLv2Parser.SatisfactionParameterContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSatisfactionFeatureValue([NotNull] SysMLv2Parser.SatisfactionFeatureValueContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSatisfactionReferenceExpression([NotNull] SysMLv2Parser.SatisfactionReferenceExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcernDefinition([NotNull] SysMLv2Parser.ConcernDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitConcernUsage([NotNull] SysMLv2Parser.ConcernUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCaseDefinition([NotNull] SysMLv2Parser.CaseDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCaseUsage([NotNull] SysMLv2Parser.CaseUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCaseBody([NotNull] SysMLv2Parser.CaseBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCaseBodyItem([NotNull] SysMLv2Parser.CaseBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitObjectiveMember([NotNull] SysMLv2Parser.ObjectiveMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitObjectiveRequirementUsage([NotNull] SysMLv2Parser.ObjectiveRequirementUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAnalysisCaseDefinition([NotNull] SysMLv2Parser.AnalysisCaseDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAnalysisCaseUsage([NotNull] SysMLv2Parser.AnalysisCaseUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVerificationCaseDefinition([NotNull] SysMLv2Parser.VerificationCaseDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitVerificationCaseUsage([NotNull] SysMLv2Parser.VerificationCaseUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementVerificationMember([NotNull] SysMLv2Parser.RequirementVerificationMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRequirementVerificationUsage([NotNull] SysMLv2Parser.RequirementVerificationUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUseCaseDefinition([NotNull] SysMLv2Parser.UseCaseDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitUseCaseUsage([NotNull] SysMLv2Parser.UseCaseUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIncludeUseCaseUsage([NotNull] SysMLv2Parser.IncludeUseCaseUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewDefinition([NotNull] SysMLv2Parser.ViewDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewDefinitionBody([NotNull] SysMLv2Parser.ViewDefinitionBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewDefinitionBodyItem([NotNull] SysMLv2Parser.ViewDefinitionBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewRenderingMember([NotNull] SysMLv2Parser.ViewRenderingMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewRenderingUsage([NotNull] SysMLv2Parser.ViewRenderingUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewUsage([NotNull] SysMLv2Parser.ViewUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewBody([NotNull] SysMLv2Parser.ViewBodyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewBodyItem([NotNull] SysMLv2Parser.ViewBodyItemContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExpose([NotNull] SysMLv2Parser.ExposeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMembershipExpose([NotNull] SysMLv2Parser.MembershipExposeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceExpose([NotNull] SysMLv2Parser.NamespaceExposeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewpointDefinition([NotNull] SysMLv2Parser.ViewpointDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitViewpointUsage([NotNull] SysMLv2Parser.ViewpointUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRenderingDefinition([NotNull] SysMLv2Parser.RenderingDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRenderingUsage([NotNull] SysMLv2Parser.RenderingUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataDefinition([NotNull] SysMLv2Parser.MetadataDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPrefixMetadataUsage([NotNull] SysMLv2Parser.PrefixMetadataUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataBodyUsageMember([NotNull] SysMLv2Parser.MetadataBodyUsageMemberContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitMetadataBodyUsage([NotNull] SysMLv2Parser.MetadataBodyUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExtendedDefinition([NotNull] SysMLv2Parser.ExtendedDefinitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitExtendedUsage([NotNull] SysMLv2Parser.ExtendedUsageContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFilterPackageImportDeclaration([NotNull] SysMLv2Parser.FilterPackageImportDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNamespaceImportDirect([NotNull] SysMLv2Parser.NamespaceImportDirectContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCalculationUsageDeclaration([NotNull] SysMLv2Parser.CalculationUsageDeclarationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyActionUsage_([NotNull] SysMLv2Parser.EmptyActionUsage_Context context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyFeature_([NotNull] SysMLv2Parser.EmptyFeature_Context context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyMultiplicity_([NotNull] SysMLv2Parser.EmptyMultiplicity_Context context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitEmptyUsage_([NotNull] SysMLv2Parser.EmptyUsage_Context context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitFilterPackageImport([NotNull] SysMLv2Parser.FilterPackageImportContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNonFeatureChainPrimaryExpression([NotNull] SysMLv2Parser.NonFeatureChainPrimaryExpressionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitPortConjugation([NotNull] SysMLv2Parser.PortConjugationContext context); +} +} // namespace DemaConsulting.SysML2Tools.Parser.Antlr diff --git a/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs b/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs index a31979b9..7599e4cd 100644 --- a/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs +++ b/src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs @@ -19,7 +19,7 @@ // SOFTWARE. using Antlr4.Runtime; -using DemaConsulting.SysML2Tools.Parser.Generated; +using DemaConsulting.SysML2Tools.Parser.Antlr; namespace DemaConsulting.SysML2Tools.Parser.Internal; diff --git a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs index 1a85d071..7a1cd651 100644 --- a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs +++ b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs @@ -19,7 +19,7 @@ // SOFTWARE. using Antlr4.Runtime; -using DemaConsulting.SysML2Tools.Parser.Generated; +using DemaConsulting.SysML2Tools.Parser.Antlr; using DemaConsulting.SysML2Tools.Parser.Internal; namespace DemaConsulting.SysML2Tools.Parser; diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/AnalysisTooling.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/AnalysisTooling.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/AnalysisTooling.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/AnalysisTooling.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/SampledFunctions.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/SampledFunctions.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/SampledFunctions.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/SampledFunctions.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/StateSpaceRepresentation.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/StateSpaceRepresentation.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/StateSpaceRepresentation.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/StateSpaceRepresentation.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/TradeStudies.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/TradeStudies.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Analysis/TradeStudies.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Analysis/TradeStudies.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CausationConnections.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/CauseAndEffect/CausationConnections.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CausationConnections.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/CauseAndEffect/CausationConnections.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CauseAndEffect.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/CauseAndEffect/CauseAndEffect.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Cause and Effect/CauseAndEffect.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/CauseAndEffect/CauseAndEffect.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/ShapeItems.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Geometry/ShapeItems.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/ShapeItems.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Geometry/ShapeItems.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/SpatialItems.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Geometry/SpatialItems.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Geometry/SpatialItems.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Geometry/SpatialItems.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ImageMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/ImageMetadata.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ImageMetadata.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/ImageMetadata.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ModelingMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/ModelingMetadata.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ModelingMetadata.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/ModelingMetadata.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/ParametersOfInterestMetadata.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/ParametersOfInterestMetadata.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/RiskMetadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/RiskMetadata.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Metadata/RiskMetadata.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/Metadata/RiskMetadata.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQ.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQ.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQ.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQ.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAcoustics.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQAcoustics.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAcoustics.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQAcoustics.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQAtomicNuclear.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQAtomicNuclear.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQBase.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQBase.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQBase.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQBase.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQCharacteristicNumbers.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQCharacteristicNumbers.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQChemistryMolecular.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQChemistryMolecular.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQCondensedMatter.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQCondensedMatter.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQElectromagnetism.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQElectromagnetism.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQInformation.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQInformation.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQInformation.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQInformation.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQLight.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQLight.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQLight.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQLight.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQMechanics.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQMechanics.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQMechanics.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQMechanics.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQSpaceTime.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQSpaceTime.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQThermodynamics.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/ISQThermodynamics.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/MeasurementRefCalculations.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/MeasurementRefCalculations.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementReferences.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/MeasurementReferences.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/MeasurementReferences.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/MeasurementReferences.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Quantities.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/Quantities.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Quantities.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/Quantities.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/QuantityCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/QuantityCalculations.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/QuantityCalculations.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/QuantityCalculations.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SI.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/SI.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SI.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/SI.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SIPrefixes.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/SIPrefixes.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/SIPrefixes.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/SIPrefixes.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/TensorCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/TensorCalculations.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/TensorCalculations.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/TensorCalculations.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Time.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/Time.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/Time.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/Time.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/USCustomaryUnits.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/USCustomaryUnits.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/VectorCalculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/VectorCalculations.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Quantities and Units/VectorCalculations.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/QuantitiesAndUnits/VectorCalculations.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/DerivationConnections.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/RequirementDerivation/DerivationConnections.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/DerivationConnections.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/RequirementDerivation/DerivationConnections.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/RequirementDerivation/RequirementDerivation.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/DomainLibraries/RequirementDerivation/RequirementDerivation.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/Collections.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelDataTypeLibrary/Collections.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/Collections.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelDataTypeLibrary/Collections.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelDataTypeLibrary/ScalarValues.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelDataTypeLibrary/ScalarValues.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelDataTypeLibrary/VectorValues.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelDataTypeLibrary/VectorValues.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/BaseFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/BaseFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/BooleanFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/BooleanFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/CollectionFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/CollectionFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/ComplexFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/ComplexFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/ControlFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/ControlFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/DataFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/DataFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/DataFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/DataFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/IntegerFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/IntegerFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/NaturalFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/NaturalFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/NumericalFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/NumericalFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/OccurrenceFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/OccurrenceFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/RationalFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/RationalFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RealFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/RealFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/RealFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/RealFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/ScalarFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/ScalarFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/SequenceFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/SequenceFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/StringFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/StringFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/StringFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/StringFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/TrigFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/TrigFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/VectorFunctions.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelFunctionLibrary/VectorFunctions.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Base.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Base.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Base.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Base.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Clocks.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Clocks.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Clocks.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Clocks.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/ControlPerformances.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/ControlPerformances.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/FeatureReferencingPerformances.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/FeatureReferencingPerformances.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/KerML.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/KerML.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/KerML.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/KerML.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Links.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Links.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Links.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Links.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Metaobjects.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Metaobjects.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Objects.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Objects.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Objects.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Objects.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Observation.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Observation.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Observation.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Observation.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Occurrences.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Occurrences.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Performances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Performances.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Performances.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Performances.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/SpatialFrames.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/SpatialFrames.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/StatePerformances.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/StatePerformances.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Transfers.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Transfers.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Transfers.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Transfers.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/TransitionPerformances.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/TransitionPerformances.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Triggers.kerml b/src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Triggers.kerml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Kernel Libraries/Kernel Semantic Library/Triggers.kerml rename to src/DemaConsulting.SysML2Tools/Stdlib/KernelLibraries/KernelSemanticLibrary/Triggers.kerml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/README.md b/src/DemaConsulting.SysML2Tools/Stdlib/README.md new file mode 100644 index 00000000..6cd46c97 --- /dev/null +++ b/src/DemaConsulting.SysML2Tools/Stdlib/README.md @@ -0,0 +1,31 @@ +# Stdlib + +This folder contains the SysML v2 standard library files embedded as resources +in `DemaConsulting.SysML2Tools`. + +## Source + +Files are taken from the +[Systems-Modeling/SysML-v2-Release](https://github.com/Systems-Modeling/SysML-v2-Release) +repository, tag **2026-04**, from the `sysml.library/` subtree. + +## License + +These files are Copyright © 2019–2024 Model Driven Solutions, Inc. and other +contributors, distributed under the +[Eclipse Public License 2.0 (EPL-2.0)](https://www.eclipse.org/legal/epl-2.0/). + +## Contents + +The library contains two file types: + +- **`.sysml`** — SysML v2 surface language; parsed by the SysML v2 grammar. +- **`.kerml`** — KerML (Kernel Modeling Language) files; embedded for future use + when a KerML grammar is integrated (Phase 2). + +## Folder Naming + +The upstream repository uses spaces in folder names (e.g., `Domain Libraries`, +`Kernel Data Type Library`). These have been renamed to CamelCase +(e.g., `DomainLibraries`, `KernelDataTypeLibrary`) to avoid quoting and +URL-encoding issues. The file names and file contents are unchanged. diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Actions.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Actions.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Actions.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Actions.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Allocations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Allocations.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Allocations.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Allocations.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/AnalysisCases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/AnalysisCases.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/AnalysisCases.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/AnalysisCases.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Attributes.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Attributes.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Attributes.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Attributes.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Calculations.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Calculations.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Calculations.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Calculations.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Cases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Cases.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Cases.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Cases.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Connections.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Connections.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Connections.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Connections.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Constraints.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Constraints.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Constraints.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Constraints.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Flows.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Flows.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Flows.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Flows.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Interfaces.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Interfaces.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Interfaces.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Interfaces.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Items.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Items.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Items.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Items.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Metadata.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Metadata.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Metadata.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Metadata.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Parts.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Parts.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Parts.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Parts.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Ports.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Ports.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Ports.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Ports.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Requirements.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Requirements.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Requirements.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Requirements.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/StandardViewDefinitions.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/StandardViewDefinitions.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/StandardViewDefinitions.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/StandardViewDefinitions.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/States.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/States.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/States.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/States.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/SysML.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/SysML.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/SysML.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/SysML.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/UseCases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/UseCases.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/UseCases.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/UseCases.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/VerificationCases.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/VerificationCases.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/VerificationCases.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/VerificationCases.sysml diff --git a/src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Views.sysml b/src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Views.sysml similarity index 100% rename from src/DemaConsulting.SysML2Tools/Stdlib/Systems Library/Views.sysml rename to src/DemaConsulting.SysML2Tools/Stdlib/SystemsLibrary/Views.sysml From 81e97b93f71f9f78efb505d46d7504dcf76dd463 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 20:40:34 -0400 Subject: [PATCH 03/15] docs: fix Scope sections in both introduction.md files Scope should be a flat list of software items by type, not a duplicate of the Software Structure hierarchy. Matches the template intent. Also fix missing design entry in verification OTS companion structure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/design/introduction.md | 48 ++++++++++----------------- docs/verification/introduction.md | 55 ++++++++++++------------------- 2 files changed, 38 insertions(+), 65 deletions(-) diff --git a/docs/design/introduction.md b/docs/design/introduction.md index 751006d2..3541f33a 100644 --- a/docs/design/introduction.md +++ b/docs/design/introduction.md @@ -19,43 +19,29 @@ This document covers the detailed design of the following software items: **Local items:** -- **DemaConsulting.SysML2Tools** (System — core library) - - **Parser** (Subsystem) — SysML v2 parsing engine - - **WorkspaceParser** (Unit) — public parsing API - - **Internal** (Subsystem) — internal implementation - - **SysmlDiagnosticListener** (Unit) — ANTLR4 error listener - - **StdlibLoader** (Unit) — embedded stdlib loader -- **DemaConsulting.SysML2Tools.Svg** (System — SVG renderer, Phase 0 stub) -- **DemaConsulting.SysML2Tools.Png** (System — PNG renderer, Phase 0 stub) -- **DemaConsulting.SysML2Tools.Tool** (System — dotnet tool) - - **Program** — entry point and execution orchestrator - - **Cli** subsystem - - **Context** — command-line argument parser and I/O owner - - **Lint** (Subsystem) — lint command implementation - - **LintCommand** (Unit) — lint subcommand handler - - **SelfTest** subsystem - - **Validation** — self-validation test runner - - **Utilities** subsystem - - **PathHelpers** — safe path combination utilities +- **DemaConsulting.SysML2Tools**: system, subsystem, and unit design. +- **DemaConsulting.SysML2Tools.Svg**: system design (Phase 0 stub). +- **DemaConsulting.SysML2Tools.Png**: system design (Phase 0 stub). +- **DemaConsulting.SysML2Tools.Tool**: system, subsystem, and unit design. **OTS items:** -- **ANTLR4** — integration and usage design -- **BuildMark** — integration and usage design -- **FileAssert** — integration and usage design -- **Pandoc** — integration and usage design -- **ReqStream** — integration and usage design -- **ReviewMark** — integration and usage design -- **SarifMark** — integration and usage design -- **SonarMark** — integration and usage design -- **VersionMark** — integration and usage design -- **WeasyPrint** — integration and usage design -- **xUnit** — integration and usage design +- **ANTLR4**: integration and usage design. +- **BuildMark**: integration and usage design. +- **FileAssert**: integration and usage design. +- **Pandoc**: integration and usage design. +- **ReqStream**: integration and usage design. +- **ReviewMark**: integration and usage design. +- **SarifMark**: integration and usage design. +- **SonarMark**: integration and usage design. +- **VersionMark**: integration and usage design. +- **WeasyPrint**: integration and usage design. +- **xUnit**: integration and usage design. The following topics are out of scope: -- Design documents are not produced for the test projects or build pipeline CI configuration -- The internal design of OTS software items is excluded; only integration and usage design is documented +- Design documents are not produced for the test projects or build pipeline CI configuration. +- The internal design of OTS software items is excluded; only integration and usage design is documented. ## Software Structure diff --git a/docs/verification/introduction.md b/docs/verification/introduction.md index 3dfaf4d5..6d23deaf 100644 --- a/docs/verification/introduction.md +++ b/docs/verification/introduction.md @@ -17,46 +17,32 @@ This document covers the verification design for the following software items: **Local items:** -- **DemaConsulting.SysML2Tools** (System — core library) - - **Parser** (Subsystem) — SysML v2 parsing engine - - **WorkspaceParser** (Unit) — public parsing API - - **Internal** (Subsystem) — internal implementation - - **SysmlDiagnosticListener** (Unit) — ANTLR4 error listener - - **StdlibLoader** (Unit) — embedded stdlib loader -- **DemaConsulting.SysML2Tools.Svg** (System — SVG renderer, Phase 0 stub) -- **DemaConsulting.SysML2Tools.Png** (System — PNG renderer, Phase 0 stub) -- **DemaConsulting.SysML2Tools.Tool** (System — dotnet tool) - - **Program** (Unit) — entry point and execution orchestrator - - **Cli** (Subsystem) — command-line argument parsing and I/O - - **Context** (Unit) — argument parser and I/O owner - - **Lint** (Subsystem) — lint command implementation - - **LintCommand** (Unit) — lint subcommand handler - - **SelfTest** (Subsystem) — self-validation test runner - - **Validation** (Unit) — self-validation test runner - - **Utilities** (Subsystem) — shared utilities - - **PathHelpers** (Unit) — safe path combination utilities +- **DemaConsulting.SysML2Tools**: system, subsystem, and unit verification. +- **DemaConsulting.SysML2Tools.Svg**: system verification (Phase 0 stub). +- **DemaConsulting.SysML2Tools.Png**: system verification (Phase 0 stub). +- **DemaConsulting.SysML2Tools.Tool**: system, subsystem, and unit verification. **OTS items:** -- **ANTLR4** — ANTLR4 runtime (Antlr4.Runtime.Standard) -- **BuildMark** — build-notes documentation tool -- **FileAssert** — document assertion tool -- **Pandoc** — Markdown-to-HTML conversion tool -- **ReqStream** — requirements traceability tool -- **ReviewMark** — file review enforcement tool -- **SarifMark** — SARIF report conversion tool -- **SonarMark** — SonarCloud quality report tool -- **VersionMark** — tool-version documentation tool -- **WeasyPrint** — HTML-to-PDF conversion tool -- **xUnit** — unit-testing framework +- **ANTLR4**: integration and usage verification. +- **BuildMark**: integration and usage verification. +- **FileAssert**: integration and usage verification. +- **Pandoc**: integration and usage verification. +- **ReqStream**: integration and usage verification. +- **ReviewMark**: integration and usage verification. +- **SarifMark**: integration and usage verification. +- **SonarMark**: integration and usage verification. +- **VersionMark**: integration and usage verification. +- **WeasyPrint**: integration and usage verification. +- **xUnit**: integration and usage verification. The following topics are out of scope: - Verification documents are not produced for the test projects themselves — they are the - means of verification, not subjects of it -- Build pipeline CI configuration is excluded + means of verification, not subjects of it. +- Build pipeline CI configuration is excluded. - The internal implementation of OTS software items is excluded; only integration and usage - are verified + are verified. ## Folder Layout @@ -81,8 +67,9 @@ Local items have parallel artifacts in: OTS items have parallel artifacts in: -- Requirements: `docs/reqstream/ots/{ots-name}.yaml` (kebab-case) -- Verification: `docs/verification/ots/{ots-name}.md` (kebab-case) +- Requirements: `docs/reqstream/ots/{ots-name}.yaml` +- Design: `docs/design/ots/{ots-name}.md` +- Verification: `docs/verification/ots/{ots-name}.md` Review-sets: defined in `.reviewmark.yaml` From e2e87a8f22379c399c72e8bd3f23473038d1683b Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 20:47:28 -0400 Subject: [PATCH 04/15] docs: replace bloated Scope lists with prose paragraphs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/design/introduction.md | 27 +++++---------------------- docs/verification/introduction.md | 26 ++++---------------------- 2 files changed, 9 insertions(+), 44 deletions(-) diff --git a/docs/design/introduction.md b/docs/design/introduction.md index 3541f33a..c0e6c0e1 100644 --- a/docs/design/introduction.md +++ b/docs/design/introduction.md @@ -15,28 +15,11 @@ how they are realized. ## Scope -This document covers the detailed design of the following software items: - -**Local items:** - -- **DemaConsulting.SysML2Tools**: system, subsystem, and unit design. -- **DemaConsulting.SysML2Tools.Svg**: system design (Phase 0 stub). -- **DemaConsulting.SysML2Tools.Png**: system design (Phase 0 stub). -- **DemaConsulting.SysML2Tools.Tool**: system, subsystem, and unit design. - -**OTS items:** - -- **ANTLR4**: integration and usage design. -- **BuildMark**: integration and usage design. -- **FileAssert**: integration and usage design. -- **Pandoc**: integration and usage design. -- **ReqStream**: integration and usage design. -- **ReviewMark**: integration and usage design. -- **SarifMark**: integration and usage design. -- **SonarMark**: integration and usage design. -- **VersionMark**: integration and usage design. -- **WeasyPrint**: integration and usage design. -- **xUnit**: integration and usage design. +This document defines the design for each software item in SysML2 Tools — +full architectural and detailed design for local items (systems, subsystems, +and units), and integration/usage design for OTS software items. A reviewer +should be able to understand how each item satisfies its requirements without +reading source code. The following topics are out of scope: diff --git a/docs/verification/introduction.md b/docs/verification/introduction.md index 6d23deaf..89dc296a 100644 --- a/docs/verification/introduction.md +++ b/docs/verification/introduction.md @@ -13,28 +13,10 @@ test scenario. The document does not restate design; it explains how the design ## Scope -This document covers the verification design for the following software items: - -**Local items:** - -- **DemaConsulting.SysML2Tools**: system, subsystem, and unit verification. -- **DemaConsulting.SysML2Tools.Svg**: system verification (Phase 0 stub). -- **DemaConsulting.SysML2Tools.Png**: system verification (Phase 0 stub). -- **DemaConsulting.SysML2Tools.Tool**: system, subsystem, and unit verification. - -**OTS items:** - -- **ANTLR4**: integration and usage verification. -- **BuildMark**: integration and usage verification. -- **FileAssert**: integration and usage verification. -- **Pandoc**: integration and usage verification. -- **ReqStream**: integration and usage verification. -- **ReviewMark**: integration and usage verification. -- **SarifMark**: integration and usage verification. -- **SonarMark**: integration and usage verification. -- **VersionMark**: integration and usage verification. -- **WeasyPrint**: integration and usage verification. -- **xUnit**: integration and usage verification. +This document describes how each software item in SysML2 Tools is verified — +local items (systems, subsystems, and units), and OTS software items. For each +item it names the test scenarios that verify its requirements. A reviewer should +be able to confirm coverage completeness without reading test code. The following topics are out of scope: From ffd7541fb7a5df4422642c96184cec9684f1ec96 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 21:20:22 -0400 Subject: [PATCH 05/15] test(phase1): add OMG reference model test suite and consolidate parser types - Download 251 OMG SysML v2 example/training/validation files (EPL-2.0) from Systems-Modeling/SysML-v2-Release tag 2026-04 into test/SysMLModels/OMG/ - Folder and file names de-spaced using CamelCase rule (contents unchanged) - Add test/SysMLModels/README.md and test/SysMLModels/OMG/README.md documenting source, license, transformation rules, and regen instructions - Add OmgModelsTests.cs: Parse_OmgModels_NoSyntaxErrors (Phase 1 gate) and OmgModels_FileCount_IsExpected - Consolidate DiagnosticSeverity, SysmlDiagnostic, WorkspaceParseResult into WorkspaceParser.cs as top-level types; delete the 3 separate files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Parser/DiagnosticSeverity.cs | 36 - .../Parser/SysmlDiagnostic.cs | 38 - .../Parser/WorkspaceParseResult.cs | 53 - .../Parser/WorkspaceParser.cs | 64 + .../Parser/OmgModelsTests.cs | 85 + test/SysMLModels/OMG/README.md | 68 + .../AnalysisExamples/AnalysisAnnotation.sysml | 26 + .../examples/AnalysisExamples/Dynamics.sysml | 91 + .../TurbojetStageAnalysis.sysml | 110 ++ .../VehicleAnalysisDemo.sysml | 286 +++ .../AHFCoreLib.sysml | 55 + .../AHFNorwayTopics.sysml | 160 ++ .../AHFProfileLib.sysml | 117 ++ .../AHFSequences.sysml | 122 ++ .../ProductSelection_N_ary.sysml | 21 + .../ProductSelection_OwnedEnds.sysml | 47 + .../ProductSelection_UnownedEnds.sysml | 37 + .../OMG/examples/CameraExample/Camera.sysml | 14 + .../CameraExample/PictureTaking.sysml | 12 + .../CauseAndEffectExample.sysml | 55 + .../MedicalDeviceFailure.sysml | 25 + .../examples/CommentExamples/Comments.sysml | 15 + .../FlashlightExample/FlashlightExample.sysml | 59 + .../CarWithEnvelopingShape.sysml | 17 + .../GeometryExamples/CarWithShapeAndCSG.sysml | 88 + .../ExternalShapeRefExample.sysml | 31 + .../GeometryExamples/SimpleQuadcopter.sysml | 247 +++ .../VehicleGeometryAndCoordinateFrames.sysml | 130 ++ .../examples/ImportTests/AliasImport.sysml | 13 + .../examples/ImportTests/CircularImport.sysml | 27 + .../ImportTests/PrivateImportTest.sysml | 33 + .../ImportTests/QualifiedNameImportTest.sysml | 13 + .../AnalysisIndividualExample.sysml | 95 + .../JohnIndividualExample.sysml | 59 + .../ServerSequenceModel.sysml | 42 + .../ServerSequenceModelOutside.sysml | 20 + .../ServerSequenceOutsideRealization-2.sysml | 97 + .../ServerSequenceOutsideRealization-3.sysml | 159 ++ .../ServerSequenceRealization-2.sysml | 102 ++ .../ServerSequenceRealization-3.sysml | 151 ++ .../MassConstraintExample.sysml | 117 ++ .../MassRoll-upExample/MassRollup.sysml | 27 + .../MassRoll-upExample/Vehicles.sysml | 37 + .../IssueMetadataExample.sysml | 30 + .../RationaleMetadataExample.sysml | 24 + .../RequirementMetadataExample.sysml | 34 + .../RiskMetadataExample.sysml | 19 + .../VerificationMetadataExample.sysml | 15 + .../examples/PacketExample/PacketUsage.sysml | 16 + .../OMG/examples/PacketExample/Packets.sysml | 35 + .../HSUVRequirements.sysml | 39 + .../RequirementDerivationExample.sysml | 39 + .../VehicleRequirementDerivation.sysml | 40 + .../OMG/examples/RoomModel/RoomModel.sysml | 77 + .../OMG/examples/SimpleTests/ActionTest.sysml | 53 + .../OMG/examples/SimpleTests/AliasTest.sysml | 22 + .../examples/SimpleTests/AllocationTest.sysml | 36 + .../examples/SimpleTests/AnalysisTest.sysml | 38 + .../examples/SimpleTests/AssignmentTest.sysml | 52 + .../SimpleTests/CalculationTest.sysml | 30 + .../examples/SimpleTests/CommentTest.sysml | 44 + .../SimpleTests/ConjugationTest.sysml | 35 + .../examples/SimpleTests/ConnectionTest.sysml | 77 + .../examples/SimpleTests/ConstraintTest.sysml | 90 + .../SimpleTests/ControlNodeTest.sysml | 35 + .../examples/SimpleTests/DecisionTest.sysml | 22 + .../SimpleTests/DefaultValueTest.sysml | 18 + .../examples/SimpleTests/DependencyTest.sysml | 20 + .../SimpleTests/EnumerationTest.sysml | 54 + .../SimpleTests/FeaturePathTest.sysml | 43 + .../OMG/examples/SimpleTests/ImportTest.sysml | 18 + .../examples/SimpleTests/IndividualTest.sysml | 39 + .../OMG/examples/SimpleTests/ItemTest.sysml | 23 + .../examples/SimpleTests/MetadataTest.sysml | 42 + .../SimpleTests/MultiplicityTest.sysml | 19 + .../examples/SimpleTests/OccurrenceTest.sysml | 32 + .../examples/SimpleTests/ParameterTest.sysml | 16 + .../OMG/examples/SimpleTests/PartTest.sysml | 55 + .../SimpleTests/RequirementTest.sysml | 29 + .../SimpleTests/RootPackageTest.sysml | 14 + .../OMG/examples/SimpleTests/StateTest.sysml | 72 + .../SimpleTests/StructuredControlTest.sysml | 36 + .../TextualRepresentationTest.sysml | 22 + .../examples/SimpleTests/TradeStudyTest.sysml | 21 + .../examples/SimpleTests/UseCaseTest.sysml | 43 + .../SimpleTests/VariabilityTest.sysml | 41 + .../SimpleTests/VerificationTest.sysml | 39 + .../OMG/examples/SimpleTests/ViewTest.sysml | 46 + .../CartSample.sysml | 64 + .../EVSample.sysml | 319 ++++ .../TimeVaryingAttribute.sysml | 51 + .../VehicleVariabilityModel.sysml | 165 ++ .../SysMLV2SpecAnnexASimpleVehicleModel.sysml | 1581 +++++++++++++++++ .../VehicleExample/VehicleDefinitions.sysml | 54 + .../VehicleExample/VehicleIndividuals.sysml | 115 ++ .../VehicleExample/VehicleUsages.sysml | 96 + .../WheelPackage-Updated.sysml | 92 + .../8.4.1WheelHubAssembly/WheelPackage.sysml | 94 + .../VehicleDecomposition-Updated.sysml | 68 + .../VehicleDecomposition.sysml | 55 + .../D.4.7.8Dynamics/HSUVDynamics.sysml | 88 + .../training/01.Packages/CommentExample.sysml | 24 + .../01.Packages/DocumentationExample.sysml | 14 + .../training/01.Packages/PackageExample.sysml | 9 + .../PartDefinitionExample.sysml | 20 + .../GeneralizationExample.sysml | 19 + .../04.Subsetting/SubsettingExample.sysml | 15 + .../05.Redefinition/RedefinitionExample.sysml | 24 + .../EnumerationDefinitions-1.sysml | 17 + .../EnumerationDefinitions-2.sysml | 32 + .../training/07.Parts/PartsExample-1.sysml | 29 + .../training/07.Parts/PartsExample-2.sysml | 29 + .../OMG/training/08.Items/ItemsExample.sysml | 17 + .../09.Connections/ConnectionsExample.sysml | 42 + .../10.Ports/PortConjugationExample.sysml | 20 + .../OMG/training/10.Ports/PortExample.sysml | 26 + .../InterfaceDecompositionExample.sysml | 23 + .../11.Interfaces/InterfaceExample.sysml | 19 + .../BindingConnectorsExample-1.sysml | 29 + .../BindingConnectorsExample-2.sysml | 26 + .../13.Flows/FlowDefinitionExample.sysml | 21 + .../13.Flows/FlowInterfaceExample.sysml | 22 + .../training/13.Flows/FlowUsageExample.sysml | 18 + .../ActionDefinitionExample.sysml | 21 + .../ActionShorthandExample.sysml | 26 + .../ActionSuccessionExample-1.sysml | 26 + .../ActionSuccessionExample-2.sysml | 24 + .../15.Actions/ActionDecomposition.sysml | 27 + .../ConditionalSuccessionExample-1.sysml | 32 + .../ConditionalSuccessionExample-2.sysml | 31 + .../OMG/training/17.Control/Camera.sysml | 25 + .../17.Control/ControlStructuresExample.sysml | 29 + .../training/17.Control/DecisionExample.sysml | 34 + .../training/17.Control/ForkJoinExample.sysml | 41 + .../training/17.Control/MergeExample.sysml | 42 + .../ActionPerformanceExample.sysml | 21 + .../TerminateActionsExample-1.sysml | 28 + .../TerminateActionsExample-2.sysml | 20 + .../AssignmentExample.sysml | 41 + .../MessagingExample.sysml | 33 + .../MessagingWithPorts.sysml | 40 + .../OpaqueActionExample.sysml | 19 + .../StateDefinitionExample-1.sysml | 32 + .../StateDefinitionExample-2.sysml | 23 + .../OMG/training/24.States/StateActions.sysml | 35 + .../24.States/StateDecomposition-1.sysml | 25 + .../24.States/StateDecomposition-2.sysml | 32 + .../ChangeAndTimeTriggers.sysml | 43 + .../25.Transitions/LocalClockExample.sysml | 32 + .../25.Transitions/TransitionActions.sysml | 44 + .../StateExhibitionExample.sysml | 15 + .../EventOccurrenceExample.sysml | 29 + .../27.Occurrences/InteractionExample-1.sysml | 23 + .../27.Occurrences/InteractionExample-2.sysml | 34 + .../InteractionRealization-1.sysml | 55 + .../InteractionRealization-2.sysml | 82 + .../MessagePayloadExample.sysml | 36 + .../TimeSliceAndSnapshotExample.sysml | 27 + .../IndividualsAndRoles-1.sysml | 22 + .../IndividualsAndSnapshotsExample.sysml | 24 + .../IndividualsAndTimeSlices.sysml | 26 + .../CarMassRollupExample1.sysml | 38 + .../CarMassRollupExample2.sysml | 38 + .../training/29.Expressions/MassRollup1.sysml | 19 + .../training/29.Expressions/MassRollup2.sysml | 21 + .../CalculationDefinitions.sysml | 23 + .../30.Calculations/CalculationUsages-1.sysml | 42 + .../30.Calculations/CalculationUsages-2.sysml | 29 + .../AnalyticalConstraints.sysml | 43 + .../ConstraintAssertions-1.sysml | 32 + .../ConstraintAssertions-2.sysml | 37 + .../31.Constraints/ConstraintsExample-1.sysml | 32 + .../31.Constraints/ConstraintsExample-2.sysml | 32 + .../DerivationConstraints.sysml | 25 + .../31.Constraints/TimeConstraints.sysml | 37 + .../RequirementDefinitions.sysml | 42 + .../32.Requirements/RequirementGroups.sysml | 33 + .../RequirementSatisfaction.sysml | 27 + .../32.Requirements/RequirementUsages.sysml | 25 + .../AnalysisCaseDefinitionExample.sysml | 86 + .../AnalysisCaseUsageExample.sysml | 33 + .../TradeStudyAnalysisExample.sysml | 43 + .../VerificationCaseDefinitionExample.sysml | 47 + .../VerificationCaseUsageExample.sysml | 52 + .../UseCaseDefinitionExample.sysml | 34 + .../35.UseCases/UseCaseUsageExample.sysml | 43 + .../VariationConfiguration.sysml | 14 + .../36.Variability/VariationDefinitions.sysml | 35 + .../36.Variability/VariationUsages.sysml | 25 + .../37.Dependencies/DependencyExample.sysml | 27 + .../AllocationDefinitionExample.sysml | 38 + .../AllocationUsageExample.sysml | 34 + .../39.Metadata/MetadataExample-1.sysml | 32 + .../39.Metadata/MetadataExample-2.sysml | 20 + .../40.Filtering/FilteringExample-1.sysml | 37 + .../40.Filtering/FilteringExample-2.sysml | 35 + .../ModelLibraryExample.sysml | 35 + .../SemanticMetadataExample.sysml | 25 + .../UserKeywordExample.sysml | 32 + .../training/42.Views/ViewpointExample.sysml | 38 + .../OMG/training/42.Views/ViewsExample.sysml | 35 + .../01-PartsTree/1a-PartsTree.sysml | 125 ++ .../1c-PartsTreeRedefinition.sysml | 86 + .../1d-PartsTreeWithReference.sysml | 51 + .../2a-PartsInterconnection.sysml | 206 +++ ...terconnection-MultipleDecompositions.sysml | 90 + .../3a-Function-basedBehavior-1.sysml | 137 ++ .../3a-Function-basedBehavior-2.sysml | 85 + .../3a-Function-basedBehavior-3.sysml | 73 + ...unction-basedBehavior-structureMod-1.sysml | 51 + ...unction-basedBehavior-structureMod-2.sysml | 49 + ...unction-basedBehavior-structureMod-3.sysml | 33 + .../3d-Function-basedBehavior-item.sysml | 83 + .../3e-Function-basedBehavior-item.sysml | 64 + .../4a-FunctionalAllocation.sysml | 110 ++ .../5-State-basedBehavior-1.sysml | 236 +++ .../5-State-basedBehavior-1a.sysml | 238 +++ .../5-State-basedBehavior-2.sysml | 128 ++ .../6-IndividualAndSnapshots.sysml | 167 ++ ...-VariantConfiguration-GeneralConcept.sysml | 53 + ...ariantConfiguration-GeneralConcept-a.sysml | 79 + .../7b-VariantConfigurations.sysml | 140 ++ .../08-Requirements/8-Requirements.sysml | 205 +++ .../9-Verification-simplified.sysml | 115 ++ .../10-AnalysisAndTrades/10a-Analysis.sysml | 76 + ...de-offAmongAlternativeConfigurations.sysml | 97 + .../10c-FuelEconomyAnalysis.sysml | 168 ++ .../10d-DynamicsAnalysis.sysml | 80 + .../11a-View-Viewpoint.sysml | 57 + .../11b-SafetyAndSecurityFeatureViews.sysml | 66 + .../12a-Dependency.sysml | 16 + .../12b-Allocation-1.sysml | 56 + .../12b-Allocation.sysml | 26 + .../13a-ModelContainment.sysml | 62 + ...etyAndSecurityFeaturesElementGroup-1.sysml | 56 + ...etyAndSecurityFeaturesElementGroup-2.sysml | 52 + ...afetyAndSecurityFeaturesElementGroup.sysml | 40 + .../14a-LanguageExtensions.sysml | 31 + .../14b-LanguageExtensions.sysml | 51 + .../14c-LanguageExtensions.sysml | 208 +++ .../15_01-Constants.sysml | 55 + .../15_02-BasicValueProperties.sysml | 25 + .../15_03-ValueExpression.sysml | 30 + .../15_04-LogicalExpressions.sysml | 30 + ...nOfExpressionAndConstraintDefinition.sysml | 56 + .../15_06-SystemOfQuantities.sysml | 40 + .../15_07-SystemOfUnitsAndScales.sysml | 46 + .../15_08-RangeRestriction.sysml | 19 + .../15_10-PrimitiveDataTypes.sysml | 89 + .../15_11-VariableLengthCollectionTypes.sysml | 36 + .../15_12-CompoundValueType.sysml | 31 + ...15_13-DiscretelySampledFunctionValue.sysml | 76 + .../15_19-MaterialsWithProperties.sysml | 82 + .../15_19a-MaterialsWithProperties.sysml | 69 + .../17a-Sequence-Modeling.sysml | 42 + .../17b-Sequence-Modeling.sysml | 42 + .../validation/18-UseCase/18-UseCase.sysml | 89 + test/SysMLModels/README.md | 26 + 258 files changed, 15158 insertions(+), 127 deletions(-) delete mode 100644 src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs delete mode 100644 src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs delete mode 100644 src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs create mode 100644 test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs create mode 100644 test/SysMLModels/OMG/README.md create mode 100644 test/SysMLModels/OMG/examples/AnalysisExamples/AnalysisAnnotation.sysml create mode 100644 test/SysMLModels/OMG/examples/AnalysisExamples/Dynamics.sysml create mode 100644 test/SysMLModels/OMG/examples/AnalysisExamples/TurbojetStageAnalysis.sysml create mode 100644 test/SysMLModels/OMG/examples/AnalysisExamples/VehicleAnalysisDemo.sysml create mode 100644 test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFCoreLib.sysml create mode 100644 test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFNorwayTopics.sysml create mode 100644 test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFProfileLib.sysml create mode 100644 test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFSequences.sysml create mode 100644 test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_N_ary.sysml create mode 100644 test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_OwnedEnds.sysml create mode 100644 test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_UnownedEnds.sysml create mode 100644 test/SysMLModels/OMG/examples/CameraExample/Camera.sysml create mode 100644 test/SysMLModels/OMG/examples/CameraExample/PictureTaking.sysml create mode 100644 test/SysMLModels/OMG/examples/CauseAndEffectExamples/CauseAndEffectExample.sysml create mode 100644 test/SysMLModels/OMG/examples/CauseAndEffectExamples/MedicalDeviceFailure.sysml create mode 100644 test/SysMLModels/OMG/examples/CommentExamples/Comments.sysml create mode 100644 test/SysMLModels/OMG/examples/FlashlightExample/FlashlightExample.sysml create mode 100644 test/SysMLModels/OMG/examples/GeometryExamples/CarWithEnvelopingShape.sysml create mode 100644 test/SysMLModels/OMG/examples/GeometryExamples/CarWithShapeAndCSG.sysml create mode 100644 test/SysMLModels/OMG/examples/GeometryExamples/ExternalShapeRefExample.sysml create mode 100644 test/SysMLModels/OMG/examples/GeometryExamples/SimpleQuadcopter.sysml create mode 100644 test/SysMLModels/OMG/examples/GeometryExamples/VehicleGeometryAndCoordinateFrames.sysml create mode 100644 test/SysMLModels/OMG/examples/ImportTests/AliasImport.sysml create mode 100644 test/SysMLModels/OMG/examples/ImportTests/CircularImport.sysml create mode 100644 test/SysMLModels/OMG/examples/ImportTests/PrivateImportTest.sysml create mode 100644 test/SysMLModels/OMG/examples/ImportTests/QualifiedNameImportTest.sysml create mode 100644 test/SysMLModels/OMG/examples/IndividualsExamples/AnalysisIndividualExample.sysml create mode 100644 test/SysMLModels/OMG/examples/IndividualsExamples/JohnIndividualExample.sysml create mode 100644 test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModel.sysml create mode 100644 test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModelOutside.sysml create mode 100644 test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-2.sysml create mode 100644 test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-3.sysml create mode 100644 test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-2.sysml create mode 100644 test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-3.sysml create mode 100644 test/SysMLModels/OMG/examples/MassRoll-upExample/MassConstraintExample.sysml create mode 100644 test/SysMLModels/OMG/examples/MassRoll-upExample/MassRollup.sysml create mode 100644 test/SysMLModels/OMG/examples/MassRoll-upExample/Vehicles.sysml create mode 100644 test/SysMLModels/OMG/examples/MetadataExamples/IssueMetadataExample.sysml create mode 100644 test/SysMLModels/OMG/examples/MetadataExamples/RationaleMetadataExample.sysml create mode 100644 test/SysMLModels/OMG/examples/MetadataExamples/RequirementMetadataExample.sysml create mode 100644 test/SysMLModels/OMG/examples/MetadataExamples/RiskMetadataExample.sysml create mode 100644 test/SysMLModels/OMG/examples/MetadataExamples/VerificationMetadataExample.sysml create mode 100644 test/SysMLModels/OMG/examples/PacketExample/PacketUsage.sysml create mode 100644 test/SysMLModels/OMG/examples/PacketExample/Packets.sysml create mode 100644 test/SysMLModels/OMG/examples/RequirementsExamples/HSUVRequirements.sysml create mode 100644 test/SysMLModels/OMG/examples/RequirementsExamples/RequirementDerivationExample.sysml create mode 100644 test/SysMLModels/OMG/examples/RequirementsExamples/VehicleRequirementDerivation.sysml create mode 100644 test/SysMLModels/OMG/examples/RoomModel/RoomModel.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ActionTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/AliasTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/AllocationTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/AnalysisTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/AssignmentTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/CalculationTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/CommentTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ConjugationTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ConnectionTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ConstraintTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ControlNodeTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/DecisionTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/DefaultValueTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/DependencyTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/EnumerationTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/FeaturePathTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ImportTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/IndividualTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ItemTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/MetadataTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/MultiplicityTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/OccurrenceTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ParameterTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/PartTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/RequirementTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/RootPackageTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/StateTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/StructuredControlTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/TextualRepresentationTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/TradeStudyTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/UseCaseTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/VariabilityTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/VerificationTest.sysml create mode 100644 test/SysMLModels/OMG/examples/SimpleTests/ViewTest.sysml create mode 100644 test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/CartSample.sysml create mode 100644 test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/EVSample.sysml create mode 100644 test/SysMLModels/OMG/examples/TimesliceAndSnapshotExamples/TimeVaryingAttribute.sysml create mode 100644 test/SysMLModels/OMG/examples/VariabilityExamples/VehicleVariabilityModel.sysml create mode 100644 test/SysMLModels/OMG/examples/VehicleExample/SysMLV2SpecAnnexASimpleVehicleModel.sysml create mode 100644 test/SysMLModels/OMG/examples/VehicleExample/VehicleDefinitions.sysml create mode 100644 test/SysMLModels/OMG/examples/VehicleExample/VehicleIndividuals.sysml create mode 100644 test/SysMLModels/OMG/examples/VehicleExample/VehicleUsages.sysml create mode 100644 test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage-Updated.sysml create mode 100644 test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage.sysml create mode 100644 test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition-Updated.sysml create mode 100644 test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition.sysml create mode 100644 test/SysMLModels/OMG/examples/v1SpecExamples/D.4.7.8Dynamics/HSUVDynamics.sysml create mode 100644 test/SysMLModels/OMG/training/01.Packages/CommentExample.sysml create mode 100644 test/SysMLModels/OMG/training/01.Packages/DocumentationExample.sysml create mode 100644 test/SysMLModels/OMG/training/01.Packages/PackageExample.sysml create mode 100644 test/SysMLModels/OMG/training/02.PartDefinitions/PartDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/03.Generalization/GeneralizationExample.sysml create mode 100644 test/SysMLModels/OMG/training/04.Subsetting/SubsettingExample.sysml create mode 100644 test/SysMLModels/OMG/training/05.Redefinition/RedefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-1.sysml create mode 100644 test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-2.sysml create mode 100644 test/SysMLModels/OMG/training/07.Parts/PartsExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/07.Parts/PartsExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/08.Items/ItemsExample.sysml create mode 100644 test/SysMLModels/OMG/training/09.Connections/ConnectionsExample.sysml create mode 100644 test/SysMLModels/OMG/training/10.Ports/PortConjugationExample.sysml create mode 100644 test/SysMLModels/OMG/training/10.Ports/PortExample.sysml create mode 100644 test/SysMLModels/OMG/training/11.Interfaces/InterfaceDecompositionExample.sysml create mode 100644 test/SysMLModels/OMG/training/11.Interfaces/InterfaceExample.sysml create mode 100644 test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/13.Flows/FlowDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/13.Flows/FlowInterfaceExample.sysml create mode 100644 test/SysMLModels/OMG/training/13.Flows/FlowUsageExample.sysml create mode 100644 test/SysMLModels/OMG/training/14.ActionDefinitions/ActionDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/14.ActionDefinitions/ActionShorthandExample.sysml create mode 100644 test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/15.Actions/ActionDecomposition.sysml create mode 100644 test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/17.Control/Camera.sysml create mode 100644 test/SysMLModels/OMG/training/17.Control/ControlStructuresExample.sysml create mode 100644 test/SysMLModels/OMG/training/17.Control/DecisionExample.sysml create mode 100644 test/SysMLModels/OMG/training/17.Control/ForkJoinExample.sysml create mode 100644 test/SysMLModels/OMG/training/17.Control/MergeExample.sysml create mode 100644 test/SysMLModels/OMG/training/18.ActionPerformance/ActionPerformanceExample.sysml create mode 100644 test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/20.AssignmentActions/AssignmentExample.sysml create mode 100644 test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingExample.sysml create mode 100644 test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingWithPorts.sysml create mode 100644 test/SysMLModels/OMG/training/22.OpaqueActions/OpaqueActionExample.sysml create mode 100644 test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/24.States/StateActions.sysml create mode 100644 test/SysMLModels/OMG/training/24.States/StateDecomposition-1.sysml create mode 100644 test/SysMLModels/OMG/training/24.States/StateDecomposition-2.sysml create mode 100644 test/SysMLModels/OMG/training/25.Transitions/ChangeAndTimeTriggers.sysml create mode 100644 test/SysMLModels/OMG/training/25.Transitions/LocalClockExample.sysml create mode 100644 test/SysMLModels/OMG/training/25.Transitions/TransitionActions.sysml create mode 100644 test/SysMLModels/OMG/training/26.StateExhibition/StateExhibitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/EventOccurrenceExample.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-1.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-2.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/MessagePayloadExample.sysml create mode 100644 test/SysMLModels/OMG/training/27.Occurrences/TimeSliceAndSnapshotExample.sysml create mode 100644 test/SysMLModels/OMG/training/28.Individuals/IndividualsAndRoles-1.sysml create mode 100644 test/SysMLModels/OMG/training/28.Individuals/IndividualsAndSnapshotsExample.sysml create mode 100644 test/SysMLModels/OMG/training/28.Individuals/IndividualsAndTimeSlices.sysml create mode 100644 test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample1.sysml create mode 100644 test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample2.sysml create mode 100644 test/SysMLModels/OMG/training/29.Expressions/MassRollup1.sysml create mode 100644 test/SysMLModels/OMG/training/29.Expressions/MassRollup2.sysml create mode 100644 test/SysMLModels/OMG/training/30.Calculations/CalculationDefinitions.sysml create mode 100644 test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-1.sysml create mode 100644 test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-2.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/AnalyticalConstraints.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-1.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-2.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/DerivationConstraints.sysml create mode 100644 test/SysMLModels/OMG/training/31.Constraints/TimeConstraints.sysml create mode 100644 test/SysMLModels/OMG/training/32.Requirements/RequirementDefinitions.sysml create mode 100644 test/SysMLModels/OMG/training/32.Requirements/RequirementGroups.sysml create mode 100644 test/SysMLModels/OMG/training/32.Requirements/RequirementSatisfaction.sysml create mode 100644 test/SysMLModels/OMG/training/32.Requirements/RequirementUsages.sysml create mode 100644 test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseUsageExample.sysml create mode 100644 test/SysMLModels/OMG/training/33.Analysis/TradeStudyAnalysisExample.sysml create mode 100644 test/SysMLModels/OMG/training/34.Verification/VerificationCaseDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/34.Verification/VerificationCaseUsageExample.sysml create mode 100644 test/SysMLModels/OMG/training/35.UseCases/UseCaseDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/35.UseCases/UseCaseUsageExample.sysml create mode 100644 test/SysMLModels/OMG/training/36.Variability/VariationConfiguration.sysml create mode 100644 test/SysMLModels/OMG/training/36.Variability/VariationDefinitions.sysml create mode 100644 test/SysMLModels/OMG/training/36.Variability/VariationUsages.sysml create mode 100644 test/SysMLModels/OMG/training/37.Dependencies/DependencyExample.sysml create mode 100644 test/SysMLModels/OMG/training/38.Allocation/AllocationDefinitionExample.sysml create mode 100644 test/SysMLModels/OMG/training/38.Allocation/AllocationUsageExample.sysml create mode 100644 test/SysMLModels/OMG/training/39.Metadata/MetadataExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/39.Metadata/MetadataExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/40.Filtering/FilteringExample-1.sysml create mode 100644 test/SysMLModels/OMG/training/40.Filtering/FilteringExample-2.sysml create mode 100644 test/SysMLModels/OMG/training/41.LanguageExtension/ModelLibraryExample.sysml create mode 100644 test/SysMLModels/OMG/training/41.LanguageExtension/SemanticMetadataExample.sysml create mode 100644 test/SysMLModels/OMG/training/41.LanguageExtension/UserKeywordExample.sysml create mode 100644 test/SysMLModels/OMG/training/42.Views/ViewpointExample.sysml create mode 100644 test/SysMLModels/OMG/training/42.Views/ViewsExample.sysml create mode 100644 test/SysMLModels/OMG/validation/01-PartsTree/1a-PartsTree.sysml create mode 100644 test/SysMLModels/OMG/validation/01-PartsTree/1c-PartsTreeRedefinition.sysml create mode 100644 test/SysMLModels/OMG/validation/01-PartsTree/1d-PartsTreeWithReference.sysml create mode 100644 test/SysMLModels/OMG/validation/02-PartsInterconnection/2a-PartsInterconnection.sysml create mode 100644 test/SysMLModels/OMG/validation/02-PartsInterconnection/2c-PartsInterconnection-MultipleDecompositions.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-1.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-2.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-3.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-1.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-2.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-3.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3d-Function-basedBehavior-item.sysml create mode 100644 test/SysMLModels/OMG/validation/03-Function-basedBehavior/3e-Function-basedBehavior-item.sysml create mode 100644 test/SysMLModels/OMG/validation/04-FunctionalAllocation/4a-FunctionalAllocation.sysml create mode 100644 test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1.sysml create mode 100644 test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1a.sysml create mode 100644 test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-2.sysml create mode 100644 test/SysMLModels/OMG/validation/06-IndividualAndSnapshots/6-IndividualAndSnapshots.sysml create mode 100644 test/SysMLModels/OMG/validation/07-VariantConfiguration/7a-VariantConfiguration-GeneralConcept.sysml create mode 100644 test/SysMLModels/OMG/validation/07-VariantConfiguration/7a1-VariantConfiguration-GeneralConcept-a.sysml create mode 100644 test/SysMLModels/OMG/validation/07-VariantConfiguration/7b-VariantConfigurations.sysml create mode 100644 test/SysMLModels/OMG/validation/08-Requirements/8-Requirements.sysml create mode 100644 test/SysMLModels/OMG/validation/09-Verification/9-Verification-simplified.sysml create mode 100644 test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10a-Analysis.sysml create mode 100644 test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10b-Trade-offAmongAlternativeConfigurations.sysml create mode 100644 test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10c-FuelEconomyAnalysis.sysml create mode 100644 test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10d-DynamicsAnalysis.sysml create mode 100644 test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11a-View-Viewpoint.sysml create mode 100644 test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11b-SafetyAndSecurityFeatureViews.sysml create mode 100644 test/SysMLModels/OMG/validation/12-DependencyRelationships/12a-Dependency.sysml create mode 100644 test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation-1.sysml create mode 100644 test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation.sysml create mode 100644 test/SysMLModels/OMG/validation/13-ModelContainment/13a-ModelContainment.sysml create mode 100644 test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-1.sysml create mode 100644 test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-2.sysml create mode 100644 test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup.sysml create mode 100644 test/SysMLModels/OMG/validation/14-LanguageExtensions/14a-LanguageExtensions.sysml create mode 100644 test/SysMLModels/OMG/validation/14-LanguageExtensions/14b-LanguageExtensions.sysml create mode 100644 test/SysMLModels/OMG/validation/14-LanguageExtensions/14c-LanguageExtensions.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_01-Constants.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_02-BasicValueProperties.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_03-ValueExpression.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_04-LogicalExpressions.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_05-UnificationOfExpressionAndConstraintDefinition.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_06-SystemOfQuantities.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_07-SystemOfUnitsAndScales.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_08-RangeRestriction.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_10-PrimitiveDataTypes.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_11-VariableLengthCollectionTypes.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_12-CompoundValueType.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_13-DiscretelySampledFunctionValue.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19-MaterialsWithProperties.sysml create mode 100644 test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19a-MaterialsWithProperties.sysml create mode 100644 test/SysMLModels/OMG/validation/17-SequenceModeling/17a-Sequence-Modeling.sysml create mode 100644 test/SysMLModels/OMG/validation/17-SequenceModeling/17b-Sequence-Modeling.sysml create mode 100644 test/SysMLModels/OMG/validation/18-UseCase/18-UseCase.sysml create mode 100644 test/SysMLModels/README.md diff --git a/src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs b/src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs deleted file mode 100644 index c6808bd6..00000000 --- a/src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) DEMA Consulting -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -namespace DemaConsulting.SysML2Tools.Parser; - -/// -/// Severity level of a SysML diagnostic message. -/// -public enum DiagnosticSeverity -{ - /// Informational message — not a problem. - Info, - - /// Warning — parseable but suspicious. - Warning, - - /// Error — the file cannot be parsed or resolved correctly. - Error -} diff --git a/src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs b/src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs deleted file mode 100644 index 57ee9b6c..00000000 --- a/src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) DEMA Consulting -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -namespace DemaConsulting.SysML2Tools.Parser; - -/// -/// A single diagnostic message produced while parsing a SysML v2 file. -/// -/// -/// The source file path (or a [stdlib]… virtual path for embedded library files). -/// -/// One-based line number within . -/// Zero-based column offset within the line. -/// Severity of the diagnostic. -/// Human-readable description of the problem. -public sealed record SysmlDiagnostic( - string FilePath, - int Line, - int Column, - DiagnosticSeverity Severity, - string Message); diff --git a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs deleted file mode 100644 index a4821cf1..00000000 --- a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) DEMA Consulting -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -namespace DemaConsulting.SysML2Tools.Parser; - -/// -/// The aggregate result of parsing a SysML v2 workspace (stdlib + user files). -/// -public sealed class WorkspaceParseResult -{ - /// - /// Initializes a new instance of . - /// - /// All files that were parsed (stdlib + user files). - /// All diagnostics collected across all files. - internal WorkspaceParseResult(IReadOnlyList files, IReadOnlyList diagnostics) - { - Files = files; - Diagnostics = diagnostics; - } - - /// - /// Gets all file paths that were parsed, including stdlib virtual paths. - /// - public IReadOnlyList Files { get; } - - /// - /// Gets all diagnostics collected across every parsed file. - /// - public IReadOnlyList Diagnostics { get; } - - /// - /// Gets a value indicating whether any error-level diagnostics exist. - /// - public bool HasErrors => Diagnostics.Any(d => d.Severity == DiagnosticSeverity.Error); -} diff --git a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs index 7a1cd651..4081d9b2 100644 --- a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs +++ b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs @@ -24,6 +24,70 @@ namespace DemaConsulting.SysML2Tools.Parser; +/// +/// Severity level of a SysML diagnostic message. +/// +public enum DiagnosticSeverity +{ + /// Informational message — not a problem. + Info, + + /// Warning — parseable but suspicious. + Warning, + + /// Error — the file cannot be parsed or resolved correctly. + Error +} + +/// +/// A single diagnostic message produced while parsing a SysML v2 file. +/// +/// +/// The source file path (or a [stdlib]… virtual path for embedded library files). +/// +/// One-based line number within . +/// Zero-based column offset within the line. +/// Severity of the diagnostic. +/// Human-readable description of the problem. +public sealed record SysmlDiagnostic( + string FilePath, + int Line, + int Column, + DiagnosticSeverity Severity, + string Message); + +/// +/// The aggregate result of parsing a SysML v2 workspace (stdlib + user files). +/// +public sealed class WorkspaceParseResult +{ + /// + /// Initializes a new instance of . + /// + /// All files that were parsed (stdlib + user files). + /// All diagnostics collected across all files. + internal WorkspaceParseResult(IReadOnlyList files, IReadOnlyList diagnostics) + { + Files = files; + Diagnostics = diagnostics; + } + + /// + /// Gets all file paths that were parsed, including stdlib virtual paths. + /// + public IReadOnlyList Files { get; } + + /// + /// Gets all diagnostics collected across every parsed file. + /// + public IReadOnlyList Diagnostics { get; } + + /// + /// Gets a value indicating whether any error-level diagnostics exist. + /// + public bool HasErrors => Diagnostics.Any(d => d.Severity == DiagnosticSeverity.Error); +} + /// /// Parses one or more SysML v2 source files together with the OMG stdlib. /// diff --git a/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs b/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs new file mode 100644 index 00000000..79d80cbb --- /dev/null +++ b/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs @@ -0,0 +1,85 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using DemaConsulting.SysML2Tools.Parser; + +namespace DemaConsulting.SysML2Tools.Tests.Parser; + +/// +/// Tests that validate the parser against the OMG reference model files. +/// +public sealed class OmgModelsTests +{ + /// + /// Finds the test/SysMLModels/OMG directory relative to the test assembly. + /// + private static string FindOmgModelsRoot() + { + // Walk up from the test assembly location to find the repo root + var dir = new DirectoryInfo(AppContext.BaseDirectory); + while (dir != null && !Directory.Exists(Path.Combine(dir.FullName, "test", "SysMLModels", "OMG"))) + { + dir = dir.Parent; + } + + if (dir == null) + { + throw new DirectoryNotFoundException("Cannot locate test/SysMLModels/OMG from test assembly location."); + } + + return Path.Combine(dir.FullName, "test", "SysMLModels", "OMG"); + } + + /// + /// Every OMG reference model file (examples, training, validation) must + /// parse without syntax errors. This is the Phase 1 gate from the architecture. + /// + [Fact] + public void Parse_OmgModels_NoSyntaxErrors() + { + var omgRoot = FindOmgModelsRoot(); + var files = Directory.GetFiles(omgRoot, "*.sysml", SearchOption.AllDirectories); + Assert.NotEmpty(files); + + var result = WorkspaceParser.Parse(files); + + var errors = result.Diagnostics + .Where(d => d.Severity == DiagnosticSeverity.Error) + .ToList(); + + Assert.True( + errors.Count == 0, + $"{errors.Count} syntax error(s) in OMG models:{Environment.NewLine}" + + string.Join(Environment.NewLine, errors.Select(d => + $" {d.FilePath}({d.Line},{d.Column}): {d.Message}"))); + } + + /// + /// Confirms all 251 expected OMG model files are present. + /// + [Fact] + public void OmgModels_FileCount_IsExpected() + { + var omgRoot = FindOmgModelsRoot(); + var files = Directory.GetFiles(omgRoot, "*.sysml", SearchOption.AllDirectories); + Assert.True(files.Length >= 251, + $"Expected at least 251 OMG model files, found {files.Length}"); + } +} diff --git a/test/SysMLModels/OMG/README.md b/test/SysMLModels/OMG/README.md new file mode 100644 index 00000000..c36576a8 --- /dev/null +++ b/test/SysMLModels/OMG/README.md @@ -0,0 +1,68 @@ +# OMG SysML v2 Models + +This folder contains SysML v2 model files from the OMG reference implementation +repository, used as ground-truth test inputs for the SysML2Tools parser. + +## Source + +- **Repository**: [Systems-Modeling/SysML-v2-Release](https://github.com/Systems-Modeling/SysML-v2-Release) +- **Tag**: `2026-04` +- **Subtree**: `sysml/src/` (examples, training, and validation models only; + the standard library is embedded separately in `src/DemaConsulting.SysML2Tools/Stdlib/`) + +## License + +Copyright © 2019–2024 Model Driven Solutions, Inc. and other contributors. +Distributed under the [Eclipse Public License 2.0 (EPL-2.0)](https://www.eclipse.org/legal/epl-2.0/). + +## Folder and File Name Transformations + +The upstream repository uses spaces in folder and file names. All spaces have +been removed using the following rule: + +> A space followed by an alphanumeric character is removed and that character +> is uppercased (CamelCase join). Any remaining spaces (e.g., before a hyphen) +> are then stripped. + +Examples: + +| Upstream name | Stored as | +| --- | --- | +| `Vehicle Example/` | `VehicleExample/` | +| `Simple Tests/` | `SimpleTests/` | +| `1a-Parts Tree.sysml` | `1a-PartsTree.sysml` | +| `SysML v2 Spec Annex A SimpleVehicleModel.sysml` | `SysMLV2SpecAnnexASimpleVehicleModel.sysml` | +| `7a-Variant Configuration - General Concept.sysml` | `7a-VariantConfiguration-GeneralConcept.sysml` | +| `15_07-System of Units and Scales.sysml` | `15_07-SystemOfUnitsAndScales.sysml` | + +File contents are unchanged. + +## Regenerating + +To update to a newer OMG release tag, run from the repository root: + +```pwsh +$tag = '2026-04' # update to new tag +$outRoot = 'test\SysMLModels\OMG' + +function Convert-SpacesToCamel($name) { + $r = [regex]::Replace($name, ' ([a-zA-Z0-9])', { $args[0].Groups[1].Value.ToUpper() }) + $r.Replace(' ', '') +} + +$baseRaw = "https://raw.githubusercontent.com/Systems-Modeling/SysML-v2-Release/$tag" +$resp = Invoke-RestMethod "https://api.github.com/repos/Systems-Modeling/SysML-v2-Release/git/trees/$tag`?recursive=1" +$files = $resp.tree | Where-Object { $_.path -like 'sysml/src/*' -and $_.path -like '*.sysml' } + +Remove-Item $outRoot\examples, $outRoot\training, $outRoot\validation -Recurse -Force -ErrorAction SilentlyContinue + +foreach ($file in $files) { + $relPath = $file.path.Substring('sysml/src/'.Length) + $newParts = ($relPath -split '/') | ForEach-Object { Convert-SpacesToCamel $_ } + $dest = Join-Path $outRoot ($newParts -join '\') + New-Item -ItemType Directory -Path (Split-Path $dest -Parent) -Force | Out-Null + Invoke-WebRequest -Uri "$baseRaw/$($file.path.Replace(' ','%20'))" -OutFile $dest -UseBasicParsing +} +``` + +Update the **Tag** entry above and commit the result. diff --git a/test/SysMLModels/OMG/examples/AnalysisExamples/AnalysisAnnotation.sysml b/test/SysMLModels/OMG/examples/AnalysisExamples/AnalysisAnnotation.sysml new file mode 100644 index 00000000..5d974866 --- /dev/null +++ b/test/SysMLModels/OMG/examples/AnalysisExamples/AnalysisAnnotation.sysml @@ -0,0 +1,26 @@ +package AnalysisAnnotation { + private import ScalarValues::Real; + private import AnalysisTooling::*; + private import ISQ::*; + + action def ComputeDynamics { + metadata ToolExecution { + toolName = "ModelCenter"; + uri = "aserv://localhost/Vehicle/Equation1"; + } + + in dt : TimeValue { @ToolVariable { name = "deltaT"; } } + in whlpwr : PowerValue { @ToolVariable { name = "power"; } } + in Cd : Real { @ToolVariable { name = "C_D"; } } + in Cf: Real { @ToolVariable { name = "C_F"; } } + in tm : MassValue { @ToolVariable { name = "mass"; } } + in v_in : SpeedValue { @ToolVariable { name = "v0"; } } + in x_in : LengthValue { @ToolVariable { name = "x0"; } } + + out a_out : AccelerationValue { @ToolVariable { name = "a"; } } + out v_out : SpeedValue { @ToolVariable { name = "v"; } } + out x_out : LengthValue { @ToolVariable { name = "x"; } } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/AnalysisExamples/Dynamics.sysml b/test/SysMLModels/OMG/examples/AnalysisExamples/Dynamics.sysml new file mode 100644 index 00000000..26746dd7 --- /dev/null +++ b/test/SysMLModels/OMG/examples/AnalysisExamples/Dynamics.sysml @@ -0,0 +1,91 @@ +package Dynamics { + private import ScalarValues::Real; + private import ISQ::*; + + // Function definitions + + calc def Power { + in whlpwr : PowerValue; in Cd : Real; in Cf : Real; in tm : MassValue; in v : SpeedValue; + return tp : PowerValue = whlpwr - Cd * v - Cf * tm * v; + } + + calc def Acceleration { in dt : TimeValue; in tm : MassValue; in tp: PowerValue; + return a : AccelerationValue = tp * dt * tp; + } + + calc def Velocity { in dt : TimeValue; in v0 : SpeedValue; in a : AccelerationValue; + return v : SpeedValue = v0 + a * dt; + } + + calc def Position { in dt : TimeValue; in x0 : LengthValue; in v : SpeedValue; + return x : LengthValue = x0 + v * dt; + } + + // Analysis action def + + action def StraightLineVehicleDynamics { + + in attribute dt : TimeValue; + in attribute whlpwr : PowerValue; + in attribute Cd : Real; + in attribute Cf: Real; + in attribute tm : MassValue; + in attribute v_in : SpeedValue; + in attribute x_in : LengthValue; + + out attribute a_out : AccelerationValue; + out attribute v_out : SpeedValue; + out attribute x_out : LengthValue; + + assert constraint { + attribute tp : PowerValue; + + tp == Power(whlpwr, Cd, Cf, tm, v_in) & + a_out == Acceleration(dt, tm, tp) & + v_out == Velocity(dt, v_in, a_out) & + x_out == Position(dt, x_in, v_in) + } + } + + + // Analysis actions + + action dyn1 : StraightLineVehicleDynamics { + in attribute dt : TimeValue; + in attribute whlpwr : PowerValue; + in attribute Cd : Real; + in attribute Cf: Real; + in attribute tm : MassValue; + in attribute v_in : SpeedValue; + in attribute x_in : LengthValue; + + attribute tp : PowerValue = Power(whlpwr, Cd, Cf, tm, v_in); + + out attribute :>> a_out : AccelerationValue = Acceleration(dt, tm, tp); + out attribute :>> v_out : SpeedValue = Velocity(dt, v_in, a_out); + out attribute :>> x_out : LengthValue = Position(dt, x_in, v_in); + } + + action dyn2 : StraightLineVehicleDynamics { + calc acc : Acceleration { + in dt = dyn2::dt; + in tm = dyn2::tm; + in tp = Power(whlpwr, Cd, Cf, tm, v_in); + } + bind a_out = acc.a; + + calc vel : Velocity { + in dt = dyn2::dt; + in v0 = dyn2::v_in; + in a = acc.a; + } + bind v_out = vel.v; + + calc pos : Position { + in dt = dyn2::dt; + in x0 = dyn2::x_in; + in v0 = vel.v; + } + bind x_out = pos.x; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/AnalysisExamples/TurbojetStageAnalysis.sysml b/test/SysMLModels/OMG/examples/AnalysisExamples/TurbojetStageAnalysis.sysml new file mode 100644 index 00000000..5e2991c2 --- /dev/null +++ b/test/SysMLModels/OMG/examples/AnalysisExamples/TurbojetStageAnalysis.sysml @@ -0,0 +1,110 @@ +package 'Turbojet Stage Analysis' { + private import Quantities::ScalarQuantityValue; + private import MeasurementReferences::DimensionOneValue; + private import ISQ::*; + + package 'Thermodynamic Functions' { + calc def 'Ideal Gas Law' { in rho; in R_bar; in T; + return p = rho * R_bar * T; + } + + calc def 'Reversible Adiabatic Compression Density' { in rho_1; in p_1; in p_2; in gamma; + return rho_2 = rho_1 * (p_2 / p_1)^(1/gamma); + } + + calc def 'Reversible Adiabatic Compression Temperature' { in T_1; in p_1; in p_2; in gamma; + return T_2 = T_1 * (p_2 / p_1)**((gamma - 1) / gamma); + } + + calc def 'Total Pressure' { in P_static; in rho; in V; + 1/2 * rho * V^2 + P_static + } + + // Showing explicit parameter typing + calc def 'Total Temperature' { in T_static : TemperatureValue; in Cp : DimensionOneValue; in V : VolumeValue; + return : TemperatureValue = 1/(2 * Cp) * V^2 + T_static; + } + + calc def 'Total Enthalpy' { in h_total; in h_static; in V; + return H_total = 1/2 * V^2 + h_static; + } + } + + package 'Thermodynamics Structure' { + part def 'Ideal Gas Parcel' { + comment + /* + The parcel is an infinitesimal volume used to analyze points in a flow + */ + attribute 'Molar Mass'; + attribute 'Density'; + attribute 'Pressure'; + attribute 'Temperature'; + attribute 'Enthalpy'; + attribute 'Specific Gas Constant'; + } + + part def 'Moving Ideal Gas Parcel' specializes 'Ideal Gas Parcel' { + comment about 'Stagnation Pressure' + /* + Stagnation pressure is the pressure of the parcel if the kinetic energy defined by its + velocity in a given coordinate frame is converted to gas internal energy through deceleration + to a velocity that matches the current frame. + */ + attribute 'Stagnation Pressure'; + attribute 'Stagnation Temperature'; + attribute 'Stagnation Enthalpy'; + + comment about 'Static Pressure' + /* + Static pressure is the pressure of the parcel as it moves + */ + attribute 'Static Pressure' redefines 'Ideal Gas Parcel'::'Pressure'; + attribute 'Static Temperature' redefines 'Ideal Gas Parcel'::'Temperature'; + attribute 'Static Enthalpy' redefines 'Ideal Gas Parcel'::'Enthalpy'; + } + + action def 'Thermodynamic Process'; // need start and end shots to show beginning and end attributes + + action def 'Adiabatic Process' specializes 'Thermodynamic Process' { + /* + Thermodynamic process typically have their states defined at beginning and end + of the process (since these starts are path-independent) + */ + action 'Stage 1' :>> start; + action 'Stage 2' :>> done; + } + + action def 'Reversible Adiabatic Process' specializes 'Adiabatic Process'; + } + + package 'Low-Pressure Compressor Analysis' { + + part 'Analysis Context' { + private import 'Thermodynamic Functions'::*; + + part 'Inlet Gas' : 'Thermodynamics Structure'::'Moving Ideal Gas Parcel' { + // Explicit binding notation + calc 'Solve for Pressure1' : 'Ideal Gas Law'; + bind 'Density' = 'Solve for Pressure1'.rho; + bind 'Specific Gas Constant' = 'Solve for Pressure1'.R_bar; + bind 'Static Temperature' = 'Solve for Pressure1'.T; + bind 'Static Pressure' = 'Solve for Pressure1'.p; + + // Shorthand parameter binding notation + calc 'Solve for Pressure2' : 'Ideal Gas Law' { + in rho = 'Density'; + in R_bar = 'Specific Gas Constant'; + in T = 'Static Temperature'; + } + + // Invocation expression notation + attribute :>> 'Static Pressure' = 'Ideal Gas Law'('Density', 'Specific Gas Constant', 'Static Temperature'); + + // Equation as a constraint (note "==") + constraint { 'Static Pressure' == 'Ideal Gas Law'('Density', 'Specific Gas Constant', 'Static Temperature') } + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/AnalysisExamples/VehicleAnalysisDemo.sysml b/test/SysMLModels/OMG/examples/AnalysisExamples/VehicleAnalysisDemo.sysml new file mode 100644 index 00000000..1310f62a --- /dev/null +++ b/test/SysMLModels/OMG/examples/AnalysisExamples/VehicleAnalysisDemo.sysml @@ -0,0 +1,286 @@ +package 'Vehicle Analysis Demo' { + private import ScalarValues::*; + private import ISQ::*; + private import USCustomaryUnits::*; + + private import VehicleQuantities::*; + private import VehicleModel::*; + private import FuelEconomyRequirementsModel::*; + private import DynamicsModel::*; + private import FuelEconomyAnalysisModel::*; + + package VehicleQuantities { + private import Quantities::*; + private import MeasurementReferences::*; + + attribute def DistancePerVolumeUnit :> DerivedUnit { + private attribute distancePF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute volumePF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (distancePF, volumePF); } + } + + attribute def DistancePerVolumeValue :> ScalarQuantityValue { + :>> num : Real; + :>> mRef : DistancePerVolumeUnit; + } + + attribute gallon : VolumeUnit = 231.0 * 'in' ** 3; + attribute mpg : DistancePerVolumeUnit = 'mi' / gallon; + } + + package VehicleModel { + item def Fuel; + + port def FuelPort { + out item fuel: Fuel; + } + + part def FuelTank { + attribute volumeMax : VolumeValue; + attribute fuelVolume : VolumeValue; + attribute fuelLevel : Real = fuelVolume / volumeMax; + + port fuelInPort : ~FuelPort; + port fuelOutPort : FuelPort; + } + + part def Wheel { + attribute diameter : LengthValue; + } + + part def Vehicle { + attribute mass : MassValue; + attribute cargoMass : MassValue; + + attribute wheelDiameter : LengthValue; + attribute driveTrainEfficiency : Real; + + attribute fuelEconomy_city : DistancePerVolumeValue; + attribute fuelEconomy_highway : DistancePerVolumeValue; + + port fuelInPort : ~FuelPort; + } + + part vehicle_c1 : Vehicle { + port :>> fuelInPort { + in item :>> fuel; + } + + part fuelTank : FuelTank { + port :>> fuelInPort { + in item :>> fuel; + } + } + + bind fuelInPort.fuel = fuelTank.fuelInPort.fuel; + + part wheel : Wheel[4] { + :>> diameter = wheelDiameter; + } + } + } + + package FuelEconomyRequirementsModel { + requirement def FuelEconomyRequirement { + attribute actualFuelEconomy : DistancePerVolumeValue; + attribute requiredFuelEconomy : DistancePerVolumeValue; + + require constraint { actualFuelEconomy >= requiredFuelEconomy } + } + + requirement cityFuelEconomyRequirement : FuelEconomyRequirement { + :>> requiredFuelEconomy = 25 [mpg]; + } + + requirement highwayFuelEconomyRequirement : FuelEconomyRequirement { + :>> requiredFuelEconomy = 30 [mpg]; + } + } + + package DynamicsModel { + calc def Acceleration { in p : PowerValue; in m : MassValue; in v : SpeedValue; + return : AccelerationValue = p / (m * v); + } + + calc def Velocity { in v0 : SpeedValue; in a : AccelerationValue; in dt : TimeValue; + return : SpeedValue = v0 + a * dt; + } + + calc def Position { in x0 : LengthValue; in v : SpeedValue; in dt : TimeValue; + return : LengthValue = x0 + v * dt; + } + + constraint def StraightLineDynamicsEquations { + in p : PowerValue; + in m : MassValue; + in dt : TimeValue; + in x_i : LengthValue; + in v_i : SpeedValue; + in x_f : LengthValue; + in v_f : SpeedValue; + in a : AccelerationValue; + + attribute v_avg : SpeedValue = (v_i + v_f)/2; + + a == Acceleration(p, m, v_avg) & + v_f == Velocity(v_i, a, dt) & + x_f == Position(x_i, v_avg, dt) + } + + action def StraightLineDynamics { + in power : PowerValue; + in mass : MassValue; + in delta_t : TimeValue; + in x_in : LengthValue; + in v_in : SpeedValue; + out x_out : LengthValue; + out v_out : SpeedValue; + out a_out : AccelerationValue; + + assert constraint dynamics : StraightLineDynamicsEquations { + in p = power; + in m = mass; + in dt = delta_t; + in x_i = x_in; + in v_i = v_in; + in x_f = x_out; + in v_f = v_out; + in a = a_out; + } + } + } + + package FuelEconomyAnalysisModel { + private import SequenceFunctions::size; + private import SampledFunctions::SampledFunction; + private import SampledFunctions::SamplePair; + private import ControlFunctions::forAll; + + attribute def ScenarioState { + position : LengthValue; + velocity : SpeedValue; + } + + attribute def NominalScenario :> SampledFunction { + attribute def TimeStateRecord :> SamplePair { + t : TimeValue :>> domainValue; + s : ScenarioState :>> rangeValue; + } + :>> samples : TimeStateRecord; + n : Natural = size(samples); + } + + analysis def FuelEconomyAnalysis { + subject vehicle: Vehicle; + in attribute scenario : NominalScenario; + in requirement fuelEconomyRequirement : FuelEconomyRequirement; + return calculatedFuelEconomy : DistancePerVolumeValue; + + objective fuelEconomyAnalysisObjective { + doc + /* + * The objective of this analysis is to determine whether the + * current vehicle design configuration can satisfy the fuel + * economy requirement. + */ + + assume constraint { + vehicle.wheelDiameter == 33 ['in'] & + vehicle.driveTrainEfficiency == 0.4 + } + + require fuelEconomyRequirement { + :>> actualFuelEconomy = calculatedFuelEconomy; + } + } + + action dynamicsAnalysis { + in sc: NominalScenario; + out power : PowerValue[*]; + out acceleration : AccelerationValue[*]; + /* + * Solve for the required engine power as a function of time + * to support the scenarios. + */ + assert constraint straightLineDynamics { + (1..sc.n-1)->forAll {in i: Integer; + private thisSample : NominalScenario::TimeStateRecord = + sc.samples#(i); + private nextSample : NominalScenario::TimeStateRecord = + sc.samples#(i+1); + StraightLineDynamicsEquations ( + p = power#(i), + m = vehicle.mass, + dt = nextSample.t - thisSample.t, + x_i = thisSample.s.position, + v_i = thisSample.s.velocity, + x_f = nextSample.s.position, + v_f = nextSample.s.velocity, + a = acceleration#(i) + ) + } + } + } + + action fuelConsumptionAnalysis { + in power : PowerValue[*] = dynamicsAnalysis.power; + in acceleration : AccelerationValue[*] = dynamicsAnalysis.acceleration; + out fuelEconomy : DistancePerVolumeValue = calculatedFuelEconomy; + /* + * Solve the engine equations to determine how much fuel is + * consumed. The engine RPM is a function of the speed of the + * vehicle and the gear state. + */ + } + } + } + + part vehicleFuelEconomyAnalysisContext { + requirement vehicleFuelEconomyRequirementsGroup { + subject vehicle : Vehicle; + + requirement vehicleFuelEconomyRequirement_city :> cityFuelEconomyRequirement { + doc /* The vehicle shall provide a fuel economy that is greater than or equal to + * 25 miles per gallon for the nominal city driving scenarios. + */ + + :>> actualFuelEconomy = vehicle.fuelEconomy_city; + + assume constraint { vehicle.cargoMass == 1000 [lb] } + } + + requirement vehicleFuelEconomyRequirement_highway :> highwayFuelEconomyRequirement { + doc /* The vehicle shall provide a fuel economy that is greater than or equal to + * 30 miles per gallon for the nominal highway driving scenarios. + */ + + :>> actualFuelEconomy = vehicle.fuelEconomy_highway; + + assume constraint { vehicle.cargoMass == 1000 [lb] } + } + + } + + attribute cityScenario : NominalScenario; + attribute highwayScenario : NominalScenario; + + analysis cityFuelEconomyAnalysis : FuelEconomyAnalysis { + subject vehicle = vehicle_c1; + in attribute scenario = cityScenario; + in requirement fuelEconomyRequirement = cityFuelEconomyRequirement; + } + + analysis highwayFuelEconomyAnalysis : FuelEconomyAnalysis { + subject vehicle = vehicle_c1; + in attribute scenario = highwayScenario; + in requirement fuelEconomyRequirement = highwayFuelEconomyRequirement; + } + + part vehicle_c1_analysized :> vehicle_c1 { + attribute :>> fuelEconomy_city = cityFuelEconomyAnalysis.calculatedFuelEconomy; + attribute :>> fuelEconomy_highway = highwayFuelEconomyAnalysis.calculatedFuelEconomy; + } + + satisfy vehicleFuelEconomyRequirementsGroup by vehicle_c1_analysized; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFCoreLib.sysml b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFCoreLib.sysml new file mode 100644 index 00000000..81184f88 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFCoreLib.sysml @@ -0,0 +1,55 @@ +// /** Mandatory Services and Systems */ +library package AHFCoreLib { + private import AHFProfileLib::*; + private import ScalarValues::*; + private import AHFProfileMetadata::*; + + #service port def ServiceDiscovery { + // The functionalities as Requests (Operations) cannot be defined yet + // We could consider using flows to designate the functionalities + } + + #service port def ServiceDiscoveryDD :> ServiceDiscovery{ + } + + #service port def Authorisation { + attribute publickey:String; // just as examples + } + + #service port def AuthorisationDD :> Authorisation{ + } + + + #clouddd ArrowheadCore{ + // /** Design Level */ + // First the system definitions (SysD) of core systems + + #system service_registry { + #service serviceDiscovery : ServiceDiscovery ; + } + + #system authorization{ + #service authorisation : Authorisation; + attribute protocol:String = "HTTP"; + } + + #system orchestrationDesign; // just indicated for now + + // /** Design Description level */ + #systemdd service_registry_DD :> service_registry{ + #servicedd :>> serviceDiscovery:ServiceDiscoveryDD { + #idd serviceDiscovery_HTTP ;// nested port for HTTP protocol + // here we refer the functionalities like operation Register etc. + #idd serviceDiscovery_MQTT ; // nested port for MQTT protocol + } + } + + #systemdd authorization_DD :> authorization{ + #servicedd :>> authorisation { + #idd authorisation_HTTP ; // nested port for HTTP protocol + #idd authorisation_MQTT ; // nested port for MQTT protocol + } + action Echo_behavior :> ServiceMethod; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFNorwayTopics.sysml b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFNorwayTopics.sysml new file mode 100644 index 00000000..ae4511f0 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFNorwayTopics.sysml @@ -0,0 +1,160 @@ +package AHFNorway { + doc /* This is the Norwegian use-case for Arrowhead Framework */ + // The use-case is for Productive4.0 and Arrowhead Tools + // The system is taken from a chemical factory + // This is focusing on the monitoring of products when delivered + private import AHFProfileLib::*; + private import AHFProfileMetadata::*; + private import AHFCoreLib::**; + private import ScalarValues::*; + + #service def APISService { + doc /* Service design */ + + attribute :>> serviceDefinition = "APISPullService"; + attribute :>> intrfce_protocol = "{JSON}"; + attribute :>> serviceURL = "pull"; + } + + #servicedd port def APIS_DD :> APISService { + doc /* Service design description with nested protocol-specific ports */ + + #idd port APIS_HTTP { + // the asynch implementation of synchronous remote calls + out cll:CallGiveItems; + in retrn:ResultGiveItems; + } + + #idd port APIS_MQTT { + // GetAllItems functionality + out pub:Publish; + out retall:Return_AllItems; + in subscr:Subscribe; + } + } + + // Asynchronous signals + attribute def Publish {nametopic:String;} + attribute def Subscribe{nametopic:String;} + attribute def Return_AllItems {itms:String;} + attribute def Subscribe_giveItems{itms:String;} + attribute def Return_Ack{ack:Boolean;} + + // Signals for implementing the remote procedure call by asynch signals + attribute def CallGiveItems{itms:String; } + attribute def ResultGiveItems{ack:Boolean;} + + #clouddd AHFNorway_LocalCloudDD :> ArrowheadCore { + #systemdd TellUConsumer { + #servicedd serviceDiscovery:~ServiceDiscoveryDD ; // communicating with ServiceRegistry + #servicedd apisp:APIS_DD ; + + attribute :>> systemname = "UngerApisClient"; + attribute :>> address = "Unger_network_ip"; + attribute :>> portno = 0; + + // We want an operation call to GiveItems, and actually sending the payload + // Call apisp::APIS_HTTP::giveItems(in allitems: String = "All the items", out ackback:Boolean); + + state TellUbehavior{ + entry send new CallGiveItems("All the items") via apisp.APIS_HTTP; + then Wait; + state Wait; + accept rs:ResultGiveItems + // Here do whatever about the result rs.ret + then Wait; + } + + } + + #systemdd APISProducer { + #servicedd serviceDiscovery:~ServiceDiscoveryDD ; // communicating with ServiceRegistry + #servicedd tellu:~APIS_DD; // providing the APISService + #servicedd apisc:APIS_DD ; // talking to APISConsumer + + :>> systemname = "PrediktorApisServer"; + :>> address = "Prediktor_network_ip"; + :>> portno = 6565; + attribute x:Boolean; + + action giveItems :> ServiceMethod + { in itms:String; out ack:Boolean; + /* Forward itms and return an ack */ + first start; + then send new Return_AllItems(itms) via apisc.APIS_MQTT; + success = true; + bind ack = success; + } + + state APISPbehavior{ + entry send new Publish("Return_AllItems") via apisc.APIS_MQTT; + then WaitOnData; + + state WaitOnData; + accept cl:CallGiveItems via tellu.APIS_HTTP + do action { + first start; + then action giveItems{ in itms=cl.itms; out ack=x; } + then send new ResultGiveItems(x) via tellu.APIS_HTTP; + } + then WaitOnData; + } + } + + #systemdd APISConsumer { + #servicedd serviceDiscovery:~ServiceDiscovery ; // communicating with ServiceRegistry + #servicedd apisp:~APIS_DD ; + :>> systemname = "TellUClient"; + :>> address = "Prediktor_network_ip"; + :>> portno = 1; + + // Now sending signal to the remote behavior through the port functionality + state MQTT_APISP { + entry send new Subscribe("Return_AllItems") via apisp.APIS_MQTT; + then Idle; + state Idle; + accept Return_AllItems via apisp.APIS_MQTT + // Get the stuff and do something with them + then Idle; + } + } + + part MQTTServer { + port getTopic:~APIS_DD; + port giveTopic:APIS_DD; + + state Serve{ + entry; + then Publ; + state Publ; + accept pub:Publish via getTopic.APIS_MQTT + // store information about who will provide "Publish::nametopic" + then Subsr; + + state Subsr; + accept Subscribe via giveTopic.APIS_MQTT + // store information about who want to receive "Subscribe::nametopic" + then Idle; + + state Idle; + accept retrnall:Return_AllItems via getTopic.APIS_MQTT + do send retrnall via giveTopic.APIS_MQTT + then Idle; + } + } + + connect APISProducer.apisc to MQTTServer.getTopic; + connect MQTTServer.giveTopic to APISConsumer.apisp; + + connect TellUConsumer.apisp to APISProducer.tellu; + + // Then we need to connect the application systems to the mandatory systems + connect APISProducer.serviceDiscovery to service_registry.serviceDiscovery; + connect TellUConsumer.serviceDiscovery to service_registry.serviceDiscovery; + connect APISConsumer.serviceDiscovery to service_registry.serviceDiscovery; + + // Same procedure for the other mandatory services + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFProfileLib.sysml b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFProfileLib.sysml new file mode 100644 index 00000000..9e5c3807 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFProfileLib.sysml @@ -0,0 +1,117 @@ +library package AHFProfileLib { + // Systems and Services and their functionalities + private import ScalarValues::*; + + // Design level + port def SD{ + doc /* Service definition */ + + attribute serviceDefinition:String; + attribute serviceURL:String; + attribute intrfce_protocol:String; // which may be "REST" or "MQTT" etc. + } + + part def SysLocalCloudsDesign { + doc /* System of Systems Definition */ + + // System of Local Clouds + part locclouds:LocalCloudDesign[1..*]; + } + + part system_of_systems:SysLocalCloudsDD; // defining a top level usage + + part def LocalCloudDesign { + doc /* Local Cloud definition */ + + part systems:SysD[1..*]; + } + + part def SysD { + doc /* System definitions */ + + port services: SD[1..*]; + attribute systemname: String; + attribute address: String; + attribute portno: Integer; + } + + // Design Description level + port def IDD :> SD{ + doc /* Interface Design Description of services */ + + attribute encoding_kind:String; + } + + port def SDDD :> SD{ + doc /* Service Definition Design Description */ + + port idds:IDD[*]; // nested protocol-specific services + } + + part def SysLocalCloudsDD :> SysLocalCloudsDesign { + doc /* System of Systems Detailed Description */ + + part :>> locclouds:LocalCloudDD[1..*]; // the descriptions + } + + part def LocalCloudDD :> LocalCloudDesign { + part :>> systems:SysDD[1..*]; + } + + part def SysDD :> SysD{ + doc /* System Detailed Description */ + + port :>> services:SDDD; + action ServiceMethod[1..*]; //means general behaviors + } +} + +library package AHFProfileMetadata{ + private import Metaobjects::SemanticMetadata; + private import AHFProfileLib::*; + + port global_sd:SD; + metadata def SDMetadata :> SemanticMetadata{ + // :>> baseType = system_of_systems.locclouds.systems.services meta SysML::PortUsage; + // :>> baseType = SysD::services meta SysML::PortUsage; + :>> baseType default global_sd meta SysML::PortUsage; + } + + metadata def SysLocalCloudsMetadata :> SemanticMetadata{ + :>> baseType = system_of_systems meta SysML::PartUsage; + } + + metadata def LocalCloudsMetadata :> SemanticMetadata{ + :>> baseType default system_of_systems::locclouds meta SysML::PartUsage; + } + + metadata def SysDMetadata :> SemanticMetadata{ + :>> baseType default system_of_systems::locclouds::systems meta SysML::PartUsage; + // :>> baseType default LocalCloudDesign::systems meta SysML::PartUsage; + } + + metadata def IDDMetadata :> SDMetadata{ + // :>> baseType = system_of_systems.locclouds.systems.services.idd meta SysML::PortUsage; + :>> baseType = SDDD::idds meta SysML::PortUsage; + // :>> global_sddd.idd; + } + + port global_sddd:SDDD; + metadata def SDDDMetadata :> SDMetadata { + // :>> baseType = system_of_systems.locclouds.systems.services meta SysML::PortUsage; + :>> baseType = global_sddd meta SysML::PortUsage; + } + + metadata def LocalCloudsDDMetadata :> LocalCloudsMetadata{ + :>> baseType = system_of_systems::locclouds meta SysML::PartUsage; + } + + part global_clouddd:LocalCloudDD; + part global_systemsdd:SysDD; + metadata def SysDDMetadata :> SysDMetadata{ + // :>> baseType = system_of_systems.locclouds.systems meta SysML::PartUsage; + //:>> baseType = LocalCloudDD::systems meta SysML::PartUsage; + :>> baseType = global_systemsdd meta SysML::PartUsage; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFSequences.sysml b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFSequences.sysml new file mode 100644 index 00000000..71fad077 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ArrowheadFrameworkExample/AHFSequences.sysml @@ -0,0 +1,122 @@ +// ** This is the Norwegian use-case for Arrowhead Framework */ +package AHFNorwaySequences { + // Here we show sequences of the Norwegian use-case + private import AHFProfileLib::*; + private import AHFCoreLib::*; + private import AHFNorway::*; + private import ScalarValues::*; + + part AHFN_LocalCloudDD_Seqs = AHFNorway_LocalCloudDD{ + occurrence def APIS_transfer_lifetime { + // lifetime orderings + ref part tlc = AHFNorway_LocalCloudDD.TellUConsumer{ + event occurrence call_getItems1; + then event occurrence return_getItems1; + event occurrence call_getItems2; + then event occurrence return_getItems2; + } + ref part apsp = AHFNorway_LocalCloudDD.APISProducer{ + event occurrence send_publish_returnallitems; + then event occurrence receive_call_getItems1; + then event occurrence send_returnallitems1; + then event occurrence return_getItems_ack1; + then event occurrence receive_call_getItems2; + then event occurrence send_returnallitems2; + then event occurrence return_getItems_ack2; + } + ref part mqtts = AHFNorway_LocalCloudDD.MQTTServer{ + event occurrence receive_publish_returnallitems; + then event occurrence receive_subscribe_returnallitems; + then event forw1:MQTTforwarding; + then event forw2:MQTTforwarding; + } + ref part apsc = AHFNorway_LocalCloudDD.APISConsumer{ + event occurrence send_subscribe_returnallitems; + then event forw1:MQTTforwarding; + then event forw2:MQTTforwarding; + } + occurrence forw1:MQTTforwarding; + occurrence forw2:MQTTforwarding; + + message publish_returnallitems of Publish + from apsp.send_publish_returnallitems to mqtts.receive_publish_returnallitems; + message subscribe_returnallitems of Subscribe + from apsc.send_subscribe_returnallitems to mqtts.receive_subscribe_returnallitems; + message call_getItems1 of CallGiveItems[1] + from tlc.call_getItems1 to apsp.receive_call_getItems1; + bind apsp.send_returnallitems1 = forw1.mq; // binding the sending to the actual gate + /* How to express that this event sends a Return_AllItems? */ + message returnack1 of ResultGiveItems + from apsp.return_getItems_ack1 to tlc.return_getItems1; + message call_getItems2 of CallGiveItems[1] + from tlc.call_getItems2 to apsp.receive_call_getItems2; + bind apsp.send_returnallitems2 = forw2.mq; // binding the sending to the actual gate + message returnack2 of ResultGiveItems + from apsp.return_getItems_ack2 to tlc.return_getItems2; + } + + occurrence def MQTTforwarding { + ref part mqttsf = AHFNorway_LocalCloudDD.MQTTServer{ + event occurrence receive_returnallitems; + then event occurrence send_returnallitems; + } + + ref part apscf :> AHFNorway_LocalCloudDD.APISConsumer { + event occurrence receive_returnallitems; + } + + in event occurrence mq; // parameter for gate + + message sendallitems1 of Return_AllItems + from mq to mqttsf.receive_returnallitems; + message sendallitems2 of Return_AllItems + from mqttsf.send_returnallitems to apscf.receive_returnallitems; + } + + + interface APIS_transfer_interface : Interfaces::Interface connect ( + tlu ::> AHFNorway_LocalCloudDD.TellUConsumer.apisp.APIS_HTTP, // port reference + apsph ::> AHFNorway_LocalCloudDD.APISProducer.tellu.APIS_HTTP, + apspm ::> AHFNorway_LocalCloudDD.APISProducer.apisc.APIS_MQTT, + apsc ::> AHFNorway_LocalCloudDD.APISConsumer.apisp.APIS_MQTT, + mqget ::> AHFNorway_LocalCloudDD.MQTTServer.getTopic, + mqgive ::> AHFNorway_LocalCloudDD.MQTTServer.giveTopic) { + + flow publish_returnallitems of Publish + from apspm.pub to mqget.APIS_MQTT.pub; + flow subscribe_returnallitems of Subscribe + from apsc.subscr to mqgive.APIS_MQTT.subscr; + flow call_getItems of CallGiveItems[1] + from tlu.cll to apsph.cll; + flow returnallitems of Return_AllItems + from apspm.retall to mqget.APIS_MQTT.retall; + flow sendallitems of Return_AllItems + from mqgive.APIS_MQTT.retall to apsc.retall; + flow returnack of ResultGiveItems + from apsph.retrn to tlu.retrn; + + // Successions on each lifetime + // tlu + succession first call_getItems.start + then returnack.done; + // apisp (taking both ports) + succession first publish_returnallitems.start + then call_getItems.done; + succession first call_getItems.done + then returnallitems.start; + succession first returnallitems.start + then returnack.start; + // MQTTServer + succession first publish_returnallitems.done + then subscribe_returnallitems.done; + succession first subscribe_returnallitems + then returnallitems.done; + succession first returnallitems.done + then sendallitems.start; + // apisc + succession first subscribe_returnallitems.start + then sendallitems.done; + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_N_ary.sysml b/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_N_ary.sysml new file mode 100644 index 00000000..4f38b4e3 --- /dev/null +++ b/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_N_ary.sysml @@ -0,0 +1,21 @@ +package ProductSelection_N_ary_SysML { + + item def ShoppingCart; + item def Product; + item def Account; + + // User-specified connection defiation definition + connection def ProductSelection { + end [0..1] item cart: ShoppingCart[1]; + end [0..*] item selectedProduct: Product[1]; + end [1..1] item account : Account[1]; + } + + // Equivalent connection defiation definition with named end items. + connection def ProductSelection1 { + end inCart[0..1] item cart: ShoppingCart[1]; + end selectedProducts[0..*] item selectedProduct: Product[1]; + end withAccount[1..1] item account : Account[1]; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_OwnedEnds.sysml b/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_OwnedEnds.sysml new file mode 100644 index 00000000..a4eab6ed --- /dev/null +++ b/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_OwnedEnds.sysml @@ -0,0 +1,47 @@ +package ProductSelection_OwnedEnds_SysML { + + item def SelectionInfo; + item def ShoppingCart; + item def Product; + + // User-specified connection defiation definition + connection def ProductSelection { + item info: SelectionInfo; + + end [0..1] item cart: ShoppingCart[1]; + end [0..*] nonunique item selectedProduct: Product[1]; + } + + // Equivalent connection defiation definition with named end items. + connection def ProductSelection1 { + item info: SelectionInfo; + + end inCart[0..1] item cart: ShoppingCart[1]; + end selectedProducts[0..*] item selectedProduct: Product[1]; + } + + connection def SingleProductSelection specializes ProductSelection { + end [0..1] item cart: ShoppingCart[1]; + end [0..1] item selectedProduct: Product[1]; + } + + connection def SingleProductSelection1 specializes ProductSelection1 { + end inCart1 [0..1] item cart: ShoppingCart[1]; + end selectedProduct1 [0..1] item selectedProduct: Product[1]; + } + + item def OnlineCustomer { + item info1: SelectionInfo; + item myCart: ShoppingCart[1]; + item products: Product[0..*]; + + connection ps1 : ProductSelection connect myCart to products { + :>> info = info1; + } + + connection ps2 : ProductSelection connect [1] myCart to [1] products { + :>> info = info1; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_UnownedEnds.sysml b/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_UnownedEnds.sysml new file mode 100644 index 00000000..14e7d211 --- /dev/null +++ b/test/SysMLModels/OMG/examples/AssociationExamples/ProductSelection_UnownedEnds.sysml @@ -0,0 +1,37 @@ +package ProductSelection_UnownedEnds_SysML { + + item def SelectionInfo; + item def ShoppingCart { + item selectedProducts : Product[0..*]; + } + item def Product { + item inCart: ShoppingCart[0..1]; + } + + connection def ProductSelection { + item info: SelectionInfo[1]; + + end item cart: ShoppingCart[1] crosses selectedProduct.inCart; + end item selectedProduct: Product[1] crosses cart.selectedProducts; + } + + connection def SingleProductSelection :> ProductSelection { + end item cart: ShoppingCart[1]; + end [0..1] item selectedProduct: Product[1]; + } + + item def OnlineCustomer { + item info1: SelectionInfo; + item myCart: ShoppingCart[1]; + item products: Product[0..*]; + + connection ps1 : ProductSelection connect myCart to products { + :>> info = info1; + } + + connection ps2 : ProductSelection connect [1] myCart to [1] products { + :>> info = info1; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/CameraExample/Camera.sysml b/test/SysMLModels/OMG/examples/CameraExample/Camera.sysml new file mode 100644 index 00000000..28d9fd1f --- /dev/null +++ b/test/SysMLModels/OMG/examples/CameraExample/Camera.sysml @@ -0,0 +1,14 @@ +part def Camera { + private import PictureTaking::*; + + perform action takePicture[*] :> PictureTaking::takePicture; + + part focusingSubsystem { + perform takePicture.focus; + } + + part imagingSubsystem { + perform takePicture.shoot; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/CameraExample/PictureTaking.sysml b/test/SysMLModels/OMG/examples/CameraExample/PictureTaking.sysml new file mode 100644 index 00000000..3994a3a7 --- /dev/null +++ b/test/SysMLModels/OMG/examples/CameraExample/PictureTaking.sysml @@ -0,0 +1,12 @@ +package PictureTaking { + part def Exposure; + + action def Focus { out xrsl: Exposure; } + action def Shoot { in xsf: Exposure; } + + action takePicture { + action focus: Focus[1]; + flow of Exposure from focus.xrsl to shoot.xsf; + action shoot: Shoot[1]; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/CauseAndEffectExamples/CauseAndEffectExample.sysml b/test/SysMLModels/OMG/examples/CauseAndEffectExamples/CauseAndEffectExample.sysml new file mode 100644 index 00000000..0cc238de --- /dev/null +++ b/test/SysMLModels/OMG/examples/CauseAndEffectExamples/CauseAndEffectExample.sysml @@ -0,0 +1,55 @@ +package CauseAndEffectExample { + private import CauseAndEffect::*; + + part def Causer1; + part def Causer2; + part def Effected1; + part def Effected2; + + #multicausation connection def MultiCauseEffect { + end #cause cause1 : Causer1; + end #cause cause2 : Causer2; + end #effect effect1 : Effected1; + end #effect effect2 : Effected2; + } + + part causer1 : Causer1; + part causer2 : Causer2; + part effected1 : Effected1; + part effected2 : Effected2; + + #multicausation connection : MultiCauseEffect connect + ( cause1 ::> causer1, cause2 ::> causer2, + effect1 ::> effected1, effect2 ::> effected2 ); + + #multicausation connect + ( cause1 ::> causer1, cause2 ::> causer2, + effect1 ::> effected1, effect2 ::> effected2 ); + + occurrence a; + item b; + part c; + action d; + + #multicausation connection { + end #cause ::> a; + end #cause ::> b; + end #effect ::> c; + end #effect ::> d; + } + + #cause causeA ::> a; + #cause causeB ::> b; + #effect effectC ::> c; + #effect effectD ::> d; + + #multicausation connect ( causeA, causeB, effectC, effectD ); + + #causation connect a to c; + #causation connect b to d { + @CausationMetadata { + isNecessary = true; + probability = 0.1; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/CauseAndEffectExamples/MedicalDeviceFailure.sysml b/test/SysMLModels/OMG/examples/CauseAndEffectExamples/MedicalDeviceFailure.sysml new file mode 100644 index 00000000..75626e65 --- /dev/null +++ b/test/SysMLModels/OMG/examples/CauseAndEffectExamples/MedicalDeviceFailure.sysml @@ -0,0 +1,25 @@ +package MedicalDeviceFailure { + private import CauseAndEffect::*; + + part medicalDevice { + part battery { + event occurrence depleted; + event occurrence cannotBeCharged; + } + + event occurrence deviceFails; + + ref patient { + event occurrence therapyDelayed; + } + + #multicausation connection { + end #cause ::> battery.depleted; + end #cause ::> battery.cannotBeCharged; + end #effect ::> deviceFails; + } + + #causation connect deviceFails to patient.therapyDelayed; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/CommentExamples/Comments.sysml b/test/SysMLModels/OMG/examples/CommentExamples/Comments.sysml new file mode 100644 index 00000000..324319d8 --- /dev/null +++ b/test/SysMLModels/OMG/examples/CommentExamples/Comments.sysml @@ -0,0 +1,15 @@ +package Comments { + doc /* Documentation Comment */ + + doc /* Documentation about Package */ + + comment cmt /* Named Comment */ + comment cmt_cmt about cmt /* Comment about Comment */ + + comment about C /* Documention Comment on Part Def */ + part def C { + doc /* Documentation in Part Def */ + comment /* Comment in Part Def */ + comment about Comments /* Comment about Package */ + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/FlashlightExample/FlashlightExample.sysml b/test/SysMLModels/OMG/examples/FlashlightExample/FlashlightExample.sysml new file mode 100644 index 00000000..07c48aab --- /dev/null +++ b/test/SysMLModels/OMG/examples/FlashlightExample/FlashlightExample.sysml @@ -0,0 +1,59 @@ +package 'Flashlight Example' { + + attribute def OnOffCmd; + attribute def Light; + + port def OnOffCmdPort { + out onOffCmd : OnOffCmd; + } + + port def LightPort { + out light: Light; + } + + part context { + part user { + port onOffCmdPort: OnOffCmdPort; + perform illuminateRegion.sendOnOffCmd { + out onOffCmd = onOffCmdPort.onOffCmd; + } + } + + interface userToFlashlight connect user.onOffCmdPort to flashlight.onOffCmdPort { + perform illuminateRegion.onOffCmdFlow; + } + + part flashlight { + port onOffCmdPort: ~OnOffCmdPort; + + perform illuminateRegion.produceDirectedLight { + in onOffCmd = onOffCmdPort.onOffCmd; + out light = lightPort.light; + } + + port lightPort: LightPort ; + } + part reflectingSource { + port lightPort: ~LightPort; + + perform illuminateRegion.reflectLight { + in light = lightPort.light; + } + } + } + + action illuminateRegion { + action sendOnOffCmd { out onOffCmd: OnOffCmd; } + + succession flow onOffCmdFlow from sendOnOffCmd.onOffCmd to produceDirectedLight.onOffCmd; + + action produceDirectedLight { in onOffCmd; out light: Light; } + + succession flow lightFlow from produceDirectedLight.light to reflectLight.light; + + action reflectLight { in light: Light; } + } + + + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/GeometryExamples/CarWithEnvelopingShape.sysml b/test/SysMLModels/OMG/examples/GeometryExamples/CarWithEnvelopingShape.sysml new file mode 100644 index 00000000..a7186d4e --- /dev/null +++ b/test/SysMLModels/OMG/examples/GeometryExamples/CarWithEnvelopingShape.sysml @@ -0,0 +1,17 @@ +package CarWithEnvelopingShape { + private import ShapeItems::Box; + private import SI::mm; + + part def Car { + doc + /* + * Example car with simple enveloping shape that is a solid box + */ + + item boundingBox : Box [1] :> boundingShapes { + :>> length = 4800 [mm]; + :>> width = 1840 [mm]; + :>> height = 1350 [mm]; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/GeometryExamples/CarWithShapeAndCSG.sysml b/test/SysMLModels/OMG/examples/GeometryExamples/CarWithShapeAndCSG.sysml new file mode 100644 index 00000000..a52284b2 --- /dev/null +++ b/test/SysMLModels/OMG/examples/GeometryExamples/CarWithShapeAndCSG.sysml @@ -0,0 +1,88 @@ +package CarWithShapeAndCSG { + private import SpatialItems::*; + private import ShapeItems::*; + private import Objects::Point; + private import Quantities::VectorQuantityValue; + private import MeasurementReferences::CoordinateFrame; + private import MeasurementReferences::TranslationRotationSequence; + private import MeasurementReferences::Translation; + private import MeasurementReferences::Rotation; + private import SI::*; + + part def Car :> SpatialItem { + doc + /* + * Car with simple engine + */ + + item :>> shape = new Cuboid(4800 [mm], 1840 [mm], 1350 [mm]); + + attribute datum :>> coordinateFrame { + :>> mRefs = (mm, mm, mm); + } + + part powerSource : Engine [1] :> componentParts { + :>> ecf { + :>> mRefs = datum.mRefs; + :>> transformation : TranslationRotationSequence { + :>> source = datum; + :>> elements = ( new Translation((3800, (1840-190)/2, 40)[datum]) ); + } + } + } + } + + part def Engine :> SpatialItem { + doc + /* + * Simple 2-cylinder engine + * + * Note: The engine shape is modeled as a rectangular box with two cylindrical holes, a gross simplification. + */ + + item :>> shape [1]; + + attribute engineCoordinateFrame :>> coordinateFrame; + + part rawEngineBlock :> subSpatialParts [1] { + item :>> shape : Box [1] { + :>> length = 300 [mm]; + :>> width = 190 [mm]; + :>> height = 330 [mm]; + } + } + + private attribute rearCylinderSpacing = 90 [mm]; + private item cylinder1 :> subSpatialParts [1] { + item :>> shape : Cylinder [1] { + :>> radius = 55 [mm]; + :>> height = 350 [mm]; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> source = ecf; + :>> elements = (new Translation( (rearCylinderSpacing, rawEngineBlock.shape.width/2, -10)[ecf])); + } + } + } + + private attribute cylinderSpacing = 2*cylinder1.shape.radius + 20 [mm]; + private item cylinder2 :> subSpatialParts [1] { + item :>> shape : Cylinder [1] { + :>> radius = cylinder1.shape.radius; + :>> height = cylinder1.shape.height; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> source = ecf; + :>> elements = ( new Translation((rearCylinderSpacing + cylinderSpacing, rawEngineBlock.shape.width/2, -10)[ecf]) ); + } + } + } + + /* CSG difference of rawEngineBlock minus cylinder1 minus cylinder2 */ + attribute :> differencesOf[1] { + item :>> elements = (rawEngineBlock, cylinder1, cylinder2); + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/GeometryExamples/ExternalShapeRefExample.sysml b/test/SysMLModels/OMG/examples/GeometryExamples/ExternalShapeRefExample.sysml new file mode 100644 index 00000000..4bcd856a --- /dev/null +++ b/test/SysMLModels/OMG/examples/GeometryExamples/ExternalShapeRefExample.sysml @@ -0,0 +1,31 @@ +package ExternalShapeRefExample { + private import ScalarValues::String; + private import ShapeItems::*; + private import ISQ::mass; + private import SI::mm; + + metadata def ExternalShapeRef { + doc + /* + * Metadata to reference an externally defined shape. + */ + + attribute purpose : String[1]; + attribute shapeIri : String[1]; + } + + part myBatteryUnit { + item :>> shape : Shell { + metadata ExternalShapeRef { + purpose = "highLoD"; + shapeIri = "file:/detailed-geometry/LEMS-250W_BatteryHousing_Example.step"; + } + } + + private item envelopingBoxBatteryUnit : Box :> envelopingShapes { + :>> length = 140[mm]; + :>> width = 148[mm]; + :>> height = 90[mm]; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/GeometryExamples/SimpleQuadcopter.sysml b/test/SysMLModels/OMG/examples/GeometryExamples/SimpleQuadcopter.sysml new file mode 100644 index 00000000..be69a47e --- /dev/null +++ b/test/SysMLModels/OMG/examples/GeometryExamples/SimpleQuadcopter.sysml @@ -0,0 +1,247 @@ +package SimpleQuadcopter { + private import ISQ::*; + private import SI::*; + private import SpatialItems::*; + private import ShapeItems::*; + private import RealFunctions::sqrt; + private import TrigFunctions::pi; + private import TrigFunctions::tan; + private import MeasurementReferences::CoordinateFrame; + private import MeasurementReferences::TranslationRotationSequence; + private import MeasurementReferences::Translation; + private import MeasurementReferences::Rotation; + + part motorShape : SpatialItem { + item :>> shape : Cylinder { + :>> radius = 18 [mm]; + :>> height = 30 [mm]; + } + } + + part def Strut :> SpatialItem { + // By default will get same coordinateFrame.mRefs as owning SpatialItem, i.e.: + // attribute :>> coordinateFrame { :>> mRefs = (mm, mm, mm); } + + /* rawStrut is a construction shape: a rectangular beam */ + part rawStrut :> subSpatialParts { + item :>> shape : Box { + :>> length = 160 [mm]; + :>> width = 15 [mm]; + :>> height = 8 [mm]; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (0, shape.width/2, 0)[source])); + } + } + } + + /* motorCutout is a construction shape: a cylinder of the same shape as the */ + part motorCutout :> subSpatialParts { + item :>> shape = motorShape.shape; + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (175, 0, -1)[source])); + } + } + } + + /* Strut shape is CSG difference of rawStrut minus motorCutout */ + attribute :> differencesOf[1] { + item :>> elements = (rawStrut, motorCutout); + } + } + + part def PropellerMotorAssy :> SpatialItem { + // By default will get same coordinateFrame.mRefs as owning CompoundSpatialItem, i.e.: + // attribute :>> coordinateFrame { :>> mRefs = (mm, mm, mm); } + + part propeller :> subSpatialParts { + item :>> shape : Cylinder { + doc /* propeller stay-out volume, without propeller shaft */ + :>> radius = 80 [mm]; + :>> height = 6 [mm]; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (175, 0, 31)[source])); + } + } + } + + part motor :> subSpatialParts { + item :>> shape = motorShape.shape; + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (175, 0, 0)[source])); + } + } + } + + // By default the shape of a PropellerMotorAssy is the union of its owned composite items and parts that are SpatialItems. + } + + part def Camera :> SpatialItem { + // By default will get same coordinateFrame.mRefs as owning CompoundSpatialItem, i.e.: + // attribute :>> coordinateFrame { :>> mRefs = (mm, mm, mm); } + + part cameraHousing :> subSpatialParts { + item :>> shape : Cylinder { + :>> radius = 15 [mm]; + :>> height = 24 [mm]; + } + } + + /* The field of view is modeled as an item, since it is not a part of the quadcopter but rather a stay-out volume + * that can for example be used to formulate a constraint. + */ + item fieldOfView :> subSpatialParts { + doc /* Conical field of view with half-top angle 20 degree */ + item :>> shape : Cone { + :>> radius = height * tan(20 * pi/180) [mm]; + :>> height = 500 [mm]; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Rotation( (0, 1, 0)[source], 180['°'])); + } + } + } + + // By default the shape of a Camera is the union of its owned composite items and parts that are SpatialItems. + } + + part quadCopter : SpatialItem { + attribute datum :>> coordinateFrame { + doc /* The datum is the top level coordinate frame of the system-of-interest, i.e., the quadcopter. + * By convention its origin is placed at the bottom of the mainBody with the +X axis pointing in the + * forward fligth (velocity) direction and the +Z axis pointing upward. The +Y axis completes the + * right-handed Cartesian coordinate system. + */ + :>> mRefs = (mm, mm, mm); + } + + part mainBody :> subSpatialParts { + + /* rawBody is a construction shape: the enveloping rectangular box */ + part rawBody :> subSpatialParts { + item :>> shape : Box { + :>> length = 160 [mm]; + :>> width = 15 [mm]; + :>> height = 8 [mm]; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (0, shape.width/2, 0)[source])); + } + } + } + + /* cuttingBox is a construction shape: the enveloping rectangular box */ + part cuttingCornersBox :> subSpatialParts { + item :>> shape : Box { + :>> length = 105 [mm]; + :>> width = 105 [mm]; + :>> height = 60 [mm]; + } + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (0, -shape.length/sqrt(2), -10)[source]), + new Rotation((0, 0, 1)[source], 45['°'])); + } + } + } + + /* Main body shape is the CSG intersection of rawBody and cuttingCornersBox */ + attribute :> intersectionsOf[1] { + item :>> elements = (rawBody, cuttingCornersBox); + } + // Current syntax is not end-user friendly + // It will be possible to specify following simple CSG expression: + // item :>> shape = rawBody & cuttingCornersBox; + } + + // Helper construction parameters + private attribute xStrut : LengthValue = 49.60[mm]; + private attribute yStrut : LengthValue = 24.65[mm]; + private attribute zStrut : LengthValue = 25[mm]; + private attribute zPMAssy : LengthValue = 12[mm]; + + part strut1 : Strut :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (xStrut.num, yStrut.num, zStrut.num)[source]), + new Rotation((0, 0, 1)[source], 45['°'])); + } + } + } + part strut2 : Strut :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (-xStrut.num, yStrut.num, zStrut.num)[source]), + new Rotation((0, 0, 1)[source], 135['°'])); + } + } + } + part strut3 : Strut :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (-xStrut.num, -yStrut.num, zStrut.num)[source]), + new Rotation((0, 0, 1)[source], 225['°'])); + } + } + } + part strut4 : Strut :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (xStrut.num, -yStrut.num, zStrut.num)[source]), + new Rotation((0, 0, 1)[source], 315['°'])); + } + } + } + + part propellerMotorAssy1 : PropellerMotorAssy :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (xStrut.num, yStrut.num, zPMAssy.num)[source]), + new Rotation((0, 0, 1)[source], 45['°'])); + } + } + } + part propellerMotorAssy2 : PropellerMotorAssy :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (-xStrut.num, yStrut.num, zPMAssy.num)[source]), + new Rotation((0, 0, 1)[source], 135['°'])); + } + } + } + part propellerMotorAssy3 : PropellerMotorAssy :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (-xStrut.num, -yStrut.num, zPMAssy.num)[source]), + new Rotation((0, 0, 1)[source], 225['°'])); + } + } + } + part propellerMotorAssy4 : PropellerMotorAssy :> subSpatialParts { + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (xStrut.num, -yStrut.num, zPMAssy.num)[source]), + new Rotation((0, 0, 1)[source], 315['°'])); + } + } + } + + /* The camera is placed protruding from the +X face of the main body, rotated about the +Y axis over 50° downwards */ + part camera : Camera :> subSpatialParts{ + attribute :>> coordinateFrame { + :>> transformation : TranslationRotationSequence { + :>> elements = (new Translation( (59, 0, 2)[source]), + new Rotation((0, 1, 0)[source], 50['°'])); + } + } + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/GeometryExamples/VehicleGeometryAndCoordinateFrames.sysml b/test/SysMLModels/OMG/examples/GeometryExamples/VehicleGeometryAndCoordinateFrames.sysml new file mode 100644 index 00000000..d12d6204 --- /dev/null +++ b/test/SysMLModels/OMG/examples/GeometryExamples/VehicleGeometryAndCoordinateFrames.sysml @@ -0,0 +1,130 @@ +package VehicleGeometryAndCoordinateFrames { + private import TrigFunctions::*; + private import ISQ::*; + private import SI::*; + private import Time::*; + + private import ShapeItems::*; + private import SpatialItems::*; + + private import MeasurementReferences::CoordinateFrame; + private import MeasurementReferences::TranslationRotationSequence; + private import MeasurementReferences::Translation; + private import MeasurementReferences::Rotation; + + private import Collections::Array; + private import ScalarValues::Boolean; + private import ScalarValues::Real; + private import ScalarValues::Natural; + private import ControlFunctions::forAll; + + part def Vehicle :> SpatialItem; + + part def Chassis :> SpatialItem { + item :>> shape = new Box(4800 [mm], 1840 [mm], 1350 [mm]); + } + + part def Wheel :> SpatialItem { + doc + /* + * Generic wheel with lugbolts + * + * The radius is estimated for a 22 inch hub plus 110 mm tire height. + * The wheel width is equal to the cylinder height. + * The wheel has 5 lugbolts that are evenly distributed along a circle centered at the wheel's center. + */ + + item :>> shape : Cylinder { + :>> radius = 22/2*25.4 + 110 [mm]; + :>> height = 220 [mm]; + } + attribute wheelCoordinateFrame : CoordinateFrame; + + attribute numberOfBolts : Natural = 5; + part lugBolts : LugBolt[1..numberOfBolts] :> subSpatialParts; + + /* + * As an example of a more involved placement of composite parts, constrain the positions of the coordinate frame origins + * of the lugbolts to a circle with radius lbpr distributed evenly over 360°. + */ + attribute lugBoltPlacementRadius :>> radius default 60 [mm]; + private attribute lugBoltDistributionAngle :>> planeAngle = 360/numberOfBolts ['°']; + private attribute lbda : Real = lugBoltDistributionAngle.num * (pi/180); // lugBoltDistributionAngle in radian + assert constraint { + (1..numberOfBolts)->forAll { + in i : Natural; + private attribute lbcf = lugBolts#(i).coordinateFrame; + private attribute trs : TranslationRotationSequence { + :>> source = wcf; + :>> target = lbcf; + :>> elements = new Translation((lbpr*cos((i-1)*lbda), lbpr*sin((i-1)*lbda), -8)[wcf]); + } + lbcf.transformation == trs + } + } + } + + part def LugBolt :> SpatialItem { + item :>> shape : Cylinder { + :>> radius = 14 [mm]; + :>> height = 40 [mm]; + } + } + + part vehicle : Vehicle, SpatialItem { + /* + * Vehicle frame origin at center of bottom plate of chassis + * with +Z upwards and +X in the forward (front) direction + */ + attribute datum :>> coordinateFrame { + :>> mRefs = (mm, mm, mm); + } + + part chassis : Chassis[1] :> componentParts { + attribute :>> coordinateFrame { + attribute :>> transformation : TranslationRotationSequence { + attribute :>> source = datum; + attribute :>> elements = new Translation((-(shape as Box).length/2, -(shape as Box).width/2, 0)[datum]); + } + } + } + + private attribute plusXAxis : Array { :>> dimensions = 3; :>> elements : Real[3] = (1, 0, 0); } + private attribute frontWheelXShift : Real = 1670; + private attribute rearWheelXShift : Real = -1820; + private attribute wheelYShift : Real = 720; + + part leftFrontWheel : Wheel[1] :> componentParts { + attribute :>> coordinateFrame { + attribute :>> transformation : TranslationRotationSequence { + attribute :>> source = datum; + attribute :>> elements = (new Translation((frontWheelXShift, wheelYShift, 80)[datum]), new Rotation(plusXAxis[datum], -90['°'])); + } + } + } + part rightFrontWheel : Wheel[1] :> componentParts { + attribute :>> coordinateFrame { + attribute :>> transformation : TranslationRotationSequence { + attribute :>> source = datum; + attribute :>> elements = (new Translation((frontWheelXShift, -wheelYShift, 80)[datum]), new Rotation((1, 0, 0)[datum], 90['°'])); + } + } + } + part leftRearWheel : Wheel[1] :> componentParts { + attribute :>> coordinateFrame { + attribute :>> transformation : TranslationRotationSequence { + attribute :>> source = datum; + attribute :>> elements = (new Translation((rearWheelXShift, wheelYShift, 80)[datum]), new Rotation((1, 0, 0)[datum], 90['°'])); + } + } + } + part rightRearWheel : Wheel[1] :> componentParts { + attribute :>> coordinateFrame { + attribute :>> transformation : TranslationRotationSequence { + attribute :>> source = datum; + attribute :>> elements = (new Translation((rearWheelXShift, -wheelYShift, 80)[datum]), new Rotation((-1, 0, 0)[datum], 90['°'])); + } + } + } + } +} diff --git a/test/SysMLModels/OMG/examples/ImportTests/AliasImport.sysml b/test/SysMLModels/OMG/examples/ImportTests/AliasImport.sysml new file mode 100644 index 00000000..8a4cd5e8 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ImportTests/AliasImport.sysml @@ -0,0 +1,13 @@ +package AliasImport { + package Definitions { + part def Vehicle; + + alias Car for Vehicle; + } + + package Usages { + private import Definitions::Car; + + part vehicle : Car; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ImportTests/CircularImport.sysml b/test/SysMLModels/OMG/examples/ImportTests/CircularImport.sysml new file mode 100644 index 00000000..4224a1da --- /dev/null +++ b/test/SysMLModels/OMG/examples/ImportTests/CircularImport.sysml @@ -0,0 +1,27 @@ +package CircularImport { + + package P1 { + public import P2::*; + part def A; + } + package P2 { + public import P1::*; + part def B; + } + package Test1 { + public import P1::*; + part x: A; + part y: B; + } + package Test2 { + public import P2::*; + part x: A; + part y: B; + } + + part x: P1::A; + + // The following should not fail. + part y: P1::B; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ImportTests/PrivateImportTest.sysml b/test/SysMLModels/OMG/examples/ImportTests/PrivateImportTest.sysml new file mode 100644 index 00000000..193682f9 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ImportTests/PrivateImportTest.sysml @@ -0,0 +1,33 @@ +package PrivateImportTest { + package P1 { + part def A; + } + package P2 { + private import P1::*; + } + + part x: P1::A; + + public import P2::*; + // This should fail. + // A is not visible, because the import in P2 is private. + // part y: A; + // part y1: P2::A; + + package P3 { + part def B; + } + + private import P3::*; + + // This should not fail. + // Private import only restricts visibility outside the package. + part z: B; + + package P4 { + public import all P2::*; + + // This should not fail because "import all" overrides private import. + part z1: A; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/ImportTests/QualifiedNameImportTest.sysml b/test/SysMLModels/OMG/examples/ImportTests/QualifiedNameImportTest.sysml new file mode 100644 index 00000000..fce145d3 --- /dev/null +++ b/test/SysMLModels/OMG/examples/ImportTests/QualifiedNameImportTest.sysml @@ -0,0 +1,13 @@ +package QualifiedNameImportTest { + package P1 { + part def A; + } + package P2 { + package P2a { + public import P1::*; + } + // The following should not fail. + // A is a member of P2a because of the import. + part x: P2a::A; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/IndividualsExamples/AnalysisIndividualExample.sysml b/test/SysMLModels/OMG/examples/IndividualsExamples/AnalysisIndividualExample.sysml new file mode 100644 index 00000000..2f83ae72 --- /dev/null +++ b/test/SysMLModels/OMG/examples/IndividualsExamples/AnalysisIndividualExample.sysml @@ -0,0 +1,95 @@ +package AnalysisIndividualExample { + private import ScalarValues::*; + private import Quantities::*; + private import ISQ::*; + private import USCustomaryUnits::*; + + package VehicleQuantities { + private import MeasurementReferences::*; + + attribute def DistancePerVolumeUnit :> DerivedUnit { + private attribute distancePF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; } + private attribute volumePF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (distancePF, volumePF); } + } + + attribute def DistancePerVolumeValue :> ScalarQuantityValue { + :>> num : Real; + :>> mRef : DistancePerVolumeUnit; + } + + attribute gallon : VolumeUnit = 231.0 * 'in' ** 3; + attribute mpg : DistancePerVolumeUnit = 'mi' / gallon; + attribute hp : PowerUnit = 745.7[SI::W]; + } + + package VehicleModel { + public import VehicleQuantities::*; + + part def Vehicle { + attribute power :> ISQ::power; + } + + part def Engine { + attribute peakPower :> ISQ::power; + attribute fuelEfficiency : Real; + } + + part vehicle_c1 : Vehicle { + attribute :>> power = engine.peakPower; + part engine : Engine[1]; + } + } + + package FuelEconomyAnalysisModel { + private import VehicleModel::*; + private import SequenceFunctions::size; + private import SampledFunctions::SampledFunction; + private import SampledFunctions::SamplePair; + private import ControlFunctions::forAll; + + action def FuelConsumption { + in power : PowerValue[*]; + out fuelEconomy : DistancePerVolumeValue; + } + + analysis def FuelEconomyAnalysis { + subject vehicle: Vehicle; + + action fuelConsumption : FuelConsumption { + in power = vehicle.power; + out fuelEconomy : DistancePerVolumeValue; + } + + return calculatedFuelEconomy : DistancePerVolumeValue = + fuelConsumption.fuelEconomy; + } + } + + package IndividualAnalysisModel { + private import VehicleModel::*; + private import FuelEconomyAnalysisModel::*; + + individual part def Vehicle_1 :> Vehicle; + individual part def Engine_1 :> Engine; + + individual analysis def FuelEconomyAnalysis_1 :> FuelEconomyAnalysis; + individual action def FuelConsumption_1 :> FuelConsumption; + + individual analysis fuelEconomyAnalysis_1 : FuelEconomyAnalysis_1 { + subject vehicle : Vehicle_1 :> vehicle_c1 { + individual part :>> engine : Engine_1 { + attribute :>> peakPower = 200[hp]; + attribute :>> fuelEfficiency = 0.4; + } + } + individual action :>> fuelConsumption : FuelEconomyAnalysis_1 { + snapshot :>> done :> fuelConsumption { + out :>> fuelEconomy = 35[mph]; + } + } + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/IndividualsExamples/JohnIndividualExample.sysml b/test/SysMLModels/OMG/examples/IndividualsExamples/JohnIndividualExample.sysml new file mode 100644 index 00000000..c8393f44 --- /dev/null +++ b/test/SysMLModels/OMG/examples/IndividualsExamples/JohnIndividualExample.sysml @@ -0,0 +1,59 @@ +package JohnIndividualExample { + + item def Person { + doc + /* + * This is the definition of the class of persons, each of whom has an age. + */ + + attribute age : ScalarValues::Natural; + + timeslice asPresident : Person [0..*] { + doc + /* + * These are the periods during which a Person is president. + */ + } + } + + individual item def John :> Person { + doc + /* + * This the definition of the individual Person who is John. + * There is at most one such person. + */ + } + + item def Country { + doc + /* + * This is the definition of the class of countries, each of which may have + * at most one president (at any point in time). + */ + ref presidentOfCountry[0..1] : Person :> presidentOfCountry.asPresident; + } + + individual item def UnitedStates :> Country { + doc + /* + * This is the definition of the individual country that is the + * United States. It contains a single instance. The United States + * always has a president who must be at least 35 years old. + */ + + ref presidentOfUS[1] :>> presidentOfCountry { + assert constraint { age >= 35 } + } + } + + individual UnitedStatesWithJohnAsPresident : UnitedStates { + timeslice item UnitedStatesWhenJohnIsPresident[*] : UnitedStates { + doc + /* + * These are the time slices of the United States during + * which John is president of the United States. + */ + ref :>> presidentOfUS : John; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModel.sysml b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModel.sysml new file mode 100644 index 00000000..1ddd03fe --- /dev/null +++ b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModel.sysml @@ -0,0 +1,42 @@ +package ServerSequenceModel { + private import ScalarValues::String; + public import SignalDefinitions::*; + + package SignalDefinitions { + item def Subscribe { + attribute topic : String; + ref part subscriber; + } + + item def Publish { + attribute topic : String; + ref publication; + } + + item def Deliver { + ref publication; + } + } + + part def PubSubSequence { + part producer[1] { + event occurrence publish_source_event; + } + + message publish_message from producer.publish_source_event to server.publish_target_event; + + part server[1] { + event occurrence subscribe_target_event; + then event occurrence publish_target_event; + then event occurrence deliver_source_event; + } + + message subscribe_message from consumer.subscribe_source_event to server.subscribe_target_event; + message deliver_message from server.deliver_source_event to consumer.deliver_target_event; + + part consumer { + event occurrence subscribe_source_event; + then event occurrence deliver_target_event; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModelOutside.sysml b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModelOutside.sysml new file mode 100644 index 00000000..6e205fac --- /dev/null +++ b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceModelOutside.sysml @@ -0,0 +1,20 @@ +package ServerSequenceModelOutside { + public import ServerSequenceModel::*; + + part def PubSubSequenceOutside :> PubSubSequence { + part :>> producer { + event publish_source_event = publish_message.start; + } + + part :>> server { + event occurrence :>> subscribe_target_event = subscribe_message.done; + then event occurrence :>> publish_target_event = publish_message.done; + then event occurrence :>> deliver_source_event = deliver_message.start; + } + + part :>> consumer { /* Redundant with timing constraints on server and generic transfers. */ + event occurrence :>> subscribe_source_event = subscribe_message.start; + then event occurrence :>> deliver_target_event = deliver_message.done; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-2.sysml b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-2.sysml new file mode 100644 index 00000000..95a3f0e8 --- /dev/null +++ b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-2.sysml @@ -0,0 +1,97 @@ +package ServerSequenceOutsideRealization_2 { + private import ScalarValues::String; + private import ServerSequenceModelOutside::*; + private import Configuration::*; + + package Configuration { + + port def PublicationPort; + + port def SubscriptionPort; + + part producer_2[1] { + attribute someTopic : String; + private item somePublication; + /* Requiring FIFO sort (as opposed to just default) to make arrival/leave ordering + * in ServerSequenceModelOutside.sysml equivalent to accept/send new ordering in + * ServerSquenceRealization-2.sysml. */ + :>> incomingTransferSort = Occurrences::earlierFirstIncomingTransferSort; + + port publicationPort : ~PublicationPort; + + perform action producerBehavior { + action publish send new Publish(someTopic, somePublication) via publicationPort; + } + } + + interface producer_2.publicationPort to server_2.publicationPort; + + part server_2[1] { + port publicationPort : PublicationPort; + port subscriptionPort : SubscriptionPort; + :>> incomingTransferSort = Occurrences::earlierFirstIncomingTransferSort; + + exhibit state serverBehavior { + entry; then waitForSubscription; + + state waitForSubscription; + transition subscribing + first waitForSubscription + accept sub : Subscribe via subscriptionPort + then waitForPublication; + + state waitForPublication; + transition delivering + first waitForPublication + accept pub : Publish via publicationPort + if pub.topic == subscribing.sub.topic + do send new Deliver(pub.publication) to subscribing.sub.subscriber + then waitForPublication; + } + } + + interface consumer_2.subscriptionPort to server_2.subscriptionPort; + + part consumer_2[1] { + attribute myTopic : String; + :>> incomingTransferSort = Occurrences::earlierFirstIncomingTransferSort; + + port subscriptionPort : ~SubscriptionPort; + + perform action consumerBehavior { + action subscribe send new Subscribe(myTopic, consumer_2) to server_2; + then action delivery accept Deliver via consumer_2; + } + } + + } + + part realization_2 : PubSubSequence { + part :>> producer :> producer_2; + part :>> server :> server_2; + part :>> consumer :> consumer_2; + + flow :>> publish_message: Transfers::MessageTransfer { + end :>> source ::> producer.publicationPort; + end :>> target ::> server.publicationPort; + } + flow :>> subscribe_message: Transfers::MessageTransfer { + end :>> source ::> consumer.subscriptionPort; + end :>> target ::> server.subscriptionPort; + } + flow :>> deliver_message: Transfers::MessageTransfer { + end :>> source ::> server; + end :>> target ::> consumer; + } + + /* Binding sent/accept messages to specification model messages. */ + /* Sends */ + bind producer_2.producerBehavior.publish.sentMessage = publish_message; + bind consumer_2.consumerBehavior.subscribe.sentMessage = subscribe_message; + bind server_2.serverBehavior.delivering.effect.sentMessage = deliver_message; + /* Accepts */ + bind consumer_2.consumerBehavior.delivery.acceptedMessage = subscribe_message; + bind server_2.serverBehavior.subscribing.accepter.acceptedMessage = subscribe_message; + bind server_2.serverBehavior.delivering.accepter.acceptedMessage = publish_message; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-3.sysml b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-3.sysml new file mode 100644 index 00000000..e5313a4f --- /dev/null +++ b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceOutsideRealization-3.sysml @@ -0,0 +1,159 @@ +package ServerSequenceOutsideRealization_3 { + private import ScalarValues::String; + private import ServerSequenceModelOutside::*; + private import Configuration::*; + + package Configuration { + + port def PublicationPort { + in ref publish : Publish; + } + + port def SubscriptionPort { + in ref subscribe : Subscribe; + out ref deliver : Deliver; + } + + interface def PublicationInterface { + end source : ~PublicationPort; + end target : PublicationPort; + } + + interface def SubscriptionInterface { + end source : ~SubscriptionPort; + end target : SubscriptionPort; + } + + part producer_3[1] { + attribute someTopic : String; + private item somePublication; + + port publicationPort : ~PublicationPort { + out ref :>> publish; + } + + perform action producerBehavior { + action publish { + out ref request : Publish[1] = new Publish(someTopic, somePublication); + } + } + + /* Internal flows are instantaneous to make arrival/leave ordering in SequenceModelOutside.sysml + * equivalent to ordering participant internals in ServerSequenceRealization-3.sysml. */ + flow publish_request from producerBehavior.publish.request to publicationPort.publish + { attribute :>> isInstant = true;} + } + + interface publication_interface : PublicationInterface connect producer_3.publicationPort to server_3.publicationPort { + flow publish_request from publication_interface.source.publish to publication_interface.target.publish; + } + + part server_3[1] { + port publicationPort : PublicationPort { + in ref :>> publish; + } + port subscriptionPort : SubscriptionPort { + in ref :>> subscribe; + out ref :>> deliver; + } + + flow subscribe_request from subscriptionPort.subscribe to serverBehavior.subscribing.request + { attribute :>> isInstant = true;} + flow publish_request from publicationPort.publish to serverBehavior.publishing.request + { attribute :>> isInstant = true;} + flow deliver_response from serverBehavior.delivering.response to subscriptionPort.deliver + { attribute :>> isInstant = true;} + + perform action serverBehavior { + + action subscribing { + in ref request : Subscribe[1]; + out attribute topic : String[1] = request.topic; + } + + then merge continuePublishing; + then action publishing { + in ref request : Publish[1]; + out attribute topic[1] = request.topic; + out ref publication[1] = request.publication; + } + + then decide; + if publishing.topic == subscribing.topic then delivering; + else continuePublishing; + + then action delivering { + in topic : String[1] = subscribing.topic; + in publication[1] = publishing.publication; + out ref response : Deliver = new Deliver(publication); + } + then continuePublishing; + + } + } + + interface subscription_interface : SubscriptionInterface connect consumer_3.subscriptionPort to server_3.subscriptionPort { + flow subscribe_request from subscription_interface.source.subscribe to subscription_interface.target.subscribe; + flow deliver_response from subscription_interface.target.deliver to subscription_interface.source.deliver; + } + + part consumer_3[1] { + attribute myTopic : String; + + port subscriptionPort : ~SubscriptionPort { + out ref :>> subscribe; + in ref :>> deliver; + } + + flow subscribe_request from consumerBehavior.subscribe.request to subscriptionPort.subscribe + { attribute :>> isInstant = true;} + flow deliver_response from subscriptionPort.deliver to consumerBehavior.delivery.response + { attribute :>> isInstant = true;} + + perform action consumerBehavior { + action subscribe { + out ref request : Subscribe = new Subscribe(myTopic); + } + then action delivery { + in ref response : Deliver; + } + } + } + + } + + part realization_2 : PubSubSequence { + part :>> producer :> producer_3 { + event producerBehavior.publish[1] :>> publish_source_event; + } + + part :>> server :> server_3 { + event serverBehavior.subscribing[1] :>> subscribe_target_event; + event serverBehavior.publishing[1] :>> publish_target_event; + event serverBehavior.delivering[1] :>> deliver_source_event; + } + + part :>> consumer :> consumer_3 { + event consumerBehavior.subscribe[1] :>> subscribe_source_event; + event consumerBehavior.delivery[1] :>> deliver_target_event; + } + + flow :>> publish_message from producer.producerBehavior.publish.request to server.serverBehavior.publishing.request { + event producer.publish_request[1]; + then event publication_interface.publish_request[1]; + then event server.publish_request[1]; + } + + flow :>> subscribe_message from consumer.consumerBehavior.subscribe.request to server.serverBehavior.subscribing.request { + event consumer.subscribe_request[1]; + then event subscription_interface.subscribe_request[1]; + then event server.subscribe_request[1]; + } + + flow :>> deliver_message from server.serverBehavior.delivering.response to consumer.consumerBehavior.delivery.response { + event server.deliver_response[1]; + then event subscription_interface.deliver_response[1]; + then event consumer.deliver_response[1]; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-2.sysml b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-2.sysml new file mode 100644 index 00000000..c1793ca4 --- /dev/null +++ b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-2.sysml @@ -0,0 +1,102 @@ +package ServerSequenceRealization_2 { + private import ScalarValues::String; + private import ServerSequenceModel::*; + private import Configuration::*; + + package Configuration { + + port def PublicationPort; + + port def SubscriptionPort; + + part producer_2[1] { + attribute someTopic : String; + private item somePublication; + + port publicationPort : ~PublicationPort; + + perform action producerBehavior { + action publish send new Publish(someTopic, somePublication) via publicationPort; + } + } + + interface producer_2.publicationPort to server_2.publicationPort; + + part server_2[1] { + port publicationPort : PublicationPort; + port subscriptionPort : SubscriptionPort; + + exhibit state serverBehavior { + entry; then waitForSubscription; + + state waitForSubscription; + transition subscribing + first waitForSubscription + accept sub : Subscribe via subscriptionPort + then waitForPublication; + + state waitForPublication; + transition delivering + first waitForPublication + accept pub : Publish via publicationPort + if pub.topic == subscribing.sub.topic + do send new Deliver(pub.publication) to subscribing.sub.subscriber + then waitForPublication; + } + } + + interface consumer_2.subscriptionPort to server_2.subscriptionPort; + + part consumer_2[1] { + attribute myTopic : String; + + port subscriptionPort : ~SubscriptionPort; + + perform action consumerBehavior { + action subscribe send new Subscribe(myTopic, consumer_2) to server_2; + then action delivery accept Deliver via consumer_2; + } + } + + } + + part realization_2 : PubSubSequence { + part :>> producer :> producer_2 { + event producerBehavior.publish[1] :>> publish_source_event; + } + + part :>> server :> server_2 { + event serverBehavior.subscribing.accepter[1] :>> subscribe_target_event; + event serverBehavior.delivering.accepter[1] :>> publish_target_event; + event serverBehavior.delivering.effect[1] :>> deliver_source_event; + } + + part :>> consumer :> consumer_2 { + event consumerBehavior.subscribe[1] :>> subscribe_source_event; + event consumerBehavior.delivery[1] :>> deliver_target_event; + } + + flow :>> publish_message: Transfers::MessageTransfer { + end :>> source ::> producer.publicationPort; + end :>> target ::> server.publicationPort; + } + flow :>> subscribe_message: Transfers::MessageTransfer { + end :>> source ::> consumer.subscriptionPort; + end :>> target ::> server.subscriptionPort; + } + flow :>> deliver_message: Transfers::MessageTransfer { + end :>> source ::> server; + end :>> target ::> consumer; + } + + /* Binding sent/accept messages to specification model messages. */ + /* Sends */ + bind producer_2.producerBehavior.publish.sentMessage = publish_message; + bind consumer_2.consumerBehavior.subscribe.sentMessage = subscribe_message; + bind server_2.serverBehavior.delivering.effect.sentMessage = deliver_message; + /* Accepts */ + bind consumer_2.consumerBehavior.delivery.acceptedMessage = subscribe_message; + bind server_2.serverBehavior.subscribing.accepter.acceptedMessage = subscribe_message; + bind server_2.serverBehavior.delivering.accepter.acceptedMessage = publish_message; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-3.sysml b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-3.sysml new file mode 100644 index 00000000..5fb51f6e --- /dev/null +++ b/test/SysMLModels/OMG/examples/InteractionSequencingExamples/ServerSequenceRealization-3.sysml @@ -0,0 +1,151 @@ +package ServerSequenceRealization_3 { + private import ScalarValues::String; + private import ServerSequenceModel::*; + private import Configuration::*; + + package Configuration { + + port def PublicationPort { + in ref publish : Publish; + } + + port def SubscriptionPort { + in ref subscribe : Subscribe; + out ref deliver : Deliver; + } + + interface def PublicationInterface { + end source : ~PublicationPort; + end target : PublicationPort; + } + + interface def SubscriptionInterface { + end source : ~SubscriptionPort; + end target : SubscriptionPort; + } + + part producer_3[1] { + attribute someTopic : String; + private item somePublication; + + port publicationPort : ~PublicationPort { + out ref :>> publish; + } + + perform action producerBehavior { + action publish { + out ref request : Publish[1] = new Publish(someTopic, somePublication); + } + } + + flow publish_request from producerBehavior.publish.request to publicationPort.publish; + } + + interface publication_interface : PublicationInterface connect producer_3.publicationPort to server_3.publicationPort { + flow publish_request from publication_interface.source.publish to publication_interface.target.publish; + } + + part server_3[1] { + port publicationPort : PublicationPort { + in ref :>> publish; + } + port subscriptionPort : SubscriptionPort { + in ref :>> subscribe; + out ref :>> deliver; + } + + flow subscribe_request from subscriptionPort.subscribe to serverBehavior.subscribing.request; + flow publish_request from publicationPort.publish to serverBehavior.publishing.request; + flow deliver_response from serverBehavior.delivering.response to subscriptionPort.deliver; + + perform action serverBehavior { + + action subscribing { + in ref request : Subscribe[1]; + out attribute topic : String[1] = request.topic; + } + + then merge continuePublishing; + then action publishing { + in ref request : Publish[1]; + out attribute topic[1] = request.topic; + out ref publication[1] = request.publication; + } + + then decide; + if publishing.topic == subscribing.topic then delivering; + else continuePublishing; + + then action delivering { + in topic : String[1] = subscribing.topic; + in publication[1] = publishing.publication; + out ref response : Deliver = new Deliver(publication); + } + then continuePublishing; + + } + } + + interface subscription_interface : SubscriptionInterface connect consumer_3.subscriptionPort to server_3.subscriptionPort { + flow subscribe_request from subscription_interface.source.subscribe to subscription_interface.target.subscribe; + flow deliver_response from subscription_interface.target.deliver to subscription_interface.source.deliver; + } + + part consumer_3[1] { + attribute myTopic : String; + + port subscriptionPort : ~SubscriptionPort { + out ref :>> subscribe; + in ref :>> deliver; + } + + flow subscribe_request from consumerBehavior.subscribe.request to subscriptionPort.subscribe; + flow deliver_response from subscriptionPort.deliver to consumerBehavior.delivery.response; + + perform action consumerBehavior { + action subscribe { + out ref request : Subscribe = new Subscribe(myTopic); + } + then action delivery { + in ref response : Deliver; + } + } + } + + } + + part realization_2 : PubSubSequence { + part :>> producer :> producer_3 { + event producerBehavior.publish[1] :>> publish_source_event; + } + + part :>> server :> server_3 { + event serverBehavior.subscribing[1] :>> subscribe_target_event; + event serverBehavior.publishing[1] :>> publish_target_event; + event serverBehavior.delivering[1] :>> deliver_source_event; + } + + part :>> consumer :> consumer_3 { + event consumerBehavior.subscribe[1] :>> subscribe_source_event; + event consumerBehavior.delivery[1] :>> deliver_target_event; + } + + flow :>> publish_message from producer.producerBehavior.publish.request to server.serverBehavior.publishing.request { + event producer.publish_request[1]; + then event publication_interface.publish_request[1]; + then event server.publish_request[1]; + } + + flow :>> subscribe_message from consumer.consumerBehavior.subscribe.request to server.serverBehavior.subscribing.request { + event consumer.subscribe_request[1]; + then event subscription_interface.subscribe_request[1]; + then event server.subscribe_request[1]; + } + + flow :>> deliver_message from server.serverBehavior.delivering.response to consumer.consumerBehavior.delivery.response { + event server.deliver_response[1]; + then event subscription_interface.deliver_response[1]; + then event consumer.deliver_response[1]; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MassRoll-upExample/MassConstraintExample.sysml b/test/SysMLModels/OMG/examples/MassRoll-upExample/MassConstraintExample.sysml new file mode 100644 index 00000000..d8af9dfd --- /dev/null +++ b/test/SysMLModels/OMG/examples/MassRoll-upExample/MassConstraintExample.sysml @@ -0,0 +1,117 @@ +package MassConstraintExample { + private import ISQ::*; + private import SI::*; + private import NumericalFunctions::*; + + part def Engine { + attribute m :> mass; + } + + part def Transmission { + attribute m :> mass; + } + + part def Vehicle1 { + attribute m : MassValue = eng.m + trans.m; + + part eng : Engine { + attribute :>> m : MassValue; + } + + part trans : Transmission { + attribute :>> m : MassValue; + } + } + + part def Vehicle2 { + assert constraint { m == eng.m + trans.m } + + attribute m : MassValue; + + part eng : Engine { + attribute :>> m : MassValue; + } + + part trans : Transmission { + attribute :>> m : MassValue; + } + } + + constraint def MassConstraint3 { + in totalMass : MassValue; + in partMasses : MassValue[0..*]; + + totalMass == sum(partMasses) + } + + part def Vehicle3 { + assert constraint massConstraint : MassConstraint3 { + in totalMass = m; + in partMasses = (eng.m, trans.m); + } + + attribute m : MassValue; + + part eng { + attribute m : MassValue; + } + + part trans { + attribute m : MassValue; + } + } + + constraint def MassConstraint4 { + in totalMass : MassValue; + in partMasses : MassValue[0..*]; + } + + constraint mc : MassConstraint4 { + in totalMass : MassValue; + in partMasses : MassValue[0..*]; + + totalMass == sum(partMasses) + } + + part def Vehicle4 { + assert mc { + in totalMass = m; + in partMasses = (eng.m, trans.m); + } + + attribute m : MassValue; + + part eng : Engine { + attribute :>> m : MassValue; + } + + part trans : Transmission { + attribute :>> m : MassValue; + } + } + + constraint def MassLimit { + in mass : MassValue; + in maxMass : MassValue; + + mass <= maxMass + } + + part def Vehicle5 { + assert constraint ml : MassLimit { + in mass = m; + in maxMass = 2500 [kg]; + } + + attribute m : MassValue = eng.m + trans.m; + + part eng : Engine { + attribute :>> m : MassValue; + } + + part trans : Transmission { + attribute :>> m : MassValue; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MassRoll-upExample/MassRollup.sysml b/test/SysMLModels/OMG/examples/MassRoll-upExample/MassRollup.sysml new file mode 100644 index 00000000..e483162e --- /dev/null +++ b/test/SysMLModels/OMG/examples/MassRoll-upExample/MassRollup.sysml @@ -0,0 +1,27 @@ +package MassRollup { + private import NumericalFunctions::*; + + part def MassedThing { + attribute mass :> ISQ::mass; + attribute totalMass :> ISQ::mass; + } + + part simpleThing : MassedThing { + attribute redefines totalMass = mass; + } + + part compositeThing : MassedThing { + part subcomponents: MassedThing[*]; + + attribute redefines totalMass default + mass + sum(subcomponents.totalMass); + } + + part filteredMassThing :> compositeThing { + abstract attribute minMass :> ISQ::mass; + + attribute redefines totalMass = + mass + sum(subcomponents.totalMass.?{in p :> ISQ::mass; p > minMass}); + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MassRoll-upExample/Vehicles.sysml b/test/SysMLModels/OMG/examples/MassRoll-upExample/Vehicles.sysml new file mode 100644 index 00000000..fb8736c4 --- /dev/null +++ b/test/SysMLModels/OMG/examples/MassRoll-upExample/Vehicles.sysml @@ -0,0 +1,37 @@ +package VehicleMasses { + private import ScalarValues::*; + private import MassRollup::*; + + part def CarPart :> MassedThing { + attribute serialNumber: String; + } + + part car: CarPart :> compositeThing { + attribute vin redefines serialNumber; + + part carParts: CarPart[*] redefines subcomponents; + + part engine :> simpleThing, carParts { + //... + } + + part transmission :> simpleThing, carParts { + //... + } + } + + // Example usage + private import SI::*; + part c :> car { + redefines mass = 1000 [kg]; + part redefines engine { + redefines mass = 100 [kg]; + } + + part redefines transmission { + redefines mass = 50 [kg]; + } + } + + // c.totalMass --> 1150.0 [kg] +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MetadataExamples/IssueMetadataExample.sysml b/test/SysMLModels/OMG/examples/MetadataExamples/IssueMetadataExample.sysml new file mode 100644 index 00000000..b6c011f1 --- /dev/null +++ b/test/SysMLModels/OMG/examples/MetadataExamples/IssueMetadataExample.sysml @@ -0,0 +1,30 @@ +package IssueMetadataExample { + private import ModelingMetadata::Issue; + + //Example: the following identifies an issue with the interface + + metadata InterfaceCompatibilityIssue : Issue about engineToTransmissionInterface { + text = "This issue is about the interface compatability between the engine and transmission." + + "The interface def includes an end defined by a ClutchPort." + + "However, the interface usage connects the transmission port that is defined by ~DrivePwrPort." + + "This should have surfaced a compatibility issue, since the interface is not really compatible with its definition"; + } + + interface def EngineToTransmissionInterface{ + end p1:DrivePwrPort; + end p2:ClutchPort; + } + port def DrivePwrPort; + port def ClutchPort; + + part engine{ + port drivePwrPort:DrivePwrPort; + } + part transmission{ + port clutchPort:~DrivePwrPort; + } + + interface engineToTransmissionInterface:EngineToTransmissionInterface + connect engine.drivePwrPort to transmission.clutchPort; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MetadataExamples/RationaleMetadataExample.sysml b/test/SysMLModels/OMG/examples/MetadataExamples/RationaleMetadataExample.sysml new file mode 100644 index 00000000..fa6b602d --- /dev/null +++ b/test/SysMLModels/OMG/examples/MetadataExamples/RationaleMetadataExample.sysml @@ -0,0 +1,24 @@ +package RationaleMetadataExample { + private import ModelingMetadata::Rationale; + + /* Example: the following provides the rationale for selecting the engine4cyl based on a trade study analysis. + The rationale could be contained in the vehicle configuration with the selected engine */ + + part engine; + part engine4cyl :> engine; + part engine6cyl :> engine; + + metadata engineSelectionRationale : Rationale about engine4cyl { + text = "This rationale for selecting the engine4cyl refers to the engineTradeOffAnalysis."; + explanation = engineTradeOffAnalysis; + } + + private import TradeStudies::*; + analysis engineTradeOffAnalysis:TradeStudy{ + subject alternatives :> engine [2] = (engine4cyl, engine6cyl); + + /* ... */ + + return selectedEngine :> engine; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MetadataExamples/RequirementMetadataExample.sysml b/test/SysMLModels/OMG/examples/MetadataExamples/RequirementMetadataExample.sysml new file mode 100644 index 00000000..4501e4b7 --- /dev/null +++ b/test/SysMLModels/OMG/examples/MetadataExamples/RequirementMetadataExample.sysml @@ -0,0 +1,34 @@ +package RequirementMetadataExample { + private import Metaobjects::SemanticMetadata; + private import ModelingMetadata::*; + private import RiskMetadata::*; + private import RiskLevelEnum::*; + + requirement def Goal; + requirement goals : Goal[*] nonunique; + metadata def goal :> SemanticMetadata { + :>> baseType = goals meta SysML::RequirementUsage; + } + + requirement <'1'> vehicleMassRequirement { + doc /* The total mass of a vehicle shall be less than or equal to the required mass. */ + + @StatusInfo { + status = StatusKind::tbd; + risk { + totalRisk = high; + technicalRisk = medium; + scheduleRisk = low; + costRisk = medium; + } + originator = "Bob"; + owner = "Mary"; + } + } + + #goal requirement deliverPayload { + assume #goal constraint payloadMassLimit; + require #goal vehicleMassRequirement; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MetadataExamples/RiskMetadataExample.sysml b/test/SysMLModels/OMG/examples/MetadataExamples/RiskMetadataExample.sysml new file mode 100644 index 00000000..5db0fe86 --- /dev/null +++ b/test/SysMLModels/OMG/examples/MetadataExamples/RiskMetadataExample.sysml @@ -0,0 +1,19 @@ +package RiskMetadataExample { + private import RiskMetadata::*; + private import RiskLevelEnum::*; + + part engine4cyl{ + @Risk { + totalRisk = high; + technicalRisk = medium; + scheduleRisk = medium; + } + @Risk { + totalRisk { + probability = 0.3; + impact = 0.7; + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/MetadataExamples/VerificationMetadataExample.sysml b/test/SysMLModels/OMG/examples/MetadataExamples/VerificationMetadataExample.sysml new file mode 100644 index 00000000..98269d03 --- /dev/null +++ b/test/SysMLModels/OMG/examples/MetadataExamples/VerificationMetadataExample.sysml @@ -0,0 +1,15 @@ +package VerificationMetadataExample { + private import VerificationCases::*; + private import VerificationMethodKind::*; + + verification def MassTest; + verification massTests:MassTest { + @VerificationMethod{ kind = (test,demo); } + objective { + } + action weighVehicle { + @VerificationMethod{ kind = analyze; } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/PacketExample/PacketUsage.sysml b/test/SysMLModels/OMG/examples/PacketExample/PacketUsage.sysml new file mode 100644 index 00000000..39963799 --- /dev/null +++ b/test/SysMLModels/OMG/examples/PacketExample/PacketUsage.sysml @@ -0,0 +1,16 @@ +package 'Packet Usage' { + public import Packets::*; + private import ScalarValues::Real; + + part packet1: 'Thermal Data Packet'; + part packet2: 'Thermal Data Packet'; + part packet3: 'Thermal Data Packet' { + attribute 'special data field' redefines 'packet data field'{ + attribute redefines 'user data field' { + attribute 'special data': Real; + } + } + } + +} + diff --git a/test/SysMLModels/OMG/examples/PacketExample/Packets.sysml b/test/SysMLModels/OMG/examples/PacketExample/Packets.sysml new file mode 100644 index 00000000..11067e15 --- /dev/null +++ b/test/SysMLModels/OMG/examples/PacketExample/Packets.sysml @@ -0,0 +1,35 @@ +package Packets { + private import ScalarValues::*; + private import Time::DateTime; + + attribute 'packet header' { } + + attribute 'packet data field' { + attribute 'packet secondary header' redefines 'packet header'; + attribute 'user data field'; + } + + part def 'Data Packet' { + attribute 'packet primary header' redefines 'packet header' { + attribute 'packet version number': Integer; + attribute 'packet identification': String; + attribute 'packet data length': Integer; + } + attribute redefines 'packet data field'; + } + + part def 'Thermal Data Packet' :> 'Data Packet' { + attribute 'packet data field' redefines Packets::'packet data field'{ + attribute 'packet secondary header' redefines 'packet header' { + attribute 'packet timestamp': DateTime; + attribute 'telemetry packet type': String; + } + + attribute 'user data field' redefines Packets::'packet data field'::'user data field' { + attribute timestamp: DateTime; + attribute temperature: Real; + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/RequirementsExamples/HSUVRequirements.sysml b/test/SysMLModels/OMG/examples/RequirementsExamples/HSUVRequirements.sysml new file mode 100644 index 00000000..3eb53a2e --- /dev/null +++ b/test/SysMLModels/OMG/examples/RequirementsExamples/HSUVRequirements.sysml @@ -0,0 +1,39 @@ +package HSUVRequirements { + private import Requirements::*; + + requirement <'UR1.1'> Load: FunctionalRequirementCheck { + // The following requirements are composite sub-requirements. + requirement Passengers; + requirement FuelCapacity; + requirement Cargo; + } + + requirement <'UR1.2'> EcoFriendliness: PerformanceRequirementCheck { + requirement <'URI1.2.1'> Emissions: PerformanceRequirementCheck { + /* The car shall meet 2010 Kyoto Accord emissions standards. */ + } + } + + requirement <'UR1.3'> Performance: PerformanceRequirementCheck { + requirement Acceleration; + requirement <'UR1.3.1'> FuelEconomy: PerformanceRequirementCheck { + /* User shall obtain fuel economy better than that provided by + * 95% of cars built in 2004. + */ + } + requirement Braking; + requirement Range; + requirement Power; + } + + requirement <'UR1.4'> Ergonomics; + + // Syntactically, should this be explicitly marked as a "group"? + requirement HybridSUVSpec { + // The following requirements are required by reference. + require Load; + require EcoFriendliness; + require Performance; + require Ergonomics; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/RequirementsExamples/RequirementDerivationExample.sysml b/test/SysMLModels/OMG/examples/RequirementsExamples/RequirementDerivationExample.sysml new file mode 100644 index 00000000..69d0eb76 --- /dev/null +++ b/test/SysMLModels/OMG/examples/RequirementsExamples/RequirementDerivationExample.sysml @@ -0,0 +1,39 @@ +package RequirementDerivationExample { + private import RequirementDerivation::*; + + requirement def Req1; + + requirement def Req1_1; + requirement def Req1_2; + + #derivation connection def Req1_Derivation { + end #original r1 : Req1; + end #derive r1_1 : Req1_1; + end #derive r1_2 : Req1_2; + } + + part def System; + part def Subsystem1; + part def Subsystem2; + + part system : System { + part sub1 : Subsystem1; + part sub2 : Subsystem2; + } + + part satisfactionContext { + ref :>> system; + + satisfy requirement req1 : Req1 by system; + satisfy requirement req1_1 : Req1_1 by system.sub1; + satisfy requirement req1_2 : Req1_2 by system.sub2; + + #derivation connection : Req1_Derivation { + end r1 ::> req1; + end r1_1 ::> req1_1; + end r1_2 ::> req1_1; + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/RequirementsExamples/VehicleRequirementDerivation.sysml b/test/SysMLModels/OMG/examples/RequirementsExamples/VehicleRequirementDerivation.sysml new file mode 100644 index 00000000..6db4ff57 --- /dev/null +++ b/test/SysMLModels/OMG/examples/RequirementsExamples/VehicleRequirementDerivation.sysml @@ -0,0 +1,40 @@ +package VehicleRequirementDerivation { + private import RequirementDerivation::*; + + part vehicle { + attribute mass :> ISQ::mass; + + part chassis { + attribute mass :> ISQ::mass; + } + + part engine { + attribute mass :> ISQ::mass; + } + } + + requirement def MassRequirement { + subject mass :> ISQ::mass; + attribute massLimit :> ISQ::mass; + require constraint { mass <= massLimit } + } + + requirement vehicleMassRequirement : MassRequirement { + subject :>> mass = vehicle.mass; + } + + requirement chassisMassRequirement : MassRequirement { + subject :>> mass = vehicle.chassis.mass; + } + + requirement engineMassRequirement : MassRequirement { + subject :>> mass = vehicle.engine.mass; + } + + #derivation connection { + end #original ::> vehicleMassRequirement; + end #derive ::> chassisMassRequirement; + end #derive ::> engineMassRequirement; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/RoomModel/RoomModel.sysml b/test/SysMLModels/OMG/examples/RoomModel/RoomModel.sysml new file mode 100644 index 00000000..e591fae8 --- /dev/null +++ b/test/SysMLModels/OMG/examples/RoomModel/RoomModel.sysml @@ -0,0 +1,77 @@ +// SysML v2 Interpretation of the SysML v1 Room Connection Example +package RoomModel { + package RoomDefinitionModelLibrary{ + private import Port_Definitions::*; + private import Flow_Definitions::*; + package Part_Definitions{ + // Rooms + part def Classroom { + port classEntry: EntryWay_to_Classroom; + } + part def Storageroom { + port storageEntry: EntryWay_to_Storageroom; + } + part def Hallway { + // conjugate ports with ~ + port hallExit_to_Classroom: ~EntryWay_to_Classroom; + port hallExit_to_Storageroom: ~EntryWay_to_Storageroom; + } + } + package Port_Definitions{ + port def EntryWay_to_Classroom { + //flow properties + in ref student:Student; + in ref teacher:Teacher; + in ref furniture:Furniture; + in ref air:Air; + } + port def EntryWay_to_Storageroom { + //flow properties + in ref furniture: Furniture; + in ref air: Air; + } + } + package Flow_Definitions { + // Conveyed items between Hallway, Classroom, and Storageroom + part def Air; + part def Furniture; + part def Student; + part def Teacher; + } + } + package Room_Configuration{ + // defining the parts and their interconnection in context + private import RoomDefinitionModelLibrary::*; + private import RoomDefinitionModelLibrary::Part_Definitions::*; + private import RoomDefinitionModelLibrary::Port_Definitions::*; + private import RoomDefinitionModelLibrary::Flow_Definitions::*; + part roomContext{ + part c:Classroom; + part s:Storageroom; + part h:Hallway; + + // Connectors and item flows between hallway and classroom + flow HallToClassroom_Air + from h.hallExit_to_Classroom.air + to c.classEntry.air; + flow HallToClassroom_Furniture + from h.hallExit_to_Classroom.furniture + to c.classEntry.furniture; + flow HallToClassroom_Student + from h.hallExit_to_Classroom.student + to c.classEntry.student; + flow HallToClassroom_Teacher + from h.hallExit_to_Classroom.teacher + to c.classEntry.teacher; + flow HallToStorageroom_Air + from h.hallExit_to_Storageroom.air + to s.storageEntry.air; + flow HallToStorageroom_Furniture + from h.hallExit_to_Storageroom.furniture + to s.storageEntry.furniture; + } + } +} + + + diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ActionTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ActionTest.sysml new file mode 100644 index 00000000..32b8101b --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ActionTest.sysml @@ -0,0 +1,53 @@ +package ActionTest { + action def A{ in x; } + + action a: A { + first start; + + action b { in y = x; } + + bind x = b.y; + } + + attribute def S; + + action a1 { + first start; + then merge m; + then accept S; + then accept sig after 10[SI::s]; + then accept at new Time::Iso8601DateTime("2022-01-30T01:00:00Z"); + + then send new S() to b; + then accept when b.f; + then decide; + if true then m; + else done; + } + + action a2 { + in s : S; + action aa { + out part target; + } + flow aa.target to snd.receiver; + action snd send { + in :>> payload = s; + } + action snd2 send via this to aa.target; + bind s = snd2.payload; + } + + action b { + attribute f : ScalarValues::Boolean; + ref action a : A; + } + + action def c { + first start; + then action c1 { + terminate c1; + } + then terminate; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/AliasTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/AliasTest.sysml new file mode 100644 index 00000000..00e3785e --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/AliasTest.sysml @@ -0,0 +1,22 @@ +package AliasTest { + private import ISQSpaceTime::breadth; // import of an alias + attribute b :> breadth; + + part def P1 { + port porig1; + alias po1 for porig1; + } + + part p1 : P1 { + port po1 :>> po1; + } + + part p2 : P1 { + port pdest; + alias pd1 for pdest; + } + + + connect p1.po1 to p2.pdest; + connect p1.po1 to p2.pd1; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/AllocationTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/AllocationTest.sysml new file mode 100644 index 00000000..fcf26dab --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/AllocationTest.sysml @@ -0,0 +1,36 @@ +package AllocationTest { + part def Logical { + part component; + } + + part def Physical { + part assembly { + part element; + } + } + + part l : Logical { + part :>> component; + } + part p : Physical { + part :>> assembly { + part :>> element; + } + allocate l.component to assembly.element; + } + + allocation def A; + + allocation def Logical_to_Physical :> A { + end logical : Logical; + end physical : Physical; + } + + allocation allocation1 : Logical_to_Physical allocate l to p; + allocation allocation2 : Logical_to_Physical allocate ( + logical ::> l, + physical ::> p + ); + + allocate l.component to p.assembly.element; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/AnalysisTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/AnalysisTest.sysml new file mode 100644 index 00000000..b345419f --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/AnalysisTest.sysml @@ -0,0 +1,38 @@ +package AnalysisTest { + + part def V { + m; + } + + part vv : V; + + requirement def AnalysisObjective { + doc /* ... */ + } + + analysis def AnalysisCase { + subject v : V; + + objective obj : AnalysisObjective { + subject = result; + } + + v.m + } + + analysis def AnalysisPlan { + subject v : V; + + objective { + doc /* ... */ + } + + analysis analysisCase : AnalysisCase { return mass; } + } + + part analysisContext { + analysis analysisPlan : AnalysisPlan { + subject v = vv; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/AssignmentTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/AssignmentTest.sysml new file mode 100644 index 00000000..a2a88431 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/AssignmentTest.sysml @@ -0,0 +1,52 @@ +package AssignmentTest { + + part def Counter { + attribute count : ScalarValues::Integer := 0; + + action incr { + assign count := count + 1; + } + + action decr { + assign count := count - 1; + } + } + + attribute def Incr; + attribute def Decr; + + state def Counting { + part counter : Counter; + entry assign counter.count := 0; + + then state wait; + accept Incr + then increment; + accept Decr + then decrement; + + state increment { + do assign counter.count := counter.count + 1; + } + then wait; + + state decrement { + do assign counter.count := counter.count - 1; + } + then wait; + } + + calc def Increment { + in c : Counter; + return : Counter; + + perform c.incr; + c + } + + action a { + state counting : Counting; + assign counting.counter.count := counting.counter.count + 1; + assign counting.counter.count := Increment(counting.counter).count; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/CalculationTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/CalculationTest.sysml new file mode 100644 index 00000000..4890d550 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/CalculationTest.sysml @@ -0,0 +1,30 @@ +package CalculationExample { + private import ISQ::*; + private import NumericalFunctions::*; + + part def VehiclePart { + attribute m : MassValue; + } + + part def Vehicle :> VehiclePart; + + part vehicle : Vehicle { + part eng : VehiclePart; + part trans : VehiclePart; + attribute ::> m = ms.totalMass; + } + + calc def MassSum { + in partMasses : MassValue[0..*]; + return totalMass : MassValue = sum(partMasses); + } + + calc ms: MassSum { + in partMasses = (vehicle.eng.m, vehicle.trans.m); + return totalMass; + } + + part vehicles[*] = (vehicle, vehicle); + attribute masses1[*] = (vehicles as VehiclePart).m; + attribute masses2[*] = (vehicles as vehicle).m; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/CommentTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/CommentTest.sysml new file mode 100644 index 00000000..1cf70de3 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/CommentTest.sysml @@ -0,0 +1,44 @@ + /* AAA */ + //a lexical comment ("note") is not a part of model +package CommentTest { + // inside package + /* +*AAA + * BBB*/ + /* + * + * + * AAA *** + *BBB + */ + + /* + * AAAA + * BBBB */ + /* AAAA + + + * BBBB + * + * CCCC + */ + locale "en_US" /* + * AAAA + * BBBB + * CCC DDD + */ + + /* comment inside a package */ + doc locale "en_US" /* Documentation about Package */ + comment cmt /* Named Comment */ + comment cmt_cmt about cmt /* Comment about Comment */ + + comment about C /* Documention Comment about Part Def */ + part def C { + doc /* Documentation in Part Def */ + comment /* Comment in Part Def */ + comment about CommentTest locale "en_US" /* Comment about Package */ + } + /* abc */ + part def A; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ConjugationTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ConjugationTest.sysml new file mode 100644 index 00000000..eccdaa17 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ConjugationTest.sysml @@ -0,0 +1,35 @@ +package ConjugationTest { + port def P; + + part def B { + port p1: P; + port p2: ~P; + } + + connection def A { + end port p1: P; + end port p2: ~P; + } + + interface def I { + end p1: P; + end p2: ~P; + } + + part def B1 { + part p { + port p1: P; + port p2: ~P; + } + + connection a: A { + end port p3: P ::> p.p1; + end port p4: ~P ::> p.p2; + } + interface i: I { + end port p3: P ::> p.p1; + end port p4: ~P ::> p.p2; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ConnectionTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ConnectionTest.sysml new file mode 100644 index 00000000..1cfb9df6 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ConnectionTest.sysml @@ -0,0 +1,77 @@ +package ConnectionTest { + + part p { + part x { + part x1; + } + } + + part def P { + part y; + + connect p to y; + + part p1 :> p; + + connect p1.x to y; + connect p1.x.x1 to y; + + part a; + part b; + + bind a = b; + binding ab bind a = b; + binding ab1 : AB bind a = b; + + first a then b; + succession s first a then b; + succession s1 : AB first a then b; + } + + abstract connection def C { + part p; + end end1; + end end2; + end end3; + } + + part d1; + part d2; + part d3; + part d4; + + connection bus : C connect (d1, d2, d3, d4); + + connection : C { + end :>> end1 ::> d1; + end end2 ::> d2; + end end3 ::> d3; + } + + connection { + part q; + end ref end1 ::> d1 :> q; + end end2 ::> d2; + } + + abstract flow def F; + + message : F from p to p; + + part def A { + ref b : B; + } + + part def B; + + connection def AB { + end [1] item a : A { + @M; + } + end b : B; + } + + metadata def M; + + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ConstraintTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ConstraintTest.sysml new file mode 100644 index 00000000..686807e2 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ConstraintTest.sysml @@ -0,0 +1,90 @@ +package ConstraintTest { + private import ISQ::MassValue; + private import SI::kg; + private import NumericalFunctions::sum; + + constraint def MassAnalysis { + attribute totalMass: MassValue; + attribute componentMasses: MassValue[0..*]; + + totalMass == sum(componentMasses) + } + + part def Component { + attribute mass: MassValue; + } + + part vehicle : Component { + part engine : Component; + part frontAxleAssembly : Component; + part rearAxleAssembly : Component; + } + + part vehicle1a :> vehicle { + assert constraint massAnalysis : MassAnalysis { + attribute redefines totalMass; + attribute redefines componentMasses; + } + + bind massAnalysis.totalMass = mass; + bind massAnalysis.componentMasses = engine.mass; + bind massAnalysis.componentMasses = frontAxleAssembly.mass; + bind massAnalysis.componentMasses = rearAxleAssembly.mass; + } + + part vehicle1b :> vehicle { + assert constraint massAnalysis : MassAnalysis { + attribute redefines totalMass = mass; + attribute redefines componentMasses = (engine.mass, frontAxleAssembly.mass, rearAxleAssembly.mass); + } + } + + constraint def MassAnalysis2 { + in totalMass : MassValue; + in componentMasses: MassValue[0..*]; + + totalMass == sum(componentMasses) + } + + part vehicle2a :> vehicle { + assert constraint massConstraint : MassAnalysis2; + + bind massConstraint.totalMass = mass; + bind massConstraint.componentMasses = engine.mass; + bind massConstraint.componentMasses = frontAxleAssembly.mass; + bind massConstraint.componentMasses = rearAxleAssembly.mass; + } + + part vehicle2b :> vehicle { + assert constraint massAnalysis2 : MassAnalysis2 { + in totalMass = mass; + in componentMasses = (engine.mass, frontAxleAssembly.mass, rearAxleAssembly.mass); + } + } + + constraint def MassAnalysis3 { + in totalMass : MassValue; + in componentMasses: MassValue[0..*]; + } + + constraint massAnalysis3 : MassAnalysis3 { + in totalMass : MassValue; + in componentMasses: MassValue[0..*]; + + totalMass == sum(componentMasses) + } + + part vehicle3 :> vehicle { + assert massAnalysis3 { + in totalMass = mass; + in componentMasses = (engine.mass, frontAxleAssembly.mass, rearAxleAssembly.mass); + } + } + + part vehicle4 :> vehicle { + assert constraint { mass == engine.mass + frontAxleAssembly.mass + rearAxleAssembly.mass } + } + + constraint massLimitation { mass : MassValue; massLimit : MassValue; mass < massLimit } + assert not massLimitation { :>> mass = vehicle3.mass; :>> massLimit = vehicle4.mass; } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ControlNodeTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ControlNodeTest.sysml new file mode 100644 index 00000000..0b2ca290 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ControlNodeTest.sysml @@ -0,0 +1,35 @@ +action def ControlNodeTest { + action A1; + then J; + + action A2 { + out a; + } + then J; + + flow A2.a to F.a; + + join J; + then fork F { + in a; + out b1; + out b2; + } + then B1; + then B2; + + flow F.b1 to B1.b; + flow F.b2 to B2.b; + + action B1 { + in b; + } + then M; + + action B2 { + in b; + } + then M; + + merge M; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/DecisionTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/DecisionTest.sysml new file mode 100644 index 00000000..73944e3a --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/DecisionTest.sysml @@ -0,0 +1,22 @@ +action def DecisionTest { + attribute x = 1; + + decide 'test x'; + if x == 1 then A1; + if x > 1 then A2; + else A3; + + then decide D; + if true then A1; + if false then A2; + + action A1; + action A2; + action A3; + + succession S first A1 + if x == 0 then A2; + + first A3; + if x > 0 then 'test x'; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/DefaultValueTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/DefaultValueTest.sysml new file mode 100644 index 00000000..223e92bd --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/DefaultValueTest.sysml @@ -0,0 +1,18 @@ +package DefaultValueTest { + + part def V { + attribute m default = 10; + attribute n = 20; + } + + part v1 : V { + attribute :>> m = 20; + } + + part def W :> V { + attribute :>> m default = n; + } + + part v2 = new W(); + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/DependencyTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/DependencyTest.sysml new file mode 100644 index 00000000..d39e4122 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/DependencyTest.sysml @@ -0,0 +1,20 @@ +package DependencyTest { + + package System { + package 'Application Layer'; + package 'Service Layer'; + package 'Data Layer'; + } + + private import System::*; + + dependency Use from 'Application Layer' to 'Service Layer'; + dependency from 'Service Layer' to 'Data Layer'; + + attribute x; + attribute y; + attribute z; + + dependency z to x, y; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/EnumerationTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/EnumerationTest.sysml new file mode 100644 index 00000000..2dc2fb4b --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/EnumerationTest.sysml @@ -0,0 +1,54 @@ +package EnumerationTest { + + attribute def Color { + attribute val : ScalarValues::Natural; + } + + enum def ColorKind :> Color { + doc + /* + * An EnumerationDefinition can contain only EnumerationUsages. However, + * it can specialize an AttributeDefinition in order to inherit + * common features for its enumeration values. + */ + + enum red { + :>> val = 0; + } + enum blue { + :>> val = 1; + } + enum green { + :>> val = 2; + } + } + + enum color : ColorKind; + enum color1 = ColorKind::blue; // Implicitly typed by ColorKind. + attribute color2 : ColorKind = color1; + + enum def E1 { a; b; c; + doc + /* + * The "enum" keyword is optional for EnumerationUsages used to define the + * enumerated values of an EnumerationDefinition. + */ + } + + enum def E2; + + attribute def Size :> ScalarValues::Real { + doc + /* + * An EnumerationDefinition can also be used to restrict a supertype to + * specific values. + */ + } + enum def SizeChoice :> Size { + = 60.0; + = 70.0; + = 80.0; + } + enum size: SizeChoice = 60.0; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/FeaturePathTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/FeaturePathTest.sysml new file mode 100644 index 00000000..0c469c45 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/FeaturePathTest.sysml @@ -0,0 +1,43 @@ +package Q { + part def F { + part a : A; + } + + part f : F; + + part def A { + part g = f.a; + } + + part def B { + part f : F; + part a : A; + } + + part def C { + part b : B { + connect f.a to a.g; + bind f.a = a.g; + } + + part c subsets b.f { + part aa subsets a; + } + + flow b.f.a to c.aa; + } + + part e1 { + attribute x : E; + // Ensure that "e1" resolves correctly. + bind e1.x = E::e2; + } + + enum def E { + enum e1; + enum e2; + } + + part g = new A().g.g.g; + +} diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ImportTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ImportTest.sysml new file mode 100644 index 00000000..c767014c --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ImportTest.sysml @@ -0,0 +1,18 @@ +package ImportTest { + package Pkg1 { + private import Pkg2::Pkg21::Pkg211::P211; + private import Pkg2::Pkg21::*; + private import Pkg211::*::**; + part p11 : Pkg211::P211; + part def P12; + } + + package Pkg2 { + private import Pkg1::*; + package Pkg21 { + package Pkg211 { + part def P211 :> P12; + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/IndividualTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/IndividualTest.sysml new file mode 100644 index 00000000..cbc804bd --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/IndividualTest.sysml @@ -0,0 +1,39 @@ +package IndividualTest { + individual def IO1; + individual occurrence def IO2 { + individual io : IO1; + } + + individual item def II1 { + individual item ii : II1; + } + + item def I { + part i : I; + } + individual item def II2 :> I { + individual item :>> i : II2; + } + + individual part def IP1 { + individual part p : IP1; + } + + part def P { + part p : P; + } + individual part def IP2 :> P { + individual part :>> p : IP2; + } + + individual action def AP1 { + individual action a : AP1; + } + + action def A { + action a : A; + } + individual action def IA2 :> A { + individual action :>> a : IA2; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ItemTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ItemTest.sysml new file mode 100644 index 00000000..92e212d4 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ItemTest.sysml @@ -0,0 +1,23 @@ +package ItemTest { + + item f: A; + + public item def A { + item b: B; + protected ref part c: C; + } + + abstract item def B { + public abstract part a: A; + } + + private part def C { + private in ref y: A, B; + } + + port def P { + in item a1: A; + out item a2: A; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/MetadataTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/MetadataTest.sysml new file mode 100644 index 00000000..2ebd767b --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/MetadataTest.sysml @@ -0,0 +1,42 @@ +package MetadataTest { + private import 'User Defined Extensions'::*; + + library package 'User Defined Extensions' { + + #Security enum def ClassificationLevel :> ScalarValues::Natural { + uncl : ClassificationLevel = 0; + conf : ClassificationLevel = 1; + #Security enum secret : ClassificationLevel = 2; + } + + metadata def Classified { + ref :>> annotatedElement : SysML::Usage; + ref classificationLevel : ClassificationLevel; + } + + metadata def Security; + } + + ref x { + metadata Classified { + classificationLevel = ClassificationLevel::conf; + } + } + + ref y { + @Classified { + classificationLevel = ClassificationLevel::conf; + } + @Security; + } + + private ref #Classified #Security z1; + abstract #Classified z2; + + ref z { + #Security #Classified metadata Classified { + classificationLevel = ClassificationLevel::secret; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/MultiplicityTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/MultiplicityTest.sysml new file mode 100644 index 00000000..f42d0ae8 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/MultiplicityTest.sysml @@ -0,0 +1,19 @@ +package MultiplicityTest { + + part def P; + attribute n : ScalarValues::Integer = 5; + + part a[1]; + part b[0..2] : P; + part c : P[2..*]; + part d[*]; + + part e[n]; + part f[n..*]; + part g[1..n]; + + attribute def A { + attribute i :ScalarValues::Integer; + attribute x : A[i]; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/OccurrenceTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/OccurrenceTest.sysml new file mode 100644 index 00000000..46701ca5 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/OccurrenceTest.sysml @@ -0,0 +1,32 @@ +package OccurrenceTest { + occurrence def Occ { + attribute a; + ref occurrence occ1 : Occ; + occurrence occ2 : Occ; + item x; + part y; + + individual snapshot s : Ind; + timeslice t; + } + + occurrence occ : Occ { + occurrence o1 : Occ; + ref occurrence o2 : Occ; + item z; + } + + individual occurrence def Ind { + snapshot s2; + timeslice t2; + } + individual occurrence ind : Ind, Occ { + snapshot s3; + individual timeslice t3 :> ind; + individual snapshot s4 : Ind; + } + + occurrence o1 { + occurrence o2; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ParameterTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ParameterTest.sysml new file mode 100644 index 00000000..f1a6d1d5 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ParameterTest.sysml @@ -0,0 +1,16 @@ +package ParameterTest { + attribute def A { + attribute x : ScalarValues::String; + attribute y : A; + } + + attribute a : A; + + calc def F { in p : A; in q : ScalarValues::Integer; return : ScalarValues::Integer; } + + attribute f = F(a, 2); + attribute g = F(q = 1, p = a); + + attribute b = new A(y=a, x=""); + attribute c = new A("test2"); +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/PartTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/PartTest.sysml new file mode 100644 index 00000000..1ec56ab3 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/PartTest.sysml @@ -0,0 +1,55 @@ +package PartTest { + + part f: A; + + public part def A { + part <'1'> b: B; + protected port c: C; + constant attribute x[0..2]; + derived constant ref attribute y :> x; + ref z : ScalarValues::Integer; + } + + item def S; + + abstract part def B { + public abstract part a: A[1..2]; + public abstract part b subsets a; + public abstract part c[0..1] subsets a; + port x: ~C { + port p; + ref port q; + } + package P { } + + succession flow x.p to a1.aa.receiver; + + action a1 { + accept S via x; + action aa accept S; + } + perform action a2; + + state s1; + exhibit state s2; + } + + private port def C { + private in ref y: A, B { + part B_b redefines B::b; + part B_c redefines B::c; + port B_x redefines B::x; + } + alias z1 for y; + alias z2 for y; + port c1 : C; + ref port c2 : C; + } + + part p1 :> p2; + part p2 :> p3; + part p3 :> p1; + + part p4 :> p4; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/RequirementTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/RequirementTest.sysml new file mode 100644 index 00000000..7fab0245 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/RequirementTest.sysml @@ -0,0 +1,29 @@ +package RequirementTest { + constraint def C; + constraint c : C; + private import q::**; + requirement def R { + assume constraint c1 : C; + require c; + doc /* */ + requirement; + requirement def <'1'> A { + doc /* Text */ + subject s; + } + } + requirement def R1 { + require constraint c1 :>> c; + } + part p; + part q { + requirement r : R; + satisfy r by p; + assert satisfy r by q; + } + + requirement r1 : R1; + not satisfy r1 by p; + assert not satisfy r1 by q; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/RootPackageTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/RootPackageTest.sysml new file mode 100644 index 00000000..4be14fa2 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/RootPackageTest.sysml @@ -0,0 +1,14 @@ +package P1 { + part def A; +} + +package P2 { + private import P1::*; + part a : A; +} + +private import P2::*; + +package P3 { + part b subsets a; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/StateTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/StateTest.sysml new file mode 100644 index 00000000..d65864d9 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/StateTest.sysml @@ -0,0 +1,72 @@ +package StateTest { + attribute def Sig { + x; + } + attribute def Exit; + + part p; + + action act; + + state def S { + do action A; + entry; then S1; + + state S1; + accept s : Sig + do action D + then S2; + + state S2 { + do send new Sig(T.s.x) to p; + state S3; + } + accept Exit then done; + + transition + first S1 + accept s : Sig + do action D + then S2.S3; + + transition T + first S2.S3 + accept s : Sig via p + if true + do send s to p + then S1; + + exit act; + + state S3 { + state S3a; + } + + transition first S3.S3a then S1; + } + + state s0 { + state s1 { + state s2; + } + state s3 { + state s4; + } + transition t1 first s1.s2 then s3.s4; + } + + state s parallel { + state s1; + state s2; + } + + state s4 { + do action a; + action c; + } + + state s5 :> s4 { + do action b :>> c; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/StructuredControlTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/StructuredControlTest.sysml new file mode 100644 index 00000000..7c2cade9 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/StructuredControlTest.sysml @@ -0,0 +1,36 @@ +package StructuredControlTest { + + action { + attribute i : ScalarValues::Integer := 0; + attribute b : ScalarValues::Boolean; + + if i < 0 { + assign i := 0; + } else if i == 0 { + assign i := 1; + } else { + assign i := i + 1; + } + + if i > 0 { + assign i := i + 1; + } + + then action aLoop + while i > 0 { + assign i := i - 1; + } until b; + + then while i > 0 { + assign i := i - 1; + } + + loop { + assign i := i - 1; + } until b; + + for n : ScalarValues::Integer in (1, 2, 3) { + assign i := i * n; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/TextualRepresentationTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/TextualRepresentationTest.sysml new file mode 100644 index 00000000..9eed883d --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/TextualRepresentationTest.sysml @@ -0,0 +1,22 @@ +package TextualRepresentationTest { + private import ScalarValues::Real; + + item def C { + attribute x: Real; + assert constraint x_constraint { + rep inOCL language "ocl" + /* self.x > 0.0 */ + } + } + + action def setX { + in c : C; + in newX : Real; + + language "alf" + /* c.x = newX; + * WriteLine("Set new x"); + */ + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/TradeStudyTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/TradeStudyTest.sysml new file mode 100644 index 00000000..c9ce1ca0 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/TradeStudyTest.sysml @@ -0,0 +1,21 @@ +package TradeStudyTest { + private import ScalarValues::Real; + private import TradeStudies::*; + + part def Engine; + part engine1: Engine; + part engine2: Engine; + + analysis engineTradeStudy : TradeStudy { + subject : Engine[1..*] = (engine1, engine2); + objective : MaximizeObjective; + + calc :>> evaluationFunction { + in part : Engine; + return : Real; + } + + return part : Engine; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/UseCaseTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/UseCaseTest.sysml new file mode 100644 index 00000000..4705fa6d --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/UseCaseTest.sysml @@ -0,0 +1,43 @@ +package UseCaseTest { + + part def System; + part def User; + + use case def UseSystem { + subject system : System; + actor user : User; + + objective { + /* Goal */ + } + + include use case uc1 : UC1; + include use case uc2 { + subject = system; + actor user = UseSystem::user; + } + } + + use case def UC1; + + part user : User; + + use case uc2 { + subject; + actor :>> user; + } + + use case u : UseSystem; + + part system : System { + include uc2; + perform u; + use case uc1 : UC1; + } + + use case uc3 { + include u; + include system.uc1; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/VariabilityTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/VariabilityTest.sysml new file mode 100644 index 00000000..c6567c16 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/VariabilityTest.sysml @@ -0,0 +1,41 @@ +package VariabilityTest { + part def P { + attribute a; + } + + part def Q :> P; + attribute def B; + variation part def V :> P { + variant part x : Q { + attribute b : B :>> a; + } + } + + part q : Q; + variation part v : P { + variant q { + attribute b : B :>> a; + } + } + + part y : P = v::q; + + variation action def A { + variant action a1; + variant action a2; + } + + variation use case uc1 { + variant use case uc11; + variant use case uc12; + } + + variation analysis a1; + + variation verification v1; + + variation requirement r { + variant requirement r1; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/VerificationTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/VerificationTest.sysml new file mode 100644 index 00000000..1224ab31 --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/VerificationTest.sysml @@ -0,0 +1,39 @@ +package VerificationTest { + + part def V { + m : ScalarValues::Integer; + } + + part vv : V; + + requirement def R { + doc /* ... */ + } + + requirement r : R; + + verification def VerificationCase { + subject v : V; + objective { + verify requirement : R; + } + + VerificationCases::PassIf(v.m == 0) + } + + verification def VerificationPlan { + subject v : V; + + objective { + verify r; + } + + verification verificationCase : VerificationCase; + } + + part verificationContext { + verification verificationPlan : VerificationPlan { + subject v = vv; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/SimpleTests/ViewTest.sysml b/test/SysMLModels/OMG/examples/SimpleTests/ViewTest.sysml new file mode 100644 index 00000000..3c527c1b --- /dev/null +++ b/test/SysMLModels/OMG/examples/SimpleTests/ViewTest.sysml @@ -0,0 +1,46 @@ +package ViewTest { + package P { + public part p1; + private part p2; + } + + part def S; + + concern def C { + subject; + stakeholder s : S; + } + + concern c : C { + subject; + stakeholder s1; + } + + viewpoint def VP { + frame c; + } + + rendering def R; + + rendering r : R; + + view def V { + viewpoint vp: VP { + frame concern c1; + concern c2; + } + render rendering r1: R[0..1]; + + view v: V[0..*] { + expose P::*; + render r; + + rendering r2; + + alias vp1 for p1; + // Note: "expose" imports all. + alias vp2 for p2; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/CartSample.sysml b/test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/CartSample.sysml new file mode 100644 index 00000000..ce82d151 --- /dev/null +++ b/test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/CartSample.sysml @@ -0,0 +1,64 @@ +// State Space Representation cart example + +package CartSample { + private import StateSpaceRepresentation::*; + part def Cart { + attribute mass :> ISQ::mass; + + attribute def CartInput :> Input { + attribute force :> ISQ::force; + } + + attribute def CartOutput :> Output { + attribute velocity :> ISQ::speed; + } + + attribute def CartState :> StateSpace { + attribute velocity :> ISQ::speed; + } + + attribute def CartStateDerivative :> StateDerivative { + ref :>> stateSpace : CartState; + attribute accel :> ISQ::acceleration; + } + } + + part def Pusher { + attribute def PusherOutput :> Output { + attribute force :> ISQ::force; + } + } + + part context { + part cart : Cart { + action cartBehavior : ContinuousStateSpaceDynamics { + in input : CartInput; + out output : CartOutput; + :>> stateSpace : CartState; + + calc :>> getDerivative { + in input: CartInput; + in stateSpace: CartState; + new CartStateDerivative(input.force / mass) + } + calc :>> getOutput { + in :>> stateSpace : CartState; + new CartOutput(stateSpace.velocity) + } + } + } + part pusher : Pusher { + attribute pusherForce :> ISQ::force; + + action pusherBehavior : ContinuousStateSpaceDynamics { + in input; + out output : PusherOutput; + calc :>> getOutput { + new PusherOutput(pusherForce) + } + } + } + + flow pusher.pusherBehavior.output to cart.cartBehavior.input; + } +} diff --git a/test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/EVSample.sysml b/test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/EVSample.sysml new file mode 100644 index 00000000..ffddc377 --- /dev/null +++ b/test/SysMLModels/OMG/examples/StateSpaceRepresentationExamples/EVSample.sysml @@ -0,0 +1,319 @@ +// State Space Representation EV example +package EVSample { + private import SI::*; + private import StateSpaceRepresentation::*; + + attribute <'A⋅h'> 'ampere hour' : ElectricChargeUnit = A*h; + + part def Vehicle { + attribute mass :> ISQ::mass; + + attribute def VehicleInput :> Input { + attribute force :> ISQ::force; + } + + attribute def VehicleOutput :> Output { + attribute accel :> ISQ::acceleration; + attribute velocity :> ISQ::speed; + attribute distance :> ISQ::distance; + } + + attribute def VehicleState :> StateSpace { + attribute velocity :> ISQ::speed; + attribute distance :> ISQ::distance; + } + } + + part def Battery { + attribute baseVoltage :> ISQ::electricPotential; + attribute socInit: ScalarValues::Real; + attribute capacity :> ISQ::electricCharge; + attribute internalResistance :> ISQ::resistance; + + attribute def BatteryInput :> Input { + attribute current :> ISQ::electricCurrent; + } + + attribute def BatteryOutput :> Output { + attribute voltage :> ISQ::electricPotential; + } + + attribute def BatteryState :> StateSpace { + attribute soc: ScalarValues::Real; + } + + } + + part def Motor { + torquePerCurrent :> Quantities::scalarQuantities = ISQ::torque / ISQ::electricCurrent; + + attribute motR :> ISQ::resistance; + attribute motL :> ISQ::inductance; + + attribute def MotorInput :> Input { + attribute voltage :> ISQ::electricPotential; + attribute friction :> ISQ::torque; + } + + attribute def MotorOutput :> Output { + attribute current :> ISQ::electricCurrent; + attribute torque :> ISQ::torque; + } + + attribute def MotorState :> StateSpace { + attribute current :> ISQ::electricCurrent; + } + } + + part def Tire { + attribute radius :> ISQ::length; + attribute moment :> ISQ::momentOfInertia; + + attribute def TireInput :> Input { + attribute torque :> ISQ::torque; + attribute accel :> ISQ::acceleration; + } + + attribute def TireOutput :> Output { + attribute force :> ISQ::force; + attribute outTorque :> ISQ::torque; + } + } + + requirement def VehicleRequirement { + subject vehicle : Vehicle; + } + + analysis def VehicleAnalysis { + subject vehicle : Vehicle; + requirement vehicleRequirement : VehicleRequirement; + } + + + requirement def RangeRequirement :> VehicleRequirement { + doc /* The range of EV must be longer than the required spec under the flat road. */ + attribute actualRange : LengthValue; + attribute requiredRange : LengthValue; + + require constraint { actualRange >= requiredRange } + } + + analysis def RangeAnalysis :> VehicleAnalysis { + return simulatedRange : LengthValue; + + requirement rangeRequirement :>> vehicleRequirement : RangeRequirement; + + objective rangeAnalysisObjective { + doc /* This analysis is to estimate the range of + * the EV by simulating the vehicle driving under the compact vehicle regulation. + */ + require rangeRequirement { + :>> actualRange = simulatedRange; + } + } + } + + requirement def EfficiencyRequirement :> VehicleRequirement { + doc /* The efficiency of EV must be better than the required spec. */ + attribute actualEfficiency; + attribute requiredEfficiency; + + require constraint { actualEfficiency >= requiredEfficiency } + } + + analysis def EfficiencyAnalysis :> VehicleAnalysis { + return simulatedEfficiency; + + requirement efficiencyRequirement :>> vehicleRequirement : EfficiencyRequirement; + + objective efficiencyAnalysisObjective { + require efficiencyRequirement { + attribute :>> actualEfficiency = simulatedEfficiency; + } + } + } + + requirement def MaxSpeedRequirement :> VehicleRequirement { + doc /* The maximum speed of EV must be larger than the required spec. */ + attribute actualMaxSpeed :> ISQ::speed; + attribute requiredMaxSpeed :> ISQ::speed; + } + + analysis def MaxSpeedAnalysis :> VehicleAnalysis { + return simulatedMaxSpeed; + + requirement maxSpeedRequirement :>> vehicleRequirement : MaxSpeedRequirement; + + objective maxSpeedAnalysisObjective { + require maxSpeedRequirement { + attribute :>> actualMaxSpeed = simulatedMaxSpeed; + } + } + } + + + part vehicle : Vehicle { + attribute :>> mass default 1000[kg]; + + /* airFrictionCoefficient [kg / m] = 1/2 * rho[kg/m^3] * Cd * S[m^2], + * where rho is air density, S is front projected area. */ + attribute airFrictionCoefficient = 0.2; + + attribute efficiency; + + action vehicleBehavior : ContinuousStateSpaceDynamics { + in input : VehicleInput; + out output : VehicleOutput; + :>> stateSpace : VehicleState; + } + + part battery: Battery { + :>> baseVoltage = 300[V]; + :>> capacity = 50['A⋅h']; + :>> socInit = 0.8; + :>> internalResistance = 1.8['Ω']; + action batteryBehavior : ContinuousStateSpaceDynamics { + in input : BatteryInput; + out output : BatteryOutput; + :>> stateSpace : BatteryState; + } + } + + flow battery.batteryBehavior.output to motor.motorBehavior.input; + + part motor: Motor { + :>> motR = 4['Ω']; + :>> motL = 0.2[H]; + + action motorBehavior : ContinuousStateSpaceDynamics { + in input : MotorInput; + out output : MotorOutput; + :>> stateSpace : MotorState; + } + } + + flow motor.motorBehavior.output to tire.tireBehavior.input; + + part tire: Tire { + :>> moment default 300['kg⋅m²']; + :>> radius default 0.7[m]; + action tireBehavior : ContinuousStateSpaceDynamics { + in input : TireInput; + out output : TireOutput; + } + } + + flow tire.tireBehavior.output to motor.motorBehavior.input; + flow tire.tireBehavior.output to vehicleBehavior.input; + } + + part vehicle_compact :> vehicle { + attribute :>> mass = 800[kg]; + part :>> tire { + :>> moment = 200['kg⋅m²']; + :>> radius = 0.5[m]; + } + } + + part smallEVRangeContext { + requirement smallEVRequirement : VehicleRequirement { + doc /* The small EVs must be ligher than 900[kg] */ + subject :>> vehicle = vehicle_compact; + /* To comform with the regulation and the battery mass will impact it. */ + assume constraint { vehicle.mass < 900[kg] } + } + + analysis smallEVAnalysis : VehicleAnalysis { + subject :>> vehicle :> vehicle_compact; + requirement :>> vehicleRequirement = smallEVRequirement; + } + + requirement rangeRequirementSmall :> smallEVRequirement : RangeRequirement { + doc /* The small EVs must run longer than 130km */ + attribute :>> requiredRange = 130[km]; + } + + analysis rangeAnalysisSmall :> smallEVAnalysis : RangeAnalysis { + requirement :>> rangeRequirement = rangeRequirementSmall; + return simulatedRange = vehicle.vehicleBehavior.output.distance; + } + + requirement efficiencyRequirementSmall :> smallEVRequirement : EfficiencyRequirement { + doc /* The target efficiency of small EVs is 0.9. */ + attribute :>> requiredEfficiency = 0.9; + } + + analysis efficiencyAnalysisSmall :> smallEVAnalysis : EfficiencyAnalysis { + requirement :>> efficiencyRequirement = efficiencyRequirementSmall; + + return simulatedEfficiency = vehicle.efficiency; + } + + requirement maxSpeedRequirementSmall :> smallEVRequirement : MaxSpeedRequirement { + doc /* The target maximum speed of small EVs is 130 [km/h]. */ + attribute :>> requiredMaxSpeed = 130 [km/h]; + } + + analysis maxSpeedAnalysisSmall :> smallEVAnalysis : MaxSpeedAnalysis { + subject; + requirement :>> maxSpeedRequirement = maxSpeedRequirementSmall; + out voltage :> ISQ::electricPotential = vehicle.battery.batteryBehavior.output.voltage; + return simulatedMaxSpeed = vehicle.vehicleBehavior.output.velocity; + } + } + + part vehicle_large :> vehicle { + attribute :>> mass = 1100[kg]; + part :>> tire { + :>> moment = 300['kg⋅m²']; + :>> radius = 0.7[m]; + } + } + + part largeEVRangeContext { + requirement largeEVRequirement : VehicleRequirement { + doc /* The large EVs must be ligher than 900[kg] */ + subject :>> vehicle = vehicle_large; + /* To comform with the regulation and the battery mass will impact it. */ + assume constraint { vehicle.mass < 1200[kg] } + } + + analysis largeEVAnalysis : VehicleAnalysis { + subject :>> vehicle :> vehicle_large; + requirement :>> vehicleRequirement = largeEVRequirement; + } + + requirement rangeRequirementLarge :> largeEVRequirement : RangeRequirement { + doc /* The large EVs must run longer than 200km */ + attribute :>> requiredRange = 200[km]; + } + + analysis rangeAnalysisLarge :> largeEVAnalysis : RangeAnalysis { + requirement :>> rangeRequirement = rangeRequirementLarge; + return simulatedRange = vehicle.vehicleBehavior.output.distance; + } + + requirement efficiencyRequirementLarge :> largeEVRequirement : EfficiencyRequirement { + doc /* The target efficiency of large EVs is 0.8. */ + attribute :>> requiredEfficiency = 0.8; + } + + analysis efficiencyAnalysisLarge :> largeEVAnalysis : EfficiencyAnalysis { + requirement :>> efficiencyRequirement = efficiencyRequirementLarge; + + return simulatedEfficiency = vehicle.efficiency; + } + + requirement maxSpeedRequirementLarge :> largeEVRequirement : MaxSpeedRequirement { + doc /* The target maximum speed of large EVs is 140 [km/h]. */ + attribute :>> requiredMaxSpeed = 140 [km/h]; + } + + analysis maxSpeedAnalysisLarge :> largeEVAnalysis : MaxSpeedAnalysis { + subject; + requirement :>> maxSpeedRequirement = maxSpeedRequirementLarge; + out voltage = vehicle.battery.batteryBehavior.output.voltage; + return simulatedMaxSpeed = vehicle.vehicleBehavior.output.velocity; + } + } +} diff --git a/test/SysMLModels/OMG/examples/TimesliceAndSnapshotExamples/TimeVaryingAttribute.sysml b/test/SysMLModels/OMG/examples/TimesliceAndSnapshotExamples/TimeVaryingAttribute.sysml new file mode 100644 index 00000000..aa5b6c7f --- /dev/null +++ b/test/SysMLModels/OMG/examples/TimesliceAndSnapshotExamples/TimeVaryingAttribute.sysml @@ -0,0 +1,51 @@ +package TimeVaryingAttribute { + private import SI::s; + + item def PwrCmd { + attribute pwrLevel: ScalarValues::Integer; + } + + part def Transport2 { + private import Time::*; + attribute startTime = TimeOf(start); + attribute elapseTime :> ISQ::duration; + attribute :>> localClock.currentTime = startTime + elapseTime; + + out item pwrCmd:PwrCmd; + // Lifetime conditions + timeslice :>> portionOfLife { + snapshot :>> start { + :>> elapseTime = 0 [s]; + :>> pwrCmd.pwrLevel = 0; + } + snapshot :>> done { + :>> elapseTime = 2 [s]; + :>> pwrCmd.pwrLevel = 1; + } + } + + // Alternative: + // // initial conditions + // :>> portionOfLife.start : C { + // :>> elapseTime = 0 [s]; + // :>> pwrCmd.pwrLevel = 0; + // } + + timeslice transportPeriod { + snapshot :>> start{ + :>> elapseTime = 1 [s]; + } + snapshot :>> done { + :>> elapseTime = 1.5 [s]; + } + :>> pwrCmd.pwrLevel = 2*elapseTime.num; + } + +// Alternative: +// // final conditions +// :>> portionOfLife.done { +// :>> elapseTime = 2 [s]; +// :>> pwrCmd.pwrLevel = 1; +// } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/VariabilityExamples/VehicleVariabilityModel.sysml b/test/SysMLModels/OMG/examples/VariabilityExamples/VehicleVariabilityModel.sysml new file mode 100644 index 00000000..f07311af --- /dev/null +++ b/test/SysMLModels/OMG/examples/VariabilityExamples/VehicleVariabilityModel.sysml @@ -0,0 +1,165 @@ +package VehicleVariabilityModel { + + package DesignModel { + public import PartDefinitions::*; + public import PartsTree::*; + public import ActionDefinitions::*; + public import ActionTree::*; + + package PartDefinitions { + part def Vehicle; + + attribute def Diameter; + part def Cylinder { + attribute diameter : Diameter[1]; + } + + part def Engine; + part def Transmission; + part def Sunroof; + + port def AutoPort; + } + + package PartsTree { + part vehicle : Vehicle { + part engine : Engine[1]; + part transmission : Transmission[1]; + part sunroof : Sunroof[0..1]; + } + + part engine : Engine { + port autoPort : AutoPort; + part cylinder : Cylinder[2..*]; + } + + part '4cylEngine' :> engine { + part :>> cylinder[4]; + } + + part '6cylEngine' :> engine { + part :>> cylinder[6]; + } + + part transmission : Transmission; + part manualTransmission :> transmission; + part automaticTransmission :> transmission; + } + + package ActionDefinitions { + action def GenerateTorque; + action def AmplifyTorque; + action def ProvidePower; + } + + package ActionTree { + action generateTorque4Cyl : GenerateTorque; + action generateTorque6Cyl : GenerateTorque; + + action amplifyTorqueManual : AmplifyTorque; + action amplifyTorqueAutomatic : AmplifyTorque; + } + } + + package '150% Model' { + private import DesignModel::*; + + package PartsTree { + + // Variation point definitions + + variation attribute def DiameterChoices :> Diameter { + variant attribute diameterSmall; + variant attribute diameterLarge; + } + + variation part def EngineChoices :> Engine { + variant '4cylEngine'; + variant '6cylEngine' { + variation port :>> autoPort { + variant port autoPort1; + variant port autoPort2; + } + + part :>> cylinder { + attribute :>> diameter : DiameterChoices; + } + + assert constraint { + (autoPort == autoPort::autoPort1 and cylinder.diameter == cylinder::diameter::diameterSmall) xor + (autoPort == autoPort::autoPort2 and cylinder.diameter == cylinder::diameter::diameterLarge) + } + } + } + + // Part superset model + + abstract part vehicleFamily :> vehicle { + // Variation point usage + part :>> engine : EngineChoices[1]; + + // Variation point with embedded variant definitions + variation part :>> transmission : Transmission[1] { + variant manualTransmission; + variant automaticTransmission; + } + + assert constraint { + (engine == engine::'4cylEngine' and transmission == transmission::manualTransmission) xor + (engine == engine::'6cylEngine' and transmission == transmission::automaticTransmission) + } + + // Variation point on variant multiplicity (inherited multiplicity is [0..1]) + variation part :>> sunroof { + variant part withSunroof[1]; + variant part withoutSunroof[0]; + } + + perform ActionTree::providePowerFamily; + } + } + + package ActionTree { + + // Action superset Model + + action providePowerFamily : ProvidePower { + variation action generateTorque : GenerateTorque { + variant generateTorque4Cyl; + variant generateTorque6Cyl; + } + + variation action amplifyTorque : AmplifyTorque { + variant amplifyTorqueManual; + variant amplifyTorqueAutomatic; + } + + assert constraint { + (generateTorque == generateTorque::generateTorque4Cyl and + amplifyTorque == amplifyTorque::amplifyTorqueManual + ) xor + (generateTorque == generateTorque::generateTorque6Cyl and + amplifyTorque == amplifyTorque::amplifyTorqueAutomatic + ) + } + } + } + } + + package '100% Model' { + private import '150% Model'::*; + + // Vehicle instance model + + part vehicle4Cyl :> PartsTree::vehicleFamily { + part :>> engine = engine::'4cylEngine'; + part :>> transmission = transmission::manualTransmission; + part :>> sunroof = sunroof::withoutSunroof; + + perform action :>> providePowerFamily { + action :>> generateTorque = generateTorque::generateTorque4Cyl; + action :>> amplifyTorque = amplifyTorque::amplifyTorqueManual; + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/VehicleExample/SysMLV2SpecAnnexASimpleVehicleModel.sysml b/test/SysMLModels/OMG/examples/VehicleExample/SysMLV2SpecAnnexASimpleVehicleModel.sysml new file mode 100644 index 00000000..f3fb8695 --- /dev/null +++ b/test/SysMLModels/OMG/examples/VehicleExample/SysMLV2SpecAnnexASimpleVehicleModel.sysml @@ -0,0 +1,1581 @@ +package SimpleVehicleModel{ + // 2023-02 release + public import Definitions::*; + public import ISQ::*; + package Definitions{ + public import PartDefinitions::*; + public import PortDefinitions::*; + public import ItemDefinitions::*; + public import SignalDefinitions::*; + public import InterfaceDefinitions::*; + public import AllocationDefinitions::*; + public import ActionDefinitions::*; + public import StateDefinitions::*; + public import RequirementDefinitions::*; + public import AttributeDefinitions::*; + public import IndividualDefinitions::*; + public import MetadataDefinitions::**; + public import KeyWord_MetadataDefinitions::*; + package PartDefinitions{ + part def Vehicle { + attribute mass :> ISQ::mass; + attribute dryMass:>ISQ::mass; + attribute cargoMass:>ISQ::mass; + attribute position:>ISQ::length; + attribute velocity:>ISQ::speed; + attribute acceleration:>ISQ::acceleration; + attribute electricalPower:>ISQ::power; + attribute Tmax:>ISQ::temperature; + attribute maintenanceTime: Time::DateTime; + attribute brakePedalDepressed: Boolean; + port ignitionCmdPort:IgnitionCmdPort; + port pwrCmdPort:PwrCmdPort; + port vehicleToRoadPort:VehicleToRoadPort; + port statusPort:StatusPort; + perform action providePower; + perform action provideBraking; + perform action controlDirection; + perform action performSelfTest; + perform action applyParkingBrake; + perform action senseTemperature; + exhibit state vehicleStates parallel { + ref controller : VehicleController; + state operatingStates { + entry action initial; + state off; + state starting; + state on { + entry performSelfTest; + do providePower; + exit applyParkingBrake; + constraint {electricalPower<=500[W]} + } + + transition initial then off; + + transition off_To_starting + first off + accept ignitionCmd:IgnitionCmd via ignitionCmdPort + if ignitionCmd.ignitionOnOff==IgnitionOnOff::on and brakePedalDepressed + do send new StartSignal() to controller + then starting; + + transition starting_To_on + first starting + accept VehicleOnSignal + then on; + + transition on_To_off + first on + accept VehicleOffSignal + do send new OffSignal() to controller + then off; + } + + state healthStates { + entry action initial; + do senseTemperature{ + out temp; + } + + state normal; + state maintenance; + state degraded; + + transition initial then normal; + + transition normal_To_maintenance + first normal + accept at maintenanceTime + then maintenance; + + transition normal_To_degraded + first normal + accept when senseTemperature.temp > Tmax + do send new OverTemp() to controller + then degraded; + + transition maintenance_To_normal + first maintenance + accept ReturnToNormal + then normal; + + transition degraded_To_normal + first degraded + accept ReturnToNormal + then normal; + } + } + } + part def Engine{ + attribute mass :> ISQ::mass; + attribute peakHorsePower:>ISQ::power; + attribute fuelEfficiency:Real; + attribute cost:Real; + attribute displacement :> ISQ::volume; + port engineControlPort: ~ControlPort; + port fuelInPort: ~ FuelPort; + port fuelCmdPort:FuelCmdPort; + port drivePwrPort:DrivePwrPort; + port ignitionCmdPort:IgnitionCmdPort; + port flyWheelPort; + perform action generateTorque; + exhibit state engineStates{ + state off; + state starting; + state on{ + do generateTorque; + } + } + } + part def StarterMotor{ + port gearPort:GearPort; + } + part def Cylinder; + part def Transmission{ + attribute gearRatio:Real; + port clutchPort:~DrivePwrPort; + exhibit state transmissionStates; + } + part def Driveshaft; + part def AxleAssembly; + part def Axle{ + attribute mass:>ISQ::mass; + } + part def FrontAxle:>Axle{ + attribute steeringAngle:>ISQ::angularMeasure; + } + part def HalfAxle{ + port shankCompositePort:ShankCompositePort{ + } + } + part def Differential; + part def Wheel{ + attribute diameter:LengthValue; + port lugNutCompositePort:LugNutCompositePort; + } + part def Hub{ + port shankCompositePort:ShankCompositePort; + } + abstract part def Software; + part def VehicleSoftware:>Software; + part def VehicleController:>Software { + port controlPort:ControlPort; + exhibit state controllerStates parallel { + state operatingStates { + entry action initial; + state off; + state on; + transition initial then off; + transition 'off-on' + first off + accept StartSignal + then on; + transition 'on-off' + first on + accept OffSignal + then off; + } + } + } + part def CruiseController:>Software { + port setSpeedPort:~SetSpeedPort; + port speedSensorPort:~SpeedSensorPort; + port cruiseControlPort:CruiseControlPort; + exhibit state cruiseControllerStates; + } + part def SpeedSensor{ + port speedSensorPort:SpeedSensorPort; + } + part def FuelTank{ + attribute mass :> ISQ::mass; + ref item fuel:Fuel{ + attribute :>> fuelMass; + } + attribute fuelKind:FuelKind; + attribute fuelMassMax:>ISQ::mass; + assert constraint fuelConstraint {fuel.fuelMass<=fuelMassMax} + port fuelOutPort:FuelPort; + port fuelInPort:~FuelPort; + } + part def BodyAssy; + part def Body{ + attribute color:Colors; + } + part def Thermostat; + part def WaterHose; + part def Road{ + attribute incline:Real; + attribute friction:Real; + } + part def Engine4Cyl; + part def Engine6Cyl; + part def TransmissionChoices; + part def TransmissionAutomatic; + part def TransmissionManual; + part def Sunroof; + + //logical Components + part def ElectricalGenerator; + part def TorqueGenerator; + part def SteeringSubsystem; + part def BrakingSubsystem; + } + package PortDefinitions{ + port def IgnitionCmdPort{ + in item ignitionCmd:IgnitionCmd; + } + port def StatusPort; + port def GearPort; + port def PwrCmdPort{ + in item pwrCmd:PwrCmd; + } + port def FuelCmdPort:>PwrCmdPort{ + in item fuelCmd:FuelCmd redefines pwrCmd; + } + port def FuelPort{ + out item fuel:Fuel; + } + port def DrivePwrPort{ + out torque:Torque; + } + port def ShaftPort_a; + port def ShaftPort_b; + port def ShaftPort_c; + port def ShaftPort_d; + port def DiffPort; + port def AxlePort; + port def AxleToWheelPort; + port def WheelToAxlePort; + port def WheelToRoadPort; + + port def LugNutCompositePort{ + port lugNutPort:LugNutPort [*]; + } + port def ShankCompositePort{ + port shankPort:ShankPort [*]; + } + port def LugNutPort{ + attribute threadDia; + attribute threadPitch; + } + port def ShankPort{ + attribute threadDia; + attribute threadPitch; + attribute shaftLength; + } + + port def VehicleToRoadPort; + port def ControlPort; + port def CruiseControlPort:>ControlPort; + port def SpeedSensorPort; + port def SetSpeedPort; + + port def DriverCmdPort{ + out item driverCmd[*]:DriverCmd; + } + port def HandPort :> DriverCmdPort { + out item ignitionCmd:IgnitionCmd subsets driverCmd; + out item pwrCmd:PwrCmd subsets driverCmd; + } + } + package ItemDefinitions{ + item def PwrCmd{ + attribute throttleLevel:Real; + } + item def FuelCmd:>PwrCmd; + item def Fuel{ + attribute fuelMass:>ISQ::mass; + } + item def SensedSpeed{ + attribute speed:>ISQ::speed; + } + } + package SignalDefinitions{ + item def Cmd{ + } + item def DriverCmd; + item def IgnitionCmd:>DriverCmd{ + attribute ignitionOnOff:IgnitionOnOff; + } + item def EngineStatus; + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + attribute def StartSignal; + attribute def OffSignal; + attribute def OverTemp; + attribute def ReturnToNormal; + attribute def SetSpeed:>Real; + } + package InterfaceDefinitions{ + interface def EngineToTransmissionInterface{ + end p1:DrivePwrPort; + end p2:~DrivePwrPort; + flow p1.torque to p2.torque; + } + interface def FuelInterface { + end fuelOutPort:FuelPort; + end fuelInPort:~FuelPort; + flow of Fuel from fuelOutPort.fuel to fuelInPort.fuel; + } + + interface def WheelFastenerInterface{ + end lugNutPort:LugNutPort; + end shankPort:ShankPort; + attribute maxTorque : Torque; + constraint {lugNutPort.threadDia == shankPort.threadDia} + } + interface def WheelHubInterface{ + end lugNutCompositePort:LugNutCompositePort; + end shankCompositePort:ShankCompositePort; + interface wheelFastenerInterface:WheelFastenerInterface [5] + connect lugNutCompositePort.lugNutPort to shankCompositePort.shankPort; + } + } + package AllocationDefinitions{ + allocation def LogicalToPhysical{ + end #logical logicalEnd; + end #physical physicalEnd; + } + } + package ActionDefinitions{ + action def ProvidePower { + in item pwrCmd:PwrCmd; + out wheelToRoadTorque:Torque[2]; + } + action def GenerateTorque { + in item fuelCmd:FuelCmd; + out engineTorque:Torque; + } + action def AmplifyTorque { + in engineTorque:Torque; + out transmissionTorque:Torque; + } + action def TransferTorque { + in transmissionTorque:Torque; + out driveshaftTorque:Torque; + } + action def DistributeTorque { + in driveshaftTorque:Torque; + out wheelToRoadTorque:Torque[2]; + } + action def PerformSelfTest; + action def ApplyParkingBrake; + action def SenseTemperature{ + out temp: ISQ::TemperatureValue; + } + } + package StateDefinitions { + state def VehicleStates; + state def ControllerStates; + state def CruiseControllerStates; + } + package RequirementDefinitions{ + requirement def MassRequirement{ + doc /*The actual mass shall be less than the required mass*/ + attribute massRequired:>ISQ::mass; + attribute massActual:>ISQ::mass; + require constraint {massActual<=massRequired} + } + requirement def ReliabilityRequirement{ + doc /*The actual reliability shall be greater than the required reliability*/ + attribute reliabilityRequired:Real; + attribute reliabilityActual:Real; + require constraint {reliabilityActual>=reliabilityRequired} + } + requirement def TorqueGenerationRequirement { + doc /* The engine shall generate torque as a function of RPM as shown in Table 1. */ + subject generateTorque:ActionDefinitions::GenerateTorque; + } + requirement def DrivePowerOutputRequirement { + doc /* The engine shall provide a connection point to transfer torque to the transmission.*/ + } + requirement def FuelEconomyRequirement { + doc /* The vehicle shall maintain an average fuel economomy of at least x miles per gallon for the nominal + driving scenario */ + attribute actualFuelEconomy :> distancePerVolume; + attribute requiredFuelEconomy :> distancePerVolume; + require constraint {actualFuelEconomy >= requiredFuelEconomy} + } + } + package AttributeDefinitions{ + public import ScalarValues::*; + public import Quantities::*; + public import MeasurementReferences::DerivedUnit; + public import SIPrefixes::kilo; + // Numerical Functions provides basic operators such as Sum expression + public import NumericalFunctions::*; + public import SI::*; + public import USCustomaryUnits::*; + alias Torque for ISQ::TorqueValue; + + enum def Colors {black;grey;red;} + enum def DiameterChoices:>ISQ::LengthValue{ + enum = 60 [mm]; + enum = 80 [mm]; + enum = 100 [mm]; + } + attribute cylinderDiameter: DiameterChoices = 80 [mm]; + enum def IgnitionOnOff {on;off;} + enum def FuelKind {gas;diesel;} + + distancePerVolume :> scalarQuantities = distance / volume; + timePerDistance :> scalarQuantities = time / distance; + volumePerDistance :> scalarQuantities = volume / distance; + volumePerTime :> scalarQuantities = volume / time; + + // kpl is approx .425 * mpg + kpl : DerivedUnit = km / L; + rpm : DerivedUnit = 1 / SI::min; + kW : DerivedUnit = kilo * W; + + } + package IndividualDefinitions{ + individual def VehicleRoadContext_1:>GenericContext::Context; + individual def Vehicle_1:>Vehicle; + individual def FrontAxleAssembly_1:>AxleAssembly; + individual def FrontAxle_1:>FrontAxle; + individual def Wheel_1:>Wheel; + individual def Wheel_2:>Wheel; + individual def RearAxleAssembly_1:>AxleAssembly; + individual def Road_1:>Road; + } + package MetadataDefinitions { + public import AnalysisTooling::*; + metadata def Safety { + attribute isMandatory : Boolean; + } + metadata def Security; + } + package KeyWord_MetadataDefinitions{ + public import Metaobjects::SemanticMetadata; + + // the following is used to define the key word failureMode + state failureModes[*] nonunique; + + // with alias + metadata def failureMode :> SemanticMetadata { + :>> baseType = failureModes meta SysML::StateUsage; + } + + occurrence logicalOccurrences [*] nonunique; + + metadata def logical :> SemanticMetadata { + :>> baseType = logicalOccurrences meta SysML::Usage; + } + + occurrence physicalOccurrences [*] nonunique; + + metadata def

physical :> SemanticMetadata { + :>> baseType = physicalOccurrences meta SysML::Usage; + } + } + package GenericContext { + + part def Context { + attribute time:TimeValue; + attribute spatialCF: CartesianSpatial3dCoordinateFrame[1] { :>> mRefs = (m, m, m); } + attribute velocityCF: CartesianVelocity3dCoordinateFrame[1] = spatialCF/s; + attribute accelarationCF: CartesianAcceleration3dCoordinateFrame[1] = velocityCF/s; + } + } + } + + package VehicleLogicalConfiguration{ + package PartsTree{ + #logical part vehicleLogical:Vehicle{ + part torqueGenerator:TorqueGenerator{ + action generateTorque; + } + part electricalGenerator:ElectricalGenerator{ + action generateElectricity; + } + part steeringSystem:SteeringSubsystem; + part brakingSubsystem:BrakingSubsystem; + } + } + } + package VehicleLogicalToPhysicalAllocation{ + public import VehicleConfigurations::VehicleConfiguration_b::PartsTree::**; + public import VehicleLogicalConfiguration::PartsTree::*; + + allocation vehicleLogicalToPhysicalAllocation:LogicalToPhysical + allocate vehicleLogical to vehicle_b{ + allocate vehicleLogical.torqueGenerator to vehicle_b.engine{ + allocate vehicleLogical.torqueGenerator.generateTorque to vehicle_b.engine.generateTorque; + } + allocate vehicleLogical.electricalGenerator to vehicle_b.engine{ + allocate vehicleLogical.electricalGenerator.generateElectricity to vehicle_b.engine.alternator.generateElectricity; + } + } + } + package VehicleConfigurations{ + package VehicleConfiguration_a{ + package PartsTree{ + part vehicle_a:Vehicle{ + attribute mass redefines Vehicle::mass=dryMass+cargoMass+fuelTank.fuel.fuelMass; + attribute dryMass redefines Vehicle::dryMass=sum(partMasses); + attribute redefines Vehicle::cargoMass=0 [kg]; + attribute partMasses [*] nonunique :>ISQ::mass; + part fuelTank:FuelTank{ + attribute redefines mass=75[kg]; + ref item redefines fuel{ + attribute redefines fuelMass=50[kg]; + } + } + part frontAxleAssembly:AxleAssembly{ + attribute mass :> ISQ::mass=800[kg]; + part frontAxle:Axle; + part frontWheels:Wheel[2]; + } + part rearAxleAssembly:AxleAssembly{ + attribute mass :> ISQ::mass=875[kg]; + attribute driveTrainEfficiency:Real = 0.6; + part rearAxle:Axle; + part rearWheels:Wheel[2]{ + attribute redefines diameter; + } + } + } + } + package ActionTree{ + } + package Requirements{ + } + } + package VehicleConfiguration_b{ + //Shapes library for simple geometry + public import ShapeItems::Box; + public import ParametersOfInterestMetadata::mop; + public import ModelingMetadata::*; // incudes status info + + package PartsTree{ + part vehicle_b : Vehicle{ + #mop attribute mass redefines mass=dryMass+cargoMass+fuelTank.fuel.fuelMass; + attribute dryMass redefines dryMass=sum(partMasses); + attribute redefines cargoMass default 0 [kg]; + attribute partMasses=(fuelTank.mass,frontAxleAssembly.mass,rearAxleAssembly.mass,engine.mass,transmission.mass,driveshaft.mass); + attribute avgFuelEconomy :> distancePerVolume; + port fuelCmdPort: FuelCmdPort redefines pwrCmdPort { + in item fuelCmd redefines pwrCmd; + } + port setSpeedPort:~SetSpeedPort; + port vehicleToRoadPort redefines vehicleToRoadPort{ + port wheelToRoadPort1:WheelToRoadPort; + port wheelToRoadPort2:WheelToRoadPort; + } + perform ActionTree::providePower redefines providePower; + perform ActionTree::performSelfTest redefines performSelfTest; + perform ActionTree::applyParkingBrake redefines applyParkingBrake; + perform ActionTree::senseTemperature redefines senseTemperature; + exhibit state vehicleStates redefines vehicleStates; + + // Example vehicle with simple enveloping shape that is a solid + item :> envelopingShapes : Box[1] { + length1:>> length = 4800 [mm]; + width1:>> width = 1840 [mm]; + height1:>> height = 1350 [mm]; + } + + part fuelTank:FuelTank{ + attribute redefines mass=75[kg]; + ref item redefines fuel{ + attribute redefines fuelMass=60[kg]; + } + attribute redefines fuelMassMax=60 [kg]; + } + part frontAxleAssembly:AxleAssembly{ + attribute mass :> ISQ::mass=800[kg]; + port shaftPort_d:ShaftPort_d; + part frontAxle:FrontAxle; + part frontWheels:Wheel[2]; + } + + part rearAxleAssembly:AxleAssembly{ + attribute mass :> ISQ::mass=875[kg]; + attribute driveTrainEfficiency:Real = 0.6; + port shaftPort_d:ShaftPort_d; + perform providePower.distributeTorque; + part rearWheel1:Wheel{ + attribute redefines diameter; + port wheelToRoadPort:WheelToRoadPort; + port lugNutCompositePort :>> lugNutCompositePort{ + port lugNutPort :>> lugNutPort [5]; + } + } + part rearWheel2:Wheel{ + attribute redefines diameter; + port wheelToRoadPort:WheelToRoadPort; + port lugNutCompositePort :>> lugNutCompositePort{ + port lugNutPort :>> lugNutPort [5]; + } + } + part differential:Differential{ + port shaftPort_d:ShaftPort_d; + port leftDiffPort:DiffPort; + port rightDiffPort:DiffPort; + } + part rearAxle{ + part leftHalfAxle:HalfAxle{ + port leftAxleToDiffPort:AxlePort; + port shankCompositePort :>> shankCompositePort{ + port shankPort :>> shankPort [5]; + } + } + part rightHalfAxle:HalfAxle{ + port rightAxleToDiffPort:AxlePort; + port shankCompositePort :>> shankCompositePort { + port shankPort :>> shankPort [5]; + } + } + } + + bind shaftPort_d=differential.shaftPort_d; + connect differential.leftDiffPort to rearAxle.leftHalfAxle.leftAxleToDiffPort; + connect differential.rightDiffPort to rearAxle.rightHalfAxle.rightAxleToDiffPort; + + interface wheelToleftHalAxleInterface:WheelHubInterface + connect [1] rearWheel1.lugNutCompositePort to [1] rearAxle.leftHalfAxle.shankCompositePort; + interface wheelTorightHalAxleInterface:WheelHubInterface + connect [1] rearWheel2.lugNutCompositePort to [1] rearAxle.rightHalfAxle.shankCompositePort; + + } + part starterMotor:StarterMotor; + part engine:Engine{ + perform providePower.generateTorque redefines generateTorque; + part cylinders:Cylinder[4..6]; + part alternator{ + action generateElectricity; + } + satisfy Requirements::engineSpecification by vehicle_b.engine{ + requirement torqueGenerationRequirement :>> torqueGenerationRequirement{ + subject generateTorque redefines generateTorque = vehicle_b.engine.generateTorque; + } + requirement drivePowerOuputRequirement :>> drivePowerOutputRequirement{ + port torqueOutPort redefines torqueOutPort=vehicle_b.engine.drivePwrPort; + } + } + } + part transmission:Transmission{ + attribute mass :> ISQ::mass=100[kg]; + port shaftPort_a:ShaftPort_a; + perform providePower.amplifyTorque; + } + part driveshaft:Driveshaft{ + attribute mass :> ISQ::mass=100[kg]; + port shaftPort_b:ShaftPort_b; + port shaftPort_c:ShaftPort_c; + perform providePower.transferTorque; + } + part vehicleSoftware:VehicleSoftware{ + part vehicleController: VehicleController { + exhibit state controllerStates redefines controllerStates; + part cruiseController:CruiseController; + } + } + part speedSensor:SpeedSensor; + + // parts in bodyAssy and interioer are marked as safety or security features + part bodyAssy:BodyAssy{ + part body:Body{ + attribute :>> color = Colors::red; + } + part bumper {@Safety{isMandatory = true;}} + part keylessEntry {@Security;} + } + part interior { + part alarm {@Security;} + part seatBelt[2] {@Safety{isMandatory = true;}} + part frontSeat[2]; + part driverAirBag {@Safety{isMandatory = false;}} + } + + //connections + bind engine.fuelCmdPort=fuelCmdPort; + + interface engineToTransmissionInterface:EngineToTransmissionInterface + connect engine.drivePwrPort to transmission.clutchPort; + + interface fuelInterface:FuelInterface + connect fuelTank.fuelOutPort to engine.fuelInPort; + + allocate ActionTree::providePower.generateToAmplify to engineToTransmissionInterface; + + bind engine.ignitionCmdPort=ignitionCmdPort; + connect starterMotor.gearPort to engine.flyWheelPort; + connect vehicleSoftware.vehicleController.controlPort to engine.engineControlPort; + bind vehicle_b.setSpeedPort = vehicleSoftware.vehicleController.cruiseController.setSpeedPort; + connect speedSensor.speedSensorPort to vehicleSoftware.vehicleController.cruiseController.speedSensorPort; + bind vehicleSoftware.vehicleController.cruiseController.cruiseControlPort = vehicleSoftware.vehicleController.controlPort; + connect transmission.shaftPort_a to driveshaft.shaftPort_b; + connect driveshaft.shaftPort_c to rearAxleAssembly.shaftPort_d; + bind rearAxleAssembly.rearWheel1.wheelToRoadPort=vehicleToRoadPort.wheelToRoadPort1; + bind rearAxleAssembly.rearWheel2.wheelToRoadPort=vehicleToRoadPort.wheelToRoadPort2; + + satisfy Requirements::vehicleSpecification by vehicle_b{ + requirement vehicleMassRequirement:>>vehicleMassRequirement{ + attribute redefines massActual=vehicle_b.mass; + attribute redefines fuelMassActual = vehicle_b.fuelTank.fuel.fuelMass; + } + } + } + } + package ActionTree{ + action providePower:ProvidePower{ + in item fuelCmd:FuelCmd redefines pwrCmd; + out wheelToRoadTorque redefines wheelToRoadTorque [2] = distributeTorque.wheelToRoadTorque; + action generateTorque:GenerateTorque { + in item = providePower.fuelCmd; + } + action amplifyTorque:AmplifyTorque; + action transferTorque:TransferTorque; + action distributeTorque:DistributeTorque; + + //named flow + flow generateToAmplify from generateTorque.engineTorque to amplifyTorque.engineTorque; + //unnamed flows + flow amplifyTorque.transmissionTorque to transferTorque.transmissionTorque; + flow transferTorque.driveshaftTorque to distributeTorque.driveshaftTorque; + } + action performSelfTest: PerformSelfTest; + action applyParkingBrake: ApplyParkingBrake; + action senseTemperature: SenseTemperature; + } + package DiscreteInteractions{ + package Sequence{ + part def Driver{ + port p1; + port p2; + } + + part part0{ + perform action startVehicle{ + action turnVehicleOn send ignitionCmd via driver.p1{ + in ignitionCmd:IgnitionCmd; + } + action trigger1 accept ignitionCmd:IgnitionCmd via vehicle.ignitionCmdPort; + flow of IgnitionCmd from trigger1.ignitionCmd to startEngine.ignitionCmd; + action startEngine{ + in item ignitionCmd:IgnitionCmd; + out item es:EngineStatus; + } + flow of EngineStatus from startEngine.es to sendStatus.es; + action sendStatus send es via vehicle.statusPort{ + in es:EngineStatus; + } + action trigger2 accept es:EngineStatus via driver.p2; + } + part driver : Driver { + perform startVehicle.turnVehicleOn; + perform startVehicle.trigger2; + event occurrence driverReady; + } + part vehicle : Vehicle { + perform startVehicle.trigger1; + perform startVehicle.sendStatus; + event occurrence doorClosed; + } + first vehicle.doorClosed then driver.driverReady; + message of ignitionCmd:IgnitionCmd from driver.turnVehicleOn to vehicle.trigger1; + message of es:EngineStatus from vehicle.sendStatus to driver.trigger2; + } + } + occurrence CruiseControl1{ + part vehicle_b:>PartsTree::vehicle_b{ + port redefines setSpeedPort{ + event occurrence setSpeedReceived; + } + part redefines speedSensor{ + port redefines speedSensorPort{ + event occurrence sensedSpeedSent; + } + } + part redefines vehicleSoftware{ + part redefines vehicleController{ + part redefines cruiseController{ + port redefines setSpeedPort{ + //analagous to gate: event occurrence bound but may not need this since the port is bound + event occurrence setSpeedReceived = vehicle_b.setSpeedPort.setSpeedReceived; + } + port redefines speedSensorPort{ + event occurrence sensedSpeedReceived; + } + port redefines cruiseControlPort{ + event occurrence fuelCmdSent; + } + } + } + } + part redefines engine{ + port redefines fuelCmdPort{ + event occurrence fuelCmdReceived; + } + } + message sendSensedSpeed of SensedSpeed + from speedSensor.speedSensorPort.sensedSpeedSent to vehicleSoftware.vehicleController.cruiseController.speedSensorPort.sensedSpeedReceived; + message sendFuelCmd of FuelCmd + from vehicleSoftware.vehicleController.cruiseController.cruiseControlPort.fuelCmdSent to engine.fuelCmdPort.fuelCmdReceived; + } + } + occurrence CruiseControl2{ + part vehicle_b:>PartsTree::vehicle_b{ + port redefines setSpeedPort{ + event occurrence setSpeedReceived; + } + part redefines speedSensor{ + port redefines speedSensorPort{ + event sendSensedSpeed.sourceEvent; + } + } + part redefines vehicleSoftware{ + part redefines vehicleController{ + part redefines cruiseController{ + port redefines setSpeedPort{ + //analagous to gate: event occurrence bound but may not need this since the port is bound + event occurrence setSpeedReceived = vehicle_b.setSpeedPort.setSpeedReceived; + } + port redefines speedSensorPort{ + event occurrence setSpeedReceived=setSpeedPort.setSpeedReceived; + then event sendSensedSpeed.targetEvent; + } + port redefines cruiseControlPort{ + event sendFuelCmd.sourceEvent; + } + } + } + } + part redefines engine{ + port redefines fuelCmdPort{ + event sendFuelCmd.targetEvent; + } + } + message sendSensedSpeed of SensedSpeed; + message sendFuelCmd of FuelCmd; + } + } + } + package Requirements{ + public import RequirementDerivation::*; + public import ModelingMetadata::*; // incudes status info + item marketSurvey; + dependency from vehicleSpecification to marketSurvey; + + requirement vehicleSpecification{ + subject vehicle:Vehicle; + requirement <'1'> vehicleMassRequirement: MassRequirement { + doc /* The total mass of the vehicle shall be less than or equal to the required mass. + Assume total mass includes a full tank of gas of 60 kg*/ + attribute redefines massRequired=2000 [kg]; + attribute redefines massActual default vehicle.dryMass + fuelMassActual; + attribute fuelMassActual:>ISQ::mass; + attribute fuelMassMax:>ISQ::mass = 60 [kg]; + assume constraint {fuelMassActual==fuelMassMax} + } + + allocate vehicleMassRequirement to PartsTree::vehicle_b.mass; + + requirement <'2'> vehicleFuelEconomyRequirements{ + doc /* fuel economy requirements group */ + attribute assumedCargoMass:>ISQ::mass; + requirement <'2_1'> cityFuelEconomyRequirement:FuelEconomyRequirement{ + redefines requiredFuelEconomy= 10 [km / L]; + assume constraint {assumedCargoMass<=500 [kg]} + } + requirement <'2_2'> highwayFuelEconomyRequirement:FuelEconomyRequirement{ + redefines requiredFuelEconomy= 12.75 [km / L]; + assume constraint {assumedCargoMass<=500 [kg]} + + //StatusInfo is contained in ModelingMetadata library + // StatusKind has values for open, closed, tbd, tbr, tbd + @StatusInfo { + status = StatusKind::closed; + originator = "Bob"; + owner = "Mary"; + } + } + } + } + requirement engineSpecification { + subject engine1:Engine; + requirement <'1'> engineMassRequirement: MassRequirement { + doc /* The total mass of the engine shall be less than or equal to the required mass.*/ + attribute redefines massRequired=200 [kg]; + attribute redefines massActual = engine1.mass; + } + requirement torqueGenerationRequirement : TorqueGenerationRequirement{ + subject generateTorque default engine1.generateTorque; + } + + requirement drivePowerOutputRequirement : DrivePowerOutputRequirement{ + port torqueOutPort{ + out torque:Torque; + } + } + } + // the engine mass requirement is derived from the vehicle mass requirement + #derivation connection { + end #original ::> vehicleSpecification.vehicleMassRequirement; + end #derive ::> engineSpecification.engineMassRequirement; + } + + } + } + package Engine4Cyl_Variant{ + public import ModelingMetadata::*; // incudes refinement + part engine:Engine{ + part cylinders:Cylinder[4..8] ordered; + } + part engine4Cyl:>engine{ + part redefines cylinders [4]; + part cylinder1 subsets cylinders[1]; + part cylinder2 subsets cylinders[1]; + part cylinder3 subsets cylinders[1]; + part cylinder4 subsets cylinders[1]; + } + #refinement dependency engine4Cyl to VehicleConfiguration_b::PartsTree::vehicle_b::engine; + } + package WheelHubAssemblies{ + // alternative 1 - w/o explicit nesxted interfaces + part wheelHubAssy1{ + part wheel1:Wheel{ + port :>>lugNutCompositePort:LugNutCompositePort { + port lugNutPort :>> lugNutPort [5]; + } + } + part hub1:Hub{ + port :>> shankCompositePort:ShankCompositePort { + port shankPort :>> shankPort [5]; + } + } + interface wheelHubInterface:WheelHubInterface + connect [1] wheel1.lugNutCompositePort to [1] hub1.shankCompositePort; + } + // alternative 2 - w multiple nesxted interfaces + part wheelHubAssy2{ + part wheel1:Wheel{ + port :>>lugNutCompositePort:LugNutCompositePort { + port lugNutPort :>> lugNutPort [5]; + } + } + part hub1:Hub{ + port :>> shankCompositePort:ShankCompositePort { + port shankPort :>> shankPort [5]; + } + } + interface wheelHubInterface:WheelHubInterface + connect [1] lugNutCompositePort ::> wheel1.lugNutCompositePort to [1] shankCompositePort ::> hub1.shankCompositePort { + interface wheelFastenerInterface1 :> wheelFastenerInterface + connect [5] lugNutPort ::> lugNutCompositePort.lugNutPort to [5] shankPort ::> shankCompositePort.shankPort; + } + } + // alternative 3 - w explicit nesxted interfaces + part wheelHubAssy3{ + part wheel1:Wheel{ + port lugNutCompositePort :>> lugNutCompositePort { + port lugNutPort [5] :>> lugNutPort { + attribute :>> threadDia = 14 [mm]; + attribute :>> threadPitch = 1.5 [mm]; + } + port lugNutPort1 [1] :> lugNutPort; + port lugNutPort2 [1] :> lugNutPort; + port lugNutPort3 [1] :> lugNutPort; + } +} + part hub1:Hub{ + port shankCompositePort :>> shankCompositePort { + port shankPort [5] :>> shankPort { + attribute :>> threadDia = 14 [mm]; + attribute :>> threadPitch = 1.5 [mm]; + attribute :>> shaftLength = 70 [mm]; + } + port shankPort1 [1] :> shankPort; + port shankPort2 [1] :> shankPort; + port shankPort3 [1] :> shankPort; + } +} + interface wheelHubInterface:WheelHubInterface + connect [1] lugNutCompositePort ::> wheel1.lugNutCompositePort to [1] shankCompositePort ::> hub1.shankCompositePort { + interface wheelFastenerInterface1 :> wheelFastenerInterface + connect lugNutPort ::> lugNutCompositePort.lugNutPort1 to shankPort ::> shankCompositePort.shankPort1 { + attribute :>> maxTorque = 90 * 1.356 [N*m]; + } + interface wheelFastenerInterface2 :> wheelFastenerInterface + connect lugNutPort ::> lugNutCompositePort.lugNutPort2 to shankPort ::> shankCompositePort.shankPort2 { + attribute :>> maxTorque = 90 * 1.356 [N*m]; + } + interface wheelFastenerInterface3 :> wheelFastenerInterface + connect lugNutPort ::> lugNutCompositePort.lugNutPort3 to shankPort ::> shankCompositePort.shankPort3 { + attribute :>> maxTorque = 90 * 1.356 [N*m]; + } + } + } + } + } + package VehicleAnalysis{ + public import RiskMetadata::*; + public import RiskLevelEnum::*; + // recursive public import uses double asterisk ** + public import VehicleConfigurations::VehicleConfiguration_b::**; + package FuelEconomyAnalysisModel{ + public import SampledFunctions::SampledFunction; + + /* + This analysis model was provided by Hisashi Miyashita on January 27, 2021 + We use the simplest fuel consumption analysis model introduced in: + Akcelik, R. "Fuel efficiency and other objectives in traffic system management." Traffic Engineering and Control 22.2 (1981): 54-65. + + Fuel consumption rate f can be decomposed to: + f = f_a + f_b * tpd_avg, + where tpd_avg is average interrupted travel time per unit distance, actually the inverse of the average velocity [t/km]; + f_a is the best fuel consumption per distance; and + f_b is the additional fuel consumption per distance and average travel time, which can be regarded as the idling fuel consumption. + Approximately, it is proportional to engine displacement and it ranges from 0.5 to 0.6 [l/hour/litre of engine displacement] + according to: + Review of the Incidence, Energy Use and Costs of Passenger Vehicle Idling; Gordon W. Taylor, P.Eng. Prepared for the Office of Energy Efficiency, Natural Resources Canada, 2003 + + We assume f_a can be approximated to + fuel_consumption / distance = BSFC * SGG * required_power_avg * tpd_avg, + where required_power_avg is the required power, and it can be approximately derived from: + total_energy == P_req * tpd_avg * distance == 1/2 * mass / tpd_avg^2 + This part is computed with BestFuelConsumptionPerDistance calc def. + + BSFC means Brake-Specific Fuel Consumption, defined as gram/power. SGG is the specific gravity of gasoline. + The high octane gasoline is about 0.76[l/kg]. + */ + + attribute def Scenario :> SampledFunction { + attribute wayPoint[1..*] { + attribute elapseTime[1] :> ISQ::time; + attribute position[1] :> ISQ::distance; + } + } + + calc def FuelConsumption { + in bestFuelConsumption: Real; + in idlingFuelConsumption: Real; + in tpd_avg:>timePerDistance; + attribute f = bestFuelConsumption + idlingFuelConsumption * tpd_avg; + return dpv :> distancePerVolume = 1/f; + } + + calc def AverageTravelTimePerDistance { + in scenario: Scenario; + return tpd_avg:>timePerDistance; + } + calc def TraveledDistance { + in scenario: Scenario; + return distance:> length; + } + calc def IdlingFuelConsumptionPerTime { + in engine:Engine; + attribute idlingFuelConsumptionPerDisplacement: Real = 0.5; + return f_a : Real = engine.displacement * idlingFuelConsumptionPerDisplacement; + } + + attribute specificGravityOfGasoline: Real = 0.76; + calc def BestFuelConsumptionPerDistance { + in mass: MassValue; + in bsfc: Real; + in tpd_avg:> timePerDistance; + in distance:>length; + attribute required_power_avg:> ISQ::power; + constraint {required_power_avg == 1/2 * mass * tpd_avg **(-3) / distance} + return f_b : Real = bsfc * specificGravityOfGasoline * required_power_avg * tpd_avg; + } + + calc def ComputeBSFC{ + in engine: Engine; + return : Real; + } + + analysis fuelEconomyAnalysis { + subject = vehicle_b; + + objective fuelEconomyAnalysisObjective { + doc /*estimate the vehicle fuel economy*/ + require vehicleSpecification.vehicleFuelEconomyRequirements; + } + + in attribute scenario: Scenario; + // define a series of waypoints + + attribute distance = TraveledDistance(scenario); + attribute tpd_avg = AverageTravelTimePerDistance(scenario); + attribute bsfc = ComputeBSFC(vehicle_b.engine); + attribute f_a = BestFuelConsumptionPerDistance(vehicle_b.mass, bsfc, tpd_avg, distance); + attribute f_b = IdlingFuelConsumptionPerTime(vehicle_b.engine); + + return attribute calculatedFuelEconomy:>distancePerVolume=FuelConsumption(f_a, f_b, tpd_avg); + } + } + package ElectricalPowerAnalysis{ + } + package ReliabilityAnalyis{ + } + package VehicleTradeOffAnalysis{ + /* The following example provides the rationale for selecting the engine4cyl. + The rationale and risk are contained in a metadata library. */ + + @Rationale about engineTradeOffAnalysis::vehicle_b_engine4cyl{ + explanation = VehicleAnalysis::VehicleTradeOffAnalysis::engineTradeOffAnalysis; + text = "the engine4cyl was evaluated to have a higher objective function compared to the engine6cyl based on the trade-off analyiss"; + } + + // The following risk for the engine4cyl could have been included as part of the objective evaluaiton criteria + + @Risk about engineTradeOffAnalysis::vehicle_b_engine4cyl { + totalRisk = medium; + technicalRisk = medium; + scheduleRisk = medium; + costRisk = RiskLevelEnum::low; + } + @Risk about engineTradeOffAnalysis::vehicle_b_engine4cyl::engine::fuelEfficiency { + technicalRisk { + probability = 0.3; + impact = 0.5; + } + } + + + public import TradeStudies::*; + //evaluation function with criterion engine mass, engine power, and engine cost + calc def EngineEvaluation { + in engineMass:>ISQ::mass; + in enginePower:>ISQ::power; + in engineFuelEfficiency:Real; + in engineCost:Real; + return eval:Real; + } + calc def EngineEvaluation_4cyl { + in engineMass:>ISQ::mass; + in enginePower:>ISQ::power; + in engineFuelEfficiency:Real; + in engineCost:Real; + return eval:Real; + } + calc def EngineEvaluation_6cyl { + in engineMass:>ISQ::mass; + in enginePower:>ISQ::power; + in engineFuelEfficiency:Real; + in engineCost:Real; + return eval:Real; + } + analysis engineTradeOffAnalysis:TradeStudy{ + subject vehicleAlternatives[2]:>vehicle_b; + + part vehicle_b_engine4cyl:>vehicleAlternatives{ + part engine redefines engine{ + part cylinders :>> cylinders [4]; + attribute mass redefines mass=180 [kg]; + attribute peakHorsePower redefines peakHorsePower = 180 [W]; + attribute fuelEfficiency redefines fuelEfficiency=.6; + attribute cost redefines cost = 1000; + } + } + part vehicle_b_engine6cyl:>vehicleAlternatives{ + part engine redefines engine{ + part cylinders redefines cylinders [6]; + attribute mass redefines mass=220 [kg]; + attribute peakHorsePower redefines peakHorsePower = 220 [W]; + attribute fuelEfficiency redefines fuelEfficiency=.5; + attribute cost redefines cost = 1500; + } + } + + objective :MaximizeObjective; + /*Select vehicle alternative with the engine whose evaluation function returns the max value*/ + + calc :> evaluationFunction{ + in part vehicle:>vehicle_b_engine4cyl; + return attribute eval:Real=EngineEvaluation_4cyl (vehicle.engine.mass, vehicle.engine.peakHorsePower, vehicle.engine.fuelEfficiency, vehicle.engine.cost); + } + calc :> evaluationFunction{ + in part vehicle:>vehicle_b_engine6cyl; + return attribute eval:Real=EngineEvaluation_6cyl (vehicle.engine.mass, vehicle.engine.peakHorsePower, vehicle.engine.fuelEfficiency, vehicle.engine.cost); + } + return part selectedVehicle:>vehicle_b; + } + } + } + package VehicleVerification{ + public import VehicleConfigurations::VehicleConfiguration_b::**; + public import VerificationCaseDefinitions::*; + public import VerificationCases1::*; + // the following is a model library which contains VerdictKind + public import VerificationCases::*; + public import VerificationSystem::*; + package VerificationCaseDefinitions{ + verification def MassTest; + verification def AccelerationTest; + verification def ReliabilityTest; + } + package VerificationCases1{ + verification massTests:MassTest { + subject vehicle_uut :> vehicle_b; + actor vehicleVerificationSubSystem_1 = verificationContext.massVerificationSystem; + objective { + verify vehicleSpecification.vehicleMassRequirement{ + redefines massActual=weighVehicle.massMeasured; + } + } + // method kinds are test, demo, analyze, should also include inspection, similarity + @ VerificationMethod{ + kind = (VerificationMethodKind::test, VerificationMethodKind::analyze); + } + action weighVehicle { + out massMeasured:>ISQ::mass; + } + then action evaluatePassFail { + in massMeasured:>ISQ::mass; + out verdict = PassIf(vehicleSpecification.vehicleMassRequirement(vehicle_uut)); + } + flow from weighVehicle.massMeasured to evaluatePassFail.massMeasured; + return :>> verdict = evaluatePassFail.verdict; + } + } + package VerificationSystem{ + part verificationContext{ + perform massTests; + part vehicle_UnitUnderTest :> vehicle_b; + part massVerificationSystem{ + part scale{ + perform massTests.weighVehicle; + } + part operator{ + perform massTests.evaluatePassFail; + } + } + } + } + } + package VehicleIndividuals{ + individual a:VehicleRoadContext_1{ + timeslice t0_t2_a{ + snapshot t0_a { + attribute t0 redefines time=0 [s]; + snapshot t0_r:Road_1{ + :>>Road::incline =0; + :>>Road::friction=.1; + } + snapshot t0_v:Vehicle_1{ + :>>Vehicle::position=0 [m]; + :>>Vehicle::velocity=0 [m]; + :>>Vehicle::acceleration=1.96 [m/s**2]; + // .2 g where 1 g = 9.8 meters/sec^2 + snapshot t0_fa:FrontAxleAssembly_1{ + snapshot t0_leftFront:Wheel_1; + snapshot t0_rightFront:Wheel_2; + } + } + } + snapshot t1_a{ + attribute t1 redefines time=1 [s]; + snapshot t1_r:Road_1{ + :>>Road::incline =0; + :>>Road::friction=.1; + } + snapshot t1_v:Vehicle_1{ + :>>Vehicle::position=.98 [m]; + :>>Vehicle::velocity=1.96 [m/s]; + :>>Vehicle::acceleration=1.96 [m/s**2]; + // .2 g where 1 g = 9.8 meters/sec^2 + snapshot t1_fa:FrontAxleAssembly_1{ + snapshot t1_leftFront:Wheel_1; + snapshot t1_rightFront:Wheel_2; + } + } + } + snapshot t2_a{ + attribute t2 redefines time=2 [s]; + snapshot t2_r:Road_1{ + :>>Road::incline =0; + :>>Road::friction=.1; + } + snapshot t2_v:Vehicle_1{ + :>>Vehicle::position=3.92 [m]; + :>>Vehicle::velocity=3.92 [m/s]; + :>>Vehicle::acceleration=1.96 [m/s**2]; + // .2 g where 1 g = 9.8 meters/sec^2 + snapshot t2_fa:FrontAxleAssembly_1{ + snapshot t2_leftFront:Wheel_1; + snapshot t2_rightFront:Wheel_2; + } + } + } + } + } + } + package MissionContext{ + /* Define mission context with mission use cases for vehicle_b */ + public import VehicleConfigurations::VehicleConfiguration_b::**; + public import ParametersOfInterestMetadata::moe; + public import TransportPassengerScenario::*; + package ContextDefinitions{ + part def MissionContext:>GenericContext::Context; + part def Road; + part def Driver{ + port handPort:HandPort{ + } + exhibit state driverStates{ + state initial; + state wait; + transition initial then wait; + //ignition on + transition 'wait-wait-1' + first wait + do send new IgnitionCmd (ignitionOnOff=IgnitionOnOff::on) via handPort + then wait; + // ignition off + transition 'wait-wait-2' + first wait + do send new IgnitionCmd (ignitionOnOff=IgnitionOnOff::off) via handPort + then wait; + } + } + part def Passenger; + + requirement transportRequirements; + use case def TransportPassenger{ + objective TransportObjective { + doc /*deliver passenger to destination safely, comfortably, and within acceptable time*/ + require transportRequirements; + } + subject vehicle:Vehicle; + actor environment; + actor road; + actor driver; + actor passenger [0..4]; + include use case getInVehicle_a:>getInVehicle [1..5]; + include use case getOutOfVehicle_a:>getOutOfVehicle [1..5]; + } + + use case getInVehicle:GetInVehicle { + action unlockDoor_in [0..1]; + then action openDoor_in; + then action enterVehicle; + then action closeDoor_in; + } + use case def GetInVehicle{ + subject vehicle:Vehicle; + actor driver [0..1]; + actor passenger [0..1]; + assert constraint {driver != null xor passenger != null} + } + + use case getOutOfVehicle:GetOutOfVehicle { + action openDoor_out; + then action exitVehicle; + then action closeDoor_out; + then action lockDoor_out; + } + use case def GetOutOfVehicle{ + subject vehicle:Vehicle; + actor driver [0..1]; + actor passenger [0..1]; + assert constraint {driver != null xor passenger != null} + } + } + package TransportPassengerScenario{ + public import ContextDefinitions::TransportPassenger; + + // this version uses nesting vs fork and join for concurrent actions + use case transportPassenger:TransportPassenger{ + first start; + then action a{ + action driverGetInVehicle subsets getInVehicle_a[1]; + action passenger1GetInVehicle subsets getInVehicle_a[1]; + } + then action trigger accept ignitionCmd:IgnitionCmd; + then action b{ + action driveVehicleToDestination; + action providePower; + } + then action c{ + action driverGetOutOfVehicle subsets getOutOfVehicle_a[1]; + action passenger1GetOutOfVehicle subsets getOutOfVehicle_a[1]; + } + then done; + } + + + //this version uses forks and joins + use case transportPassenger_1:TransportPassenger{ + // declare actions + action driverGetInVehicle subsets getInVehicle_a[1]; + action passenger1GetInVehicle subsets getInVehicle_a[1]; + action driverGetOutOfVehicle subsets getOutOfVehicle_a[1]; + action passenger1GetOutOfVehicle subsets getOutOfVehicle_a[1]; + action driveVehicleToDestination; + action providePower; + item def VehicleOnSignal; + join join1; + join join2; + join join3; + action trigger accept ignitionCmd:IgnitionCmd; + + // define control flow + first start; + then fork fork1; + then driverGetInVehicle; + then passenger1GetInVehicle; + first driverGetInVehicle then join1; + first passenger1GetInVehicle then join1; + first join1 then trigger; + first trigger then fork2; + //succession trigger if trigger.ignitionCmd.ignitionOnOff==IgnitionOnOff::on then fork2; + + fork fork2; + then driveVehicleToDestination; + then providePower; + first driveVehicleToDestination then join2; + first providePower then join2; + first join2 then fork3; + + fork fork3; + then driverGetOutOfVehicle; + then passenger1GetOutOfVehicle; + first driverGetOutOfVehicle then join3; + first passenger1GetOutOfVehicle then join3; + + first join3 then done; + } + } + + part missionContext:ContextDefinitions::MissionContext{ + #moe attribute transportTime :> ISQ::time; + perform transportPassenger; + // bind parts to actors of use case + part road:ContextDefinitions::Road = transportPassenger.road; + part driver:ContextDefinitions::Driver = transportPassenger.driver{ + perform transportPassenger.a.driverGetInVehicle.unlockDoor_in; + perform transportPassenger.a.driverGetInVehicle.openDoor_in; + perform transportPassenger.a.driverGetInVehicle.enterVehicle; + perform transportPassenger.a.driverGetInVehicle.closeDoor_in; + perform transportPassenger.c.driverGetOutOfVehicle.openDoor_out; + perform transportPassenger.c.driverGetOutOfVehicle.exitVehicle; + perform transportPassenger.c.driverGetOutOfVehicle.closeDoor_out; + perform transportPassenger.c.driverGetOutOfVehicle.lockDoor_out; + perform transportPassenger.b.driveVehicleToDestination; + } + part passenger1:ContextDefinitions::Passenger = transportPassenger.passenger { + perform transportPassenger.a.passenger1GetInVehicle.unlockDoor_in; + perform transportPassenger.a.passenger1GetInVehicle.openDoor_in; + perform transportPassenger.a.passenger1GetInVehicle.enterVehicle; + perform transportPassenger.a.passenger1GetInVehicle.closeDoor_in; + perform transportPassenger.c.passenger1GetOutOfVehicle.openDoor_out; + perform transportPassenger.c.passenger1GetOutOfVehicle.exitVehicle; + perform transportPassenger.c.passenger1GetOutOfVehicle.closeDoor_out; + perform transportPassenger.c.passenger1GetOutOfVehicle.lockDoor_out; + } + part vehicle_b_1:>vehicle_b = transportPassenger.vehicle{ + attribute :>> position3dVector = (0,0,0) [spatialCF]; + perform transportPassenger.b.providePower redefines providePower; + perform transportPassenger.trigger; + } + connect driver.handPort to vehicle_b_1.ignitionCmdPort; + connect road to vehicle_b_1.vehicleToRoadPort; + } + } + package VehicleSuperSetModel{ + /* all of vehicleFamily is included in the superset model to enable subsetting a specific vehicle configuration*/ + package VariationPointDefinitions { + variation part def TransmissionChoices:>Transmission { + variant part transmissionAutomatic:TransmissionAutomatic; + variant part transmissionManual:TransmissionManual; + } + } + package VehiclePartsTree{ + public import VariationPointDefinitions::*; + abstract part vehicleFamily { + // variation with nested variation + variation part engine:Engine{ + variant part engine4Cyl:Engine4Cyl; + variant part engine6Cyl:Engine6Cyl{ + part cylinder:Cylinder [6]{ + variation attribute diameter:LengthValue{ + variant attribute smallDiameter:LengthValue; + variant attribute largeDiagmeter:LengthValue; + } + } + } + } + // variation point based on variation of part definition + part transmissionChoices:TransmissionChoices; + // optional variation point + part sunroof:Sunroof[0..1]; + // selection constraint + assert constraint selectionConstraint{ + (engine==engine::engine4Cyl and transmissionChoices==TransmissionChoices::transmissionManual) xor + (engine==engine::engine6Cyl and transmissionChoices==TransmissionChoices::transmissionAutomatic) + } + part driveshaft; + part frontAxleAssembly; + part rearAxleAssembly; + } + } + } + package SafetyandSecurityGroups { + public import VehicleConfigurations::VehicleConfiguration_b::PartsTree::*; + package SafetyGroup { + /* Parts that contribute to safety. */ + public import vehicle_b::**; + filter @Safety; + } + package SecurityGroup { + /* Parts that contribute to security. */ + public import vehicle_b::**; + filter @Security; + } + package SafetyandSecurityGroup { + /* Parts that contribute to safety OR security. */ + public import vehicle_b::**; + filter @Safety or @Security; + } + package MandatorySafetyGroup { + /* Parts that contribute to safety AND are mandatory. */ + public import vehicle_b::**; + filter @Safety and (as Safety).isMandatory; + } + } + package Views_Viewpoints{ + package ViewpointDefinitions{ + viewpoint def BehaviorViewpoint; + viewpoint def SafetyViewpoint{ + frame concern vs:VehicleSafety; + } + part def SafetyEngineer; + concern def VehicleSafety { + doc /* identify system safety features */ + subject; + stakeholder se:SafetyEngineer; + } + } + package ViewDefinitions{ + //public import Views to access rendering method library + public import Views::*; + view def TreeView{ + render asTreeDiagram; + } + view def NestedView; + view def RelationshipView; + view def TableView; + view def PartsTreeView:>TreeView { + filter @SysML::PartUsage; + } + view def PartsInterconnection:>NestedView; + } + package VehicleViews{ + public import ViewpointDefinitions::*; + public import ViewDefinitions::*; + public import VehicleConfigurations::VehicleConfiguration_b::*; + view vehiclePartsTree_Safety:PartsTreeView{ + satisfy requirement sv:SafetyViewpoint; + expose PartsTree::**; + filter @Safety; + } + } + } +} + diff --git a/test/SysMLModels/OMG/examples/VehicleExample/VehicleDefinitions.sysml b/test/SysMLModels/OMG/examples/VehicleExample/VehicleDefinitions.sysml new file mode 100644 index 00000000..17b6a252 --- /dev/null +++ b/test/SysMLModels/OMG/examples/VehicleExample/VehicleDefinitions.sysml @@ -0,0 +1,54 @@ +package VehicleDefinitions { + doc + /* + * Example vehicle definitions model. + */ + + private import ScalarValues::*; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQ::*; + private import SI::*; + + /* PART DEFINITIONS */ + + part def Vehicle { + attribute mass :> ISQ::mass; + } + part def Transmission; + part def AxleAssembly; + part def Axle { + port leftMountingPoint: AxleMountIF; + port rightMountingPoint: AxleMountIF; + } + part def Wheel { + port hub: WheelHubIF; + } + part def Lugbolt { + attribute tighteningTorque :> ISQ::torque; + } + + /* PORT DEFINITIONS */ + + port def DriveIF { + in driveTorque :> ISQ::torque; + } + + port def AxleMountIF { + out transferredTorque :> ISQ::torque; + } + + port def WheelHubIF { + in appliedTorque :> ISQ::torque; + } + + /* INTERFACE DEFINITIONS */ + + interface def Mounting { + doc /* The definition of the interface for mounting a Wheel to an Axle. */ + end axleMount: AxleMountIF; + end hub: WheelHubIF; + + flow axleMount.transferredTorque to hub.appliedTorque; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/VehicleExample/VehicleIndividuals.sysml b/test/SysMLModels/OMG/examples/VehicleExample/VehicleIndividuals.sysml new file mode 100644 index 00000000..f51960e1 --- /dev/null +++ b/test/SysMLModels/OMG/examples/VehicleExample/VehicleIndividuals.sysml @@ -0,0 +1,115 @@ +package VehicleIndividuals { + private import VehicleUsages::*; + private import Time::DateTime; + private import SI::kg; + + package IndividualDefinitions { + + individual part def Vehicle1 :> Vehicle { + doc + /* + * This is an individual Vehicle with a mass of 1800 kg. + */ + + attribute redefines mass = 1800 [kg]; + } + + individual part def Vehicle2 :> Vehicle { + doc + /* + * This is an individual Vehicle with a mass of 1700 kg. + */ + + attribute redefines mass = 1700 [kg]; + } + + individual part def AxleAssembly1 :> AxleAssembly; + + individual part def Wheel1 :> Wheel; + individual part def Wheel2 :> Wheel; + } + + package IndividualSnapshots { + public import IndividualDefinitions::*; + private import Occurrences::HappensJustBefore; + + attribute t0: DateTime; + attribute t1: DateTime; + + individual part vehicle1 : Vehicle1 { + snapshot vehicle1_t0 { + doc + /* + * This is a snapshot of Vehicle1 at time t0; + */ + + attribute :>> localClock.currentTime = t0; + } + + succession : HappensJustBefore first vehicle1_t0 then vehicle1_t0_t1; + + timeslice vehicle1_t0_t1 { + doc + /* + * This is a time slice of Vehicle1 starting at snapshot vehicle1_t0 + * (time t0) and ending at time t1. + */ + + snapshot :>> done { + attribute :>> localClock.currentTime = t1; + } + } + } + } + + package IndividualConfigurations { + public import IndividualSnapshots::*; + + individual part vehicle1_C2: Vehicle1 :> vehicle_C2, vehicle1 { + doc + /* + * This asserts that for some portion of its lifetime, Vehicle1 conforms + * to the configuration vehicle_C2; + */ + + snapshot vehicle1_C2_t0 :> vehicle1_t0 { + doc + /* + * This is a snapshot of Vehicle1 in configuration vehicle1_C2 at time t0. + */ + + individual axleAssembly1_t0: AxleAssembly1 :>> frontAxleAssembly { + doc + /* + * frontAxleAssembly is a feature of vehicle1_C2. + */ + + individual leftFrontWheel_t0: Wheel1 :>> leftFrontWheel { + doc + /* + * This asserts that Wheel1 is the leftFrontWheel of vehicle_C2_t0 + * (leftFrontWheel is a feature of vehicle_C2::frontAxleAssembly). + */ + } + } + } + + snapshot vehicle1_C2_t1 :> vehicle1_t0_t1.done { + doc + /* + * This is a snapshot of Vehicle1 in configuration vehicle_C2 at time t1. + */ + + individual axleAssembly1_t1: AxleAssembly1 :>> frontAxleAssembly { + individual rightFrontWheel_t1: Wheel1 :>> rightFrontWheel { + doc + /* + * This asserts that Wheel1 is the rightFrontWheel of vehicle_C2_t1. + */ + } + } + } + + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/VehicleExample/VehicleUsages.sysml b/test/SysMLModels/OMG/examples/VehicleExample/VehicleUsages.sysml new file mode 100644 index 00000000..14cc69bf --- /dev/null +++ b/test/SysMLModels/OMG/examples/VehicleExample/VehicleUsages.sysml @@ -0,0 +1,96 @@ +package VehicleUsages { + doc + /* + * Example usages of elements from the vehicle definitions model. + */ + + private import SI::N; + private import SI::m; + private import ScalarFunctions::*; + + public import VehicleDefinitions::*; + + /* VALUES */ + T1 = 10.0 [N * m]; + T2 = 20.0 [N * m]; + + /* PARTS */ + part narrowRimWheel: Wheel { + doc /* Narrow-rim wheel configuration with 4 to 5 lugbolts. */ + + part lugbolt: Lugbolt[4..5]; + } + + part wideRimWheel: Wheel { + doc /* Wide-rim wheel configuration with 4 to 6 lugbolts. */ + + part lugbolt: Lugbolt[4..6]; + } + + part vehicle_C1: Vehicle { + doc /* Basic Vehicle configuration showing a part hierarchy. */ + + part frontAxleAssembly: AxleAssembly { + part frontWheel[2] subsets narrowRimWheel { + part redefines lugbolt[4] { + attribute redefines tighteningTorque = T1; + } + } + part frontAxle: Axle; + } + part rearAxleAssembly: AxleAssembly { + part rearWheel[2] subsets wideRimWheel { + part redefines lugbolt[6] { + attribute redefines tighteningTorque = T2; + } + } + part rearAxle: Axle; + } + } + + part vehicle_C2 subsets vehicle_C1 { + doc /* Specialized configuration with part-specific ports. */ + + part redefines frontAxleAssembly { + part leftFrontWheel subsets frontWheel = frontWheel#(1); + part rightFrontWheel subsets frontWheel = frontWheel#(2); + + interface leftFrontMount: Mounting connect + frontAxle.leftMountingPoint to leftFrontWheel.hub; + + interface rightFrontMount: Mounting connect + frontAxle.rightMountingPoint to rightFrontWheel.hub; + } + + part rearAxleAssembly redefines vehicle_C1::rearAxleAssembly { + part leftRearWheel subsets rearWheel = rearWheel#(1); + part rightRearWheel subsets rearWheel = rearWheel#(2); + + interface leftRearMount: Mounting connect + rearAxle.leftMountingPoint to leftRearWheel.hub; + + interface rightRearMount: Mounting connect + rearAxle.rightMountingPoint to rightRearWheel.hub; + } + } + + part vehicle_C3 subsets vehicle_C2 { + doc /* Further specialized configuration with a connection to a deeply-nested port. */ + + + part transmission: Transmission { + port drive: ~DriveIF; + } + + part redefines rearAxleAssembly { + part redefines rearAxle { + port drive: DriveIF; + } + } + + interface driveShaft connect + transDrive ::> transmission.drive to axleDrive ::> rearAxleAssembly.rearAxle.drive { + flow transDrive.driveTorque to axleDrive.driveTorque; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage-Updated.sysml b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage-Updated.sysml new file mode 100644 index 00000000..0360fcc0 --- /dev/null +++ b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage-Updated.sysml @@ -0,0 +1,92 @@ +package 'Wheel Package - Updated' { + doc + /* + * Example from the SysML 1.6 spec, subclause 8.4.1 Wheel Hub Assembly. + */ + + private import ISQ::*; + + // Quantities + + pressure = force / length^2; + + // Blocks + + part def WheelHubAssembly; + part def WheelAssembly { + inflationPressure :> pressure; + } + + part def Tire { + tireSpecification : ScalarValues::String; + action mountTire; // Should be operation + } + + part def TireBead; + + connection def PressureSeat { + end : TireBead[1]; + end : TireMountingRim[1]; + } + + part def Wheel { + diameter :> length; + width :> length; + } + + connection def BandMount { + end : Wheel[1]; + end : WirelessTirePressureMonitor[1]; + } + + part def WirelessTirePressureMonitor { + action transmitPressure; // Should be operation + } + + part def TireMountingRim; + + part def InflationValve; + + part def BalanceWeight; + + part def LugBoltMountingHole { + lugBoltSize :> length; + } + + part def LugBoltJoint { + torque :> ISQ::torque; + boltTension :> force; + } + + part def Hub; + + part def LugBoltThreadableHole { + lugBoltSize :> length; + threadSize :> length; + } + + // Parts + + part wheelHubAssembly: WheelHubAssembly { + part wheel: WheelAssembly[1] { + part t: Tire[1] { + part bead : TireBead[2]; + } + part w: Wheel[1] { + part rim : TireMountingRim[2]; + part v : InflationValve[1]; + part weight : BalanceWeight[0..6]; + part mountingHoles : LugBoltMountingHole[5]; + } + connection : PressureSeat connect t.bead to w.rim; + } + part lugBoltJoints: LugBoltJoint[5] { + ref mountingHole: LugBoltMountingHole[1] subsets wheel.w.mountingHoles; + ref threadedHole: LugBoltThreadableHole[1] subsets hub.h; + } + part hub: Hub[1] { + part h: LugBoltThreadableHole[5]; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage.sysml b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage.sysml new file mode 100644 index 00000000..6ba0d0e9 --- /dev/null +++ b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.1WheelHubAssembly/WheelPackage.sysml @@ -0,0 +1,94 @@ +package 'Wheel Package' { + doc + /* + * Example from the SysML 1.6 spec, subclause 8.4.1 Wheel Hub Assembly. + */ + + private import ISQ::*; + + pressure = force / length^2; + + part def WheelHubAssembly { + part wheel: WheelAssembly[1]; + part lugBoltJoints: LugBoltJoint[5] { + ref redefines threadedHole subsets hub.h; + ref redefines mountingHole subsets wheel.w.mountingHoles; + } + part hub: Hub[1]; + } + + part def WheelAssembly { + inflationPressure :> pressure; + + part t: Tire[1] { + part bead redefines Tire::bead; + } + part w: Wheel[1] { + part rim redefines Wheel::rim; + } + + connection : PressureSeat connect t.bead to w.rim; + } + + part def Tire { + tireSpecification : ScalarValues::String; + + part bead : TireBead[2]; + + action mountTire; + } + + part def TireBead; + + connection def PressureSeat { + end : TireBead[1]; + end : TireMountingRim[1]; + } + + part def Wheel { + diameter :> length; + width :> length; + + part rim : TireMountingRim[2]; + part v : InflationValve[1]; + part weight : BalanceWeight[0..6]; + part mountingHoles : LugBoltMountingHole[5]; + } + + connection def BandMount { + end : Wheel[1]; + end : WirelessTirePressureMonitor[1]; + } + + part def WirelessTirePressureMonitor { + action transmitPressure; + } + + part def TireMountingRim; + + part def InflationValve; + + part def BalanceWeight; + + part def LugBoltMountingHole { + lugBoltSize :> length; + } + + part def LugBoltJoint { + torque :> ISQ::torque; + boltTension :> force; + + ref mountingHole: LugBoltMountingHole[1]; + ref threadedHole: LugBoltThreadableHole[1]; + } + + part def Hub { + part h: LugBoltThreadableHole[5]; + } + + part def LugBoltThreadableHole { + lugBoltSize :> length; + threadSize :> length; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition-Updated.sysml b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition-Updated.sysml new file mode 100644 index 00000000..99829a29 --- /dev/null +++ b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition-Updated.sysml @@ -0,0 +1,68 @@ +package 'Vehicle Decomposition - Updated' { + doc + /* + * Example from the SysML 1.6 spec, subclause 8.4.5 Constraining Decomposition, + * updated for usage-focused approach. + */ + + // Blocks + + part def Vehicle; + + part def 'Chassis Assembly'; + + part def Wheel; + + part def LugBolt; + + part def RollBar; + part def HeavyRollBar :> RollBar; + part def LightRollBar :> RollBar; + + part def Engine; + + part def Cylinder; + + // Parts + + part vehicle : Vehicle { + part chs : 'Chassis Assembly'[1] { + part rb : RollBar[0..1]; + part w : Wheel[4] { + part lb : LugBolt[6..10]; + } + } + part eng: Engine[1] { + part cyl : Cylinder[4..8]; + } + } + + + part 'vehicle model 1' :> vehicle { + part redefines chs { + part redefines rb : LightRollBar[0..1]; + part redefines w { + part redefines lb; + } + } + part redefines eng { + part redefines cyl[4]; + } + + // Constrains total number of lugbolts. + ref lugBolts[24] = chs.w.lb; + } + + part 'vehicle model 2' :> vehicle { + part redefines chs { + part redefines rb[0]; + part redefines w { + // Constrains number of lugbolts per wheel. + part redefines lb[6..7]; + } + } + part redefines eng { + part redefines cyl[6..8]; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition.sysml b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition.sysml new file mode 100644 index 00000000..16a3d0b4 --- /dev/null +++ b/test/SysMLModels/OMG/examples/v1SpecExamples/8.4.5ConstrainingDecomposition/VehicleDecomposition.sysml @@ -0,0 +1,55 @@ +package 'Vehicle Decomposition' { + doc + /* + * Example from the SysML 1.6 spec, subclause 8.4.5 Constraining Decomposition. + */ + + part def Vehicle { + part chs : 'Chassis Assembly'[1] { + part rb redefines 'Chassis Assembly'::rb; + part redefines w { + part redefines lb; + } + } + part eng : Engine[1] { + part cyl redefines Engine::cyl; + } + + ref cylinderBR[*] = eng.cyl; + ref rollBarBR[*] = chs.rb; + ref lugBoltBR[24..32] = chs.w.lb; + } + + part def 'Chassis Assembly' { + part w : Wheel[4]; + part rb : RollBar[0..1]; + } + + part def Wheel { + part lb : LugBolt[6..10]; + } + + part def LugBolt; + + part def RollBar; + part def HeavyRollBar :> RollBar; + part def LightRollBar :> RollBar; + + part def Engine { + part cyl : Cylinder[4..8]; + } + + part def Cylinder; + + part def 'Vehicle Model 1' :> Vehicle { + ref redefines cylinderBR[4]; + ref redefines rollBarBR : LightRollBar[*]; + ref redefines lugBoltBR[24]; + } + + part def 'Vehicle Model 2' :> Vehicle { + ref redefines cylinderBR[6..8]; + ref redefines rollBarBR[0]; + ref redefines lugBoltBR[24..28]; // 6..7 per wheel + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/examples/v1SpecExamples/D.4.7.8Dynamics/HSUVDynamics.sysml b/test/SysMLModels/OMG/examples/v1SpecExamples/D.4.7.8Dynamics/HSUVDynamics.sysml new file mode 100644 index 00000000..002d8414 --- /dev/null +++ b/test/SysMLModels/OMG/examples/v1SpecExamples/D.4.7.8Dynamics/HSUVDynamics.sysml @@ -0,0 +1,88 @@ +package HSUVDynamics { + private import ScalarValues::*; + private import SequenceFunctions::size; + private import ControlFunctions::*; + + attribute def Horsepwr :> Real; + attribute def Weight :> Real; + attribute def Accel :> Real; + attribute def Vel :> Real; + attribute def Dist :> Real; + attribute def Time :> Real; + + constraint def PowerEquation { + attribute whlpwr : Horsepwr; + attribute Cd : Real; + attribute Cf : Real; + attribute tw : Weight; + attribute tp : Horsepwr; + attribute v : Vel; + + tp == whlpwr - Cd * v - Cf * tw * v + } + + constraint def PositionEquation { + attribute dt : Time; + attribute v : Vel[0..*] ordered; + attribute x : Dist[0..*] ordered; + + (1..size(x)-1)->forAll {in n : Natural; x#(n + 1) == x#(n) + v#(n) * (5280/3600) * dt} + } + + constraint def VelocityEquation { + attribute dt : Time; + attribute v : Vel[0..*] ordered; + attribute a : Accel; + + (1..size(v)-1)->forAll {in n: Natural; v#(n + 1) == v#(n) + a * 32 * (3600/5280) * dt} + } + + constraint def AccelerationEquation { + attribute tw : Weight; + attribute dt : Time; + attribute tp : Horsepwr; + attribute a : Accel; + + a == (550/32) * tp * dt * tw + } + + constraint def StraightLineVehicleDynamics { + attribute dt : Time; + attribute whlpwr : Horsepwr; + attribute Cd : Real; + attribute Cf: Real; + attribute tw : Weight; + attribute a : Accel; + attribute v : Vel[0..*] ordered; + attribute x : Dist[0..*] ordered; + + constraint pwr : PowerEquation { + attribute redefines whlpwr = StraightLineVehicleDynamics::whlpwr; + attribute redefines Cd = StraightLineVehicleDynamics::Cd; + attribute redefines Cf = StraightLineVehicleDynamics::Cf; + attribute redefines tw = StraightLineVehicleDynamics::tw; + attribute redefines v = vel.v; + attribute redefines tp; + } + + constraint acc : AccelerationEquation { + attribute redefines tp = pwr.tp; + attribute redefines tw = StraightLineVehicleDynamics::tw; + attribute redefines dt = StraightLineVehicleDynamics::dt; + attribute redefines a = StraightLineVehicleDynamics::a; + } + + constraint vel : VelocityEquation { + attribute redefines a = acc.a; + attribute redefines v = StraightLineVehicleDynamics::v; + attribute redefines dt = StraightLineVehicleDynamics::dt; + } + + constraint pos : PositionEquation { + attribute redefines v = vel.v; + attribute redefines x = StraightLineVehicleDynamics::x; + attribute redefines dt = StraightLineVehicleDynamics::dt; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/01.Packages/CommentExample.sysml b/test/SysMLModels/OMG/training/01.Packages/CommentExample.sysml new file mode 100644 index 00000000..b55d5f3c --- /dev/null +++ b/test/SysMLModels/OMG/training/01.Packages/CommentExample.sysml @@ -0,0 +1,24 @@ +package 'Comment Example' { + /* This is a comment, which is a part of the model, + * annotating (by default) it's owning namespace. */ + + comment Comment1 /* This is a named comment. */ + + comment about Automobile + /* This is an unnamed comment, annotating an + * explicitly specified element. + */ + + part def Automobile; + + alias Car for Automobile { + /* + * This is a comment annotating its owning + * element. + */ + } + + // This is a note. It is in the text, but not part + // of the model. + alias Torque for ISQ::TorqueValue; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/01.Packages/DocumentationExample.sysml b/test/SysMLModels/OMG/training/01.Packages/DocumentationExample.sysml new file mode 100644 index 00000000..61538b08 --- /dev/null +++ b/test/SysMLModels/OMG/training/01.Packages/DocumentationExample.sysml @@ -0,0 +1,14 @@ +package 'Documentation Example' { + doc /* This is documentation of the owning + * package. + */ + + part def Automobile { + doc Document1 /* This documentation of Automobile. */ + } + + alias Car for Automobile { + doc /* This is documentation of the alias. */ + } + alias Torque for ISQ::TorqueValue; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/01.Packages/PackageExample.sysml b/test/SysMLModels/OMG/training/01.Packages/PackageExample.sysml new file mode 100644 index 00000000..84535a11 --- /dev/null +++ b/test/SysMLModels/OMG/training/01.Packages/PackageExample.sysml @@ -0,0 +1,9 @@ +package 'Package Example' { + public import ISQ::TorqueValue; + private import ScalarValues::*; + + private part def Automobile; + + public alias Car for Automobile; + alias Torque for ISQ::TorqueValue; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/02.PartDefinitions/PartDefinitionExample.sysml b/test/SysMLModels/OMG/training/02.PartDefinitions/PartDefinitionExample.sysml new file mode 100644 index 00000000..5f76994f --- /dev/null +++ b/test/SysMLModels/OMG/training/02.PartDefinitions/PartDefinitionExample.sysml @@ -0,0 +1,20 @@ +package 'Part Definition Example' { + private import ScalarValues::*; + + part def Vehicle { + attribute mass : Real; + attribute status : VehicleStatus; + + part eng : Engine; + + ref part driver : Person; + } + + attribute def VehicleStatus { + attribute gearSetting : Integer; + attribute acceleratorPosition : Real; + } + + part def Engine; + part def Person; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/03.Generalization/GeneralizationExample.sysml b/test/SysMLModels/OMG/training/03.Generalization/GeneralizationExample.sysml new file mode 100644 index 00000000..249083e0 --- /dev/null +++ b/test/SysMLModels/OMG/training/03.Generalization/GeneralizationExample.sysml @@ -0,0 +1,19 @@ +package 'Generalization Example' { + + abstract part def Vehicle; + + part def HumanDrivenVehicle specializes Vehicle { + ref part driver : Person; + } + + part def PoweredVehicle :> Vehicle { + part eng : Engine; + } + + part def HumanDrivenPoweredVehicle :> + HumanDrivenVehicle, PoweredVehicle; + + part def Engine; + part def Person; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/04.Subsetting/SubsettingExample.sysml b/test/SysMLModels/OMG/training/04.Subsetting/SubsettingExample.sysml new file mode 100644 index 00000000..31422236 --- /dev/null +++ b/test/SysMLModels/OMG/training/04.Subsetting/SubsettingExample.sysml @@ -0,0 +1,15 @@ +package 'Subsetting Example' { + + part def Vehicle { + part parts : VehiclePart[*]; + + part eng : Engine subsets parts; + part trans : Transmission subsets parts; + part wheels : Wheel[4] :> parts; + } + + abstract part def VehiclePart; + part def Engine :> VehiclePart; + part def Transmission :> VehiclePart; + part def Wheel :> VehiclePart; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/05.Redefinition/RedefinitionExample.sysml b/test/SysMLModels/OMG/training/05.Redefinition/RedefinitionExample.sysml new file mode 100644 index 00000000..2b74e0f1 --- /dev/null +++ b/test/SysMLModels/OMG/training/05.Redefinition/RedefinitionExample.sysml @@ -0,0 +1,24 @@ +package 'Redefinition Example' { + + part def Vehicle { + part eng : Engine; + } + part def SmallVehicle :> Vehicle { + part smallEng : SmallEngine redefines eng; + } + part def BigVehicle :> Vehicle { + part bigEng : BigEngine :>> eng; + } + + part def Engine { + part cyl : Cylinder[4..6]; + } + part def SmallEngine :> Engine { + part redefines cyl[4]; + } + part def BigEngine :> Engine { + part redefines cyl[6]; + } + + part def Cylinder; +} diff --git a/test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-1.sysml b/test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-1.sysml new file mode 100644 index 00000000..fb796bfe --- /dev/null +++ b/test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-1.sysml @@ -0,0 +1,17 @@ +package 'Enumeration Definitions-1' { + private import ScalarValues::Real; + + enum def TrafficLightColor { + enum green; + enum yellow; + enum red; + } + + part def TrafficLight { + attribute currentColor : TrafficLightColor; + } + + part def TrafficLightGo specializes TrafficLight { + attribute redefines currentColor = TrafficLightColor::green; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-2.sysml b/test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-2.sysml new file mode 100644 index 00000000..f33775b0 --- /dev/null +++ b/test/SysMLModels/OMG/training/06.EnumerationDefinitions/EnumerationDefinitions-2.sysml @@ -0,0 +1,32 @@ +package 'Enumeration Definitions-2' { + private import ScalarValues::*; + private import 'Enumeration Definitions-1'::*; + + attribute def ClassificationLevel { + attribute code : String; + attribute color : TrafficLightColor; + } + + enum def ClassificationKind specializes ClassificationLevel { + unclassified { + :>> code = "uncl"; + :>> color = TrafficLightColor::green; + } + confidential { + :>> code = "conf"; + :>> color = TrafficLightColor::yellow; + } + secret { + :>> code = "secr"; + :>> color = TrafficLightColor::red; + } + } + + enum def GradePoints :> Real { + A = 4.0; + B = 3.0; + C = 2.0; + D = 1.0; + F = 0.0; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/07.Parts/PartsExample-1.sysml b/test/SysMLModels/OMG/training/07.Parts/PartsExample-1.sysml new file mode 100644 index 00000000..89e2d643 --- /dev/null +++ b/test/SysMLModels/OMG/training/07.Parts/PartsExample-1.sysml @@ -0,0 +1,29 @@ +package 'Parts Example-1' { + + // Definitions + + part def Vehicle { + part eng : Engine; + } + + part def Engine { + part cyl : Cylinder[4..6]; + } + + part def Cylinder; + + // Usages + + part smallVehicle : Vehicle { + part redefines eng { + part redefines cyl[4]; + } + } + + part bigVehicle : Vehicle { + part redefines eng { + part redefines cyl[6]; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/07.Parts/PartsExample-2.sysml b/test/SysMLModels/OMG/training/07.Parts/PartsExample-2.sysml new file mode 100644 index 00000000..05f3eae2 --- /dev/null +++ b/test/SysMLModels/OMG/training/07.Parts/PartsExample-2.sysml @@ -0,0 +1,29 @@ +package 'Parts Example-2' { + + // Definitions + + part def Vehicle; + part def Engine; + part def Cylinder; + + // Usages + + part vehicle : Vehicle { + part eng : Engine { + part cyl : Cylinder[4..6]; + } + } + + part smallVehicle :> vehicle { + part redefines eng { + part redefines cyl[4]; + } + } + + part bigVehicle :> vehicle { + part redefines eng { + part redefines cyl[6]; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/08.Items/ItemsExample.sysml b/test/SysMLModels/OMG/training/08.Items/ItemsExample.sysml new file mode 100644 index 00000000..924c117e --- /dev/null +++ b/test/SysMLModels/OMG/training/08.Items/ItemsExample.sysml @@ -0,0 +1,17 @@ +package 'Items Example' { + private import ScalarValues::*; + + item def Fuel; + item def Person; + + part def Vehicle { + attribute mass : Real; + + ref item driver : Person; + + part fuelTank { + item fuel: Fuel; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/09.Connections/ConnectionsExample.sysml b/test/SysMLModels/OMG/training/09.Connections/ConnectionsExample.sysml new file mode 100644 index 00000000..287ff8ef --- /dev/null +++ b/test/SysMLModels/OMG/training/09.Connections/ConnectionsExample.sysml @@ -0,0 +1,42 @@ +package 'Connections Example' { + + part def WheelHubAssembly; + part def WheelAssembly; + part def Tire; + part def TireBead; + part def Wheel; + part def TireMountingRim; + part def LugBoltMountingHole; + part def Hub; + part def LugBoltThreadableHole; + part def LugBoltJoint; + + connection def PressureSeat { + end [1] part bead : TireBead; + end [1] part mountingRim : TireMountingRim; + } + + part wheelHubAssembly : WheelHubAssembly { + + part wheel : WheelAssembly[1] { + part t : Tire[1] { + part bead : TireBead[2]; + } + part w: Wheel[1] { + part rim : TireMountingRim[2]; + part mountingHoles : LugBoltMountingHole[5]; + } + connection : PressureSeat + connect bead references t.bead + to mountingRim references w.rim; + } + + part lugBoltJoints : LugBoltJoint[0..5]; + part hub : Hub[1] { + part h : LugBoltThreadableHole[5]; + } + connect [0..1] lugBoltJoints to [1] wheel.w.mountingHoles; + connect [0..1] lugBoltJoints to [1] hub.h; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/10.Ports/PortConjugationExample.sysml b/test/SysMLModels/OMG/training/10.Ports/PortConjugationExample.sysml new file mode 100644 index 00000000..7310f520 --- /dev/null +++ b/test/SysMLModels/OMG/training/10.Ports/PortConjugationExample.sysml @@ -0,0 +1,20 @@ +package 'Port Conjugation Example' { + + attribute def Temp; + + part def Fuel; + + port def FuelPort { + attribute temperature : Temp; + out item fuelSupply : Fuel; + in item fuelReturn : Fuel; + } + + part def FuelTank { + port fuelTankPort : FuelPort; + } + + part def Engine { + port engineFuelPort : ~FuelPort; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/10.Ports/PortExample.sysml b/test/SysMLModels/OMG/training/10.Ports/PortExample.sysml new file mode 100644 index 00000000..503f51ff --- /dev/null +++ b/test/SysMLModels/OMG/training/10.Ports/PortExample.sysml @@ -0,0 +1,26 @@ +package 'Port Example' { + + attribute def Temp; + + part def Fuel; + + port def FuelOutPort { + attribute temperature : Temp; + out item fuelSupply : Fuel; + in item fuelReturn : Fuel; + } + + port def FuelInPort { + attribute temperature : Temp; + in item fuelSupply : Fuel; + out item fuelReturn : Fuel; + } + + part def FuelTankAssembly { + port fuelTankPort : FuelOutPort; + } + + part def Engine { + port engineFuelPort : FuelInPort; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/11.Interfaces/InterfaceDecompositionExample.sysml b/test/SysMLModels/OMG/training/11.Interfaces/InterfaceDecompositionExample.sysml new file mode 100644 index 00000000..394629fc --- /dev/null +++ b/test/SysMLModels/OMG/training/11.Interfaces/InterfaceDecompositionExample.sysml @@ -0,0 +1,23 @@ +package 'Interface Decomposition Example' { + + port def SpigotBank; + port def Spigot; + + port def Faucet; + port def FaucetInlet; + + interface def WaterDelivery { + end [1] port suppliedBy : SpigotBank { + port hot : Spigot; + port cold : Spigot; + } + end [1..*] port deliveredTo : Faucet { + port hot : FaucetInlet; + port cold : FaucetInlet; + } + + connect suppliedBy.hot to deliveredTo.hot; + connect suppliedBy.cold to deliveredTo.cold; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/11.Interfaces/InterfaceExample.sysml b/test/SysMLModels/OMG/training/11.Interfaces/InterfaceExample.sysml new file mode 100644 index 00000000..a62e41b9 --- /dev/null +++ b/test/SysMLModels/OMG/training/11.Interfaces/InterfaceExample.sysml @@ -0,0 +1,19 @@ +package 'Interface Example' { + private import 'Port Example'::*; + + part def Vehicle; + + interface def FuelInterface { + end supplierPort : FuelOutPort; + end consumerPort : FuelInPort; + } + + part vehicle : Vehicle { + part tankAssy : FuelTankAssembly; + part eng : Engine; + + interface : FuelInterface connect + supplierPort ::> tankAssy.fuelTankPort to + consumerPort ::> eng.engineFuelPort; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-1.sysml b/test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-1.sysml new file mode 100644 index 00000000..5b4f3cee --- /dev/null +++ b/test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-1.sysml @@ -0,0 +1,29 @@ +package 'Binding Connectors Example-1' { + private import 'Port Example'::*; + + part def Vehicle; + part def FuelPump; + part def FuelTank; + + part vehicle : Vehicle { + part tank : FuelTankAssembly { + port redefines fuelTankPort { + out item redefines fuelSupply; + in item redefines fuelReturn; + } + + bind fuelTankPort.fuelSupply = pump.pumpOut; + bind fuelTankPort.fuelReturn = tank.fuelIn; + + part pump : FuelPump { + out item pumpOut : Fuel; + in item pumpIn : Fuel; + } + + part tank : FuelTank { + out item fuelOut : Fuel; + in item fuelIn : Fuel; + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-2.sysml b/test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-2.sysml new file mode 100644 index 00000000..ef999e7c --- /dev/null +++ b/test/SysMLModels/OMG/training/12.BindingConnectors/BindingConnectorsExample-2.sysml @@ -0,0 +1,26 @@ +package 'Binding Connectors Example-2' { + private import 'Port Example'::*; + + part def Vehicle; + part def FuelPump; + part def FuelTank; + + part vehicle : Vehicle { + part tank : FuelTankAssembly { + port redefines fuelTankPort { + out item redefines fuelSupply; + in item redefines fuelReturn; + } + + part pump : FuelPump { + out item pumpOut : Fuel = fuelTankPort.fuelSupply; + in item pumpIn : Fuel; + } + + part tank : FuelTank { + out item fuelOut : Fuel; + in item fuelIn : Fuel = fuelTankPort.fuelReturn; + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/13.Flows/FlowDefinitionExample.sysml b/test/SysMLModels/OMG/training/13.Flows/FlowDefinitionExample.sysml new file mode 100644 index 00000000..eb1d1515 --- /dev/null +++ b/test/SysMLModels/OMG/training/13.Flows/FlowDefinitionExample.sysml @@ -0,0 +1,21 @@ +package 'Flow Definition Example' { + private import 'Port Example'::*; + + part def Vehicle; + + flow def FuelFlow { + ref :>> payload : Fuel; + end port supplierPort : FuelOutPort; + end port consumerPort : FuelInPort; + } + + part vehicle : Vehicle { + part tankAssy : FuelTankAssembly; + part eng : Engine; + + flow : FuelFlow of Fuel + from tankAssy.fuelTankPort.fuelSupply + to eng.engineFuelPort.fuelSupply; + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/13.Flows/FlowInterfaceExample.sysml b/test/SysMLModels/OMG/training/13.Flows/FlowInterfaceExample.sysml new file mode 100644 index 00000000..4318fcf1 --- /dev/null +++ b/test/SysMLModels/OMG/training/13.Flows/FlowInterfaceExample.sysml @@ -0,0 +1,22 @@ +package 'Flow Interface Example' { + private import 'Port Example'::*; + + part def Vehicle; + + interface def FuelInterface { + end supplierPort : FuelOutPort; + end consumerPort : FuelInPort; + + flow supplierPort.fuelSupply to consumerPort.fuelSupply; + flow consumerPort.fuelReturn to supplierPort.fuelReturn; + } + + part vehicle : Vehicle { + part tankAssy : FuelTankAssembly; + part eng : Engine; + + interface : FuelInterface connect + supplierPort ::> tankAssy.fuelTankPort to + consumerPort ::> eng.engineFuelPort; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/13.Flows/FlowUsageExample.sysml b/test/SysMLModels/OMG/training/13.Flows/FlowUsageExample.sysml new file mode 100644 index 00000000..8959cf69 --- /dev/null +++ b/test/SysMLModels/OMG/training/13.Flows/FlowUsageExample.sysml @@ -0,0 +1,18 @@ +package 'Flow Usage Example' { + private import 'Port Example'::*; + + part def Vehicle; + + part vehicle : Vehicle { + part tankAssy : FuelTankAssembly; + part eng : Engine; + + flow of Fuel + from tankAssy.fuelTankPort.fuelSupply + to eng.engineFuelPort.fuelSupply; + + flow of Fuel + from eng.engineFuelPort.fuelReturn + to tankAssy.fuelTankPort.fuelReturn; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionDefinitionExample.sysml b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionDefinitionExample.sysml new file mode 100644 index 00000000..0a00dffc --- /dev/null +++ b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionDefinitionExample.sysml @@ -0,0 +1,21 @@ +package 'Action Definition Example' { + item def Scene; + item def Image; + item def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + + action def TakePicture { in scene : Scene; out picture : Picture; + bind focus.scene = scene; + + action focus: Focus { in scene; out image; } + + flow from focus.image to shoot.image; + + action shoot: Shoot { in image; out picture; } + + bind shoot.picture = picture; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionShorthandExample.sysml b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionShorthandExample.sysml new file mode 100644 index 00000000..eb796991 --- /dev/null +++ b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionShorthandExample.sysml @@ -0,0 +1,26 @@ +package 'Action Shorthand Example' { + item def Scene; + item def Image; + item def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + + action def TakePicture { + in item scene : Scene; + out item picture : Picture; + + action focus: Focus { + in item scene = TakePicture::scene; + out item image; + } + + flow from focus.image to shoot.image; + + then action shoot: Shoot { + in item; + out item picture = TakePicture::picture; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-1.sysml b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-1.sysml new file mode 100644 index 00000000..a9d14c4a --- /dev/null +++ b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-1.sysml @@ -0,0 +1,26 @@ +package 'Action Succession Example-1' { + item def Scene; + item def Image; + item def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + + action def TakePicture { + in item scene : Scene; + out item picture : Picture; + + bind focus.scene = scene; + + action focus: Focus { in scene; out image; } + + flow from focus.image to shoot.image; + + first focus then shoot; + + action shoot: Shoot { in image; out picture; } + + bind shoot.picture = picture; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-2.sysml b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-2.sysml new file mode 100644 index 00000000..294fe05f --- /dev/null +++ b/test/SysMLModels/OMG/training/14.ActionDefinitions/ActionSuccessionExample-2.sysml @@ -0,0 +1,24 @@ +package 'Action Definition Example' { + item def Scene; + item def Image; + item def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + + action def TakePicture { + in item scene : Scene; + out item picture : Picture; + + bind focus.scene = scene; + + action focus: Focus { in scene; out image; } + + succession flow from focus.image to shoot.image; + + action shoot: Shoot { in image; out picture; } + + bind shoot.picture = picture; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/15.Actions/ActionDecomposition.sysml b/test/SysMLModels/OMG/training/15.Actions/ActionDecomposition.sysml new file mode 100644 index 00000000..3209a6ee --- /dev/null +++ b/test/SysMLModels/OMG/training/15.Actions/ActionDecomposition.sysml @@ -0,0 +1,27 @@ +package 'Action Decomposition' { + part def Scene; + part def Image; + part def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + action def TakePicture { in scene : Scene; out picture : Picture; } + + action takePicture : TakePicture { + in item scene; + out item picture; + + action focus : Focus { + in item scene = takePicture::scene; + out item image; + } + + flow from focus.image to shoot.image; + + action shoot : Shoot { + in item; + out item picture = takePicture::picture; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-1.sysml b/test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-1.sysml new file mode 100644 index 00000000..9b7335ef --- /dev/null +++ b/test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-1.sysml @@ -0,0 +1,32 @@ +package 'Conditional Succession Example-1' { + part def Scene; + part def Image { + isWellFocused: ScalarValues::Boolean; + } + part def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + action def TakePicture { in scene : Scene; out picture : Picture; } + + action takePicture : TakePicture { + in item scene; + out item picture; + + action focus : Focus { + in item scene = takePicture::scene; + out item image; + } + + first focus + if focus.image.isWellFocused then shoot; + + flow from focus.image to shoot.image; + + action shoot : Shoot { + in item; + out item picture = takePicture::picture; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-2.sysml b/test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-2.sysml new file mode 100644 index 00000000..472bf017 --- /dev/null +++ b/test/SysMLModels/OMG/training/16.ConditionalSuccession/ConditionalSuccessionExample-2.sysml @@ -0,0 +1,31 @@ +package 'Conditional Succession Example-2' { + part def Scene; + part def Image { + isWellFocused: ScalarValues::Boolean; + } + part def Picture; + + action def Focus { in scene : Scene; out image : Image; } + action def Shoot { in image: Image; out picture : Picture; } + action def TakePicture { in scene : Scene; out picture : Picture; } + + action takePicture : TakePicture { + in item scene; + out item picture; + + action focus : Focus { + in item scene = takePicture::scene; + out item image; + } + + if focus.image.isWellFocused then shoot; + + flow from focus.image to shoot.image; + + action shoot : Shoot { + in item image; + out item picture = takePicture::picture; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/17.Control/Camera.sysml b/test/SysMLModels/OMG/training/17.Control/Camera.sysml new file mode 100644 index 00000000..ad43eb51 --- /dev/null +++ b/test/SysMLModels/OMG/training/17.Control/Camera.sysml @@ -0,0 +1,25 @@ +package Camera { + private import 'Action Decomposition'::*; + + part def Camera; + part def FocusingSubsystem; + part def ImagingSubsystem; + + part camera : Camera { + ref item scene : Scene; + part photos : Picture[*]; + + part autoFocus { + in ref item scene : Scene = camera::scene; + out ref item realImage : Image; + } + + flow autoFocus.realImage to imager.focusedImage; + + part imager { + in item focusedImage : Image; + out item photo : Picture :> photos; + } + + } +} diff --git a/test/SysMLModels/OMG/training/17.Control/ControlStructuresExample.sysml b/test/SysMLModels/OMG/training/17.Control/ControlStructuresExample.sysml new file mode 100644 index 00000000..7f78acb4 --- /dev/null +++ b/test/SysMLModels/OMG/training/17.Control/ControlStructuresExample.sysml @@ -0,0 +1,29 @@ +package 'Control Structures Example' { + private import ScalarValues::*; + + attribute def BatteryCharged; + + part battery; + part powerSystem; + + action def MonitorBattery { out charge : Real; } + action def AddCharge { in charge : Real; } + action def EndCharging; + + action def ChargeBattery { + loop action charging { + action monitor : MonitorBattery { + out charge; + } + + then if monitor.charge < 100 { + action addCharge : AddCharge { + in charge = monitor.charge; + } + } + } until charging.monitor.charge >= 100; + + then action endCharging : EndCharging; + then done; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/17.Control/DecisionExample.sysml b/test/SysMLModels/OMG/training/17.Control/DecisionExample.sysml new file mode 100644 index 00000000..f3b57929 --- /dev/null +++ b/test/SysMLModels/OMG/training/17.Control/DecisionExample.sysml @@ -0,0 +1,34 @@ +package 'Decision Example' { + private import ScalarValues::*; + + attribute def BatteryCharged; + + part battery; + part powerSystem; + + action def MonitorBattery { out charge : Real; } + action def AddCharge { in charge : Real; } + action def EndCharging; + + action def ChargeBattery { + first start; + + then merge continueCharging; + + then action monitor : MonitorBattery { + out batteryCharge : Real; + } + + then decide; + if monitor.batteryCharge < 100 then addCharge; + if monitor.batteryCharge >= 100 then endCharging; + + action addCharge : AddCharge { + in charge = monitor.batteryCharge; + } + then continueCharging; + + action endCharging : EndCharging; + then done; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/17.Control/ForkJoinExample.sysml b/test/SysMLModels/OMG/training/17.Control/ForkJoinExample.sysml new file mode 100644 index 00000000..74806b41 --- /dev/null +++ b/test/SysMLModels/OMG/training/17.Control/ForkJoinExample.sysml @@ -0,0 +1,41 @@ +package 'Fork Join Example' { + private import ScalarValues::*; + + attribute def TurnKeyToOn; + attribute def BrakePressure; + + action def MonitorBrakePedal { out pressure : BrakePressure; } + action def MonitorTraction { out modFreq : Real; } + action def Braking { in brakePressure : BrakePressure; in modulationFrequency : Real; } + + action def Brake { + action TurnOn; + + then fork; + then monitorBrakePedal; + then monitorTraction; + then braking; + + action monitorBrakePedal : MonitorBrakePedal { + out brakePressure; + } + then joinNode; + + action monitorTraction : MonitorTraction { + out modulationFrequency; + } + then joinNode; + + flow from monitorBrakePedal.brakePressure to braking.brakePressure; + flow from monitorTraction.modulationFrequency to braking.modulationFrequency; + + action braking : Braking { + in brakePressure; + in modulationFrequency; + } + then joinNode; + + join joinNode; + then done; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/17.Control/MergeExample.sysml b/test/SysMLModels/OMG/training/17.Control/MergeExample.sysml new file mode 100644 index 00000000..920e4a5d --- /dev/null +++ b/test/SysMLModels/OMG/training/17.Control/MergeExample.sysml @@ -0,0 +1,42 @@ +package 'Merge Example' { + part def Scene; + part def Image; + part def Picture; + + action def Focus { in item scene : Scene; out item image : Image; } + action def Shoot { in item image : Image; out item picture : Picture; } + action def Display { in item picture : Picture; } + action def TakePicture; + + action takePicture : TakePicture { + first start; + + then merge continue; + + then action trigger { + out item scene : Scene; + } + + flow from trigger.scene to focus.scene; + + then action focus : Focus { + in item scene; + out item image; + } + + flow from focus.image to shoot.image; + + then action shoot : Shoot { + in item image ; + out item picture; + } + + flow from shoot.picture to display.picture; + + then action display : Display { + in item picture; + } + + then continue; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/18.ActionPerformance/ActionPerformanceExample.sysml b/test/SysMLModels/OMG/training/18.ActionPerformance/ActionPerformanceExample.sysml new file mode 100644 index 00000000..db12fdb1 --- /dev/null +++ b/test/SysMLModels/OMG/training/18.ActionPerformance/ActionPerformanceExample.sysml @@ -0,0 +1,21 @@ +package 'Action Performance Example' { + private import 'Action Decomposition'::*; + + part def Camera; + part def AutoFocus; + part def Imager; + + part camera : Camera { + + perform action takePhoto[*] ordered + references takePicture; + + part f : AutoFocus { + perform takePhoto.focus; + } + + part i : Imager { + perform takePhoto.shoot; + } + } +} diff --git a/test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-1.sysml b/test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-1.sysml new file mode 100644 index 00000000..2bbf1b3a --- /dev/null +++ b/test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-1.sysml @@ -0,0 +1,28 @@ +package 'Terminate Actions Example-1' { + private import ScalarValues::Boolean; + + action monitorCriticalActivity; + action criticalActivity; + action waitForTimeOut; + + action def MonitoredActivity { + first start; + + then fork; + then performCriticalActivity; + then waitForTimeOut; + + action performCriticalActivity { + perform monitorCriticalActivity; + + perform criticalActivity; + then terminate; + } + then stop; + + action waitForTimeOut; + then stop; + + action stop terminate; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-2.sysml b/test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-2.sysml new file mode 100644 index 00000000..1822ad0e --- /dev/null +++ b/test/SysMLModels/OMG/training/19.TerminateActions/TerminateActionsExample-2.sysml @@ -0,0 +1,20 @@ +package 'Terminate Actions Example-2' { + action def WorkflowProcess; + + part def Processor { + ref action workflowProcess : WorkflowProcess; + + action internalProcess { + // ... + } + } + + action terminateProcessing { + in processor : Processor; + + terminate processor.workflowProcess; + + terminate processor; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/20.AssignmentActions/AssignmentExample.sysml b/test/SysMLModels/OMG/training/20.AssignmentActions/AssignmentExample.sysml new file mode 100644 index 00000000..fafc72b4 --- /dev/null +++ b/test/SysMLModels/OMG/training/20.AssignmentActions/AssignmentExample.sysml @@ -0,0 +1,41 @@ +package 'For Loop Example' { + private import SequenceFunctions::*; + + action def StraightLineDynamics { + in power : ISQ::PowerValue; + in mass : ISQ::MassValue; + in delta_t : ISQ::TimeValue; + in x_in : ISQ::LengthValue; + in v_in : ISQ::SpeedValue; + out x_out : ISQ::LengthValue; + out v_out : ISQ::SpeedValue; + } + + action def ComputeMotion { + in attribute powerProfile :> ISQ::power[*]; + in attribute vehicleMass :> ISQ::mass; + in attribute initialPosition :> ISQ::length; + in attribute initialSpeed :> ISQ::speed; + in attribute deltaT :> ISQ::time; + out attribute positions :> ISQ::length[*] := ( ); + + private attribute position := initialPosition; + private attribute speed := initialSpeed; + + for vehiclePower in powerProfile { + perform action dynamics : StraightLineDynamics { + in power = vehiclePower; + in mass = vehicleMass; + in delta_t = deltaT; + in x_in = position; + in v_in = speed; + out x_out; + out v_out; + } + then assign position := dynamics.x_out; + then assign speed := dynamics.v_out; + then assign positions := positions->including(position); + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingExample.sysml b/test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingExample.sysml new file mode 100644 index 00000000..c9ee543c --- /dev/null +++ b/test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingExample.sysml @@ -0,0 +1,33 @@ +package 'Messaging Example' { + item def Scene; + item def Image; + item def Picture; + + attribute def Show { + item picture : Picture; + } + + action def Focus { in item scene : Scene; out item image : Image; } + action def Shoot { in item image : Image; out item picture : Picture; } + action def TakePicture; + + action screen; + + action takePicture : TakePicture { + action trigger accept scene : Scene; + + then action focus : Focus { + in item scene = trigger.scene; + out item image; + } + + flow from focus.image to shoot.image; + + then action shoot : Shoot { + in item image; + out item picture; + } + + then send new Show(shoot.picture) to screen; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingWithPorts.sysml b/test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingWithPorts.sysml new file mode 100644 index 00000000..6b3a1561 --- /dev/null +++ b/test/SysMLModels/OMG/training/21.AsynchronousMessaging/MessagingWithPorts.sysml @@ -0,0 +1,40 @@ +package 'Messaging Example' { + item def Scene; + item def Image; + item def Picture; + + attribute def Show { + item picture : Picture; + } + + action def Focus { in item scene : Scene; out item image : Image; } + action def Shoot { in item image : Image; out item picture : Picture; } + action def TakePicture; + + part screen { + port displayPort; + } + + part camera { + port viewPort; + port displayPort; + + action takePicture : TakePicture { + action trigger accept scene : Scene via viewPort; + + then action focus : Focus { + in item scene = trigger.scene; + out item image; + } + + flow from focus.image to shoot.image; + + then action shoot : Shoot { + in item image; + out item picture; + } + + then send new Show(shoot.picture) via displayPort; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/22.OpaqueActions/OpaqueActionExample.sysml b/test/SysMLModels/OMG/training/22.OpaqueActions/OpaqueActionExample.sysml new file mode 100644 index 00000000..b6a4f7fd --- /dev/null +++ b/test/SysMLModels/OMG/training/22.OpaqueActions/OpaqueActionExample.sysml @@ -0,0 +1,19 @@ +package 'Opaque Action Example' { + + part def Sensor { + attribute ready : ScalarValues::Boolean; + } + + action def UpdateSensors { + in sensors : Sensor[*]; + language "Alf" + /* + * for (sensor in sensors) { + * if (sensor.ready) { + * Update(sensor); + * } + * } + */ + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-1.sysml b/test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-1.sysml new file mode 100644 index 00000000..7e984198 --- /dev/null +++ b/test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-1.sysml @@ -0,0 +1,32 @@ +package 'State Definition Example-1' { + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + + state def VehicleStates { + first start then off; + + state off; + + transition off_to_starting + first off + accept VehicleStartSignal + then starting; + + state starting; + + transition starting_to_on + first starting + accept VehicleOnSignal + then on; + + state on; + + transition on_to_off + first on + accept VehicleOffSignal + then off; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-2.sysml b/test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-2.sysml new file mode 100644 index 00000000..27fe08fa --- /dev/null +++ b/test/SysMLModels/OMG/training/23.StateDefinitions/StateDefinitionExample-2.sysml @@ -0,0 +1,23 @@ +package 'State Definition Example-2' { + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + + state def VehicleStates { + first start then off; + + state off; + accept VehicleStartSignal + then starting; + + state starting; + accept VehicleOnSignal + then on; + + state on; + accept VehicleOffSignal + then off; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/24.States/StateActions.sysml b/test/SysMLModels/OMG/training/24.States/StateActions.sysml new file mode 100644 index 00000000..e37af4d2 --- /dev/null +++ b/test/SysMLModels/OMG/training/24.States/StateActions.sysml @@ -0,0 +1,35 @@ +package 'State Actions' { + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + + part def Vehicle; + + action performSelfTest { in vehicle : Vehicle; } + + state def VehicleStates { in operatingVehicle : Vehicle; } + + state vehicleStates : VehicleStates { + in operatingVehicle : Vehicle; + + first start then off; + + state off; + accept VehicleStartSignal + then starting; + + state starting; + accept VehicleOnSignal + then on; + + state on { + entry performSelfTest{ in vehicle = operatingVehicle; } + do action providePower { /* ... */ } + exit action applyParkingBrake { /* ... */ } + } + accept VehicleOffSignal + then off; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/24.States/StateDecomposition-1.sysml b/test/SysMLModels/OMG/training/24.States/StateDecomposition-1.sysml new file mode 100644 index 00000000..04d39bf4 --- /dev/null +++ b/test/SysMLModels/OMG/training/24.States/StateDecomposition-1.sysml @@ -0,0 +1,25 @@ +package 'State Decomposition-1' { + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + + state def VehicleStates; + + state vehicleStates : VehicleStates { + first start then off; + + state off; + accept VehicleStartSignal + then starting; + + state starting; + accept VehicleOnSignal + then on; + + state on; + accept VehicleOffSignal + then off; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/24.States/StateDecomposition-2.sysml b/test/SysMLModels/OMG/training/24.States/StateDecomposition-2.sysml new file mode 100644 index 00000000..15ab69dd --- /dev/null +++ b/test/SysMLModels/OMG/training/24.States/StateDecomposition-2.sysml @@ -0,0 +1,32 @@ +package 'State Decomposition-1' { + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + + state def VehicleStates; + + state vehicleStates : VehicleStates parallel { + + state operationalStates { + first start then off; + + state off; + accept VehicleStartSignal + then starting; + + state starting; + accept VehicleOnSignal + then on; + + state on; + accept VehicleOffSignal + then off; + } + + state healthStates { + /* ... */ + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/25.Transitions/ChangeAndTimeTriggers.sysml b/test/SysMLModels/OMG/training/25.Transitions/ChangeAndTimeTriggers.sysml new file mode 100644 index 00000000..d9f5fcd8 --- /dev/null +++ b/test/SysMLModels/OMG/training/25.Transitions/ChangeAndTimeTriggers.sysml @@ -0,0 +1,43 @@ +package 'Change and Time Triggers' { + private import ISQ::TemperatureValue; + private import ISQ::DurationValue; + private import Time::TimeInstantValue; + private import SI::h; + + attribute def OverTemp; + + part def Vehicle { + attribute maintenanceTime : TimeInstantValue; + attribute maintenanceInterval : DurationValue; + attribute maxTemperature : TemperatureValue; + } + + part def VehicleController; + + action senseTemperature { out temp : TemperatureValue; } + + state healthStates { + in vehicle : Vehicle; + in controller : VehicleController; + + first start then normal; + do senseTemperature; + + state normal; + accept at vehicle.maintenanceTime + then maintenance; + accept when senseTemperature.temp > vehicle.maxTemperature + do send new OverTemp() to controller + then degraded; + + state maintenance { + entry assign vehicle.maintenanceTime := vehicle.maintenanceTime + vehicle.maintenanceInterval; + } + accept after 48 [h] + then normal; + + state degraded; + accept when senseTemperature.temp <= vehicle.maxTemperature + then normal; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/25.Transitions/LocalClockExample.sysml b/test/SysMLModels/OMG/training/25.Transitions/LocalClockExample.sysml new file mode 100644 index 00000000..7f68624e --- /dev/null +++ b/test/SysMLModels/OMG/training/25.Transitions/LocalClockExample.sysml @@ -0,0 +1,32 @@ +package 'Local Clock Example' { + private import ScalarValues::String; + + item def Start; + item def Request; + + part def Server { + part :>> localClock = new Time::Clock(); + + attribute today : String; + + port requestPort; + + state ServerBehavior { + first start then off; + + state off; + accept Start via requestPort + then waiting; + + state waiting; + accept request : Request via requestPort + then responding; + accept at new Time::Iso8601DateTime(today + "11:59:00") + then off; + + state responding; + accept after 5 [SI::min] + then waiting; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/25.Transitions/TransitionActions.sysml b/test/SysMLModels/OMG/training/25.Transitions/TransitionActions.sysml new file mode 100644 index 00000000..781a570f --- /dev/null +++ b/test/SysMLModels/OMG/training/25.Transitions/TransitionActions.sysml @@ -0,0 +1,44 @@ +package 'Transition Actions' { + + attribute def VehicleStartSignal; + attribute def VehicleOnSignal; + attribute def VehicleOffSignal; + + attribute def ControllerStartSignal; + + part def Vehicle { + brakePedalDepressed : ScalarValues::Boolean; + } + part def VehicleController; + + action performSelfTest { in vehicle : Vehicle; } + + state def VehicleStates; + + state vehicleStates : VehicleStates { + in operatingVehicle : Vehicle; + in controller : VehicleController; + + first start then off; + + state off; + accept VehicleStartSignal + then starting; + + state starting; + accept VehicleOnSignal + if operatingVehicle.brakePedalDepressed + do send new ControllerStartSignal() to controller + then on; + + state on { + entry performSelfTest{ in vehicle = operatingVehicle; } + do action providePower { /* ... */ } + exit action applyParkingBrake { /* ... */ } + } + accept VehicleOffSignal + then off; + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/26.StateExhibition/StateExhibitionExample.sysml b/test/SysMLModels/OMG/training/26.StateExhibition/StateExhibitionExample.sysml new file mode 100644 index 00000000..1b3ad852 --- /dev/null +++ b/test/SysMLModels/OMG/training/26.StateExhibition/StateExhibitionExample.sysml @@ -0,0 +1,15 @@ +package 'State Exhibition Example' { + private import 'Transition Actions'::*; + + part vehicle : Vehicle { + + part vehicleController : VehicleController; + + exhibit vehicleStates { + in operatingVehicle = vehicle; + in controller = vehicleController; + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/EventOccurrenceExample.sysml b/test/SysMLModels/OMG/training/27.Occurrences/EventOccurrenceExample.sysml new file mode 100644 index 00000000..1687e3ee --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/EventOccurrenceExample.sysml @@ -0,0 +1,29 @@ +package 'Event Occurrence Example' { + part def Driver; + part def CruiseController; + part def Speedometer; + part def Engine; + part def Vehicle; + + part driver : Driver { + event occurrence setSpeedSent; + } + + part vehicle : Vehicle { + + part cruiseController : CruiseController { + event occurrence setSpeedReceived; + then event occurrence sensedSpeedReceived; + then event occurrence fuelCommandSent; + } + + part speedometer : Speedometer { + event occurrence sensedSpeedSent; + } + + part engine : Engine { + event occurrence fuelCommandReceived; + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-1.sysml b/test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-1.sysml new file mode 100644 index 00000000..ad0775d7 --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-1.sysml @@ -0,0 +1,23 @@ +package 'Interaction Example-1' { + public import 'Event Occurrence Example'::*; + + item def SetSpeed; + item def SensedSpeed; + item def FuelCommand; + + occurrence def CruiseControlInteraction { + ref part :>> driver; + ref part :>> vehicle; + + message setSpeedMessage of SetSpeed + from driver.setSpeedSent to vehicle.cruiseController.setSpeedReceived; + + message sensedSpeedMessage of SensedSpeed + from vehicle.speedometer.sensedSpeedSent to vehicle.cruiseController.sensedSpeedReceived; + + message fuelCommandMessage of FuelCommand + from vehicle.cruiseController.fuelCommandSent to vehicle.engine.fuelCommandReceived; + + first setSpeedMessage then sensedSpeedMessage; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-2.sysml b/test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-2.sysml new file mode 100644 index 00000000..877b1d8f --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/InteractionExample-2.sysml @@ -0,0 +1,34 @@ +package 'Interaction Example-2' { + private import 'Event Occurrence Example'::*; + + item def SetSpeed; + item def SensedSpeed; + item def FuelCommand; + + occurrence def CruiseControlInteraction { + + ref part driver : Driver { + event setSpeedMessage.sourceEvent; + } + + ref part vehicle : Vehicle { + part cruiseController : CruiseController { + event setSpeedMessage.targetEvent; + then event sensedSpeedMessage.targetEvent; + then event fuelCommandMessage.sourceEvent; + } + + part speedometer : Speedometer { + event sensedSpeedMessage.sourceEvent; + } + + part engine : Engine { + event fuelCommandMessage.targetEvent; + } + } + + message setSpeedMessage of SetSpeed; + then message sensedSpeedMessage of SensedSpeed; + message fuelCommandMessage of FuelCommand; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-1.sysml b/test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-1.sysml new file mode 100644 index 00000000..2bc4eba3 --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-1.sysml @@ -0,0 +1,55 @@ +package 'Interaction Realization-1' { + private import 'Interaction Example-1'::*; + + part driver_a : Driver { + action driverBehavior { + action sendSetSpeed send new SetSpeed() to vehicle_a; + } + } + + part vehicle_a : Vehicle { + part cruiseController_a : CruiseController { + action controllerBehavior { + action receiveSetSpeed accept SetSpeed via vehicle_a; + then action receiveSensedSpeed accept SensedSpeed via cruiseController_a; + then action sendFuelCommand send new FuelCommand() to engine_a; + } + } + + part speedometer_a : Speedometer { + action speedometerBehavior { + action sendSensedSpeed send new SensedSpeed() to cruiseController_a; + } + } + + part engine_a : Engine { + action engineBehavior { + action receiveFuelCommand accept FuelCommand via engine_a; + } + } + } + + occurrence cruiseControlInteraction_a : CruiseControlInteraction { + part :>> driver :>> driver_a { + event driverBehavior.sendSetSpeed[1] :>> setSpeedSent; + } + + part :>> vehicle :>> vehicle_a { + part :>> cruiseController :>> cruiseController_a { + event controllerBehavior.receiveSetSpeed[1] :>> setSpeedReceived; + event controllerBehavior.receiveSensedSpeed[1] :>> sensedSpeedReceived; + event controllerBehavior.sendFuelCommand[1] :>> fuelCommandSent; + } + part :>> speedometer :>> speedometer_a { + event speedometerBehavior.sendSensedSpeed[1] :>> sensedSpeedSent; + } + part :>> engine :>> engine_a { + event engineBehavior.receiveFuelCommand[1] :>> fuelCommandReceived; + } + } + + message :>> setSpeedMessage = driver_a.driverBehavior.sendSetSpeed.sentMessage; + message :>> sensedSpeedMessage = vehicle_a.speedometer_a.speedometerBehavior.sendSensedSpeed.sentMessage; + message :>> fuelCommandMessage = vehicle_a.cruiseController_a.controllerBehavior.sendFuelCommand.sentMessage; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-2.sysml b/test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-2.sysml new file mode 100644 index 00000000..dc83c5a5 --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/InteractionRealization-2.sysml @@ -0,0 +1,82 @@ +package 'Interaction Realization-2' { + private import 'Interaction Example-1'::*; + + part driver_b : Driver { + port setSpeedPort { + out setSpeed : SetSpeed; + } + } + + interface driverToVehicleInterface connect driver_b.setSpeedPort to vehicle_b.setSpeedPort { + flow setSpeedFlow of SetSpeed + from driver_b.setSpeedPort.setSpeed to vehicle_b.setSpeedPort.setSpeed; + } + + part vehicle_b : Vehicle { + port setSpeedPort { + in setSpeed : SetSpeed; + } + + bind setSpeedPort = cruiseController_b.setSpeedPort; + + part cruiseController_b : CruiseController { + port setSpeedPort { + in setSpeed : SetSpeed; + } + port sensedSpeedPort { + in sensedSpeed : SensedSpeed; + } + port fuelCommandPort { + out fuelCommand : FuelCommand; + } + } + + flow sensedSpeedFlow of SensedSpeed + from speedometer_b.sensedSpeedPort.sensedSpeed to cruiseController_b.sensedSpeedPort.sensedSpeed; + + part speedometer_b : Speedometer { + port sensedSpeedPort { + out sensedSpeed : SensedSpeed; + } + } + + flow fuelCommandFlow of FuelCommand + from cruiseController_b.fuelCommandPort.fuelCommand to engine_b.fuelCommandPort.fuelCommand; + + part engine_b : Engine { + port fuelCommandPort { + in fuelCommand : FuelCommand; + } + } + } + + occurrence cruiseControlInteraction_b : CruiseControlInteraction { + part :>> driver :>> driver_b { + port :>> setSpeedPort { + event driver::setSpeedSent; + } + } + + part :>> vehicle :>> vehicle_b { + part :>> cruiseController :>> cruiseController_b { + port :>> setSpeedPort { + event cruiseController::setSpeedReceived; + } + } + part :>> speedometer :>> speedometer_b { + port :>> sensedSpeedPort { + event speedometer::sensedSpeedSent; + } + } + part :>> engine :>> engine_b { + port :>> fuelCommandPort { + event engine::fuelCommandReceived; + } + } + } + + message :>> setSpeedMessage = driverToVehicleInterface.setSpeedFlow; + message :>> sensedSpeedMessage = vehicle_b.sensedSpeedFlow; + message :>> fuelCommandMessage = vehicle_b.fuelCommandFlow; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/MessagePayloadExample.sysml b/test/SysMLModels/OMG/training/27.Occurrences/MessagePayloadExample.sysml new file mode 100644 index 00000000..8bf70101 --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/MessagePayloadExample.sysml @@ -0,0 +1,36 @@ +package 'Message Payload Example' { + private import 'Event Occurrence Example'::*; + + item def SetSpeed; + item def SensedSpeed; + item def FuelCommand { + attribute fuelFlow : ScalarValues::Real; + } + + part def EngineController; + + part vehicle1 :> vehicle { + part engineController : EngineController { + event occurrence fuelCommandReceived; + then event occurrence fuelCommandForwarded; + } + } + + occurrence def CruiseControlInteraction { + ref part :>> driver; + ref part vehicle :>> vehicle1; + + message setSpeedMessage of SetSpeed + from driver.setSpeedSent to vehicle.cruiseController.setSpeedReceived; + + then message sensedSpeedMessage of SensedSpeed + from vehicle.speedometer.sensedSpeedSent to vehicle.cruiseController.sensedSpeedReceived; + + then message fuelCommandMessage of fuelCommand : FuelCommand + from vehicle.cruiseController.fuelCommandSent to vehicle.engineController.fuelCommandReceived; + + then message fuelCommandForwardingMessage of fuelCommand : FuelCommand = fuelCommandMessage.fuelCommand + from vehicle.engineController.fuelCommandForwarded to vehicle.engine.fuelCommandReceived; + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/27.Occurrences/TimeSliceAndSnapshotExample.sysml b/test/SysMLModels/OMG/training/27.Occurrences/TimeSliceAndSnapshotExample.sysml new file mode 100644 index 00000000..fb541ab8 --- /dev/null +++ b/test/SysMLModels/OMG/training/27.Occurrences/TimeSliceAndSnapshotExample.sysml @@ -0,0 +1,27 @@ +package 'Time Slice and Snapshot Example' { + + attribute def Date; + item def Person; + + part def Vehicle { + timeslice assembly; + + first assembly then delivery; + + snapshot delivery { + attribute deliveryDate : Date; + } + + then timeslice ownership[0..*] ordered { + snapshot sale = start; + + ref item owner : Person[1]; + + timeslice driven[0..*] { + ref item driver : Person[1]; + } + } + + snapshot junked = done; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndRoles-1.sysml b/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndRoles-1.sysml new file mode 100644 index 00000000..a5db93ad --- /dev/null +++ b/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndRoles-1.sysml @@ -0,0 +1,22 @@ +package 'Individuals and Roles' { + private import 'Part Definition Example'::*; + + part def Wheel; + + individual part def Vehicle_1 :> Vehicle { + part leftFrontWheel : Wheel; + part rightFrontWheel : Wheel; + } + + individual part def Wheel_1 :> Wheel; + + individual part vehicle_1 : Vehicle_1 { + snapshot part vehicle_1_t0 { + snapshot leftFrontWheel_t0 : Wheel_1 :>> leftFrontWheel; + } + + then snapshot part vehicle_1_t1 { + snapshot rightFrontWheel_t1 : Wheel_1 :>> rightFrontWheel; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndSnapshotsExample.sysml b/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndSnapshotsExample.sysml new file mode 100644 index 00000000..9a1a9156 --- /dev/null +++ b/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndSnapshotsExample.sysml @@ -0,0 +1,24 @@ +package 'Individuals and Snapshots Example' { + public import 'Part Definition Example'::*; + + individual part def Vehicle_1 :> Vehicle { + + snapshot part vehicle_1_t0 { + :>> mass = 2000.0; + :>> status { + :>> gearSetting = 0; + :>> acceleratorPosition = 0.0; + } + } + + snapshot part vehicle_1_t1 { + :>> mass = 1500.0; + :>> status { + :>> gearSetting = 2; + :>> acceleratorPosition = 0.5; + } + } + + first vehicle_1_t0 then vehicle_1_t1; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndTimeSlices.sysml b/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndTimeSlices.sysml new file mode 100644 index 00000000..f16c8a65 --- /dev/null +++ b/test/SysMLModels/OMG/training/28.Individuals/IndividualsAndTimeSlices.sysml @@ -0,0 +1,26 @@ +package 'Individuals and Time Slices' { + private import 'Individuals and Snapshots Example'::*; + + individual item def Alice :> Person; + individual item def Bob :> Person; + + individual : Vehicle_1 { + + timeslice aliceDriving { + ref individual item :>> driver : Alice; + + snapshot :>> start { + :>> mass = 2000.0; + } + + snapshot :>> done { + :>> mass = 1500.0; + } + } + + then timeslice bobDriving { + ref individual item :>> driver : Bob; + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample1.sysml b/test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample1.sysml new file mode 100644 index 00000000..4b2f889d --- /dev/null +++ b/test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample1.sysml @@ -0,0 +1,38 @@ +package 'Car Mass Rollup Example 1' { + private import ScalarValues::*; + private import MassRollup1::*; + + part def CarPart :> MassedThing { + attribute serialNumber: String; + } + + part car: CarPart :> compositeThing { + attribute vin :>> serialNumber; + + part carParts: CarPart[*] :>> subcomponents; + + part engine :> simpleThing, carParts { + //... + } + + part transmission :> simpleThing, carParts { + //... + } + } + + // Example usage + + private import SI::kg; + part c :> car { + attribute :>> simpleMass = 1000[kg]; + part :>> engine { + attribute :>> simpleMass = 100[kg]; + } + + part redefines transmission { + attribute :>> simpleMass = 50[kg]; + } + } + + // c::totalMass --> 1150.0[kg] +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample2.sysml b/test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample2.sysml new file mode 100644 index 00000000..c3f4ded9 --- /dev/null +++ b/test/SysMLModels/OMG/training/29.Expressions/CarMassRollupExample2.sysml @@ -0,0 +1,38 @@ +package 'Car Mass Rollup 1' { + private import ScalarValues::*; + private import MassRollup2::*; + + part def CarPart :> MassedThing { + attribute serialNumber: String; + } + + part car: CarPart :> compositeThing { + attribute vin :>> serialNumber; + + part carParts: CarPart[*] :>> subcomponents; + + part engine :> carParts { + //... + } + + part transmission :> carParts { + //... + } + } + + // Example usage + + private import SI::kg; + part c :> car { + attribute :>> simpleMass = 1000[kg]; + part :>> engine { + attribute :>> simpleMass = 100[kg]; + } + + part redefines transmission { + attribute :>> simpleMass = 50[kg]; + } + } + + // c::totalMass --> 1150.0[kg] +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/29.Expressions/MassRollup1.sysml b/test/SysMLModels/OMG/training/29.Expressions/MassRollup1.sysml new file mode 100644 index 00000000..ef470076 --- /dev/null +++ b/test/SysMLModels/OMG/training/29.Expressions/MassRollup1.sysml @@ -0,0 +1,19 @@ +package MassRollup1 { + private import NumericalFunctions::*; + + part def MassedThing { + attribute simpleMass :> ISQ::mass; + attribute totalMass :> ISQ::mass; + } + + part simpleThing : MassedThing { + attribute :>> totalMass = simpleMass; + } + + part compositeThing : MassedThing { + part subcomponents: MassedThing[*]; + attribute :>> totalMass = + simpleMass + sum(subcomponents.totalMass); + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/29.Expressions/MassRollup2.sysml b/test/SysMLModels/OMG/training/29.Expressions/MassRollup2.sysml new file mode 100644 index 00000000..8866d064 --- /dev/null +++ b/test/SysMLModels/OMG/training/29.Expressions/MassRollup2.sysml @@ -0,0 +1,21 @@ +package MassRollup2 { + private import NumericalFunctions::*; + + part def MassedThing { + attribute simpleMass :> ISQ::mass; + attribute totalMass :> ISQ::mass default simpleMass; + } + + part compositeThing : MassedThing { + part subcomponents: MassedThing[*]; + attribute :>> totalMass default + simpleMass + sum(subcomponents.totalMass); + } + + part filteredMassThing :> compositeThing { + attribute minMass :> ISQ::mass; + attribute :>> totalMass = + simpleMass + sum(subcomponents.totalMass.?{in p:>ISQ::mass; p >= minMass}); + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/30.Calculations/CalculationDefinitions.sysml b/test/SysMLModels/OMG/training/30.Calculations/CalculationDefinitions.sysml new file mode 100644 index 00000000..20b80263 --- /dev/null +++ b/test/SysMLModels/OMG/training/30.Calculations/CalculationDefinitions.sysml @@ -0,0 +1,23 @@ +package 'Calculation Definitions' { + private import ScalarValues::Real; + private import ISQ::*; + + calc def Power { in whlpwr : PowerValue; in Cd : Real; in Cf : Real; in tm : MassValue; in v : SpeedValue; + attribute drag = Cd * v; + attribute friction = Cf * tm * v; + + return : PowerValue = whlpwr - drag - friction; + } + + calc def Acceleration { in tp: PowerValue; in tm : MassValue; in v : SpeedValue; + return : AccelerationValue = tp / (tm * v); + } + + calc def Velocity { in dt : TimeValue; in v0 : SpeedValue; in a : AccelerationValue; + return : SpeedValue = v0 + a * dt; + } + + calc def Position { in dt : TimeValue; in x0 : LengthValue; in v : SpeedValue; + return : LengthValue = x0 + v * dt; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-1.sysml b/test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-1.sysml new file mode 100644 index 00000000..43012847 --- /dev/null +++ b/test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-1.sysml @@ -0,0 +1,42 @@ +package 'Calculation Usages-1' { + private import ScalarValues::Real; + private import ISQ::*; + private import 'Calculation Definitions'::*; + + part def VehicleDynamics { + attribute C_d : Real; + attribute C_f : Real; + attribute wheelPower : PowerValue; + attribute mass : MassValue; + + action straightLineDynamics { + in delta_t : TimeValue; + in v_in : SpeedValue; + in x_in : LengthValue; + out v_out : SpeedValue = vel.v; + out x_out : LengthValue = pos.x; + + calc acc : Acceleration { + in tp = Power(wheelPower, C_d, C_f, mass, v_in); + in tm = mass; + in v = v_in; + return a; + } + + calc vel : Velocity { + in dt = delta_t; + in v0 = v_in; + in a = acc.a; + return v; + } + + calc pos : Position { + in dt = delta_t; + in x0 = x_in; + in v0 = vel.v; + return x; + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-2.sysml b/test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-2.sysml new file mode 100644 index 00000000..88928ad2 --- /dev/null +++ b/test/SysMLModels/OMG/training/30.Calculations/CalculationUsages-2.sysml @@ -0,0 +1,29 @@ +package 'Calculation Usages-2' { + private import ScalarValues::Real; + private import ISQ::*; + private import 'Calculation Definitions'::*; + + attribute def DynamicState { + attribute v: SpeedValue; + attribute x: LengthValue; + } + + part def VehicleDynamics { + attribute C_d : Real; + attribute C_f : Real; + attribute wheelPower : PowerValue; + attribute mass : MassValue; + + calc updateState { + in delta_t : TimeValue; + in currState : DynamicState; + attribute totalPower : PowerValue = Power(wheelPower, C_d, C_f, mass, currState.v); + + return attribute newState : DynamicState { + :>> v = Velocity(delta_t, currState.v, Acceleration(totalPower, mass, currState.v)); + :>> x = Position(delta_t, currState.x, currState.v); + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/AnalyticalConstraints.sysml b/test/SysMLModels/OMG/training/31.Constraints/AnalyticalConstraints.sysml new file mode 100644 index 00000000..95362ec4 --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/AnalyticalConstraints.sysml @@ -0,0 +1,43 @@ +package 'Analytical Constraints' { + private import ISQ::*; + private import 'Calculation Definitions'::*; + + constraint def StraightLineDynamicsEquations { + in p : PowerValue; + in m : MassValue; + in dt : TimeValue; + in x_i : LengthValue; + in v_i : SpeedValue; + in x_f : LengthValue; + in v_f : SpeedValue; + in a : AccelerationValue; + + attribute v_avg : SpeedValue = (v_i + v_f)/2; + + a == Acceleration(p, m, v_avg) and + v_f == Velocity(dt, v_i, a) and + x_f == Position(dt, x_i, v_avg) + } + + action def StraightLineDynamics { + in power : PowerValue; + in mass : MassValue; + in delta_t : TimeValue; + in x_in : LengthValue; + in v_in : SpeedValue; + out x_out : LengthValue; + out v_out : SpeedValue; + out a_out : AccelerationValue; + + assert constraint dynamics : StraightLineDynamicsEquations { + in p = power; + in m = mass; + in dt = delta_t; + in x_i = x_in; + in v_i = v_in; + in x_f = x_out; + in v_f = v_out; + in a = a_out; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-1.sysml b/test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-1.sysml new file mode 100644 index 00000000..bd4d202c --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-1.sysml @@ -0,0 +1,32 @@ +package 'Constraint Assertions-1' { + private import ISQ::*; + private import SI::*; + private import NumericalFunctions::*; + + part def Engine; + part def Transmission; + + constraint def MassConstraint { + in partMasses : MassValue[0..*]; + in massLimit : MassValue; + + sum(partMasses) <= massLimit + } + + part def Vehicle { + assert constraint massConstraint : MassConstraint { + in partMasses = (chassisMass, engine.mass, transmission.mass); + in massLimit = 2500[kg]; + } + + attribute chassisMass : MassValue; + + part engine : Engine { + attribute mass : MassValue; + } + + part transmission : Engine { + attribute mass : MassValue; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-2.sysml b/test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-2.sysml new file mode 100644 index 00000000..e18b2f62 --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/ConstraintAssertions-2.sysml @@ -0,0 +1,37 @@ +package 'Constraint Assertions-2' { + private import ISQ::*; + private import SI::*; + private import NumericalFunctions::*; + + part def Engine; + part def Transmission; + + constraint def MassConstraint { + in partMasses : MassValue[0..*]; + in massLimit : MassValue; + } + + constraint massConstraint : MassConstraint { + in partMasses : MassValue[0..*]; + in massLimit : MassValue; + + sum(partMasses) <= massLimit + } + + part def Vehicle { + assert massConstraint { + in partMasses = (chassisMass, engine.mass, transmission.mass); + in massLimit = 2500[kg]; + } + + attribute chassisMass : MassValue; + + part engine : Engine { + attribute mass : MassValue; + } + + part transmission : Engine { + attribute mass : MassValue; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-1.sysml b/test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-1.sysml new file mode 100644 index 00000000..002f162c --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-1.sysml @@ -0,0 +1,32 @@ +package 'Constraints Example-1' { + private import ISQ::*; + private import SI::*; + private import NumericalFunctions::*; + + part def Engine; + part def Transmission; + + constraint def MassConstraint { + in partMasses : MassValue[0..*]; + in massLimit : MassValue; + + sum(partMasses) <= massLimit + } + + part def Vehicle { + constraint massConstraint : MassConstraint { + in partMasses = (chassisMass, engine.mass, transmission.mass); + in massLimit = 2500[kg]; + } + + attribute chassisMass : MassValue; + + part engine : Engine { + attribute mass : MassValue; + } + + part transmission : Engine { + attribute mass : MassValue; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-2.sysml b/test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-2.sysml new file mode 100644 index 00000000..4024d62d --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/ConstraintsExample-2.sysml @@ -0,0 +1,32 @@ +package 'Constraints Example-2' { + private import ISQ::*; + private import SI::*; + private import NumericalFunctions::*; + + part def Engine; + part def Transmission; + + constraint def MassConstraint { + attribute partMasses : MassValue[0..*]; + attribute massLimit : MassValue; + + sum(partMasses) <= massLimit + } + + part def Vehicle { + constraint massConstraint : MassConstraint { + redefines partMasses = (chassisMass, engine.mass, transmission.mass); + redefines massLimit = 2500[kg]; + } + + attribute chassisMass : MassValue; + + part engine : Engine { + attribute mass : MassValue; + } + + part transmission : Engine { + attribute mass : MassValue; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/DerivationConstraints.sysml b/test/SysMLModels/OMG/training/31.Constraints/DerivationConstraints.sysml new file mode 100644 index 00000000..edec360a --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/DerivationConstraints.sysml @@ -0,0 +1,25 @@ +package 'Derivation Constraints' { + private import SI::*; + private import 'Constraints Example-1'::*; + + part vehicle1 : Vehicle { + attribute totalMass : MassValue; + assert constraint {totalMass == chassisMass + engine.mass + transmission.mass} + } + + part vehicle2 : Vehicle { + attribute totalMass : MassValue = chassisMass + engine.mass + transmission.mass; + } + + constraint def Dynamics { + in mass: MassValue; + in initialSpeed : SpeedValue; + in finalSpeed : SpeedValue; + in deltaT : TimeValue; + in force : ForceValue; + + force * deltaT == mass * (finalSpeed - initialSpeed) and + mass > 0[kg] + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/31.Constraints/TimeConstraints.sysml b/test/SysMLModels/OMG/training/31.Constraints/TimeConstraints.sysml new file mode 100644 index 00000000..8b70b8b4 --- /dev/null +++ b/test/SysMLModels/OMG/training/31.Constraints/TimeConstraints.sysml @@ -0,0 +1,37 @@ +package 'Time Constraints' { + private import ISQ::TemperatureValue; + private import ISQ::DurationValue; + private import Time::TimeInstantValue; + private import Time::TimeOf; + private import Time::DurationOf; + private import SI::h; + private import SI::s; + + attribute def MaintenanceDone; + + part def Vehicle { + attribute maintenanceTime : TimeInstantValue; + attribute maintenanceInterval : DurationValue; + attribute maxTemperature : TemperatureValue; + } + + state healthStates { + in vehicle : Vehicle; + + entry; then normal; + + state normal; + accept at vehicle.maintenanceTime + then maintenance; + + state maintenance { + assert constraint { TimeOf(maintenance) > vehicle.maintenanceTime } + assert constraint { TimeOf(maintenance) - TimeOf(normal.done) < 2 [s] } + entry assign vehicle.maintenanceTime := vehicle.maintenanceTime + vehicle.maintenanceInterval; + } + accept MaintenanceDone + then normal; + + constraint { DurationOf(maintenance) <= 48 [h] } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/32.Requirements/RequirementDefinitions.sysml b/test/SysMLModels/OMG/training/32.Requirements/RequirementDefinitions.sysml new file mode 100644 index 00000000..717ef217 --- /dev/null +++ b/test/SysMLModels/OMG/training/32.Requirements/RequirementDefinitions.sysml @@ -0,0 +1,42 @@ +package 'Requirement Definitions' { + private import ISQ::*; + private import SI::*; + + requirement def MassLimitationRequirement { + doc /* The actual mass shall be less than or equal to the required mass. */ + + attribute massActual: MassValue; + attribute massReqd: MassValue; + + require constraint { massActual <= massReqd } + } + + part def Vehicle { + attribute dryMass: MassValue; + attribute fuelMass: MassValue; + attribute fuelFullMass: MassValue; + } + + requirement def <'1'> VehicleMassLimitationRequirement :> MassLimitationRequirement { + doc /* The total mass of a vehicle shall be less than or equal to the required mass. */ + + subject vehicle : Vehicle; + + attribute redefines massActual = vehicle.dryMass + vehicle.fuelMass; + + assume constraint { vehicle.fuelMass > 0[kg] } + } + + port def ClutchPort; + action def GenerateTorque; + + requirement def <'2'> DrivePowerInterface { + doc /* The engine shall transfer its generated torque to the transmission via the clutch interface. */ + subject clutchPort: ClutchPort; + } + + requirement def <'3'> TorqueGeneration { + doc /* The engine shall generate torque as a function of RPM as shown in Table 1. */ + subject generateTorque: GenerateTorque; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/32.Requirements/RequirementGroups.sysml b/test/SysMLModels/OMG/training/32.Requirements/RequirementGroups.sysml new file mode 100644 index 00000000..bafb9c8e --- /dev/null +++ b/test/SysMLModels/OMG/training/32.Requirements/RequirementGroups.sysml @@ -0,0 +1,33 @@ +package 'Requirement Groups' { + private import 'Requirement Definitions'::*; + private import 'Requirement Usages'::*; + + part def Engine { + port clutchPort: ClutchPort; + perform action generateTorque: GenerateTorque; + } + + requirement vehicleSpecification { + doc /* Overall vehicle requirements group */ + + subject vehicle : Vehicle; + + require fullVehicleMassLimit; + require emptyVehicleMassLimit; + } + + requirement engineSpecification { + doc /* Engine power requirements group */ + + subject engine : Engine; + + requirement drivePowerInterface : DrivePowerInterface { + subject = engine.clutchPort; + } + + requirement torqueGeneration : TorqueGeneration { + subject = engine.generateTorque; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/32.Requirements/RequirementSatisfaction.sysml b/test/SysMLModels/OMG/training/32.Requirements/RequirementSatisfaction.sysml new file mode 100644 index 00000000..aa9836c2 --- /dev/null +++ b/test/SysMLModels/OMG/training/32.Requirements/RequirementSatisfaction.sysml @@ -0,0 +1,27 @@ +package 'Requirement Satisfaction' { + private import 'Requirement Definitions'::*; + private import 'Requirement Groups'::*; + + action 'provide power' { + action 'generate torque' { } + } + + part vehicle_c1 : Vehicle { + perform 'provide power'; + + part engine_v1: Engine { + port :>> clutchPort; + perform 'provide power'.'generate torque' :>> generateTorque; + } + } + + part 'Vehicle c1 Design Context' { + + ref vehicle_design :> vehicle_c1; + + satisfy vehicleSpecification by vehicle_design; + satisfy engineSpecification by vehicle_design.engine_v1; + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/32.Requirements/RequirementUsages.sysml b/test/SysMLModels/OMG/training/32.Requirements/RequirementUsages.sysml new file mode 100644 index 00000000..20be3d47 --- /dev/null +++ b/test/SysMLModels/OMG/training/32.Requirements/RequirementUsages.sysml @@ -0,0 +1,25 @@ +package 'Requirement Usages' { + private import SI::*; + private import 'Requirement Definitions'::*; + + requirement <'1.1'> fullVehicleMassLimit : VehicleMassLimitationRequirement { + subject vehicle : Vehicle; + attribute :>> massReqd = 2000[kg]; + + assume constraint { + doc /* Full tank is full. */ + vehicle.fuelMass == vehicle.fuelFullMass + } + } + + requirement <'1.2'> emptyVehicleMassLimit : VehicleMassLimitationRequirement { + subject vehicle : Vehicle; + attribute :>> massReqd = 1500[kg]; + + assume constraint { + doc /* Full tank is empty. */ + vehicle.fuelMass == 0[kg] + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseDefinitionExample.sysml b/test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseDefinitionExample.sysml new file mode 100644 index 00000000..60eddb7a --- /dev/null +++ b/test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseDefinitionExample.sysml @@ -0,0 +1,86 @@ +package 'Analysis Case Definition Example' { + private import ScalarValues::Real; + private import 'Calculation Definitions'::*; + private import 'Analytical Constraints'::*; + private import USCustomaryUnits::*; + private import SequenceFunctions::size; + private import Quantities::ScalarQuantityValue; + private import ControlFunctions::*; + private import ScalarValues::Positive; + + attribute def DistancePerVolumeValue :> ScalarQuantityValue; + + part def Vehicle { + attribute mass : MassValue; + attribute cargoMass : MassValue; + + attribute wheelDiameter : LengthValue; + attribute driveTrainEfficiency : Real; + + attribute fuelEconomy_city : DistancePerVolumeValue; + attribute fuelEconomy_highway : DistancePerVolumeValue; + } + + attribute def WayPoint { + time : TimeValue; + position : LengthValue; + speed : SpeedValue; + } + + analysis def FuelEconomyAnalysis { + subject vehicle : Vehicle; + objective fuelEconomyAnalysisObjective { + /* + * The objective of this analysis is to determine whether the + * subject vehicle can satisfy the fuel economy requirement. + */ + + assume constraint { + vehicle.wheelDiameter == 33 ['in'] & + vehicle.driveTrainEfficiency == 0.4 + } + + require constraint { + fuelEconomyResult > 30 [mi / gal] + } + } + + in attribute scenario : WayPoint[*]; + + action solveForPower { + out power : PowerValue[*]; + out acceleration : AccelerationValue[*]; + + /* + * Solve for the required engine power as a function of time + * to support the scenario. + */ + assert constraint { + (1..size(scenario)-1)->forAll {in i: Positive; + StraightLineDynamicsEquations ( + power#(i), + vehicle.mass, + scenario.time#(i+1) - scenario.time#(i), + scenario.position#(i), + scenario.speed#(i), + scenario.position#(i+1), + scenario.speed#(i+1), + acceleration#(i+1) + ) + } + } + } + + then action solveForFuelConsumption { + in power : PowerValue[*] = solveForPower.power; + out fuelEconomy : DistancePerVolumeValue; + + /* + * Solve the engine equations to determine how much fuel is + * consumed. + */ + } + + return fuelEconomyResult : DistancePerVolumeValue = solveForFuelConsumption.fuelEconomy; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseUsageExample.sysml b/test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseUsageExample.sysml new file mode 100644 index 00000000..062a6e06 --- /dev/null +++ b/test/SysMLModels/OMG/training/33.Analysis/AnalysisCaseUsageExample.sysml @@ -0,0 +1,33 @@ +package 'Analysis Case Usage Example' { + private import 'Analysis Case Definition Example'::*; + + part vehicleFuelEconomyAnalysisContext { + requirement vehicleFuelEconomyRequirements { + subject vehicle : Vehicle; + // ... + } + + attribute cityScenario : WayPoint[*] = ( //* ... */ ); + attribute highwayScenario : WayPoint[*] = ( //* ... */ ); + + analysis cityAnalysis : FuelEconomyAnalysis { + subject vehicle = vehicle_c1; + in scenario = cityScenario; + } + + analysis highwayAnalysis : FuelEconomyAnalysis { + subject vehicle = vehicle_c1; + in scenario = highwayScenario; + } + + part vehicle_c1 : Vehicle { + // ... + + attribute :>> fuelEconomy_city = cityAnalysis.fuelEconomyResult; + attribute :>> fuelEconomy_highway = highwayAnalysis.fuelEconomyResult; + } + + satisfy vehicleFuelEconomyRequirements by vehicle_c1; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/33.Analysis/TradeStudyAnalysisExample.sysml b/test/SysMLModels/OMG/training/33.Analysis/TradeStudyAnalysisExample.sysml new file mode 100644 index 00000000..62c91e74 --- /dev/null +++ b/test/SysMLModels/OMG/training/33.Analysis/TradeStudyAnalysisExample.sysml @@ -0,0 +1,43 @@ +package 'Trade Study Analysis Example' { + private import ScalarValues::Real; + private import TradeStudies::*; + + part def Engine; + part engine4cyl : Engine; + part engine6cyl : Engine; + + calc def PowerRollup { in engine : Engine; return : ISQ::PowerValue; } + calc def MassRollup { in engine : Engine; return : ISQ::MassValue; } + calc def EfficiencyRollup { in engine : Engine; return : Real; } + calc def CostRollup { in engine : Engine; return : Real; } + + calc def EngineEvaluation { + in power : ISQ::PowerValue; + in mass : ISQ::MassValue; + in efficiency : Real; + in cost : Real; + return evaluation : Real; + // Compute evaluation... + } + + analysis engineTradeStudy : TradeStudy { + subject : Engine = (engine4cyl, engine6cyl); + objective : MaximizeObjective; + + calc :>> evaluationFunction { + in part anEngine :>> alternative : Engine; + + calc powerRollup: PowerRollup { in engine = anEngine; return power; } + calc massRollup: MassRollup { in engine = anEngine; return mass; } + calc efficiencyRollup: EfficiencyRollup { in engine = anEngine; return efficiency; } + calc costRollup: CostRollup { in engine = anEngine; return cost; } + + return :>> result : Real = EngineEvaluation( + powerRollup.power, massRollup.mass, efficiencyRollup.efficiency, costRollup.cost + ); + } + + return part :>> selectedAlternative : Engine; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/34.Verification/VerificationCaseDefinitionExample.sysml b/test/SysMLModels/OMG/training/34.Verification/VerificationCaseDefinitionExample.sysml new file mode 100644 index 00000000..105a231a --- /dev/null +++ b/test/SysMLModels/OMG/training/34.Verification/VerificationCaseDefinitionExample.sysml @@ -0,0 +1,47 @@ +package 'Verification Case Definition Example' { + + part def Vehicle { + attribute mass :> ISQ::mass; + } + + requirement vehicleMassRequirement { + subject vehicle : Vehicle; + in massActual :> ISQ::mass; + doc /* The vehicle mass shall be less than or equal to 2500 kg. */ + + require constraint { + massActual == vehicle.mass and + massActual <= 2500[SI::kg] + } + } + + verification def VehicleMassTest { + private import VerificationCases::*; + + subject testVehicle : Vehicle; + objective vehicleMassVerificationObjective { + // The subject of the verify is automatically bound to 'testVehicle' here. + verify vehicleMassRequirement; + } + + action collectData { + in part testVehicle : Vehicle = VehicleMassTest::testVehicle; + out massMeasured :> ISQ::mass; + } + + action processData { + in massMeasured :> ISQ::mass = collectData.massMeasured; + out massProcessed :> ISQ::mass; + } + + action evaluateData { + in massProcessed :> ISQ::mass = processData.massProcessed; + out verdict : VerdictKind = + // Check that 'testVehicle' statisfies 'vehicleMassRequirement' if its mass equals 'massProcessed'. + PassIf(vehicleMassRequirement(vehicle = testVehicle, massActual = massProcessed)); + } + + return verdict : VerdictKind = evaluateData.verdict; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/34.Verification/VerificationCaseUsageExample.sysml b/test/SysMLModels/OMG/training/34.Verification/VerificationCaseUsageExample.sysml new file mode 100644 index 00000000..8f439879 --- /dev/null +++ b/test/SysMLModels/OMG/training/34.Verification/VerificationCaseUsageExample.sysml @@ -0,0 +1,52 @@ +package 'Verification Case Usage Example' { + private import 'Verification Case Definition Example'::*; + + part def MassVerificationSystem; + part def Scale; + + part vehicleTestConfig : Vehicle { + // ... + } + + verification vehicleMassTest : VehicleMassTest { + subject testVehicle :> vehicleTestConfig; + } + + part massVerificationSystem : MassVerificationSystem { + perform vehicleMassTest; + + part scale : Scale { + perform vehicleMassTest.collectData { + in part :>> testVehicle; + + // In reality, this would be some more involved process. + measurement = testVehicle.mass; + + out :>> massMeasured = measurement; + } + } + } + + individual def TestSystem :> MassVerificationSystem; + + individual def TestVehicle1 :> Vehicle; + individual def TestVehicle2 :> Vehicle; + + individual testSystem : TestSystem :> massVerificationSystem { + timeslice test1 { + perform action :>> vehicleMassTest { + in individual :>> testVehicle : TestVehicle1 { + :>> mass = 2500[SI::kg]; + } + } + } + + then timeslice test2 { + perform action :>> vehicleMassTest { + in individual :>> testVehicle : TestVehicle2 { + :>> mass = 3000[SI::kg]; + } + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/35.UseCases/UseCaseDefinitionExample.sysml b/test/SysMLModels/OMG/training/35.UseCases/UseCaseDefinitionExample.sysml new file mode 100644 index 00000000..785e6fbb --- /dev/null +++ b/test/SysMLModels/OMG/training/35.UseCases/UseCaseDefinitionExample.sysml @@ -0,0 +1,34 @@ +package 'Use Case Definition Example' { + + part def Vehicle; + part def Person; + part def Environment; + part def 'Fuel Station'; + + use case def 'Provide Transportation' { + subject vehicle : Vehicle; + + actor driver : Person; + actor passengers : Person[0..4]; + actor environment : Environment; + + objective { + doc + /* Transport driver and passengers from starting location + * to ending location. + */ + } + } + + use case def 'Enter Vehicle' { + subject vehicle : Vehicle; + actor driver : Person; + actor passengers : Person[0..4]; + } + + use case def 'Exit Vehicle' { + subject vehicle : Vehicle; + actor driver : Person; + actor passengers : Person[0..4]; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/35.UseCases/UseCaseUsageExample.sysml b/test/SysMLModels/OMG/training/35.UseCases/UseCaseUsageExample.sysml new file mode 100644 index 00000000..19b07dd7 --- /dev/null +++ b/test/SysMLModels/OMG/training/35.UseCases/UseCaseUsageExample.sysml @@ -0,0 +1,43 @@ +package 'Use Case Usage Example' { + + private import 'Use Case Definition Example'::*; + + part def 'Fuel Station'; + + use case 'provide transportation' : 'Provide Transportation' { + subject vehicle; + + first start; + + then include use case 'enter vehicle' : 'Enter Vehicle' { + subject vehicle; + actor driver = 'provide transportation'::driver; + actor passengers = 'provide transportation'::passengers; + } + + then use case 'drive vehicle' { + subject vehicle; + actor driver = 'provide transportation'::driver; + actor environment = 'provide transportation'::environment; + + include 'add fuel'[0..*] { + subject vehicle; + actor fueler = driver; + } + } + + then include use case 'exit vehicle' : 'Exit Vehicle' { + subject vehicle; + actor driver = 'provide transportation'::driver; + actor passengers = 'provide transportation'::passengers; + } + + then done; + } + + use case 'add fuel' { + subject vehicle : Vehicle; + actor fueler : Person; + actor 'fuel station' : 'Fuel Station'; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/36.Variability/VariationConfiguration.sysml b/test/SysMLModels/OMG/training/36.Variability/VariationConfiguration.sysml new file mode 100644 index 00000000..34e688f8 --- /dev/null +++ b/test/SysMLModels/OMG/training/36.Variability/VariationConfiguration.sysml @@ -0,0 +1,14 @@ +package 'Variation Configuration' { + private import 'Variation Usages'::*; + + part vehicle4Cyl :> vehicleFamily { + part redefines engine = engine::'4cylEngine'; + part redefines transmission = transmission::manualTransmission; + } + + part vehicle6Cyl :> vehicleFamily { + part redefines engine = engine::'6cylEngine'; + part redefines transmission = transmission::manualTransmission; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/36.Variability/VariationDefinitions.sysml b/test/SysMLModels/OMG/training/36.Variability/VariationDefinitions.sysml new file mode 100644 index 00000000..6cfed57e --- /dev/null +++ b/test/SysMLModels/OMG/training/36.Variability/VariationDefinitions.sysml @@ -0,0 +1,35 @@ +package 'Variation Definitions' { + private import ScalarValues::Real; + private import SI::mm; + + attribute def Diameter :> ISQ::LengthValue; + + part def Cylinder { + attribute diameter : Diameter[1]; + } + + part def Engine { + part cylinder : Cylinder[2..*]; + } + + part '4cylEngine' : Engine { + part redefines cylinder[4]; + } + + part '6cylEngine' : Engine { + part redefines cylinder[6]; + } + + // Variability model + + variation attribute def DiameterChoices :> Diameter { + variant attribute diameterSmall = 70[mm]; + variant attribute diameterLarge = 100[mm]; + } + + variation part def EngineChoices :> Engine { + variant '4cylEngine'; + variant '6cylEngine'; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/36.Variability/VariationUsages.sysml b/test/SysMLModels/OMG/training/36.Variability/VariationUsages.sysml new file mode 100644 index 00000000..96b42274 --- /dev/null +++ b/test/SysMLModels/OMG/training/36.Variability/VariationUsages.sysml @@ -0,0 +1,25 @@ +package 'Variation Usages' { + private import 'Variation Definitions'::*; + + part def Vehicle; + part def Transmission; + part manualTransmission; + part automaticTransmission; + + abstract part vehicleFamily : Vehicle { + part engine : EngineChoices[1]; + + variation part transmission : Transmission[1] { + variant manualTransmission; + variant automaticTransmission; + } + + assert constraint { + (engine == engine::'4cylEngine' and + transmission == transmission::manualTransmission) xor + (engine == engine::'6cylEngine' and + transmission == transmission::automaticTransmission) + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/37.Dependencies/DependencyExample.sysml b/test/SysMLModels/OMG/training/37.Dependencies/DependencyExample.sysml new file mode 100644 index 00000000..32a93d1a --- /dev/null +++ b/test/SysMLModels/OMG/training/37.Dependencies/DependencyExample.sysml @@ -0,0 +1,27 @@ +package 'Dependency Example' { + + part 'System Assembly' { + part 'Computer Subsystem' { + // ... + } + + part 'Storage Subsystem' { + // ... + } + } + + package 'Software Design' { + item def MessageSchema { + // ... + } + item def DataSchema { + // ... + } + } + + dependency from 'System Assembly'::'Computer Subsystem' to 'Software Design'; + + dependency Schemata + from 'System Assembly'::'Storage Subsystem' + to 'Software Design'::MessageSchema, 'Software Design'::DataSchema; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/38.Allocation/AllocationDefinitionExample.sysml b/test/SysMLModels/OMG/training/38.Allocation/AllocationDefinitionExample.sysml new file mode 100644 index 00000000..b10344f5 --- /dev/null +++ b/test/SysMLModels/OMG/training/38.Allocation/AllocationDefinitionExample.sysml @@ -0,0 +1,38 @@ +package 'Allocation Definition Example' { + package LogicalModel { + action def ProvidePower; + action def GenerateTorque; + + part def LogicalElement; + part def TorqueGenerator :> LogicalElement; + + action providePower : ProvidePower { + action generateTorque : GenerateTorque; + } + + part torqueGenerator : TorqueGenerator { + perform providePower.generateTorque; + } + + } + + package PhysicalModel { + private import LogicalModel::*; + + part def PhysicalElement; + part def PowerTrain :> PhysicalElement; + + part powerTrain : PowerTrain { + part engine { + perform providePower.generateTorque; + } + } + + allocation def LogicalToPhysical { + end logical : LogicalElement; + end physical : PhysicalElement; + } + + allocation torqueGenAlloc : LogicalToPhysical allocate torqueGenerator to powerTrain; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/38.Allocation/AllocationUsageExample.sysml b/test/SysMLModels/OMG/training/38.Allocation/AllocationUsageExample.sysml new file mode 100644 index 00000000..4f44d44c --- /dev/null +++ b/test/SysMLModels/OMG/training/38.Allocation/AllocationUsageExample.sysml @@ -0,0 +1,34 @@ +package 'Allocation Usage Example' { + package LogicalModel { + action def ProvidePower; + action def GenerateTorque; + + part def TorqueGenerator; + + action providePower : ProvidePower { + action generateTorque : GenerateTorque; + } + + part torqueGenerator : TorqueGenerator { + perform providePower.generateTorque; + } + } + + package PhysicalModel { + private import LogicalModel::*; + + part def PowerTrain; + part def Engine; + + part powerTrain : PowerTrain { + part engine : Engine { + perform providePower.generateTorque; + } + } + + allocate torqueGenerator to powerTrain { + allocate torqueGenerator.generateTorque to powerTrain.engine.generateTorque; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/39.Metadata/MetadataExample-1.sysml b/test/SysMLModels/OMG/training/39.Metadata/MetadataExample-1.sysml new file mode 100644 index 00000000..f89f23bd --- /dev/null +++ b/test/SysMLModels/OMG/training/39.Metadata/MetadataExample-1.sysml @@ -0,0 +1,32 @@ +package 'Metadata Example-1' { + + metadata def SafetyFeature; + metadata def SecurityFeature { + :> annotatedElement : SysML::PartDefinition; + :> annotatedElement : SysML::PartUsage; + } + + metadata SafetyFeature about + vehicle::interior::seatBelt, + vehicle::interior::driverAirBag, + vehicle::bodyAssy::bumper; + + metadata SecurityFeature about + vehicle::interior::alarm, + vehicle::bodyAssy::keylessEntry; + + part vehicle { + part interior { + part alarm; + part seatBelt[2]; + part frontSeat[2]; + part driverAirBag; + } + part bodyAssy { + part body; + part bumper; + part keylessEntry; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/39.Metadata/MetadataExample-2.sysml b/test/SysMLModels/OMG/training/39.Metadata/MetadataExample-2.sysml new file mode 100644 index 00000000..842acb3f --- /dev/null +++ b/test/SysMLModels/OMG/training/39.Metadata/MetadataExample-2.sysml @@ -0,0 +1,20 @@ +package 'Metadata Example-2' { + + action computeDynamics { + private import AnalysisTooling::*; + + metadata ToolExecution { + toolName = "ModelCenter"; + uri = "aserv://localhost/Vehicle/Equation1"; + } + + in dt : ISQ::TimeValue { @ToolVariable { name = "deltaT"; } } + in a : ISQ::AccelerationValue { @ToolVariable { name = "mass"; } } + in v_in : ISQ::SpeedValue { @ToolVariable { name = "v0"; } } + in x_in : ISQ::LengthValue { @ToolVariable { name = "x0"; } } + + out v_out : ISQ::SpeedValue { @ToolVariable { name = "v"; } } + out x_out : ISQ::LengthValue { @ToolVariable { name = "x"; } } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/40.Filtering/FilteringExample-1.sysml b/test/SysMLModels/OMG/training/40.Filtering/FilteringExample-1.sysml new file mode 100644 index 00000000..34b1f36f --- /dev/null +++ b/test/SysMLModels/OMG/training/40.Filtering/FilteringExample-1.sysml @@ -0,0 +1,37 @@ +package 'Filtering Example-1' { + private import ScalarValues::Boolean; + + metadata def Safety { + attribute isMandatory : Boolean; + } + + part vehicle { + part interior { + part alarm; + part seatBelt[2] {@Safety{isMandatory = true;}} + part frontSeat[2]; + part driverAirBag {@Safety{isMandatory = false;}} + } + part bodyAssy { + part body; + part bumper {@Safety{isMandatory = true;}} + part keylessEntry; + } + part wheelAssy { + part wheel[2]; + part antilockBrakes[2] {@Safety{isMandatory = false;}} + } + } + + package 'Safety Features' { + /* Parts that contribute to safety. */ + public import vehicle::**; + filter @Safety; + } + + package 'Mandatory Safety Features' { + /* Parts that contribute to safety AND are mandatory. */ + public import vehicle::**; + filter @Safety and (as Safety).isMandatory; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/40.Filtering/FilteringExample-2.sysml b/test/SysMLModels/OMG/training/40.Filtering/FilteringExample-2.sysml new file mode 100644 index 00000000..08f2d8d5 --- /dev/null +++ b/test/SysMLModels/OMG/training/40.Filtering/FilteringExample-2.sysml @@ -0,0 +1,35 @@ +package 'Filtering Example-2' { + private import ScalarValues::Boolean; + + metadata def Safety { + attribute isMandatory : Boolean; + } + + part vehicle { + part interior { + part alarm; + part seatBelt[2] {@Safety{isMandatory = true;}} + part frontSeat[2]; + part driverAirBag {@Safety{isMandatory = false;}} + } + part bodyAssy { + part body; + part bumper {@Safety{isMandatory = true;}} + part keylessEntry; + } + part wheelAssy { + part wheel[2]; + part antilockBrakes[2] {@Safety{isMandatory = false;}} + } + } + + package 'Safety Features' { + /* Parts that contribute to safety. */ + public import vehicle::**[@Safety]; + } + + package 'Mandatory Safety Features' { + /* Parts that contribute to safety AND are mandatory. */ + public import vehicle::**[@Safety and (as Safety).isMandatory]; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/41.LanguageExtension/ModelLibraryExample.sysml b/test/SysMLModels/OMG/training/41.LanguageExtension/ModelLibraryExample.sysml new file mode 100644 index 00000000..1c7e841f --- /dev/null +++ b/test/SysMLModels/OMG/training/41.LanguageExtension/ModelLibraryExample.sysml @@ -0,0 +1,35 @@ +library package 'Model Library Example' { + private import ScalarValues::Real; + private import RiskMetadata::Level; + + abstract occurrence def Situation; + + abstract occurrence situations : Situation[*] nonunique; + + abstract occurrence def Cause { + attribute probability : Real; + } + + abstract occurrence causes : Cause[*] nonunique :> situations; + + abstract occurrence def Failure { + attribute severity : Level; + } + + abstract occurrence failures : Failure[*] nonunique :> situations; + + abstract connection def Causation :> Occurrences::HappensBefore { + end [*] ref cause : Situation; + end [*] ref effect : Situation; + } + + abstract connection causations : Causation[*] nonunique; + + item def Scenario { + occurrence :>> situations; + occurrence :>> causes :> situations; + occurrence :>> failures :> situations; + } + + item scenarios : Scenario[*] nonunique; +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/41.LanguageExtension/SemanticMetadataExample.sysml b/test/SysMLModels/OMG/training/41.LanguageExtension/SemanticMetadataExample.sysml new file mode 100644 index 00000000..863b7d22 --- /dev/null +++ b/test/SysMLModels/OMG/training/41.LanguageExtension/SemanticMetadataExample.sysml @@ -0,0 +1,25 @@ +library package 'Semantic Metadata Example' { + private import 'Model Library Example'::*; + private import Metaobjects::SemanticMetadata; + + metadata def situation :> SemanticMetadata { + :>> baseType = situations meta SysML::Usage; + } + + metadata def cause :> SemanticMetadata { + :>> baseType = causes meta SysML::Usage; + } + + metadata def failure :> SemanticMetadata { + :>> baseType = failures meta SysML::Usage; + } + + metadata def causation :> SemanticMetadata { + :>> baseType = causations meta SysML::Usage; + } + + metadata def scenario :> SemanticMetadata { + :>> baseType = scenarios meta SysML::Usage; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/41.LanguageExtension/UserKeywordExample.sysml b/test/SysMLModels/OMG/training/41.LanguageExtension/UserKeywordExample.sysml new file mode 100644 index 00000000..b9f0af9d --- /dev/null +++ b/test/SysMLModels/OMG/training/41.LanguageExtension/UserKeywordExample.sysml @@ -0,0 +1,32 @@ +package 'User Keyword Example' { + private import ScalarValues::Real; + private import 'Semantic Metadata Example'::*; + private import RiskMetadata::LevelEnum; + + part def Device { + part battery { + attribute power : Real; + } + } + + #scenario def DeviceFailure { + ref device : Device; + attribute minPower : Real; + + #cause 'battery old' { + :>> probability = 0.01; + } + + #causation connect 'battery old' to 'power low'; + + #situation 'power low' { + constraint { device.battery.power < minPower } + } + + #causation connect 'power low' to 'device shutoff'; + + #failure 'device shutoff' { + :>> severity = LevelEnum::high; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/42.Views/ViewpointExample.sysml b/test/SysMLModels/OMG/training/42.Views/ViewpointExample.sysml new file mode 100644 index 00000000..b1091082 --- /dev/null +++ b/test/SysMLModels/OMG/training/42.Views/ViewpointExample.sysml @@ -0,0 +1,38 @@ +package 'Viewpoint Example' { + part def 'Systems Engineer'; + part def 'IV&V'; + + concern 'system breakdown' { + doc /* + * To ensure that a system covers all its required capabilities, + * it is necessary to understand how it is broken down into + * subsystems and components that provide those capabilities. + */ + subject; + stakeholder se : 'Systems Engineer'; + stakeholder ivv : 'IV&V'; + } + + concern 'modularity' { + doc /* + * There should be well defined interfaces between the parts of + * a system that allow each part to be understood individually, + * as well as being part of the whole system. + */ + subject; + stakeholder se : 'Systems Engineer'; + } + + viewpoint 'system structure perspective' { + frame 'system breakdown'; + frame 'modularity'; + + require constraint { + doc /* + * A system structure view shall show the hierarchical + * part decomposition of a system, starting with a + * specified root part. + */ + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/training/42.Views/ViewsExample.sysml b/test/SysMLModels/OMG/training/42.Views/ViewsExample.sysml new file mode 100644 index 00000000..c13cb1d7 --- /dev/null +++ b/test/SysMLModels/OMG/training/42.Views/ViewsExample.sysml @@ -0,0 +1,35 @@ +package 'Views Example' { + private import Views::*; + private import 'Viewpoint Example'::*; + private import 'Filtering Example-2'::*; + + view def 'Part Structure View' { + satisfy 'system structure perspective'; + filter @SysML::PartUsage; + } + + view 'vehicle structure view' : 'Part Structure View' { + expose vehicle::**; + render asTreeDiagram; + } + + rendering asTextualNotationTable :> asElementTable { + view :>> columnView[1] { + render asTextualNotation; + } + } + + view 'vehicle tabular views' { + + view 'safety features view' : 'Part Structure View' { + expose vehicle::**[@Safety]; + render asTextualNotationTable; + } + + view 'non-safety features view' : 'Part Structure View' { + expose vehicle::**[not (@Safety)]; + render asTextualNotationTable; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/01-PartsTree/1a-PartsTree.sysml b/test/SysMLModels/OMG/validation/01-PartsTree/1a-PartsTree.sysml new file mode 100644 index 00000000..dd5bd686 --- /dev/null +++ b/test/SysMLModels/OMG/validation/01-PartsTree/1a-PartsTree.sysml @@ -0,0 +1,125 @@ +package '1a-Parts Tree' { + private import SI::kg; + + package Definitions { + part def Vehicle { + attribute mass :> ISQ::mass { + doc + /* + * The 'mass' attribute property is declared here to be a + * specialization (subset) of the general 'mass' quantity + * from the 'ISQ' (International System of Quantities) + * library model. + */ + } + } + part def AxleAssembly; + part def Axle { + attribute mass :> ISQ::mass; + } + part def FrontAxle :> Axle { + attribute steeringAngle: ScalarValues::Real; + } + part def Wheel; + } + + package Usages { + private import Definitions::* { + /* + * A "private" private import makes the imported names private to the + * imported package. + */ + } + + part vehicle1: Vehicle { + /* + * 'vehicle1' is a package-owned part of type Vehicle. + */ + + attribute mass redefines Vehicle::mass = 1750 [kg] { + /* + * This redefines the 'mass' attribute property from 'Vehicle' to + * give it a fixed attribute. + */ + } + + part frontAxleAssembly: AxleAssembly { + /* + * 'frontAxleAssembly' is a nested part of part 'vehicle1'. + * It is a composite part of the containing part. + * + * (And similarly for 'rearAxleAssembly'.) + */ + + part frontAxle: Axle; + + part frontWheel: Wheel[2] ordered { + /* + * 'frontWheel' is a nested part of type 'Wheel' with + * multiplicity "2". This means that this axle assembly + * must have exactly two wheels. However, there is still + * only one 'frontWheel' part. The part is "ordered", + * so that the first wheel can be distinguished from the + * second. + */ + } + } + + part rearAxleAssembly: AxleAssembly { + part rearAxle: Axle; + part rearWheel: Wheel[2] ordered; + } + + } + + part vehicle1_c1: Vehicle { + /* + * 'vehicle1_c1' is a modified copy of 'vehicle1'. There is no + * connection between this copy and the original version in the + * model. + */ + + attribute mass redefines Vehicle::mass = 2000 [kg] { + /* + * The mass attribute has been modified. + */ + } + + part frontAxleAssembly: AxleAssembly { + + part frontAxle: FrontAxle { + /* + * The part 'frontAxle' has been modified to have type 'FrontAxle'. + */ + } + + part frontWheel: Wheel[2] ordered { + /* + * The parts 'frontWheel_1' and 'frontWheel_2' have been added + * as subsets of 'frontWheel'. These are separate parts from + * 'frontWheel', but essentially provide alternate names for + * each of the two wheels, as given by their defining expressions. + */ + } + part frontWheel_1 subsets frontWheel = frontWheel#(1); + part frontWheel_2 subsets frontWheel = frontWheel#(2); + } + + part rearAxleAssembly: AxleAssembly { + /* + * 'rearAxleAssembly' has also been modified to add subsetting parts + * for 'rearWheel'. + */ + + part rearAxle: Axle; + + part rearWheel: Wheel[2] ordered; + part rearWheel_1 subsets rearWheel = rearWheel#(1); + part rearWheel_2 subsets rearWheel = rearWheel#(2); + } + + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/01-PartsTree/1c-PartsTreeRedefinition.sysml b/test/SysMLModels/OMG/validation/01-PartsTree/1c-PartsTreeRedefinition.sysml new file mode 100644 index 00000000..c9c35f72 --- /dev/null +++ b/test/SysMLModels/OMG/validation/01-PartsTree/1c-PartsTreeRedefinition.sysml @@ -0,0 +1,86 @@ +package '1c-Parts Tree Redefinition' { + private import SI::kg; + + package Definitions { + part def Vehicle { + attribute mass :> ISQ::mass; + } + part def AxleAssembly; + part def Axle { + attribute mass :> ISQ::mass; + } + part def FrontAxle :> Axle { + attribute steeringAngle: ScalarValues::Real; + } + part def Wheel; + } + + package Usages { + private import Definitions::*; + + part vehicle1: Vehicle { + attribute mass redefines Vehicle::mass default = 1750 [kg] { + doc + /* + * The mass attribute is redefined to give it a default value. + */ + } + + part frontAxleAssembly: AxleAssembly { + part frontAxle: Axle; + part frontWheel: Wheel[2] ordered; + } + part rearAxleAssembly: AxleAssembly { + part rearAxle: Axle; + part rearWheel: Wheel[2] ordered; + } + } + + part vehicle1_c1 :> vehicle1 { + /* + * 'vehicle1_c1' is a specialization of 'vehicle1' (technically + * a subset). It inherits all the parts of 'vehicle1' and + * only needs to specify additional or redefined parts. + */ + + attribute mass redefines vehicle1::mass = 2000 [kg] { + /* + * The mass is further redefined to override the default value + * with a bound value for 'vehicle_c1'. + */ + } + + part frontAxleAssembly_c1 redefines frontAxleAssembly { + part frontAxle_c1: FrontAxle redefines frontAxle { + /* + * 'frontAxle_c1' redefines 'frontAxleAssembly'::'frontAxle' + * to give it a new name and the specialized type + * 'FrontAxle'. + */ + } + + /* + * 'frontWheel' is inherited from 'vehicle1'::'frontAxleAssembly', + * allowing it to be used in the following part declarations. + */ + + part frontWheel_1 subsets frontWheel = frontWheel#(1); + part frontWheel_2 subsets frontWheel = frontWheel#(2); + } + + part rearAxleAssembly_c1 redefines rearAxleAssembly { + part rearAxle_c1 redefines rearAxle { + /* + * 'rearAxle_c1' redefines 'rearAxleAssembly'::'rearAxle' + * to give it a new name. It inherits the type 'Axle' + * from the redefined part. + */ + } + + part rearWheel_1 subsets rearWheel = rearWheel#(1); + part rearWheel_2 subsets rearWheel = rearWheel#(2); + } + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/01-PartsTree/1d-PartsTreeWithReference.sysml b/test/SysMLModels/OMG/validation/01-PartsTree/1d-PartsTreeWithReference.sysml new file mode 100644 index 00000000..8eca0e37 --- /dev/null +++ b/test/SysMLModels/OMG/validation/01-PartsTree/1d-PartsTreeWithReference.sysml @@ -0,0 +1,51 @@ +package '1d-Parts Tree with Reference' { + + package Definitions { + part def Vehicle; + part def Trailer; + part def TrailerHitch; + part def HitchBall; + part def TrailerCoupler; + } + + package Usages { + private import Definitions::*; + + part vehicle_trailer_system { + + part vehicle1_c1: Vehicle { + ref hitchBall : HitchBall { + /* + * 'vehicle1_c1'::'hitchBall' is a reference property that + * references a hitch ball that is not part of this vehicle. + * If 'vehicle1_c1' is removed or destroyed, this does not + * effect the hitchBall referenced here. + */ + } + } + + bind vehicle1_c1.hitchBall = trailerHitch.hitchBall { + /* + * This is a binding connector between the 'hitchBall' in 'vehicle1_c1' + * and the 'hitchBall' in 'trailerHitch'. + */ + } + + part trailerHitch: TrailerHitch { + part hitchBall: HitchBall; + part trailerCoupler: TrailerCoupler; + } + + part trailer1: Trailer { + ref trailerCoupler : TrailerCoupler = trailerHitch.trailerCoupler { + /* + * This is a shorthand for a binding connector between the + * 'trailerCoupler' here and the 'trailerCoupler' in 'trailerHitch'. + * The binding connector is now contained within the 'trailer1' + * part, though, rather than being at the system level. + */ + } + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/02-PartsInterconnection/2a-PartsInterconnection.sysml b/test/SysMLModels/OMG/validation/02-PartsInterconnection/2a-PartsInterconnection.sysml new file mode 100644 index 00000000..57538dc9 --- /dev/null +++ b/test/SysMLModels/OMG/validation/02-PartsInterconnection/2a-PartsInterconnection.sysml @@ -0,0 +1,206 @@ +package '2a-Parts Interconnection' { + public import Definitions::*; + public import Usages::*; + + package Definitions { + // Port Definitions + + port def FuelCmdPort; + + port def DrivePwrPort; + port def ClutchPort; + + port def ShaftPort_a; + port def ShaftPort_b; + port def ShaftPort_c; + port def ShaftPort_d; + + port def DiffPort; + port def AxlePort; + port def AxleToWheelPort; + port def WheelToAxlePort; + port def WheelToRoadPort; + + port def VehicleToRoadPort { + /* + * A port definition can have nested ports. + */ + + port wheelToRoadPort: WheelToRoadPort[2]; + } + + // Blocks + + part def VehicleA { + port fuelCmdPort: FuelCmdPort; + port vehicleToRoadPort: VehicleToRoadPort; + } + + part def AxleAssembly; + part def RearAxleAssembly :> AxleAssembly { + port shaftPort_d: ShaftPort_d; + } + + part def Axle; + part def RearAxle :> Axle; + + part def HalfAxle { + port axleToDiffPort: AxlePort; + port axleToWheelPort: AxleToWheelPort; + } + + part def Engine { + port fuelCmdPort: FuelCmdPort; + port drivePwrPort: DrivePwrPort; + } + + part def Transmission { + port clutchPort: ClutchPort; + port shaftPort_a: ShaftPort_a; + } + + part def Driveshaft { + port shaftPort_b: ShaftPort_b; + port shaftPort_c: ShaftPort_c; + } + + part def Differential { + /* + * Ports do not have to be defined on part defs. + * They can be added directly to their usages. + */ + } + part def Wheel; + + // Interface Definitions + + interface def EngineToTransmissionInterface { + /* + * The ends of an interface definition are always ports. + */ + + end drivePwrPort: DrivePwrPort; + end clutchPort: ClutchPort; + } + + interface def DriveshaftInterface { + end shaftPort_a: ShaftPort_a; + end shaftPort_d: ShaftPort_d; + + ref driveshaft: Driveshaft { + /* + * 'driveshaft' is a reference to the driveshaft that will + * act as the "interface medium" for this interface. + */ + } + + connect shaftPort_a to driveshaft.shaftPort_b { + /* + * The two ends of 'DriveShaftInterface' are always connected + * via the referenced 'driveshaft'. + */ + } + connect driveshaft.shaftPort_c to shaftPort_d; + } + + } + + package Usages { + + part vehicle1_c1: VehicleA { + + bind fuelCmdPort = engine.fuelCmdPort; + + part engine: Engine; + + interface :EngineToTransmissionInterface + connect engine.drivePwrPort to transmission.clutchPort { + /* + * A usage of an interface definition connects two ports relative to + * a containing context. + */ + } + + part transmission: Transmission; + + part driveshaft: Driveshaft { + /* + * This 'driveshaft' is the part of 'vehicle1_c1' that will act as the + * interface medium in the following 'DriveshaftInterface' usage. + */ + } + + interface :DriveshaftInterface + connect transmission.shaftPort_a to rearAxleAssembly.shaftPort_d { + ref :>> driveshaft = vehicle1_c1.driveshaft { + /* + * The reference property from 'DriveshaftInterface' is redefined + * in order to bind it to the appropriate part of 'vehicle1_c1'. + */ + } + } + + part rearAxleAssembly: RearAxleAssembly { + bind shaftPort_d = differential.shaftPort_d; + + part differential: Differential { + port shaftPort_d: ShaftPort_d { + /* + * If the part def has no ports, then they can be defined directly in + * a usage of the part def. + */ + } + port leftDiffPort: DiffPort; + port rightDiffPort: DiffPort; + } + + interface differential.leftDiffPort to rearAxle.leftHalfAxle.axleToDiffPort { + /* + * A connection can be to a port that is arbitrarily deeply nested, on either end. + */ + } + interface differential.rightDiffPort to rearAxle.rightHalfAxle.axleToDiffPort; + + part rearAxle: RearAxle { + part leftHalfAxle: HalfAxle; + part rightHalfAxle: HalfAxle; + } + + connect rearAxle.leftHalfAxle.axleToWheelPort to leftWheel.wheelToAxlePort; + connect rearAxle.rightHalfAxle.axleToWheelPort to rightWheel.wheelToAxlePort; + + part rearWheel: Wheel[2] ordered; + + /* 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) { + port wheelToAxlePort: WheelToAxlePort; + port wheelToRoadPort: WheelToRoadPort; + } + + part rightWheel :> rearWheel = rearWheel#(2) { + port wheelToAxlePort: WheelToAxlePort; + port wheelToRoadPort: WheelToRoadPort; + } + + } + + bind rearAxleAssembly.leftWheel.wheelToRoadPort = + vehicleToRoadPort.leftWheelToRoadPort; + + bind rearAxleAssembly.rightWheel.wheelToRoadPort = + vehicleToRoadPort.rightWheelToRoadPort; + + port vehicleToRoadPort redefines VehicleA::vehicleToRoadPort { + port leftWheelToRoadPort :> wheelToRoadPort = wheelToRoadPort#(1); + port rightWheelToRoadPort :> wheelToRoadPort = wheelToRoadPort#(2); + } + + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/02-PartsInterconnection/2c-PartsInterconnection-MultipleDecompositions.sysml b/test/SysMLModels/OMG/validation/02-PartsInterconnection/2c-PartsInterconnection-MultipleDecompositions.sysml new file mode 100644 index 00000000..0df216e1 --- /dev/null +++ b/test/SysMLModels/OMG/validation/02-PartsInterconnection/2c-PartsInterconnection-MultipleDecompositions.sysml @@ -0,0 +1,90 @@ +package '2c-Parts Interconnection-Multiple Decompositions' { + + part def A1; + + part def B11 { + port pe; + } + part def B12 { + port pf; + } + part def B21 { + port pg; + } + part def B22 { + port ph; + } + + part def C1 { + port pa; + port pb; + } + part def C2 { + port pc; + } + part def C3 { + port pd; + } + part def C4; + + part a11: A1 { + doc + /* + * Decomposition 1 - Subsystems b11, b12 + */ + + part b11: B11 { + part c1: C1; + part c2: C2; + + connect c1.pa to c2.pc; + + port :>> pe = c1.pb { + doc + /* + * This combines the definition of a port with a binding + * connector. (It is the same notation used to bind a + * attribute to a attribute property or a reference to a reference + * property.) + */ + } + } + + part b12: B12 { + part c3: C3; + part c4: C4; + + port :>> pf = c3.pd; + } + + connect b11.pe to b12.pf; + } + + part a12: A1 { + doc + /* + * Decomposition 2 - Assemblies b21, b22 + */ + + part b21: B21 { + /* + * The c-level entities are already composite parts within + * a11, so they cannot also be composite parts within a12. + */ + + ref c1: C1 = a11.b11.c1; + ref c3: C3 = a11.b12.c3; + + connect c1.pb to c3.pd; + + port :>> pg = c1.pa; + } + + part b22: B22 { + ref c2: C2 = a11.b11.c2; + ref c4: C4 = a11.b12.c4; + + port :>> ph = c2.pc; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-1.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-1.sysml new file mode 100644 index 00000000..093218f3 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-1.sysml @@ -0,0 +1,137 @@ +package '3a-Function-based Behavior-1' { + public import Definitions::*; + public import Usages::*; + + package Definitions { + alias Torque for ISQ::TorqueValue { + /* + * The 'TorqueValue' type is aliased as 'Torque'. + */ + } + + attribute def FuelCmd; + + /* + * There is no special construct for modeling "signals". Data to be + * transmitted asynchronously can simply be modeled using attribute defs. + */ + + attribute def EngineStart; + attribute def EngineOff; + + /* + * Black box definitions for actions include their inputs and outputs. + */ + + action def 'Generate Torque' { in fuelCmd: FuelCmd; out engineTorque: Torque; } + action def 'Amplify Torque' { in engineTorque: Torque; out transmissionTorque: Torque; } + action def 'Transfer Torque' { in transmissionTorque: Torque; out driveshaftTorque: Torque; } + action def 'Distribute Torque' { in driveShaftTorque: Torque; out wheelTorque1: Torque; out wheelTorque2: Torque; } + + action def 'Provide Power' { in fuelCmd: FuelCmd; out wheelTorque1: Torque; out wheelTorque2: Torque; } + + } + + package Usages { + + action 'provide power': 'Provide Power'{ + in fuelCmd: FuelCmd; + out wheelTorque1: Torque; + out wheelTorque2: Torque; + + // ITEM FLOW PART + + bind 'generate torque'.fuelCmd = fuelCmd { + /* + * This is a binding connector, just as was used to + * model delegation between ports. + */ + } + + action 'generate torque': 'Generate Torque' { + /* + * An action usage inherits parameters from its definition. + * They act as its "pins". + */ + } + + flow 'generate torque'.engineTorque + to 'amplify torque'.engineTorque { + /* + * A flow is a connection between two actions that streams items from + * an output parameter of one action to an input parameter of the other. + * Note that streaming is a property of the connection, not the + * actions or their parameters. + */ + } + + action 'amplify torque': 'Amplify Torque'; + + flow 'amplify torque'.transmissionTorque + to 'transfer torque'.transmissionTorque; + + action 'transfer torque': 'Transfer Torque'; + + flow 'transfer torque'.driveshaftTorque + to 'distribute torque'.driveShaftTorque; + + action 'distribute torque': 'Distribute Torque'; + + bind wheelTorque1 = 'distribute torque'.wheelTorque1; + bind wheelTorque2 = 'distribute torque'.wheelTorque2; + + // CONTROL FLOW PART + + first start then continue { + /* + * A first is an assertion that one thing must occur + * before another, acting like a "control flow". 'start' is + * the start snapshot of the action, which acts like an + * "initial node". + */ + } + + merge continue { + /* + * A merge node is necessary to prevent a loop of successions + * from being unsatisfiable. + */ + } + first continue then engineStarted; + + action engineStarted accept engineStart: EngineStart { + /* + * An accept action accepts an incoming transfer of some item + * from outside an action, in this case the "signal" 'EngineStart'. + * Note that 'engineStarted' is the name of the action, while + * 'engineStart' is the name of the received signal attribute. + */ + } + first engineStarted then engineStopped; + + action engineStopped accept engineOff: EngineOff; + first engineStopped then continue; + + /* + * These successions act to "enable" the torque-related actions. + * Each action on the right can only be performed following the + * completion of a performance of 'engineStarted'. + */ + first engineStarted then 'generate torque'; + first engineStarted then 'amplify torque'; + first engineStarted then 'transfer torque'; + first engineStarted then 'distribute torque'; + + /* + * These successions act to "disable" the torque-related actions. + * The performance of the actions on the left cannot continue + * once there is a performance of 'engineStopped'. + */ + first 'generate torque' then engineStopped; + first 'amplify torque' then engineStopped; + first 'transfer torque' then engineStopped; + first 'distribute torque' then engineStopped; + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-2.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-2.sysml new file mode 100644 index 00000000..2d56d905 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-2.sysml @@ -0,0 +1,85 @@ +package '3a-Function-based Behavior-2' { + public import Definitions::*; + public import Usages::*; + + package Definitions { + alias Torque for ISQ::TorqueValue; + + // ATTRIBUTE DEFINITIONS + + attribute def FuelCmd; + + attribute def EngineStart; + attribute def EngineOff; + + // ACTION DEFINITIONS + + action def 'Generate Torque' { in fuelCmd: FuelCmd; out engineTorque: Torque; } + action def 'Amplify Torque' { in engineTorque: Torque; out transmissionTorque: Torque; } + action def 'Transfer Torque' { in transmissionTorque: Torque; out driveshaftTorque: Torque; } + action def 'Distribute Torque' { in driveShaftTorque: Torque; out wheelTorque1: Torque; out wheelTorque2: Torque; } + + action def 'Provide Power' { in fuelCmd: FuelCmd; out wheelTorque1: Torque; out wheelTorque2: Torque; } + + } + + package Usages { + + action 'provide power': 'Provide Power'{ + in fuelCmd: FuelCmd; + out wheelTorque1: Torque; + out wheelTorque2: Torque; + + // ITEM FLOW PART + + action 'generate torque': 'Generate Torque'{ + /* + * The binding connector shorthand can be used on action parameters. + */ + in fuelCmd = 'provide power'::fuelCmd; + } + + flow 'generate torque'.engineTorque + to 'amplify torque'.engineTorque; + + action 'amplify torque': 'Amplify Torque'; + + flow 'amplify torque'.transmissionTorque + to 'transfer torque'.transmissionTorque; + + action 'transfer torque': 'Transfer Torque'; + + flow 'transfer torque'.driveshaftTorque + to 'distribute torque'.driveShaftTorque; + + action 'distribute torque': 'Distribute Torque'; + + // CONTROL FLOW PART + + /* + * The following uses a shorthand for a sequence of successions. + * The source of the first first is given by "first start", + * and the target of each succeeding first is indicated by + * using the "then" keyword. + */ + first start; + then merge continue; + then action engineStarted accept engineStart: EngineStart; + then action engineStopped accept engineOff: EngineOff; + then continue; + + /* Enable torque generation. */ + first engineStarted then 'generate torque'; + first engineStarted then 'amplify torque'; + first engineStarted then 'transfer torque'; + first engineStarted then 'distribute torque'; + + /* Disable torque generation. */ + first 'generate torque' then engineStopped; + first 'amplify torque' then engineStopped; + first 'transfer torque' then engineStopped; + first 'distribute torque' then engineStopped; + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-3.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-3.sysml new file mode 100644 index 00000000..6727e929 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3a-Function-basedBehavior-3.sysml @@ -0,0 +1,73 @@ +package '3a-Function-based Behavior-5' { + public import Definitions::*; + public import Usages::*; + + package Definitions { + alias Torque for ISQ::TorqueValue; + + // ATTRIBUTE DEFINITIONS + + attribute def FuelCmd; + + attribute def EngineStart; + attribute def EngineOff; + + // ACTION DEFINITIONS + + action def 'Generate Torque' { in fuelCmd: FuelCmd; out engineTorque: Torque; } + action def 'Amplify Torque' { in engineTorque: Torque; out transmissionTorque: Torque; } + action def 'Transfer Torque' { in transmissionTorque: Torque; out driveshaftTorque: Torque; } + action def 'Distribute Torque' { in driveShaftTorque: Torque; out wheelTorque1: Torque; out wheelTorque2: Torque; } + + action def 'Provide Power' { in fuelCmd: FuelCmd; out wheelTorque1: Torque; out wheelTorque2: Torque; } + + } + + package Usages { + + action 'provide power': 'Provide Power' { + // PARAMETERS + + in fuelCmd: FuelCmd; + out wheelTorque1: Torque; + out wheelTorque2: Torque; + + loop { + accept engineStart : EngineStart; + then action { + action 'generate torque': 'Generate Torque' { + in fuelCmd = 'provide power'::fuelCmd; + out engineTorque: Torque; + } + + flow 'generate torque'.engineTorque + to 'amplify torque'.engineTorque; + + action 'amplify torque': 'Amplify Torque' { + in engineTorque: Torque; + out transmissionTorque: Torque; + } + + flow 'amplify torque'.transmissionTorque + to 'transfer torque'.transmissionTorque; + + action 'transfer torque': 'Transfer Torque' { + in transmissionTorque: Torque; + out driveshaftTorque: Torque; + } + + flow 'transfer torque'.driveshaftTorque + to 'distribute torque'.driveshaftTorque; + + action 'distribute torque': 'Distribute Torque' { + in driveshaftTorque: Torque; + out wheelTorque1: Torque; + out wheelTorque2: Torque; + } + } + then action accept engineOff : EngineOff; + } + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-1.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-1.sysml new file mode 100644 index 00000000..06bce112 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-1.sysml @@ -0,0 +1,51 @@ +package '3c-Function-based Behavior-structure mod-1' { + + part def Vehicle; + part def VehicleFrame; + + part def HitchBall; + part def TrailerCoupler; + + part def Trailer; + part def TrailerFrame; + + connection def TrailerHitch { + end hitch : HitchBall; + end coupler : TrailerCoupler; + } + + part 'vehicle-trailer system' { + + part vehicle : Vehicle { + part vehicleFrame : VehicleFrame { + part hitch : HitchBall; + } + } + + connection trailerHitch : TrailerHitch[0..1] + connect vehicle.vehicleFrame.hitch to trailer.trailerFrame.coupler; + + part trailer : Trailer { + part trailerFrame : TrailerFrame { + part coupler : TrailerCoupler; + } + } + + action { + // Create a link and assign it as the TrailerHitch connection. + // Link participants are determined from inherited ends. + action 'connect trailer to vehicle' + assign 'vehicle-trailer system'.trailerHitch := new TrailerHitch(); + + // Destroy the link object. + then action 'destroy connection of trailer to vehicle' : + OccurrenceFunctions::destroy { + inout occ = 'vehicle-trailer system'.trailerHitch; + } + + // Remove the link from the TrailerHitch connection. + then action 'disconnect trailer from vehicle' + assign 'vehicle-trailer system'.trailerHitch := null; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-2.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-2.sysml new file mode 100644 index 00000000..f84b7ad4 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-2.sysml @@ -0,0 +1,49 @@ +package '3c-Function-based Behavior-structure mod-2' { + + part def Vehicle; + part def VehicleFrame; + + part def HitchBall; + part def TrailerCoupler; + + part def Trailer; + part def TrailerFrame; + + connection def TrailerHitch { + end hitch : HitchBall; + end coupler : TrailerCoupler; + } + + part 'vehicle-trailer system' { + + part vehicle : Vehicle { + part vehicleFrame : VehicleFrame { + part hitch : HitchBall; + } + } + + connection trailerHitch : TrailerHitch[0..1] + connect vehicle.vehicleFrame.hitch to trailer.trailerFrame.coupler; + + part trailer : Trailer { + part trailerFrame : TrailerFrame { + part coupler : TrailerCoupler; + } + } + + perform action { + action 'connect trailer to vehicle' { + // Assert that exactly one connection exists during the + // performance of this action. + abstract ref :>> trailerHitch[1]; + } + then action 'disconnect trailer from vehicle' { + // Assert that exactly no connection exists during the + // performance of this action. + abstract ref :>> trailerHitch[0]; + } + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-3.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-3.sysml new file mode 100644 index 00000000..4c123d49 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3c-Function-basedBehavior-structureMod-3.sysml @@ -0,0 +1,33 @@ +package '3c-Function-based Behavior-structure mod-3' { + + part def Vehicle; + part def VehicleFrame; + part def HitchBall; + part def Trailer; + part def TrailerFrame; + part def TrailerCoupler; + + part vehicle : Vehicle { + part vehicleFrame : VehicleFrame { + part hitch : HitchBall; + } + } + + part trailer : Trailer { + part trailerFrame : TrailerFrame { + part coupler : TrailerCoupler { + ref part hitch : HitchBall; + } + } + } + + action { + // Insert the vehicle HitchBall into the TrailerCoupler. + action 'connect trailer to vehicle' + assign trailer.trailerFrame.coupler.hitch := vehicle.vehicleFrame.hitch; + + // Remove the HitchBall from the TrailerCoupler. + then action 'disconnect trailer from vehicle' + assign trailer.trailerFrame.coupler.hitch := null; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3d-Function-basedBehavior-item.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3d-Function-basedBehavior-item.sysml new file mode 100644 index 00000000..e645edff --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3d-Function-basedBehavior-item.sysml @@ -0,0 +1,83 @@ +package '3d-Function-based Behavior-item' { + private import ScalarValues::Real; + public import Definitions::*; + public import Usages::*; + + package Definitions { + + item def Fuel; + + port def FuelPort { + out item fuel: Fuel; + } + + part def Pump { + port fuelInPort : ~FuelPort; + port fuelOutPort : FuelPort; + } + + part def StorageTank { + port fuelOutPort : FuelPort; + } + + part def FuelTank { + port fuelInPort : ~FuelPort; + } + + part def Vehicle { + port fuelInPort : ~FuelPort; + } + + action def PumpFuel { + in fuelIn : Fuel; + out fuelOut : Fuel; + } + + } + + package Usages { + + part context { + + /* Storage Element */ + part storageTank : StorageTank; + + flow of fuel : Fuel + from storageTank.fuelOutPort.fuel to pump.fuelInPort.fuel { + /* + * Note: Explicitly notating that the flow is "of fuel : Fuel" is optional. + */ + } + + part pump : Pump { + perform action pumpFuel : PumpFuel { + in fuelIn = fuelInPort.fuel; + out fuelOut = fuelOutPort.fuel; + } + } + + flow of fuel : Fuel + from pump.fuelOutPort.fuel to vehicle.fuelInPort.fuel; + + part vehicle : Vehicle { + flow fuelInPort.fuel to fuelTank.fuel { + /* + * Note: The semantics of flowing to a "stored item" is tentative. + */ + } + + /* Storage Element */ + part fuelTank : FuelTank { + attribute volumeMax : Real; + attribute fuelLevel : Real = fuel.volume / volumeMax; + + /* Stored Item */ + item fuel : Fuel { + attribute volume : Real; + /* isConserved = true */ + } + } + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3e-Function-basedBehavior-item.sysml b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3e-Function-basedBehavior-item.sysml new file mode 100644 index 00000000..c4f96820 --- /dev/null +++ b/test/SysMLModels/OMG/validation/03-Function-basedBehavior/3e-Function-basedBehavior-item.sysml @@ -0,0 +1,64 @@ +package '3e-Function-based Behavior-item' { + public import Definitions::*; + + package Definitions { + + item def VehicleAssembly; + item def AssembledVehicle :> VehicleAssembly; + + part def Vehicle :> AssembledVehicle; + part def Transmission; + part def Engine; + + } + + package Usages { + + part AssemblyLine { + + perform action 'assemble vehicle' { + + action 'assemble transmission into vehicle' { + in item 'vehicle assy without transmission or engine' : VehicleAssembly; + in item transmission : Transmission { + /* Note: A part can be treated as an item. */ + } + + out item 'vehicle assy without engine' : VehicleAssembly = 'vehicle assy without transmission or engine' { + part transmission : Transmission = 'assemble transmission into vehicle'.transmission { + /* Note: An item can become a part of something else. */ + } + } + } + + flow 'assemble transmission into vehicle'.'vehicle assy without engine' + to 'assemble engine into vehicle'.'vehicle assy without engine'; + + action 'assemble engine into vehicle' { + in item 'vehicle assy without engine' : VehicleAssembly { + part transmission : Transmission; + } + in item engine : Engine; + + out item assembledVehicle : AssembledVehicle = 'vehicle assy without engine' { + part engine : Engine = 'assemble engine into vehicle'.engine; + } + } + } + + bind 'assemble vehicle'.'assemble engine into vehicle'.assembledVehicle = vehicle; + + part vehicle : Vehicle { + /* + * Note: An in item one context can become a part in an other. + */ + + part transmission: Transmission; + part engine: Engine; + + perform action providePower; + } + + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/04-FunctionalAllocation/4a-FunctionalAllocation.sysml b/test/SysMLModels/OMG/validation/04-FunctionalAllocation/4a-FunctionalAllocation.sysml new file mode 100644 index 00000000..d9d32ac6 --- /dev/null +++ b/test/SysMLModels/OMG/validation/04-FunctionalAllocation/4a-FunctionalAllocation.sysml @@ -0,0 +1,110 @@ +package '4a-Functional Allocation' { + private import '2a-Parts Interconnection'::*; + private import '3a-Function-based Behavior-1'::*; + private import '3a-Function-based Behavior-1'::'provide power'::*; + + part vehicle1_c1_functional_allocation :> vehicle1_c1 { + // Note: The definitions of the port types in '2a-Parts Interconnection' do not include + // flow properties. + port :>> fuelCmdPort { + in fuelCmd: FuelCmd; + } + + perform 'provide power' { + doc + /* + * This allocates the action '3a-Function-based Behavior-1'::'provide power' as an enacted + * performance of 'vehicle_c1_functional_allocation'. + */ + + // This assigns the fuelCmdPort to provide the input to 'provide power'. + in fuelCmd = fuelCmdPort.fuelCmd; + } + + //* + // The above is semantically equivalent to: + + ref action 'provide power' (in fuelCmd = fuelCmdPort::fuelCmd) + :> '3a-Function-based Behavior'::'provide power', performedActions; + + // For a composite enacted performance within the vehicle, replace the above with: + + action 'provide power' (in fuelCmd = fuelCmdPort::fuelCmd) + :> '3a-Function-based Behavior'::'provide power'; + */ + + part :>> engine { + port :>> fuelCmdPort { + in fuelCmd: FuelCmd; + } + + perform 'provide power'.'generate torque' { + /* + * This allocates one of the sub-steps of 'provide power' to a sub-part of vehicle_c1. + */ + + in fuelCmd = fuelCmdPort.fuelCmd; + out engineTorque = drivePwrPort.engineTorque; + } + + port :>> drivePwrPort { + out engineTorque: Torque; + } + } + + part :>> transmission { + port :>> clutchPort { + in attribute engineTorque: Torque; + } + + perform 'provide power'.'amplify torque' { + in engineTorque = clutchPort.engineTorque; + out transmissionTorque = shaftPort_a.transmissionTorque; + } + + port :>> shaftPort_a { + out transmissionTorque: Torque; + } + } + + part :>> driveshaft { + port :>> shaftPort_b { + in transmissionTorque: Torque; + } + + perform 'provide power'.'transfer torque' { + in transmissionTorque = shaftPort_b.transmissionTorque; + out driveshaftTorque = shaftPort_c.driveshaftTorque; + } + + port :>> shaftPort_c { + out driveshaftTorque: Torque; + } + } + + part :>> rearAxleAssembly { + port :>> shaftPort_d { + in driveshaftTorque: Torque; + } + + perform 'provide power'.'distribute torque' { + in driveshaftTorque = shaftPort_d.driveshaftTorque; + out wheelTorque1 = rearAxle.leftHalfAxle.axleToWheelPort.wheelTorque; + out wheelTorque2 = rearAxle.rightHalfAxle.axleToWheelPort.wheelTorque; + } + + part :>> rearAxle { + part :>> leftHalfAxle { + port :>> axleToWheelPort { + out wheelTorque: Torque; + } + } + part :>> rightHalfAxle { + port :>> axleToWheelPort { + out wheelTorque: Torque; + } + } + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1.sysml b/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1.sysml new file mode 100644 index 00000000..eb90ffe6 --- /dev/null +++ b/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1.sysml @@ -0,0 +1,236 @@ +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: TemperatureValue; } + + 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: TemperatureValue; + + 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'. + */ + } + + //* + // The above is semantically equivalent to: + + ref state 'vehicle states' :> Usages::'vehicle states', exhibitedStates + :>> VehicleA::'vehicle states'; + + // For a composite state performance within the vehicle, replace the above with: + + state 'vehicle states' :>> Usages::'vehicle states', VehicleA::'vehicle states'; + */ + + part vehicleController: VehicleController { + exhibit 'controller states' :>> VehicleController::'controller states'; + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1a.sysml b/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1a.sysml new file mode 100644 index 00000000..68a7d765 --- /dev/null +++ b/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-1a.sysml @@ -0,0 +1,238 @@ +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: TemperatureValue; } + + 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: TemperatureValue; + + 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'. + */ + } + + //* + // The above is semantically equivalent to: + + ref state 'vehicle states' :> Usages::'vehicle states', exhibitedStates + :>> VehicleA::'vehicle states'; + + // For a composite state performance within the vehicle, replace the above with: + + state 'vehicle states' :>> Usages::'vehicle states', VehicleA::'vehicle states'; + */ + + part vehicleController: VehicleController { + exhibit 'controller states' :>> VehicleController::'controller states'; + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-2.sysml b/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-2.sysml new file mode 100644 index 00000000..0871db00 --- /dev/null +++ b/test/SysMLModels/OMG/validation/05-State-basedBehavior/5-State-basedBehavior-2.sysml @@ -0,0 +1,128 @@ +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: TemperatureValue; } + + 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: TemperatureValue; + + 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'; + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/06-IndividualAndSnapshots/6-IndividualAndSnapshots.sysml b/test/SysMLModels/OMG/validation/06-IndividualAndSnapshots/6-IndividualAndSnapshots.sysml new file mode 100644 index 00000000..2a4eadbd --- /dev/null +++ b/test/SysMLModels/OMG/validation/06-IndividualAndSnapshots/6-IndividualAndSnapshots.sysml @@ -0,0 +1,167 @@ +package '6-Individual and Snapshots' { + private import ScalarValues::Real; + private import Time::DateTime; + private import ISQ::*; + + package 'Part Definitions' { + part def 'Temporal-Spatial Reference' { + attribute referenceTime : DateTime; + attribute referenceCoordinateSystem; + } + + /* + * Note that space and time coordinatization have not + * been fully specified yet. + */ + + part def VehicleRoadContext { + attribute t : TimeValue; + } + + part def VehicleA { + attribute mass : MassValue; + attribute position : Real; + attribute velocity : Real; + attribute acceleration : Real; + exhibit state vehicleStates { + entry; then on; + state on; + then off; + state off; + } + } + + part def Road { + attribute angle : Real; + attribute surfaceFriction : Real; + } + } + + package 'Individual Definitions' { + private import 'Part Definitions'::*; + + /* + * An individual definition restricts the instances of a part def to + * those that are portions of the same life ("identity"). + */ + + individual def 'Temporal-Spatial Reference_ID1' :> 'Temporal-Spatial Reference'; + individual def VehicleRoadContext_ID1 :> VehicleRoadContext; + individual def VehicleA_ID1 :> VehicleA; + individual def Road_ID1 :> Road; + + } + + package Values { + attribute t0 : TimeValue; + attribute t1 : TimeValue; + attribute tn : TimeValue; + + attribute m : MassValue; + + attribute p0 : Real; + attribute p1 : Real; + attribute pn : Real; + + attribute v0 : Real; + attribute v1 : Real; + attribute vn : Real; + + attribute a0 : Real; + attribute a1 : Real; + attribute an : Real; + + attribute theta0 : Real; + attribute theta1 : Real; + attribute thetan : Real; + + attribute sf0 : Real; + attribute sf1 : Real; + attribute sfn : Real; + } + + package 'Individuals and Snapshots' { + private import 'Individual Definitions'::*; + private import Values::*; + + individual reference : 'Temporal-Spatial Reference_ID1' { + /* + * An individual usage must be typed by an individual definition, + * representing the condition of that individual during some or all + * of its life. + */ + + snapshot context_t0 : VehicleRoadContext_ID1 { + :>> t = t0 { + /* + * This is a concise notation for showing the redefinition + * of a attribute property. + */ + } + + snapshot vehicle_ID1_t0 : VehicleA_ID1 { + /* + * A snapshot is a kind of individual usage restricted to + * a single instant of time. + */ + + :>> mass = m; + :>> position = p0; + :>> velocity = v0; + :>> acceleration = a0; + + exhibit vehicleStates.on { + /* + * This asserts that the snapshot exhibits the referenced + * state, which means that the vehicle must me in the state + * at the time of the snapshot. + */ + } + } + + snapshot road_ID1_t0 : Road_ID1 { + :>> angle = theta0; + :>> surfaceFriction = sf0; + } + } + + snapshot context_t1 : VehicleRoadContext_ID1 { + :>> t = t1; + + snapshot vehicle_ID1_t1 : VehicleA_ID1 { + :>> mass = m; + :>> position = p1; + :>> velocity = v1; + :>> acceleration = a1; + + exhibit vehicleStates.on; + } + + snapshot road_ID1_t1 : Road_ID1 { + :>> angle = theta1; + :>> surfaceFriction = sf1; + } + } + + // ... + + snapshot context_tn : VehicleRoadContext_ID1 { + :>> t = tn; + + snapshot vehicle_ID1_tn : VehicleA_ID1 { + :>> mass = m; + :>> position = pn; + :>> velocity = vn; + :>> acceleration = an; + + exhibit vehicleStates.off; + } + + snapshot road_ID1_tn : Road_ID1 { + :>> angle = theta1; + :>> surfaceFriction = sfn; + } + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/07-VariantConfiguration/7a-VariantConfiguration-GeneralConcept.sysml b/test/SysMLModels/OMG/validation/07-VariantConfiguration/7a-VariantConfiguration-GeneralConcept.sysml new file mode 100644 index 00000000..69fd8878 --- /dev/null +++ b/test/SysMLModels/OMG/validation/07-VariantConfiguration/7a-VariantConfiguration-GeneralConcept.sysml @@ -0,0 +1,53 @@ +package '7a-Variant Configuration - General Concept' { + + part def Vehicle; + + part part1; + part part2; + part part3; + part part4; + part part5; + part part6; + + abstract part anyVehicleConfig : Vehicle { + + variation part subsystemA { + variant part subsystem1 { + part :>> part1; + part :>> part2; + } + variant part subsystem2 { + part :>> part2; + part :>> part3; + } + } + + variation part subsystemB { + variant part subsystem3 { + part :>> part4; + part :>> part5; + } + variant part subsystem4 { + part :>> part5; + part :>> part6; + } + } + + assert constraint { + subsystemA != subsystemA::subsystem2 | + subsystemB == subsystemB::subsystem3 + } + + } + + part vehicleConfigA :> anyVehicleConfig { + part :>> subsystemA = subsystemA::subsystem1; + part :>> subsystemB = subsystemB::subsystem3; + } + + part VehicleConfigB :> anyVehicleConfig { + part :>> subsystemA = subsystemA::subsystem2; + part :>> subsystemB = subsystemB::subsystem3; + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/07-VariantConfiguration/7a1-VariantConfiguration-GeneralConcept-a.sysml b/test/SysMLModels/OMG/validation/07-VariantConfiguration/7a1-VariantConfiguration-GeneralConcept-a.sysml new file mode 100644 index 00000000..244bc461 --- /dev/null +++ b/test/SysMLModels/OMG/validation/07-VariantConfiguration/7a1-VariantConfiguration-GeneralConcept-a.sysml @@ -0,0 +1,79 @@ +package '7a1-Variant Configuration - General Concept-a' { + + action doX; + action doY; + + part part1; + part part2; + part part3 { + port p1; + } + part part4; + part part5 { + port p2; + variation perform action doXorY { + variant perform doX; + variant perform doY; + } + } + part part6; + + abstract part def SubsystemA { + abstract part :>> part3[0..1]; + } + + abstract part def SubsystemB { + abstract part :>> part5[1]; + } + + part anyVehicleConfig { + + variation part subsystemA : SubsystemA { + variant part subsystem1 : SubsystemA { + part :>> part1[1]; + part :>> part2[1]; + } + variant part subsystem2 : SubsystemA { + part :>> part2[1]; + part :>> part3[1]; + } + } + + variation part subsystemB : SubsystemB { + variant part subsystem3 : SubsystemB { + part :>> part4[1]; + part :>> part5[1]; + } + variant part subsystem4 : SubsystemB { + part :>> part5[1]; + part :>> part6[1]; + } + } + + connect [0..1] subsystemA.part3.p1 to [1] subsystemB.part5.p2; + + assert constraint { + subsystemA != subsystemA::subsystem2 | + subsystemB == subsystemB::subsystem3 + } + + } + + part vehicleConfigA :> anyVehicleConfig { + part :>> subsystemA = subsystemA::subsystem1; + part :>> subsystemB = subsystemB::subsystem3 { + part :>> part5 { + perform action :>> doXorY = doX; + } + } + } + + part VehicleConfigB :> anyVehicleConfig { + part :>> subsystemA = subsystemA::subsystem2; + part :>> subsystemB = subsystemB::subsystem4 { + part :>> part5 { + perform action :>> doXorY = doY; + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/07-VariantConfiguration/7b-VariantConfigurations.sysml b/test/SysMLModels/OMG/validation/07-VariantConfiguration/7b-VariantConfigurations.sysml new file mode 100644 index 00000000..3c66a6d1 --- /dev/null +++ b/test/SysMLModels/OMG/validation/07-VariantConfiguration/7b-VariantConfigurations.sysml @@ -0,0 +1,140 @@ +package '7b-Variant Configurations' { + private import RequirementsModel::*; + private import DesignModel::*; + private import VariantDefinitions::*; + private import ControlFunctions::forAll; + + package RequirementsModel { + requirement def EnginePerformanceRequirement; + requirement highPerformanceRequirement : EnginePerformanceRequirement; + requirement normalPerformanceRequirement : EnginePerformanceRequirement; + } + + package DesignModel { + part def Vehicle; + part def Engine; + part def Transmission; + part def Clutch; + part def Driveshaft; + part def RearAxleAssembly; + part def Wheel; + + port def FuelCmdPort; + port def ClutchPort; + port def ShaftPort_b; + port def ShaftPort_c; + port def ShaftPort_d; + port def VehicleToRoadPort; + port def WheelToRoadPort; + + part vehicle : Vehicle { + port fuelCmdPort; + + bind fuelCmdPort = engine.fuelCmdPort; + + part engine : Engine[1] { + port fuelCmdPort : FuelCmdPort; + } + + part transmission : Transmission[1] { + part clutch: Clutch[1] { + port clutchPort : ClutchPort; + } + } + + part driveshaft : Driveshaft[1] { + port shaftPort_b : ShaftPort_b; + port shaftPort_c : ShaftPort_c; + } + + part rearAxleAssembly : RearAxleAssembly { + part rearWheels : Wheel[2] { + port wheelToRoadPort : WheelToRoadPort; + } + } + + port vehicleToRoadPort : VehicleToRoadPort { + port wheelToRoadPort : WheelToRoadPort[2]; + } + } + } + + package VariantDefinitions { + part def '4CylEngine' :> Engine; + part def '6CylEngine' :> Engine; + + part def ManualTransmission :> Transmission; + part def AutomaticTransmission :> Transmission; + + part def ManualClutch :> Clutch; + part def AutomaticClutch :> Clutch; + + port def ManualClutchPort :> ClutchPort; + port def AutomaticClutchPort :> ClutchPort; + + part def NarrowRimWheel :> Wheel; + part def WideRimWheel :> Wheel; + } + + package VariabilityModel { + part anyVehicleConfig :> vehicle { + + variation requirement engineRqtChoice : EnginePerformanceRequirement { + variant highPerformanceRequirement; + variant normalPerformanceRequirement; + } + + variation part engineChoice :>> engine { + variant part '4cylEngine' : '4CylEngine'; + variant part '6cylEngine' : '6CylEngine'; + } + + satisfy engineRqtChoice by engineChoice; + + assert constraint 'engine choice constraint' { + if engineRqtChoice == engineRqtChoice::highPerformanceRequirement? + engineChoice == engineChoice::'6cylEngine' + else + engineChoice == engineChoice::'4cylEngine' + } + + variation part transmissionChoice :>> transmission { + variant part manualTransmission : ManualTransmission { + part :>> clutch : ManualClutch { + port :>> clutchPort : ManualClutchPort; + } + } + variant part automaticTransmission : AutomaticTransmission { + part :>> clutch : AutomaticClutch { + port :>> clutchPort : AutomaticClutchPort; + } + } + } + + assert constraint 'engine-transmission selection constraint' { + (engineChoice == engineChoice::'4cylEngine' and transmissionChoice == transmissionChoice::manualTransmission) xor + (engineChoice == engineChoice::'6cylEngine' and transmissionChoice == transmissionChoice::automaticTransmission) + } + + part :>> rearAxleAssembly { + variation part rearWheelChoice :>> rearWheels { + variant part narrowRimWheel : NarrowRimWheel; + variant part wideRimWheel : WideRimWheel; + } + + assert constraint 'engine-wheel selection constraint' { + (engineChoice == engineChoice::'4cylEngine' and + rearWheelChoice->forAll {in ref w; w == rearWheelChoice::narrowRimWheel}) xor + (engineChoice == engineChoice::'6cylEngine' and + rearWheelChoice->forAll {in ref w; w == rearWheelChoice::wideRimWheel}) + } + } + + } + + variation part vehicleChoice :> anyVehicleConfig { + variant part vehicle_c1; + variant part vehicle_c2; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/08-Requirements/8-Requirements.sysml b/test/SysMLModels/OMG/validation/08-Requirements/8-Requirements.sysml new file mode 100644 index 00000000..36964242 --- /dev/null +++ b/test/SysMLModels/OMG/validation/08-Requirements/8-Requirements.sysml @@ -0,0 +1,205 @@ +package '8-Requirements' { + private import ScalarValues::Real; + private import ISQ::*; + private import SI::*; + public import 'Vehicle Usages'::*; + public import 'Vehicle Requirements'::*; + + package 'Vehicle Definitions' { + part def Vehicle { + attribute mass: MassValue; + attribute fuelLevel: Real; + attribute fuelTankCapacity: Real; + } + + part def Engine { + port drivePwrPort: DrivePwrPort; + perform action 'generate torque': 'Generate Torque'; + } + + part def Transmission { + port clutchPort: ClutchPort; + } + + port def DrivePwrPort; + port def ClutchPort; + + interface def EngineToTransmissionInterface { + end drivePwrPort: DrivePwrPort; + end clutchPort: ClutchPort; + } + + action def 'Generate Torque'; + } + + package 'Vehicle Usages' { + public import 'Vehicle Definitions'::*; + + action 'provide power' { + action 'generate torque' { /* ... */ } + //... + } + + part vehicle1_c1: Vehicle { + attribute :>> mass = 2000 [kg]; + perform 'provide power'; + + part engine_v1: Engine { + port :>> drivePwrPort; + perform 'provide power'.'generate torque' :>> 'generate torque'; + } + + part transmission: Transmission { + port :>> clutchPort; + } + + interface engineToTransmission: EngineToTransmissionInterface + connect engine_v1.drivePwrPort to transmission.clutchPort; + } + + part vehicle1_c2: Vehicle { + attribute :>> mass = 2500 [kg]; + } + } + + package 'Vehicle Requirements' { + public import 'Vehicle Definitions'::*; + + requirement def <'1'> MassLimitationRequirement { + /* + * The optional requirement ID of this requirement ('1') is given after the keyword "id" (using name syntax). + * Every requirement is parameterized by a "subject". The "subject" of this requirement is implicitly "Anything". + */ + + // The requirement text is given by the documentation in the requirement def body. + doc /* The actual mass shall be less than or equal to the required mass. */ + + attribute massActual: MassValue; + attribute massReqd: MassValue; + + require constraint { + /* + * A constraint can be used to formalize a requirement. + */ + massActual <= massReqd + } + } + + requirement def <'2'> ReliabilityRequirement; + + requirement <'1.1'> vehicleMass1: MassLimitationRequirement { + doc /* The vehicle mass shall be less than or equal to 2000 kg when the fuel tank is full. */ + + subject vehicle : Vehicle { + /* + * The subject of this requirement is redefined to be a "Vehicle". + */ + } + + attribute :>> massActual: MassValue = vehicle.mass { + /* + * This redefinition binds the vehicle mass to the actual mass. + */ + } + + attribute :>> massReqd = 2000 [kg] { + /* + * This redefinition sets the required mass to 2000 kg. + */ + } + + assume constraint fuelConstraint { + /* + * A constraint can also be used to specify an assumption. + */ + + doc /* full fuel tank */ + vehicle.fuelLevel >= vehicle.fuelTankCapacity + } + } + + requirement <'2.1'> vehicleMass2: MassLimitationRequirement { + doc /* The vehicle mass shall be less than or equal to 2500 kg when the fuel tank is empty. */ + + subject vehicle : Vehicle; + + attribute :>> massActual: MassValue = vehicle.mass; + attribute :>> massReqd = 2500 [kg]; + + assume constraint fuelConstraint { + doc /* empty fuel tank */ + vehicle.fuelLevel == 0.0 + } + } + + requirement <'2.2'> vehicleReliability2: ReliabilityRequirement { + subject vehicle : Vehicle; + } + + requirement <'3.1'> drivePowerInterface { + doc /* The engine shall transfer its generated torque to the transmission via the clutch interface. */ + subject drivePwrPort: DrivePwrPort; + } + + requirement <'3.2'> torqueGeneration { + doc /* The engine shall generate torque as a function of RPM as shown in Table 1. */ + subject generateTorque: 'Generate Torque'; + } + + } + + part 'vehicle1_c1 Specification Context' { + private import 'vehicle1-c1 Specification'::*; + private import 'engine-v1 Specification'::*; + + requirement 'vehicle1-c1 Specification' { + doc + /* + * This models a "requirement group" as a requirement that references other requirements. + */ + + subject vehicle : Vehicle; + requirement references vehicleMass1 { + /* + * This is a reference to a requirement defined outside the group. + * By default, the subject of the requirement is bound to that of the group. + */ + } + // ... + } + + requirement 'engine-v1 Specification' { + subject engine : Engine; + /* + * Here the subjects of the referenced requirements are defined to be specific properties of the + * subject of the group. + */ + require torqueGeneration { + in :>> generateTorque = engine.'generate torque'; + } + require drivePowerInterface { + in :>> drivePwrPort = engine.drivePwrPort; + } + } + + satisfy 'vehicle1-c1 Specification' by vehicle1_c1 { + /* + * This asserts that if the assumptions of 'vehicle1-c1 Specification' are true with 'vehicle_c1' as + * the subject, then the required constraints are also true. + */ + } + satisfy 'engine-v1 Specification' by vehicle1_c1.engine_v1; + } + + part 'vehicle1_c2 Specification Context' { + private import 'vehicle1-c2 Specification'::*; + + requirement 'vehicle1-c2 Specification' { + subject vehicle : Vehicle; + require vehicleMass2; + require vehicleReliability2; + } + + satisfy 'vehicle1-c2 Specification' by vehicle1_c2; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/09-Verification/9-Verification-simplified.sysml b/test/SysMLModels/OMG/validation/09-Verification/9-Verification-simplified.sysml new file mode 100644 index 00000000..ee39a3dc --- /dev/null +++ b/test/SysMLModels/OMG/validation/09-Verification/9-Verification-simplified.sysml @@ -0,0 +1,115 @@ +package '9-Verification-simplified' { + private import VerificationCases::*; + private import Definitions::*; + + package Definitions { + + requirement def <'2'> MassRequirement { + attribute massActual :> ISQ::mass; + attribute massReqd :> ISQ::mass; + + doc /* The actual mass shall be less than or equal to the required mass limit. */ + + require constraint { massActual <= massReqd } + } + + part def Vehicle { + attribute mass :> ISQ::mass; + } + + part def MassVerificationSystem; + part def Scale; + part def TestOperator; + + individual def TestVehicle1 :> Vehicle; + individual def TestVehicle2 :> Vehicle; + + individual def TestSystem :> MassVerificationSystem; + + verification def MassTest { + objective massVerificationObjective { + verify requirement massRequirement : MassRequirement; + } + } + + } + + package Usages { + + requirement <'2.1'> vehicleMassRequirement : MassRequirement { + subject vehicle : Vehicle; + doc /* The vehicle mass shall be less than or equal to 2500 kg. */ + + :>> massActual = vehicle.mass; + :>> massReqd = 2500 [SI::kg]; + } + + part vehicle1_c2 : Vehicle { + // ... + } + + verification vehicleMassTest : MassTest { + subject testVehicle : Vehicle; + objective vehicleMassVerificationObjective { + // The subject of the verify is automatically bound to 'testVehicle' here. + verify vehicleMassRequirement :>> massRequirement; + } + + action collectData { + in part testVehicle : Vehicle = vehicleMassTest.testVehicle; + out massMeasured :> ISQ::mass; + } + + action processData { + in massMeasured :> ISQ::mass = collectData.massMeasured; + out massProcessed :> ISQ::mass; + } + + action evaluateData { + in massProcessed :> ISQ::mass = processData.massProcessed; + out verdict : VerdictKind = + // Check that 'testVehicle' statisfies 'vehicleMassRequirement' if its mass equals 'massProcessed'. + PassIf(vehicleMassRequirement(vehicle = new testVehicle(mass = massProcessed))); + } + + return verdict : VerdictKind = evaluateData.verdict; + } + + part massVerificationSystem : MassVerificationSystem { + perform vehicleMassTest { + in part :>> testVehicle = vehicleUnderTest; + } + + ref part vehicleUnderTest : Vehicle; + + part testOperator : TestOperator; + + part scale : Scale { + perform vehicleMassTest.collectData { + in part :>> testVehicle; + + // In reality, this would be some more involved process. + measurement = testVehicle.mass; + + out :>> massMeasured = measurement; + } + } + } + + individual testSystem : TestSystem :> massVerificationSystem { + timeslice test1 { + ref individual :>> vehicleUnderTest : TestVehicle1 :> vehicle1_c2 { + :>> mass = 2500 [SI::kg]; + } + } + + then timeslice test2 { + ref individual :>> vehicleUnderTest : TestVehicle2 :> vehicle1_c2 { + :>> mass = 2500 [SI::kg]; + } + } + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10a-Analysis.sysml b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10a-Analysis.sysml new file mode 100644 index 00000000..4cf249f0 --- /dev/null +++ b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10a-Analysis.sysml @@ -0,0 +1,76 @@ +package '10a-Analysis' { + private import ISQ::*; + private import SI::*; + private import NumericalFunctions::*; + + package VehicleDesignModel { + part def Vehicle { + mass : MassValue; + } + + part vehicle { + :>> mass : MassValue = sum(( + vehicle.engine.mass, + vehicle.transmission.mass, + vehicle.frontAxleAssembly.mass, + vehicle.rearAxleAssembly.mass + )); + + part engine { + mass : MassValue; + } + + part transmission { + mass : MassValue; + } + + part frontAxleAssembly { + mass : MassValue; + } + + part rearAxleAssembly { + mass : MassValue; + } + } + } + + package VehicleAnalysisModel { + private import VehicleDesignModel::Vehicle; + + requirement def MassAnalysisObjective { + subject mass : MassValue; + doc /* ... */ + } + + analysis def MassAnalysisCase { + subject vehicle : Vehicle; + objective : MassAnalysisObjective { + subject = MassAnalysisCase::result; + } + + // Result + vehicle.mass + } + + analysis def AnalysisPlan { + subject vehicle : Vehicle; + objective { + doc /* ... */ + } + + analysis massAnalysisCase : MassAnalysisCase { + /* + * By default, the subject of a nested analysis case bound to that + * of its containing analysis case or analysis case definition. + */ + return mass; + } + } + + part massAnalysisContext { + analysis analysisPlan : AnalysisPlan { + subject vehicle = VehicleDesignModel::vehicle; + } + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10b-Trade-offAmongAlternativeConfigurations.sysml b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10b-Trade-offAmongAlternativeConfigurations.sysml new file mode 100644 index 00000000..a66a61d3 --- /dev/null +++ b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10b-Trade-offAmongAlternativeConfigurations.sysml @@ -0,0 +1,97 @@ +package '10b-Trade-off Among Alternative Configurations' { + private import ScalarValues::Real; + private import TradeStudies::*; + private import Definitions::*; + private import Usages::*; + + package Definitions { + + part def Vehicle; + + part def Engine { + power : ISQ::PowerValue; + mass : ISQ::MassValue; + efficiency : Real; + reliability : Real; + cost : Real; + } + + part def Piston; + part def Cylinder; + part def ConnectingRod; + part def CrankShaft; + + part def '4CylCrankShaft' :> CrankShaft; + part def '6CylCrankShaft' :> CrankShaft; + + } + + package Usages { + + part engine : Engine { + part cyl[*] : Cylinder { + part p[1] : Piston; + part rod[1] : ConnectingRod; + } + + part cs : CrankShaft; + } + + variation part engineChoice :> engine { + variant part '4cylEngine' { + part :>> cyl[4]; + part :>> cs : '4CylCrankShaft'; + } + + variant part '6cylEngine' { + part :>> cyl[6]; + part :>> cs : '6CylCrankShaft'; + } + } + + part vehicle : Vehicle { + part engine[1] :> engineChoice = engineChoice::'6cylEngine' { + assert constraint engineSelectionRational { + doc /* Selected the best engine based on the 'engineTradeStudy'. */ + engine == Analysis::engineTradeStudy.selectedAlternative + } + } + + } + } + + package Analysis { + + calc def EngineEvaluation { + doc /* Evaluation function with criteria power, mass, efficency and cost. */ + in power : ISQ::PowerValue; + in mass : ISQ::MassValue; + in efficiency : Real; + in cost : Real; + return evaluation : Real; + // Compute evaluation... + } + + analysis engineTradeStudy : TradeStudy { + subject : Engine[1..*] = all engineChoice; + objective : MaximizeObjective; + + calc :>> evaluationFunction { + in part anEngine :>> alternative : Engine; + + calc powerRollup { in engine = anEngine; return power:>ISQ::power; } + calc massRollup { in engine = anEngine; return mass:>ISQ::mass; } + calc efficiencyRollup { in engine = anEngine; return efficiency: Real; } + calc costRollup { in engine = anEngine; return cost: Real; } + + return :>> result : Real = EngineEvaluation( + powerRollup.power, massRollup.mass, efficiencyRollup.efficiency, costRollup.cost + ); + } + + return part :>> selectedAlternative : Engine; + } + + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10c-FuelEconomyAnalysis.sysml b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10c-FuelEconomyAnalysis.sysml new file mode 100644 index 00000000..a60b8629 --- /dev/null +++ b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10c-FuelEconomyAnalysis.sysml @@ -0,0 +1,168 @@ +package '10c-Fuel Economy Analysis' { + private import ScalarValues::*; + private import Quantities::*; + private import MeasurementReferences::*; + private import ISQ::*; + private import USCustomaryUnits::*; + + attribute distancePerVolume : ScalarQuantityValue = length / volume; + attribute gallon : MeasurementUnit = 231.0 * 'in'^3; + + package FuelEconomyRequirementsModel { + + requirement def FuelEconomyRequirement { + attribute actualFuelEconomy :> distancePerVolume; + attribute requiredFuelEconomy :> distancePerVolume; + + require constraint { actualFuelEconomy >= requiredFuelEconomy } + } + + requirement cityFuelEconomyRequirement : FuelEconomyRequirement { + :>> requiredFuelEconomy = 25 [mi/gallon]; + } + + requirement highwayFuelEconomyRequirement : FuelEconomyRequirement { + :>> requiredFuelEconomy = 30 [mi/gallon]; + } + + } + + package VehicleDesignModel { + + part def Vehicle { + attribute fuelEconomy_city :> distancePerVolume; + attribute fuelEconomy_highway :> distancePerVolume; + + attribute cargoWeight : MassValue; + } + + part def Engine; + part def Transmission; + + part vehicle1_c1 : Vehicle { + part engine : Engine; + part transmission : Transmission { + exhibit state transmissionState { + entry; then '1stGear'; + state '1stGear'; + then '2ndGear'; + state '2ndGear'; + then '3rdGear'; + state '3rdGear'; + then '4thGear'; + state '4thGear'; + } + } + } + + } + + package FuelEconomyAnalysisModel { + private import VehicleDesignModel::*; + private import FuelEconomyRequirementsModel::*; + + attribute def ScenarioState { + position : LengthValue; + velocity : SpeedValue; + acceleration : AccelerationValue; + inclineAngle : AngularMeasureValue; + } + + abstract calc def NominalScenario { + in t : TimeValue; + return : ScenarioState; + } + calc cityScenario : NominalScenario; + calc highwayScenario : NominalScenario; + + analysis def FuelEconomyAnalysis { + subject vehicle : Vehicle; + in calc scenario : NominalScenario; + in requirement fuelEconomyRequirement : FuelEconomyRequirement; + return calculatedFuelEconomy : ScalarQuantityValue; + + objective fuelEconomyAnalysisObjective { + doc /* + * The objective of this analysis is to determine whether the + * current vehicle design configuration can satisfy the fuel + * economy requirement. + */ + + assume constraint { + doc /* wheelDiameter == 33 inches + * drive train efficiency == 0.4 + */ + } + + require fuelEconomyRequirement { + :>> actualFuelEconomy = calculatedFuelEconomy; + } + } + + action dynamicsAnalysis { + /* + * Solve for the required engine power as a function of time + * to support the nominal scenarios. + * + * Note: Vehicle force = power/speed + * Note: EngineRPM * EngineGearRatio/WheelRPM = constant + */ + } + + action fuelConsumptionAnalysis { + /* + * Solve the engine equations to determine how much fuel is + * consumed. The engine RPM is a function of the speed of the + * vehicle and the gear state. + */ + } + } + + requirement vehicleFuelEconomyRequirementsGroup { + subject vehicle : Vehicle; + requirement vehicleFuelEconomyRequirement_city :> cityFuelEconomyRequirement { + doc /* The vehicle shall provide a fuel economy that is greater than or equal to + * 25 miles per gallon for the nominal city driving scenarios. + */ + + :>> actualFuelEconomy = vehicle.fuelEconomy_city; + + assume constraint { vehicle.cargoWeight == 1000 [lb] } + } + + requirement vehicleFuelEconomyRequirement_highway :> highwayFuelEconomyRequirement { + doc /* The vehicle shall provide a fuel economy that is greater than or equal to + * 30 miles per gallon for the nominal highway driving scenarios. + */ + + :>> actualFuelEconomy = vehicle.fuelEconomy_highway; + + assume constraint { vehicle.cargoWeight == 1000 [lb] } + } + + } + + part analysisContext { + + analysis cityFuelEconomyAnalysis : FuelEconomyAnalysis { + subject vehicle = vehicle1_c1; + in calc scenario = cityScenario; + in requirement fuelEconomyRequirement = cityFuelEconomyRequirement; + } + + analysis highwayFuelEconomyAnalysis : FuelEconomyAnalysis { + subject vehicle = vehicle1_c1; + in calc scenario = highwayScenario; + in requirement fuelEconomyRequirement = highwayFuelEconomyRequirement; + } + + part vehicle1_c1_analysized :> vehicle1_c1 { + :>> fuelEconomy_city = cityFuelEconomyAnalysis.calculatedFuelEconomy; + :>> fuelEconomy_highway = highwayFuelEconomyAnalysis.calculatedFuelEconomy; + } + + satisfy vehicleFuelEconomyRequirementsGroup by vehicle1_c1_analysized; + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10d-DynamicsAnalysis.sysml b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10d-DynamicsAnalysis.sysml new file mode 100644 index 00000000..ab531dcc --- /dev/null +++ b/test/SysMLModels/OMG/validation/10-AnalysisAndTrades/10d-DynamicsAnalysis.sysml @@ -0,0 +1,80 @@ +package '10d-Dynamics Analysis' { + private import ISQ::*; + + package VehicleModel { + + part def Vehicle { + attribute mass :> ISQ::mass; + } + + } + + package DynamicsModel { + + calc def Acceleration { + in p : PowerValue; + in m : MassValue; + in v : SpeedValue; + return : AccelerationValue = p / (m * v); + } + + calc def Velocity { + in v0 : SpeedValue; + in a : AccelerationValue; + in dt : TimeValue; + return : SpeedValue = v0 + a * dt; + } + + calc def Position { + in x0 : LengthValue; + in v : SpeedValue; + in dt : TimeValue; + return : LengthValue = x0 + v * dt; + } + + action def StraightLineDynamics { + in power : PowerValue; + in mass : MassValue; + in delta_t : TimeValue; + in x_in : LengthValue; + in v_in : SpeedValue; + out x_out : LengthValue = Position(x_in, v_in, delta_t); + out v_out : SpeedValue = Velocity(v_in, a_out, delta_t); + out a_out : AccelerationValue = Acceleration(power, mass, v_in); + } + } + + package AnalysisModel { + private import VehicleModel::*; + private import DynamicsModel::*; + private import SampledFunctions::*; + private import ScalarValues::Natural; + private import SequenceFunctions::*; + + analysis def DynamicsAnalysis { + subject vehicle : Vehicle; + in attribute powerProfile :> ISQ::power[*]; + in attribute initialPosition :> ISQ::length; + in attribute initialSpeed :> ISQ::speed; + in attribute deltaT :> ISQ::time; + return attribute accelerationProfile :> ISQ::acceleration[*] := (); + + private attribute position := initialPosition; + private attribute speed := initialSpeed; + + for i in 1..powerProfile->size()-1 { + perform action dynamics : StraightLineDynamics { + in power = powerProfile#(i); + in mass = vehicle.mass; + in delta_t = deltaT; + in x_in = position; + in v_in = speed; + } + then assign position := dynamics.x_out; + then assign speed := dynamics.v_out; + then assign accelerationProfile := accelerationProfile->including(dynamics.a_out); + } + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11a-View-Viewpoint.sysml b/test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11a-View-Viewpoint.sysml new file mode 100644 index 00000000..887949b5 --- /dev/null +++ b/test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11a-View-Viewpoint.sysml @@ -0,0 +1,57 @@ +package '11a-View-Viewpoint' { + + package SystemModel { + private import SI::*; + + part def Vehicle; + part def AxleAssembly; + part def Axle; + part def Wheel; + + part vehicle : Vehicle { + attribute mass :> ISQ::mass = 2500[SI::kg]; + part frontAxleAssembly : AxleAssembly[1] { + attribute mass :> ISQ::mass = 150[kg]; + part frontWheel : Wheel[2]; + part frontAxle : Axle[1] { + attribute mass; + attribute steeringAngle; + } + } + part rearAxleAssembly : AxleAssembly[1] { + attribute mass :> ISQ::mass = 250[kg]; + part rearWheel : Wheel[2]; + part rearAxle : Axle[1] { + attribute mass; + } + } + } + + } + + package ViewModel { + private import Views::*; + + part 'systems engineer'; + + concern 'system breakdown' { + subject; + stakeholder :>> 'systems engineer'; + } + + viewpoint 'system structure perspective' { + frame 'system breakdown'; + } + + view 'system structure generation' { + satisfy 'system structure perspective'; + expose SystemModel::vehicle::**[@SysML::PartUsage]; + render asElementTable { + view :>> columnView[1] { + render asTextualNotation; + } + } + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11b-SafetyAndSecurityFeatureViews.sysml b/test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11b-SafetyAndSecurityFeatureViews.sysml new file mode 100644 index 00000000..7a96c4ae --- /dev/null +++ b/test/SysMLModels/OMG/validation/11-ViewAndViewpoint/11b-SafetyAndSecurityFeatureViews.sysml @@ -0,0 +1,66 @@ +private import Views::*; // private import library package, not internal Views package! +package '11b-Safety and Security Feaure Views' { + private import ScalarValues::*; + + package AnnotationDefinitions { + metadata def Safety { + attribute isMandatory : Boolean; + } + metadata def Security; + } + + package PartsTree { + public import AnnotationDefinitions::*; + part vehicle { + part interior { + part alarm {@Security;} + part seatBelt[2] {@Safety{isMandatory = true;}} + part frontSeat[2]; + part driverAirBag {@Safety{isMandatory = false;}} + } + part bodyAssy { + part body; + part bumper {@Safety{isMandatory = true;}} + part keylessEntry {@Security;} + } + part wheelAssy { + part wheel[2]; + part antilockBrakes[2] {@Safety{isMandatory = false;}} + } + } + } + + package ViewDefinitions { + public import AnnotationDefinitions::*; + view def SafetyFeatureView { + /* Parts that contribute to safety. */ + filter @Safety; + render asTreeDiagram; + } + + view def SafetyOrSecurityFeatureView { + /* Parts that contribute to safety OR security. */ + filter @Safety | @Security; + } + } + + package Views { + private import ViewDefinitions::*; + private import PartsTree::vehicle; + + view vehicleSafetyFeatureView : SafetyFeatureView { + expose vehicle; + } + + view vehicleMandatorySafetyFeatureView :> vehicleSafetyFeatureView { + expose vehicle::*::**; + filter @Safety and (as Safety).isMandatory; + } + + view vehicleMandatorySafetyFeatureViewStandalone { + expose vehicle::**[@Safety and (as Safety).isMandatory]; + render asElementTable; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/12-DependencyRelationships/12a-Dependency.sysml b/test/SysMLModels/OMG/validation/12-DependencyRelationships/12a-Dependency.sysml new file mode 100644 index 00000000..9d7491a8 --- /dev/null +++ b/test/SysMLModels/OMG/validation/12-DependencyRelationships/12a-Dependency.sysml @@ -0,0 +1,16 @@ +package '12a-Dependency' { + + package 'Application Layer'; + package 'Service Layer'; + package 'Data Layer'; + + dependency Use from 'Application Layer' to 'Service Layer'; + dependency from 'Service Layer' to 'Data Layer'; + + attribute x; + attribute y; + attribute z; + + dependency z to x, y; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation-1.sysml b/test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation-1.sysml new file mode 100644 index 00000000..3e996b0a --- /dev/null +++ b/test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation-1.sysml @@ -0,0 +1,56 @@ +package '12b-Allocation-1' { + private import SI::*; + private import RequirementModel::*; + private import LogicalModel::*; + private import PhysicalModel::*; + + package RequirementModel { + requirement torqueGeneration { + subject generator: TorqueGenerator; + require constraint { + generator.generateTorque.torque > 0.0 [N*m] + } + } + } + + package LogicalModel { + action def GenerateTorque { out torque :> ISQ::torque; } + + part def LogicalElement; + part def TorqueGenerator :> LogicalElement { + perform action generateTorque : GenerateTorque; + } + + action providePower { + action generateTorque : GenerateTorque; + } + + part torqueGenerator : TorqueGenerator { + perform providePower.generateTorque :>> generateTorque; + } + + satisfy torqueGeneration by torqueGenerator; + } + + package PhysicalModel { + part def PhysicalElement; + part def PowerTrain :> PhysicalElement; + + part powerTrain : PowerTrain { + part engine { + perform providePower.generateTorque; + } + } + } + + allocation def LogicalToPhysical { + end logical : LogicalElement; + end physical : PhysicalElement; + } + + allocation torqueGenAlloc : LogicalToPhysical + allocate logical ::> torqueGenerator to physical ::> powerTrain { + + allocate torqueGenerator.generateTorque to powerTrain.engine.generateTorque; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation.sysml b/test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation.sysml new file mode 100644 index 00000000..69c2ef89 --- /dev/null +++ b/test/SysMLModels/OMG/validation/12-DependencyRelationships/12b-Allocation.sysml @@ -0,0 +1,26 @@ +package '12b-Allocation' { + private import LogicalModel::*; + private import PhysicalModel::*; + + package LogicalModel { + action providePower { + action generateTorque; + } + + part torqueGenerator { + perform providePower.generateTorque; + } + } + + package PhysicalModel { + part powerTrain { + part engine { + perform providePower.generateTorque; + } + } + } + + allocate torqueGenerator to powerTrain { + allocate torqueGenerator.generateTorque to powerTrain.engine.generateTorque; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/13-ModelContainment/13a-ModelContainment.sysml b/test/SysMLModels/OMG/validation/13-ModelContainment/13a-ModelContainment.sysml new file mode 100644 index 00000000..15ae77fa --- /dev/null +++ b/test/SysMLModels/OMG/validation/13-ModelContainment/13a-ModelContainment.sysml @@ -0,0 +1,62 @@ +package '13a-Model Containment' { + private import '2a-Parts Interconnection'::*; + private import '8-Requirements'::*; + + requirement BodyAndInteriorRequirements { + public import MassLimitationRequirement; + } + + requirement PowerTrainRequirements; + + package 'Vehicle Model' { + doc + /* + * This package is used to represent a top-level "model". + * There is no specific syntax for identifying a package + * used in this way. + */ + + + package 'Vehicle1-Configuration' { + alias 'Sport Sedan' for vehicle1_c1; + + public import 'vehicle1_c1 Specification Context'::'vehicle1-c1 Specification'; + } + + package 'Vehicle Reference Model' { + doc + /* + * This package is used to represent a "model library". + * There is no specific syntax for identifying a package + * used in this way. + */ + + public import VehicleA; + public import VehicleSubsystems; + + //* + // The following would transitively import all the + // members of the VehicleSubsystems package, rather + // then importing the package itself. + + public import VehicleSubsystems::*; + */ + } + + package VehicleSubsystems { + public import 'Body&Interior'; + public import 'PowerTrain'; + } + + package 'Body&Interior' { + public import BodyAndInteriorRequirements; + } + + package PowerTrain { + public import Engine; + public import Transmission; + public import PowerTrainRequirements; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-1.sysml b/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-1.sysml new file mode 100644 index 00000000..e23c7c86 --- /dev/null +++ b/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-1.sysml @@ -0,0 +1,56 @@ +package '13b-Safety and Security Features Element Group-1' { + private import ScalarValues::*; + private import AnnotationDefinitions::*; + private import PartsTree::*; + + package AnnotationDefinitions { + metadata def Safety { + attribute isMandatory : Boolean; + } + metadata def Security; + } + + package PartsTree { + part vehicle { + part interior { + part alarm {@Security;} + part seatBelt[2] {@Safety{isMandatory = true;}} + part frontSeat[2]; + part driverAirBag {@Safety{isMandatory = false;}} + } + part bodyAssy { + part body; + part bumper {@Safety{isMandatory = true;}} + part keylessEntry {@Security;} + } + part wheelAssy { + part wheel[2]; + part antilockBrakes[2] {@Safety{isMandatory = false;}} + } + } + } + + package 'Safety Features' { + /* Parts that contribute to safety. */ + public import vehicle::**; + filter @Safety; + } + + package 'Security Features' { + /* Parts that contribute to security. */ + public import vehicle::**; + filter @Security; + } + + package 'Safety & Security Features' { + /* Parts that contribute to safety OR security. */ + public import vehicle::**; + filter @Safety or @Security; + } + + package 'Mandatory Safety Features' { + /* Parts that contribute to safety AND are mandatory. */ + public import vehicle::**; + filter @Safety and (as Safety).isMandatory; + } +} diff --git a/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-2.sysml b/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-2.sysml new file mode 100644 index 00000000..ff8f4e08 --- /dev/null +++ b/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup-2.sysml @@ -0,0 +1,52 @@ +package '13b-Safety and Security Features Element Group-2' { + private import ScalarValues::*; + private import AnnotationDefinitions::*; + private import PartsTree::*; + + package AnnotationDefinitions { + metadata def Safety { + attribute isMandatory : Boolean; + } + metadata def Security; + } + + package PartsTree { + part vehicle { + part interior { + part alarm {@Security;} + part seatBelt[2] {@Safety{isMandatory = true;}} + part frontSeat[2]; + part driverAirBag {@Safety{isMandatory = false;}} + } + part bodyAssy { + part body; + part bumper {@Safety{isMandatory = true;}} + part keylessEntry {@Security;} + } + part wheelAssy { + part wheel[2]; + part antilockBrakes[2] {@Safety{isMandatory = false;}} + } + } + } + + package 'Safety Features' { + /* Parts that contribute to safety. */ + public import vehicle::**[@Safety]; + } + + package 'Security Features' { + /* Parts that contribute to security. */ + public import vehicle::**[@Security]; + } + + package 'Safety & Security Features' { + /* Parts that contribute to safety OR security. */ + public import vehicle::**[@Safety or @Security]; + } + + package 'Mandatory Saftey Features' { + /* Parts that contribute to safety AND are mandatory. */ + public import vehicle::**[@Safety and (as Safety).isMandatory]; + } +} diff --git a/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup.sysml b/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup.sysml new file mode 100644 index 00000000..231f9e7d --- /dev/null +++ b/test/SysMLModels/OMG/validation/13-ModelContainment/13b-SafetyAndSecurityFeaturesElementGroup.sysml @@ -0,0 +1,40 @@ +package '13b-Safety and Security Features Element Group' { + + part vehicle1_c1 { + part interior { + part alarm; + part seatBelt[2]; + part frontSeat[2]; + part driverAirBag; + } + part bodyAssy { + part body; + part bumper; + part keylessEntry; + } + } + + package 'Safety Features' { + /* Parts that contribute to safety. */ + + public import vehicle1_c1::interior::seatBelt; + public import vehicle1_c1::interior::driverAirBag; + public import vehicle1_c1::bodyAssy::bumper; + } + + package 'Security Features' { + /* Parts that contribute to security. */ + + public import vehicle1_c1::interior::alarm; + public import vehicle1_c1::bodyAssy::keylessEntry; + } + + package 'Safety & Security Features' { + /* Parts that contribute to safety AND + * parts that contribute to security. + */ + + public import 'Safety Features'::*; + public import 'Security Features'::*; + } +} diff --git a/test/SysMLModels/OMG/validation/14-LanguageExtensions/14a-LanguageExtensions.sysml b/test/SysMLModels/OMG/validation/14-LanguageExtensions/14a-LanguageExtensions.sysml new file mode 100644 index 00000000..0a7ec109 --- /dev/null +++ b/test/SysMLModels/OMG/validation/14-LanguageExtensions/14a-LanguageExtensions.sysml @@ -0,0 +1,31 @@ +package '14a-Language Extensions' { + private import 'User Defined Extensions'::*; + + package 'User Defined Extensions' { + + enum def ClassificationLevel { + uncl; + conf; + secret; + } + + metadata def Classified { + ref :>> annotatedElement : SysML::PartUsage; + attribute classificationLevel : ClassificationLevel[1]; + } + } + + part part_X { + metadata Classified { + classificationLevel = ClassificationLevel::conf; + } + } + + // Alternative shorthand notation + part part_Y { + @Classified { + classificationLevel = ClassificationLevel::conf; + } + } + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/14-LanguageExtensions/14b-LanguageExtensions.sysml b/test/SysMLModels/OMG/validation/14-LanguageExtensions/14b-LanguageExtensions.sysml new file mode 100644 index 00000000..d88e9e38 --- /dev/null +++ b/test/SysMLModels/OMG/validation/14-LanguageExtensions/14b-LanguageExtensions.sysml @@ -0,0 +1,51 @@ +package '14b-Language-Extensions' { + + package LibraryModel { + + part def ECU; + + } + + package UserModel { + + package Definitions { + private import LibraryModel::*; + + part def VehicleControlUnit :> ECU; + part def EngineControlUnit :> ECU; + + part def Vehicle; + part def Engine; + part def CanBus; + + port def BusIF; + } + + package Usages { + private import Definitions::*; + + part vehicle1: Vehicle { + part vehicleControlUnit : VehicleControlUnit { + port busIF: ~BusIF; + } + + connect vehicleControlUnit.busIF to canBus.vehicleControlIF; + + part canBus: CanBus { + port vehicleControlIF: BusIF; + port engineControlIF: BusIF; + port sensorIF: BusIF; + } + + connect engine.engineControlUnit.busIF to canBus.engineControlIF; + + part engine: Engine { + part engineControlUnit: EngineControlUnit { + port busIF: ~BusIF; + } + } + } + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/14-LanguageExtensions/14c-LanguageExtensions.sysml b/test/SysMLModels/OMG/validation/14-LanguageExtensions/14c-LanguageExtensions.sysml new file mode 100644 index 00000000..b3f05884 --- /dev/null +++ b/test/SysMLModels/OMG/validation/14-LanguageExtensions/14c-LanguageExtensions.sysml @@ -0,0 +1,208 @@ +package '14c-Language-Extensions' { + private import ScalarValues::*; + + library package FMEALibrary { + + abstract occurrence def Situation; + + abstract occurrence situations : Situation[*] nonunique; + + occurrence def Cause :> Situation { + attribute occurs[0..1]: Real; + } + + abstract occurrence causes : Cause[*] nonunique; + + occurrence def FailureMode :> Situation { + attribute detected[0..1]: Real; + } + + abstract occurrence failureModes : FailureMode[*] nonunique; + + occurrence def Effect :> Situation { + attribute severity[0..1]: String; + } + + abstract occurrence effects : Effect[*] nonunique; + + item def FMEAItem :> Situation { + attribute RPN: Real[0..1]; + + occurrence :>> causes; + occurrence :>> failureModes; + occurrence :>> effects; + } + + abstract item fmeaItems : FMEAItem[*] nonunique; + + connection def Causation :> Occurrences::HappensBefore { + end [*] ref cause: Situation; + end [*] ref effect: Situation; + } + + abstract connection causations : Causation[*] nonunique; + + requirement def FMEARequirement; + + abstract requirement fmeaRequirements : FMEARequirement[*] nonunique; + + requirement def RequirementWithSIL :> FMEARequirement { + attribute sil: SIL; + } + + enum def SIL { A; B; C; } + + connection def Violation { + end [*] ref sit: Situation; + end [*] ref req: FMEARequirement; + } + + abstract connection violations : Violation[*] nonunique; + + abstract connection def ControllingMeasure { + end [*] ref sit: Situation; + end [*] ref req: FMEARequirement; + } + + connection def Prevention :> ControllingMeasure; + + abstract connection preventions : Prevention[*] nonunique; + + connection def Mitigation :> ControllingMeasure; + + abstract connection mitigations : Mitigation[*] nonunique; + + } + + library package FMEAMetadata { + private import Metaobjects::SemanticMetadata; + private import FMEALibrary::*; + + enum def Status { + Approved; + NotApproved; + } + + metadata def StatusHolder { + status: Status; + } + + metadata def SituationMetadata :> SemanticMetadata { + :>> baseType default situations meta SysML::Usage; + } + + metadata def CauseMetadata :> SituationMetadata { + :>> baseType = causes meta SysML::Usage; + } + + metadata def FailureModeMetadata :> SituationMetadata { + :>> baseType = failureModes meta SysML::Usage; + } + + metadata def EffectMetadata :> SituationMetadata { + :>> baseType = effects meta SysML::Usage; + } + + metadata def FMEAItemMetadata :> SituationMetadata { + :> annotatedElement : SysML::ItemDefinition; + :> annotatedElement : SysML::ItemUsage; + :>> baseType = fmeaItems meta SysML::Usage; + } + + metadata def CausationMetadata :> SemanticMetadata { + :>> annotatedElement : SysML::ConnectionUsage; + :>> baseType = causations meta SysML::Usage; + } + + metadata def FMEARequirementMetadata :> SemanticMetadata { + :>> annotatedElement : SysML::RequirementUsage; + :>> baseType = fmeaRequirements meta SysML::Usage; + } + + metadata def ViolationMetadata :> SemanticMetadata { + :>> annotatedElement : SysML::ConnectionUsage; + :>> baseType = violations meta SysML::Usage; + } + + abstract metadata def ControllingMeasureMetadata :> SemanticMetadata { + :>> annotatedElement : SysML::ConnectionUsage; + } + + metadata def PreventionMetadata :> ControllingMeasureMetadata { + :>> baseType = preventions meta SysML::Usage; + } + + metadata def MitigationMetadata :> ControllingMeasureMetadata { + :>> baseType = mitigations meta SysML::Usage; + } + + } + + package FMEAUserModel { + private import FMEALibrary::*; + private import FMEAMetadata::*; + + #fmeaspec requirement req1 { + doc /* Meter designed according to ISO00124 */ + } + + #fmeaspec requirement req2 { + doc /* Device working for 1 week without the need to replace batteries */ + } + + #fmeaspec requirement req3: RequirementWithSIL { + @StatusHolder { status = Status::Approved; } + + doc /* Alarm when battery has sank */ + + :>> sil = SIL::A; + } + + #fmea item def 'Glucose FMEA Item' { + + #prevention connect 'battery depleted' to req1; + + #cause occurrence 'battery depleted' { + :>> occurs = 0.005; + } + + #causation connect 'battery depleted' to 'battery cannot be charged'; + + #failure occurrence 'battery cannot be charged' { + :>> detected = 0.013; + } + + #causation connect 'battery cannot be charged' to 'glucose level undetected'; + + #effect occurrence 'glucose level undetected'; + + #causation connect 'glucose level undetected' to 'therapy delay'; + + #effect occurrence 'therapy delay' { + :>> severity = "High"; + } + + } + + #violation connect 'Glucose Meter in Use' to req2; + #mitigation connect 'Glucose Meter in Use' to req3; + + #fmea item 'Glucose Meter in Use' : 'Glucose FMEA Item' { + + part 'glucose meter' { + event 'glucose level undetected'[*]; + part battery { + event 'battery depleted'[*]; + event 'battery cannot be charged'[*]; + } + part pump; + part reservoir; + } + + part patient { + event 'therapy delay'[*]; + } + } + + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_01-Constants.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_01-Constants.sysml new file mode 100644 index 00000000..bb04e45d --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_01-Constants.sysml @@ -0,0 +1,55 @@ +package '15_01-Constants' { + private import MeasurementReferences::*; + private import SI::*; + private import RealFunctions::*; + + /* Note: Value properties that are bound to specific values are constants and have the specified + * values in all contexts. It is not legal to redefine them. + */ + + package 'Mathematical Constants' { + doc + /* + * Standard mathematical constants + * + * Irrational constants cannot be represented exactly with finite precision. + * However, they can be required to be implemented with a attribute that is accurate + * to at least a certain precision. + * + * (The decimal literals here should be interpreted as being fixed point and exact.) + */ + + attribute e: Real { + assert constraint { round(e * 1E20) == 271828182845904523536.0 } + } + attribute pi: Real { + assert constraint { round(pi * 1E20) == 314159265358979323846.0 } + } + } + + package 'Fundamental Physical Constants' { + doc + /* + * Standard fundamental physical constants + * + * Physical constants have a standard measured attribute to a finite precision. + * + * The reference source is: + * CODATA - Task Group on Fundamental Physical Constants (TGFC) - 2018 CODATA recommended values + * See https://codata.org/initiatives/strategic-programme/fundamental-physical-constants/ + * For the actual values see https://pml.nist.gov/cuu/Constants/ + */ + + attribute 'fine structure constant' : DimensionOneValue = 7.2973525693E-3[one]; // 2018 CODATA attribute 7.2973525693E-3; uncertainty = 0.0000000011E-3 + attribute 'electron to proton mass ratio': DimensionOneValue = 5.44617021487E-4[one]; // 2018 CODATA attribute 5.44617021487E-4; uncertainty = 0.00000000033E-4 + attribute 'speed of light in vacuum' : SpeedValue = 299792458[m/s]; // 2018 CODATA attribute 299792458 m s^-1; (exact) + } + + package 'Global Context' { + attribute 'nominal earth gravitational acceleration': AccelerationValue = 9.80665['m/s²']; + } + + package 'Model X Context' { + attribute 'amplifier gain': DimensionOneValue = 3.5[one]; + } +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_02-BasicValueProperties.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_02-BasicValueProperties.sysml new file mode 100644 index 00000000..84a7fe20 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_02-BasicValueProperties.sysml @@ -0,0 +1,25 @@ +package '15_02-Basic Value Properties' { + private import ScalarValues::*; + + attribute def LengthValue :> Real { + doc + /* + * Real world user models would use a quantity type + * from the library model. A attribute def is defined + * here to show that it is possible. + */ + } + + part def Tire { + attribute manufacturer: String; + attribute hubDiameter: LengthValue; + attribute width: Integer; + } + + part frenchTire: Tire { + attribute :>> manufacturer = "Michelin"; + attribute :>> hubDiameter = 18.0; + attribute :>> width = 245; + } + +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_03-ValueExpression.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_03-ValueExpression.sysml new file mode 100644 index 00000000..08efaa0a --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_03-ValueExpression.sysml @@ -0,0 +1,30 @@ +package '15_03-Value Expression' { + private import SI::*; + private import USCustomaryUnits::*; + + part def Vehicle_1 { + attribute mass: MassValue = 1200 [kg]; + attribute length: LengthValue = 4.82 [m]; + part leftFrontWheel : Wheel; + part rightFrontWheel : Wheel; + } + + part def Wheel { + attribute hubDiameter: LengthValue = 18 ['in']; + attribute width: LengthValue = 245 [mm]; + attribute outerDiameter: LengthValue = (hubDiameter + 2 * tire.height) [mm] { + doc + /* + * This binds 'outDiameter' to the result of a computed attribute. + * There is no need to mark it as "derived". + */ + } + part tire: Tire[1]; + } + + part def Tire { + attribute profileDepth: LengthValue default 6.0 [mm]; + constraint hasLegalProfileDepth {profileDepth >= 3.5 [mm]} + attribute height: LengthValue = 45 [mm]; + } +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_04-LogicalExpressions.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_04-LogicalExpressions.sysml new file mode 100644 index 00000000..4bf87321 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_04-LogicalExpressions.sysml @@ -0,0 +1,30 @@ +package '15_04-Logical Expressions' { + private import ScalarValues::*; + + part def Engine; + part def '4CylEngine' :> Engine; + part def '6CylEngine' :> Engine; + + part def Transmission; + part def ManualTransmission :> Transmission; + part def AutomaticTransmission :> Transmission; + + part def Vehicle { + attribute isHighPerformance: Boolean; + + part engine: Engine[1]; + part transmission: Transmission[1]; + + assert constraint { + if isHighPerformance? engine istype '6CylEngine' + else engine istype '4CylEngine' + } + + assert constraint { + (engine istype '4CylEngine' and + transmission istype ManualTransmission) xor + (engine istype '6CylEngine' and + transmission istype AutomaticTransmission) + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_05-UnificationOfExpressionAndConstraintDefinition.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_05-UnificationOfExpressionAndConstraintDefinition.sysml new file mode 100644 index 00000000..70d55bc2 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_05-UnificationOfExpressionAndConstraintDefinition.sysml @@ -0,0 +1,56 @@ +package '15_05-Unification of Expression and Constraint Definition' { + private import '15_03-Value Expression'::*; + private import ControlFunctions::forAll; + private import SI::*; + + constraint def DiscBrakeConstraint { + in wheelAssy : WheelAssy[4]; + + wheelAssy->forAll {in ref w: WheelAssy; + 2 * w.discBrakeAssy.radius < w.wheel.outerDiameter + } + } + + constraint def DiscBrakeFitConstraint_Alt { + in discBrakeAssy : DiscBrakeAssy[1]; + in wheel : Wheel[1]; + + 2 * discBrakeAssy.radius < wheel.outerDiameter + } + + part def Vehicle_2 { + attribute mass : MassValue[1] = 1200 [kg]; + attribute length : LengthValue[1] = 4.82 [m]; + + part wheelAssy : WheelAssy[4]; + + constraint discBrakeConstraint : DiscBrakeConstraint { + doc + /* + * This constraint is computed, but not asserted. This means a tool can identify + * when it is violated without the model being inconsistent. + */ + in wheelAssy = Vehicle_2::wheelAssy; + } + } + + part def WheelAssy { + part wheel : Wheel[1]; + part discBrakeAssy : DiscBrakeAssy[1]; + + assert constraint discBrakeFitConstraint_Alt: DiscBrakeFitConstraint_Alt { + doc + /* + * This constraint is asserted to be true, which means that the model + * is inconsistent if it the constraint is violated. + */ + + in discBrakeAssy = WheelAssy::discBrakeAssy; + in wheel = WheelAssy::wheel; + } + } + + part def DiscBrakeAssy { + attribute radius : LengthValue[1] = 95 [mm]; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_06-SystemOfQuantities.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_06-SystemOfQuantities.sysml new file mode 100644 index 00000000..6e2076b0 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_06-SystemOfQuantities.sysml @@ -0,0 +1,40 @@ +package '15_06-System of Quantities' { + private import ISQ::*; + + /* + * A System of Quantities is represented by a model library package. + * + * Its structure is modeled after the International System of Quantities (ISQ): + * - Quantity dimension is defined as the product of powers of a selected set of base quantities. + * - A system of quantities is multi-dimensional space spanned by the powers of its base quantities. + * - Any base quantity is modeled as a specialization of a SimpleUnit. Such a specialized SimpleUnit defines one base unit vector + * (with power one by definition), e.g. MassUnit with symbol M, that establishes a base quantity dimension for the system of quantities, + * without committing yet to a particular choice of measurement unit. + * - To complete the system of quantities any number of derived quantities can be added. + * - A derived quantity is modeled as a specialization of a DerivedUnit. A DerivedUnit is defined in terms of so-called UnitPowerFactors. + * Each UnitPowerFactor is a combination of a base (or other derived) quantity and an exponent. + * - As an example the AccelerationUnit (specialization of DerivedUnit) can be defined as the combination of LengthUnit (symbol L) + * to the power 1 and TimeUnit (symbol T) to the power -2, so having quantity dimension L¹⋅T⁻². + * - A quantity of dimension one is defined as a derived quantity for which the effective exponent for each + * of its base quantity power factors is zero. Historically a quantity of dimension one was also called a dimensionless quantity. + * - A quantity of dimension one may be defined by adding all quantity power factors that cancel out by having positive and negative + * exponents. Doing so enables distinction between different 'kinds of' quantities of dimension one, e.g: + * angle (L¹⋅L⁻¹), mass ratio (L¹⋅L⁻¹), power ratio (L²⋅M⋅T⁻³⋅L⁻²⋅M⁻¹⋅T³), Mach number (L¹⋅T⁻¹⋅L⁻¹⋅T¹). + * + * The International System of Quantities (ISQ) as defined in ISO/IEC 80000 is added as a predefined model library to SysML v2. + * However, this does not prevent to model any other system of quantities in another model library and use it. + */ + + /* + * Above capabilities were implemented in: + * - standard library Quantities: + * TensorQuantityValue, VectorQuantityValue, ScalarQuantityValue, + * tensorQuantities, vectorQuantities, scalarQuantities, + * SystemOfQuantities + * - standard library MeasurementReferences: + * TensorMeasurementReference, VectorMeasurementReference, ScalarMeasurementReference, + * SystemOfUnits + * - standard library ISQBase: + * attribute 'International System of Quantities': SystemOfQuantities in ISQBase + */ +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_07-SystemOfUnitsAndScales.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_07-SystemOfUnitsAndScales.sysml new file mode 100644 index 00000000..cd861d6b --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_07-SystemOfUnitsAndScales.sysml @@ -0,0 +1,46 @@ +package '15_07-System of Units and Scales' { + private import ISQ::*; + private import USCustomaryUnits::*; + + /* + * A System of Units and Scales is represented by a model library package. + * + * Its structure is modeled after the International System of Units -- Système Internationale d'Unités, abbreviated to SI -- as defined in ISO/IEC 80000: + * - Measurement units and scales are generalized to a common super type MeasurementReference. + * - A particular quantity is modeled as the tuple of a numerical value (i.e. a mathematical number) and a MeasurementReference. + * - An actual measurement unit is modeled as a usage of a specialization of either SimpleUnit or DerivedUnit, e.g. TimeUnit or ForceUnit, + * see the SI package. + * - The quantity dimension of the actual unit usage must match the quantity dimension of the generic quantity unit definition that it is a usage of. + * - A system of units and scales must define exactly one selected base unit for each base quantity in the associated system of quantities. The collection of + * base units forms the foundation for automated quantity value conversion between any pair of compatible units and/or scales. + * - If only a measurement unit is used on a quantity value, it implies expression on a ratio scale, in other words only the ratio between the actual quantity value, + * and the defined unit value is of importance. On ratio scales for one kind of quantity that only differ in their unit (e.g. metre and inch) + * zero is zero no matter what unit is selected. + * - A unit may carry a conversion factor definition w.r.t. to another reference unit. It can be a conversion by convention (e.g. between metre and foot) or + * via an ISO/IEC 80000 prefix symbol that indicates a decimal or binary multiple or sub-multiple (e.g. kilo, nano, mega, kibi, mebi, ...). See package SIPrefixes. + * - In addition to measurement units / ratio scales also other types of measurement scales are supported. The additional scales are: + * - ordinal scales (e.g. Beaufort wind force, Richter Scale, Rockwell C hardness scale), + * - interval scales (e.g. absolute temperature in deg C or F), + * - cyclic ratio scales (e.g. rotation angle with modulus 360 degree), + * - logarithmic scales (e.g. dB(A) or dBA sound pressure level w.r.t. a reference ambient pressure, dB(m) or dBm power ratio w.r.t. 1 mW). + * - Any base unit quantity is modeled as a specialization of a SimpleUnit. This specialized SimpleUnit (e.g. MassUnit) defines one base unit vector (with power one by definition) + * that establishes a base quantity dimension for the system of quantities, without committing yet to a particular choice of measurement unit. + * + * The International System of Units (SI) as defined in ISO/IEC 80000 as well as the US Customary System of Units as defined by NIST SP 811 + * are added as predefined model libraries to SysML v2. + * However, this does not prevent to model any other system of units and scales in another model library and use it. + */ + + /* + * Above capabilities were implemented in: + * - standard library MeasurementReferences: + * TensorMeasurementReference, VectorMeasurementReference, ScalarMeasurementReference, + * MeasurementUnit, OrdinalScale, IntervalScale, CyclicRatioScale, LogarithmicScale, + * SystemOfUnits + * - standard library SI: + * attribute 'ISO/IEC 80000 International System of Units' : SystemOfUnits + * :>> systemOfQuantities = isq; + * :>> baseUnits = (m, kg, s, A, K, mol, cd); + * } + */ +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_08-RangeRestriction.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_08-RangeRestriction.sysml new file mode 100644 index 00000000..d2cc3445 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_08-RangeRestriction.sysml @@ -0,0 +1,19 @@ +package '15_08-Range Restriction' { + private import ISQ::*; + private import SI::*; + private import '15_01-Constants'::'Mathematical Constants'::pi; + + part def HeadLightsTiltKnob { + attribute headLightsTile : LightBeamTiltAngleValue[1]; + } + + attribute def LightBeamTiltAngleValue :> PlaneAngleValue { + attribute angle: LightBeamTiltAngleValue :>> self { + doc + /* + * Tilt angle shall be limited to the range between 50 and 80 degrees (inclusive). + */ + } + assert constraint { angle >= 50 ['°'] and angle <= 80 ['°'] } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_10-PrimitiveDataTypes.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_10-PrimitiveDataTypes.sysml new file mode 100644 index 00000000..2a03ed01 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_10-PrimitiveDataTypes.sysml @@ -0,0 +1,89 @@ +package '15.10-Primitive Data Types' { + /* + * Primitive data types are defined in normative model libraries. + * Any more specialized data types can be declared in user-defined + * model libraries or models as needed. + */ + + private import ScalarValues::Integer { + doc + /* + * The unqualified Integer is signed, in line with integer numbers in mathematics. + */ + } + + private import ScalarValues::Natural; + attribute def UnsignedInteger :> Natural { + doc /* Mathematically, unsigned integers are just natural numbers (non-negative integers). */ + } + + private import ScalarValues::Real { + doc + /* + * The unqualified Real is signed, in line with real numbers in mathematics. + */ + } + + attribute def UnsignedReal :> Real { + doc + /* + * Example of restriction of the base Real datatype. + */ + attribute x: Real :>> self; + assert constraint { x >= 0.0 } + } + + private import ScalarValues::String { + doc + /* + * String attributes are sequences of characters. + */ + } + + private import ScalarValues::Boolean { + doc + /* + * Boolean type has two legal attributes: true, false. + */ + } + + private import Time::DateTime; + + enum def ConditionColor { + doc + /* + * Enumerations are defined as an implicit restriction of the extent of the + * enumeration type to the listed enumeration values. + * Note: Enumerations are currently limited to attributes. + */ + + enum red; + enum yellow; + enum green; + } + + attribute def ConditionLevel { + attribute associatedColor : ConditionColor; + } + + enum def SeverityEnum :> ConditionLevel { + danger { + :>> associatedColor = ConditionColor::red; + } + warning { + :>> associatedColor = ConditionColor::yellow; + } + normal { + :>> associatedColor = ConditionColor::green; + } + } + + attribute def Diameter :> ISQ::LengthValue; + enum def DiameterChoice :> Diameter { + small = 60 [SI::mm]; + medium = 70 [SI::mm]; + large = 80 [SI::mm]; + } + attribute aperatureDiameter: DiameterChoice = DiameterChoice::small; + +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_11-VariableLengthCollectionTypes.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_11-VariableLengthCollectionTypes.sysml new file mode 100644 index 00000000..30b57d35 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_11-VariableLengthCollectionTypes.sysml @@ -0,0 +1,36 @@ +package '15_11-Variable Length Collection Types' { + private import ScalarValues::*; + private import Collections::*; + + part def SparePart; + part def Person; + + /* Examples of declaring syntactic sugar-like names for instantiating collection types. */ + + attribute def 'Bag' :> Bag { + ref part :>> elements: SparePart; + } + + attribute def 'List' :> List { + value :>> elements: Integer; + } + + attribute def 'Set' :> Set { + attribute :>> elements: String; + } + + attribute def 'OrderedSet' :> OrderedSet { + ref part :>> elements: Person; + } + + attribute def 'List>' :> List { + attribute :>> elements: Set { + ref part :>> elements: Person; + } + } + + attribute def 'Array[4]' :> Array { + attribute :>> elements: Real; + attribute :>> dimensions = 4; + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_12-CompoundValueType.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_12-CompoundValueType.sysml new file mode 100644 index 00000000..2e412d84 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_12-CompoundValueType.sysml @@ -0,0 +1,31 @@ +package '15_12-Compound Value Type' { + private import ScalarValues::*; + private import USCustomaryUnits::'in'; + + /* + * Real world user models would use quantity and vector types + * from library models. They are included here for the purpose + * of showing how such attribute defs can be defined. + */ + + attribute def PositionVector { + attribute x: Real[1]; + attribute y: Real[1]; + attribute z: Real[1]; + } + + attribute def LengthValue :> Real; + + attribute def TireInfo { + attribute manufacturer: String; + attribute hubDiameter: LengthValue; + attribute width: Integer; + attribute placement: PositionVector[0..1]; + } + + attribute frenchTireInfo: TireInfo { + attribute :>> manufacturer = "Michelin"; + attribute :>> hubDiameter = 18.0['in']; + attribute :>> width = 245; + } +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_13-DiscretelySampledFunctionValue.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_13-DiscretelySampledFunctionValue.sysml new file mode 100644 index 00000000..8ad93be6 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_13-DiscretelySampledFunctionValue.sysml @@ -0,0 +1,76 @@ +package '15_13-Discretely Sampled Function Value' { + private import SampledFunctions::SampledFunction; + private import SampledFunctions::SamplePair; + private import Collections::Array; + private import ISQ::*; + private import SI::*; + private import MeasurementReferences::*; + private import Time::*; + + attribute def MissionElapsedTimeScale :> TimeScale { + :>> unit = s; + attribute :>> definitionalEpoch { + :>> num = 0; + :>> definition = "time instant zero at launch"; + } + attribute definitionalEpochInUTC : Iso8601DateTime; + + // Map the definitional epoch (t = 0) of this scale to a reference epoch expressed in UTC + // This modeled as a 1D coordinate transformation (translation only) + attribute :>> transformation : CoordinateFramePlacement { + :>> source = UTC; + :>> origin = definitionalEpochInUTC; + :>> basisDirections = 1 [UTC]; + } + } + + attribute mets: MissionElapsedTimeScale { + doc + /* + * Define mission elapsed time scale starting at given UTC date time (in microsecond resolution) + */ + :>> definitionalEpochInUTC { :>> val = "2020-08-23T22:42:32.924534Z";} + } + + attribute def MissionElapsedTimeValue :> TimeInstantValue { + doc + /* + * Define scalar quantity value type for mission elapsed time + */ + :>> mRef = mets; + } + + attribute spatialCF: CartesianSpatial3dCoordinateFrame[1] { + doc + /* + * Define Cartesian 3D coordinate systems for position and velocity + * Create a velocity coordinate system from the spatial coordinate system through division by second + */ + :>> mRefs = (m, m, m); + } + attribute velocityCF: CartesianVelocity3dCoordinateFrame[1] = spatialCF/s; + + attribute def PositionAndVelocity { + attribute position : CartesianPosition3dVector[1]; + attribute velocity : CartesianVelocity3dVector[1]; + } + + attribute def AscentProfile :> SampledFunction { + attribute def AscentSample :> SamplePair { + attribute :>> domainValue: MissionElapsedTimeValue[1]; + attribute :>> rangeValue: PositionAndVelocity[1]; + } + attribute :>> samples: AscentSample[*] ordered; + } + + attribute ascentProfile1: AscentProfile { + doc /* Example ascent profile */ + attribute sample1: AscentSample { :>> domainValue = 0.0 [mets]; :>> rangeValue = pv1; + attribute pv1: PositionAndVelocity {:>> position = (0, 0, 0) [spatialCF]; :>> velocity = (0, 0, 0) [velocityCF]; } } + attribute sample2: AscentSample { :>> domainValue = 2.5 [mets]; :>> rangeValue = pv1; + attribute pv1: PositionAndVelocity {:>> position = (0.01, 0.03, 8.6) [spatialCF]; :>> velocity = (0, 0, 5.5) [velocityCF]; } } + attribute sample3: AscentSample { :>> domainValue = 5.1 [mets]; :>> rangeValue = pv1; + attribute pv1: PositionAndVelocity {:>> position = (0.04, 0.12, 18.6) [spatialCF]; :>> velocity = (0.05, 0.03, 25.3) [velocityCF]; } } + attribute :>> samples = (sample1, sample2, sample3); + } +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19-MaterialsWithProperties.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19-MaterialsWithProperties.sysml new file mode 100644 index 00000000..65abf474 --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19-MaterialsWithProperties.sysml @@ -0,0 +1,82 @@ +package '15_19-Materials with Properties' { + private import ScalarValues::Real; + private import Quantities::*; + private import MeasurementReferences::*; + private import SI::*; + + attribute def AtomicMassValue :> MassValue; + + attribute def TensileStrengthUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def TensileStrengthValue :> ScalarQuantityValue { + attribute :>> num: Real; + attribute :>> mRef: TensileStrengthUnit; + } + + attribute <'N/mm²'> 'newton per square millimetre' : TensileStrengthUnit = N / mm^2; + + part def Substance; + part def Material :> Substance; + + /* + * The classification of materials into metals and alloys is grossly simplified and not exhaustive. + * A more complete classification would include: ChemicalSubstance, PureMaterial, MixedMaterial, + * Class, Ceramic, OrganicMaterial, AnorganicMaterial, Polymer, HybridMaterial, CompositeMaterial, + * etc. + */ + + part def Metal :> Material { + attribute atomicMass: AtomicMassValue[1]; + } + + attribute def MaterialFraction { + ref material: Material[1]; + attribute massFraction: MassFractionValue[1]; + } + + attribute def MassFractionValue :> DimensionOneValue; + + part def Alloy :> Material { + attribute fractions: MaterialFraction[2..*]; + } + + individual def Iron :> Metal { + attribute :>> atomicMass = 55.845 [Da]; + } + + individual def Carbon :> Metal { + attribute atomicMass :>> Metal::atomicMass = 12.011[Da]; + } + + individual def Manganese :> Metal { + attribute atomicMass :>> Metal::atomicMass = 54.938[Da]; + } + + individual def Steel_980 :> Alloy { + /* + * Particular example of high tensile strength steel. + */ + + attribute fraction1 :> fractions { + ref :>> material : Iron; + attribute :>> massFraction = 0.9862[one]; + } + + attribute fraction2 :> fractions { + ref :>> material : Carbon; + attribute :>> massFraction = 0.9862[one]; + } + + attribute fraction3 :> fractions { + ref :>> material : Manganese; + attribute :>> massFraction = 0.9862[one]; + } + + attribute tensileStrength: TensileStrengthValue = 980['N/mm²']; + } +} diff --git a/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19a-MaterialsWithProperties.sysml b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19a-MaterialsWithProperties.sysml new file mode 100644 index 00000000..7704f06f --- /dev/null +++ b/test/SysMLModels/OMG/validation/15-Properties-Values-Expressions/15_19a-MaterialsWithProperties.sysml @@ -0,0 +1,69 @@ +package '15_19a-Materials with Properties' { + private import ScalarValues::*; + private import Quantities::*; + private import MeasurementReferences::*; + private import SI::*; + + attribute def AtomicMassValue :> MassValue; + + /* Example declarations of a quantity and unit that are not specified in ISQ and SI */ + + attribute def TensileStrengthUnit :> DerivedUnit { + private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; } + private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; } + private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; } + attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); } + } + + attribute def TensileStrengthValue :> ScalarQuantityValue { + attribute :>> num: Real; + attribute :>> mRef: TensileStrengthUnit; + } + + attribute <'N/mm²'> 'newton per square millimetre' : TensileStrengthUnit = N / mm^2; + + attribute def Substance; + attribute def Material :> Substance; + + /* + * The classification of materials into metals and alloys is grossly simplified and not exhaustive. + * A more complete classification would include: ChemicalSubstance, PureMaterial, MixedMaterial, + * Class, Ceramic, OrganicMaterial, AnorganicMaterial, Polymer, HybridMaterial, CompositeMaterial, + * etc. + */ + + attribute def Metal :> Material { + attribute atomicMass: AtomicMassValue[1]; + } + + attribute def Alloy :> Material { + attribute fractions: MaterialFraction[2..*]; + } + + attribute def MaterialFraction { + attribute material: Material[1]; + attribute massFraction: MassFractionValue[1]; + } + + attribute def MassFractionValue :> DimensionOneValue; + + /* + * Value properties bound to specifically constructed compound values. + */ + attribute Iron: Metal { :>> atomicMass = 55.845[Da]; } + attribute Carbon: Metal { :>> atomicMass = 12.011[Da]; } + attribute Manganese: Metal { :>> atomicMass = 54.938[Da]; } + + attribute Steel_980: Alloy { + /* + * Value property with redefined/added sub-properties. + * (Particular example of high tensile strength steel.) + */ + + private attribute fraction1: MaterialFraction { :>> material = Iron; :>> massFraction = 0.9862[one]; } + private attribute fraction2: MaterialFraction { :>> material = Carbon; :>> massFraction = 0.0018[one]; } + private attribute fraction3: MaterialFraction { :>> material = Manganese; :>> massFraction = 0.012[one]; } + attribute :>> fractions = (fraction1, fraction2, fraction3); + attribute tensileStrength: TensileStrengthValue = 980 ['N/mm²']; + } +} diff --git a/test/SysMLModels/OMG/validation/17-SequenceModeling/17a-Sequence-Modeling.sysml b/test/SysMLModels/OMG/validation/17-SequenceModeling/17a-Sequence-Modeling.sysml new file mode 100644 index 00000000..a10a525d --- /dev/null +++ b/test/SysMLModels/OMG/validation/17-SequenceModeling/17a-Sequence-Modeling.sysml @@ -0,0 +1,42 @@ +package '17a-Sequence-Modeling' { + private import ScalarValues::*; + private import PayloadDefinitions::*; + + package PayloadDefinitions { + item def Subscribe { + attribute topic : String; + ref part subscriber; + } + + item def Publish { + attribute topic : String; + ref publication; + } + + item def Deliver { + ref publication; + } + } + + occurrence def PubSubSequence { + part producer[1] { + event occurrence publish_source_event; + } + + message publish_message of Publish[1] from producer.publish_source_event to server.publish_target_event; + + part server[1] { + event occurrence subscribe_target_event; + then event occurrence publish_target_event; + then event occurrence deliver_source_event; + } + + message subscribe_message of Subscribe[1] from consumer.subscribe_source_event to server.subscribe_target_event; + message deliver_message of Deliver[1] from server.deliver_source_event to consumer.deliver_target_event; + + part consumer[1] { + event occurrence subscribe_source_event; + then event occurrence deliver_target_event; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/17-SequenceModeling/17b-Sequence-Modeling.sysml b/test/SysMLModels/OMG/validation/17-SequenceModeling/17b-Sequence-Modeling.sysml new file mode 100644 index 00000000..9d2f158f --- /dev/null +++ b/test/SysMLModels/OMG/validation/17-SequenceModeling/17b-Sequence-Modeling.sysml @@ -0,0 +1,42 @@ +package '17b-Sequence-Modeling' { + private import ScalarValues::*; + private import PayloadDefinitions::*; + + package PayloadDefinitions { + item def Subscribe { + attribute topic : String; + ref part subscriber; + } + + item def Publish { + attribute topic : String; + ref publication; + } + + item def Deliver { + ref publication; + } + } + + occurrence def PubSubSequence { + part producer[1] { + event publish_message.sourceEvent; + } + + message publish_message of Publish[1]; + + part server[1] { + event subscribe_message.targetEvent; + then event publish_message.targetEvent; + then event deliver_message.sourceEvent; + } + + message subscribe_message of Subscribe[1]; + message deliver_message of Deliver[1]; + + part consumer[1] { + event subscribe_message.sourceEvent; + then event deliver_message.targetEvent; + } + } +} \ No newline at end of file diff --git a/test/SysMLModels/OMG/validation/18-UseCase/18-UseCase.sysml b/test/SysMLModels/OMG/validation/18-UseCase/18-UseCase.sysml new file mode 100644 index 00000000..8554bb0d --- /dev/null +++ b/test/SysMLModels/OMG/validation/18-UseCase/18-UseCase.sysml @@ -0,0 +1,89 @@ +package '18-Use Case' { + + part def Vehicle; + part def Person; + part def Environment; + part def 'Fuel Station'; + + use case 'provide transportation' { + subject vehicle : Vehicle; + + actor driver : Person; + actor passengers : Person[0..4]; + actor environment : Environment; + + objective { + doc + /* Satisfy mission requirements to transport driver and passengers + * from starting location to ending location in conformance with + * the driving profile and meet the mission requirements for safety, + * reliability, comfort, and affordability. + */ + } + + ref :>> start { + doc /* Mock-up of a pre-condition. */ + assert constraint { + doc /* Vehicle at starting location */ + } + } + + first start; + + then include 'enter vehicle' { + subject; + actor :>> driver = 'provide transportation'::driver; + actor :>> passengers = 'provide transportation'::passengers; + } + + then use case 'drive vehicle' { + include 'add fuel'[0..*] { + doc + /* + * Mock-up of an extension point. + * (But reference to 'add fuel' is in the wrong direction, and it doesn't + * make the extension condition sufficient to trigger the behavior.) + */ + subject; + actor :>> fueler = driver; + ref :>> start { + doc /* Fuel level < 10% max fuel */ + } + } + } + + then include 'exit vehicle' { + subject; + actor :>> driver = 'provide transportation'::driver; + actor :>> passengers = 'provide transportation'::passengers; + } + + then done; + + ref :>> done { + doc /* Mock-up of a post-condition. */ + assert constraint { + doc /* Vehicle at ending location */ + } + } + + } + + use case 'enter vehicle' { + subject vehicle : Vehicle; + actor driver : Person; + actor passengers : Person[0..4]; + } + + use case 'exit vehicle' { + subject vehicle : Vehicle; + actor driver : Person; + actor passengers : Person[0..4]; + } + + use case 'add fuel' { + subject vehicle : Vehicle; + actor fueler : Person; + actor 'fuel station' : 'Fuel Station'; + } +} \ No newline at end of file diff --git a/test/SysMLModels/README.md b/test/SysMLModels/README.md new file mode 100644 index 00000000..40db34a3 --- /dev/null +++ b/test/SysMLModels/README.md @@ -0,0 +1,26 @@ +# SysMLModels + +This folder contains SysML v2 model files used as test inputs for +`DemaConsulting.SysML2Tools`. Each subfolder represents a distinct origin +(upstream source) so that provenance, licensing, and update instructions +remain clear. + +## Structure + +```text +SysMLModels/ + README.md — this file + OMG/ — models from Systems-Modeling/SysML-v2-Release + README.md — source, license, and transformation notes + examples/ — OMG example models + training/ — OMG training models + validation/ — OMG validation models +``` + +## Adding a New Origin + +1. Create a new subfolder named after the source (e.g., `MyOrg/`). +2. Add a `README.md` documenting the source URL, commit/tag, license, + and any filename transformations applied. +3. Add a test in `DemaConsulting.SysML2Tools.Tests` that references the new + folder. From dc0ed87497c205515e38b0b10f726bc52d5000fc Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 21:53:31 -0400 Subject: [PATCH 06/15] refactor: async ParseAsync with stdlib caching and parallel user-file parsing - Replace synchronous WorkspaceParser.Parse() with ParseAsync() - Stdlib is parsed once via Lazy> - first caller starts the Task, all concurrent callers (including parallel tests) await the same shared Task - User files are parsed in parallel with Task.WhenAll + Task.Run, reducing OMG model test time ~25% (1m50s -> 1m17s per framework) - Remove synchronous Parse() entirely following the HttpClient pattern: callers who need blocking use .GetAwaiter().GetResult() and own that decision - Async spreads to LintCommand.RunAsync, Program.RunAsync, async Task Main, Validation.RunAsync - All 96 tests pass (87 tool + 9 parser) across net8/net9/net10 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Lint/LintCommand.cs | 4 +- .../Program.cs | 20 +++---- .../SelfTest/Validation.cs | 18 +++--- .../Parser/WorkspaceParser.cs | 59 +++++++++++++------ .../Parser/OmgModelsTests.cs | 7 ++- .../Parser/WorkspaceParserTests.cs | 8 +-- .../Cli/CliSubsystemTests.cs | 54 ++++++++--------- .../ProgramTests.cs | 34 +++++------ .../SelfTest/SelfTestSubsystemTests.cs | 30 +++++----- .../SelfTest/ValidationTests.cs | 32 +++++----- 10 files changed, 145 insertions(+), 121 deletions(-) diff --git a/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs b/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs index 9e179aac..0f81e347 100644 --- a/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs +++ b/src/DemaConsulting.SysML2Tools.Tool/Lint/LintCommand.cs @@ -32,7 +32,7 @@ internal static class LintCommand /// Runs the lint command. /// /// The CLI context, supplying file patterns and output methods. - public static void Run(Context context) + public static async Task RunAsync(Context context) { var files = ResolveFiles(context.Files); @@ -44,7 +44,7 @@ public static void Run(Context context) context.WriteLine($"Linting {files.Count} file(s)..."); - var result = WorkspaceParser.Parse(files); + var result = await WorkspaceParser.ParseAsync(files).ConfigureAwait(false); foreach (var diagnostic in result.Diagnostics) { diff --git a/src/DemaConsulting.SysML2Tools.Tool/Program.cs b/src/DemaConsulting.SysML2Tools.Tool/Program.cs index f7dc777d..26fe98c3 100644 --- a/src/DemaConsulting.SysML2Tools.Tool/Program.cs +++ b/src/DemaConsulting.SysML2Tools.Tool/Program.cs @@ -64,7 +64,7 @@ public static string Version /// a stack trace. Any other exception is written to stderr and then re-thrown so that the /// runtime can record it in event logs. /// - public static int Main(string[] args) + public static async Task Main(string[] args) { try { @@ -72,7 +72,7 @@ public static int Main(string[] args) using var context = Context.Create(args); // Run the program logic - Run(context); + await RunAsync(context).ConfigureAwait(false); // Return the exit code from the context return context.ExitCode; @@ -80,19 +80,19 @@ public static int Main(string[] args) catch (ArgumentException ex) { // Print expected argument exceptions and return error code - Console.Error.WriteLine($"Error: {ex.Message}"); + await Console.Error.WriteLineAsync($"Error: {ex.Message}").ConfigureAwait(false); return 1; } catch (InvalidOperationException ex) { // Print expected operation exceptions and return error code - Console.Error.WriteLine($"Error: {ex.Message}"); + await Console.Error.WriteLineAsync($"Error: {ex.Message}").ConfigureAwait(false); return 1; } catch (Exception ex) { // Print unexpected exceptions and re-throw to generate event logs - Console.Error.WriteLine($"Unexpected error: {ex.Message}"); + await Console.Error.WriteLineAsync($"Unexpected error: {ex.Message}").ConfigureAwait(false); throw; } } @@ -105,7 +105,7 @@ public static int Main(string[] args) /// Dispatch is priority-ordered: version check first, then help, then self-validation, /// then main tool logic. Only the highest-priority matching action is executed per invocation. /// - public static void Run(Context context) + public static async Task RunAsync(Context context) { // Priority 1: Version query if (context.Version) @@ -127,12 +127,12 @@ public static void Run(Context context) // Priority 3: Self-Validation if (context.Validate) { - Validation.Run(context); + await Validation.RunAsync(context).ConfigureAwait(false); return; } // Priority 4: Main tool functionality - RunToolLogic(context); + await RunToolLogicAsync(context).ConfigureAwait(false); } ///

@@ -171,12 +171,12 @@ private static void PrintHelp(Context context) /// Runs the main tool logic. /// /// The context containing command line arguments and program state. - private static void RunToolLogic(Context context) + private static async Task RunToolLogicAsync(Context context) { switch (context.Command) { case SysmlCommand.Lint: - LintCommand.Run(context); + await LintCommand.RunAsync(context).ConfigureAwait(false); break; default: diff --git a/src/DemaConsulting.SysML2Tools.Tool/SelfTest/Validation.cs b/src/DemaConsulting.SysML2Tools.Tool/SelfTest/Validation.cs index 1fd14e04..56da6cf3 100644 --- a/src/DemaConsulting.SysML2Tools.Tool/SelfTest/Validation.cs +++ b/src/DemaConsulting.SysML2Tools.Tool/SelfTest/Validation.cs @@ -41,7 +41,7 @@ internal static class Validation /// extension is unsupported, context.WriteError is also called, resulting in a /// non-zero exit code. /// - public static void Run(Context context) + public static async Task RunAsync(Context context) { // Validate input ArgumentNullException.ThrowIfNull(context); @@ -56,8 +56,8 @@ public static void Run(Context context) }; // Run core functionality tests - RunVersionTest(context, testResults); - RunHelpTest(context, testResults); + await RunVersionTestAsync(context, testResults).ConfigureAwait(false); + await RunHelpTestAsync(context, testResults).ConfigureAwait(false); // Calculate totals var totalTests = testResults.Results.Count; @@ -108,7 +108,7 @@ private static void PrintValidationHeader(Context context) /// /// The context for output. /// The test results collection. - private static void RunVersionTest(Context context, DemaConsulting.TestResults.TestResults testResults) + private static async Task RunVersionTestAsync(Context context, DemaConsulting.TestResults.TestResults testResults) { var startTime = DateTime.UtcNow; var test = CreateTestResult("TemplateTool_VersionDisplay"); @@ -130,7 +130,7 @@ private static void RunVersionTest(Context context, DemaConsulting.TestResults.T int exitCode; using (var testContext = Context.Create([.. args])) { - Program.Run(testContext); + await Program.RunAsync(testContext).ConfigureAwait(false); exitCode = testContext.ExitCode; } @@ -138,7 +138,7 @@ private static void RunVersionTest(Context context, DemaConsulting.TestResults.T if (exitCode == 0) { // Read log content - var logContent = File.ReadAllText(logFile); + var logContent = await File.ReadAllTextAsync(logFile).ConfigureAwait(false); // Verify version string is in log (version contains dots like 0.0.0) var versionPattern = new System.Text.RegularExpressions.Regex(@"\b\d+\.\d+\.\d+"); @@ -177,7 +177,7 @@ private static void RunVersionTest(Context context, DemaConsulting.TestResults.T /// /// The context for output. /// The test results collection. - private static void RunHelpTest(Context context, DemaConsulting.TestResults.TestResults testResults) + private static async Task RunHelpTestAsync(Context context, DemaConsulting.TestResults.TestResults testResults) { var startTime = DateTime.UtcNow; var test = CreateTestResult("TemplateTool_HelpDisplay"); @@ -199,7 +199,7 @@ private static void RunHelpTest(Context context, DemaConsulting.TestResults.Test int exitCode; using (var testContext = Context.Create([.. args])) { - Program.Run(testContext); + await Program.RunAsync(testContext).ConfigureAwait(false); exitCode = testContext.ExitCode; } @@ -207,7 +207,7 @@ private static void RunHelpTest(Context context, DemaConsulting.TestResults.Test if (exitCode == 0) { // Read log content - var logContent = File.ReadAllText(logFile); + var logContent = await File.ReadAllTextAsync(logFile).ConfigureAwait(false); // Verify help text is in log if (logContent.Contains("Usage:") && logContent.Contains("Options:")) diff --git a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs index 4081d9b2..4cc42676 100644 --- a/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs +++ b/src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs @@ -98,7 +98,14 @@ internal WorkspaceParseResult(IReadOnlyList files, IReadOnlyList - /// Parses the stdlib plus every file matched by . + /// Stdlib parse result — computed once on first call, shared across all concurrent callers. + /// + private static readonly Lazy Files, IReadOnlyList Diagnostics)>> _stdlibTask = + new(() => Task.Run(ParseStdlibInternal)); + + /// + /// Parses the stdlib plus every file in asynchronously. + /// User files are parsed in parallel across the thread pool. /// /// /// Absolute or relative paths to .sysml or .kerml files to include. @@ -108,33 +115,33 @@ public static class WorkspaceParser /// A containing all files parsed and all /// diagnostics collected. /// - public static WorkspaceParseResult Parse(IEnumerable filePaths) + public static async Task ParseAsync(IEnumerable filePaths) { ArgumentNullException.ThrowIfNull(filePaths); - var allFiles = new List(); - var allDiagnostics = new List(); + // Await stdlib — starts on first call; returns cached result on all subsequent calls + var (stdlibFiles, stdlibDiagnostics) = await _stdlibTask.Value.ConfigureAwait(false); - // Parse each stdlib file (silently — no user-visible output on success) - foreach (var (virtualPath, content) in StdlibLoader.LoadAll()) - { - allFiles.Add(virtualPath); - ParseSource(virtualPath, content, allDiagnostics); - } + // Parse user files in parallel across the thread pool + var userResults = await Task.WhenAll( + filePaths.Select(path => Task.Run(() => + { + var content = File.ReadAllText(path); + var diagnostics = new List(); + ParseSource(path, content, diagnostics); + return (Path: path, Diagnostics: (IReadOnlyList)diagnostics); + }))).ConfigureAwait(false); - // Parse user-supplied files - foreach (var path in filePaths) - { - allFiles.Add(path); - var content = File.ReadAllText(path); - ParseSource(path, content, allDiagnostics); - } + var allFiles = stdlibFiles.Concat(userResults.Select(r => r.Path)).ToList(); + var allDiagnostics = stdlibDiagnostics + .Concat(userResults.SelectMany(r => r.Diagnostics)) + .ToList(); return new WorkspaceParseResult(allFiles, allDiagnostics); } /// - /// Parses SysML v2 source text from a string (used in tests and for stdlib loading). + /// Parses SysML v2 source text from a string (used in tests and for single-file checks). /// /// Virtual or real path used in diagnostic messages. /// Source text to parse. @@ -146,6 +153,22 @@ public static IReadOnlyList ParseSource(string filePath, string return diagnostics; } + /// + /// Parses the stdlib and returns the aggregate files and diagnostics. + /// + private static (IReadOnlyList Files, IReadOnlyList Diagnostics) ParseStdlibInternal() + { + var files = new List(); + var diagnostics = new List(); + foreach (var (virtualPath, content) in StdlibLoader.LoadAll()) + { + files.Add(virtualPath); + ParseSource(virtualPath, content, diagnostics); + } + + return (files, diagnostics); + } + /// /// Parses SysML v2 source text and appends any diagnostics to . /// diff --git a/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs b/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs index 79d80cbb..d642ef30 100644 --- a/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs +++ b/test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs @@ -52,13 +52,13 @@ private static string FindOmgModelsRoot() /// parse without syntax errors. This is the Phase 1 gate from the architecture. /// [Fact] - public void Parse_OmgModels_NoSyntaxErrors() + public async Task Parse_OmgModels_NoSyntaxErrors() { var omgRoot = FindOmgModelsRoot(); var files = Directory.GetFiles(omgRoot, "*.sysml", SearchOption.AllDirectories); Assert.NotEmpty(files); - var result = WorkspaceParser.Parse(files); + var result = await WorkspaceParser.ParseAsync(files); var errors = result.Diagnostics .Where(d => d.Severity == DiagnosticSeverity.Error) @@ -75,11 +75,12 @@ public void Parse_OmgModels_NoSyntaxErrors() /// Confirms all 251 expected OMG model files are present. /// [Fact] - public void OmgModels_FileCount_IsExpected() + public async Task OmgModels_FileCount_IsExpected() { var omgRoot = FindOmgModelsRoot(); var files = Directory.GetFiles(omgRoot, "*.sysml", SearchOption.AllDirectories); Assert.True(files.Length >= 251, $"Expected at least 251 OMG model files, found {files.Length}"); + await Task.CompletedTask; } } diff --git a/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs b/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs index 83c446bf..c1cd2113 100644 --- a/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs +++ b/test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs @@ -92,9 +92,9 @@ public void ParseSource_ErrorPath_MatchesSuppliedPath() /// The OMG stdlib (94 embedded files) should load and parse without any errors. /// [Fact] - public void Parse_StdlibOnly_NoErrors() + public async Task Parse_StdlibOnly_NoErrors() { - var result = WorkspaceParser.Parse([]); + var result = await WorkspaceParser.ParseAsync([]); Assert.False(result.HasErrors, $"Stdlib parse errors:{Environment.NewLine}" + string.Join(Environment.NewLine, result.Diagnostics.Select(d => $" {d.FilePath}({d.Line},{d.Column}): {d.Message}"))); @@ -105,9 +105,9 @@ public void Parse_StdlibOnly_NoErrors() /// Phase 1 loads the 58 SysML stdlib files; KerML files are embedded but parsed in Phase 2. /// [Fact] - public void Parse_FilesCount_IncludesStdlib() + public async Task Parse_FilesCount_IncludesStdlib() { - var result = WorkspaceParser.Parse([]); + var result = await WorkspaceParser.ParseAsync([]); Assert.True(result.Files.Count >= 58, $"Expected at least 58 stdlib files, got {result.Files.Count}"); } diff --git a/test/DemaConsulting.SysML2Tools.Tool.Tests/Cli/CliSubsystemTests.cs b/test/DemaConsulting.SysML2Tools.Tool.Tests/Cli/CliSubsystemTests.cs index 189c5508..a68e36f5 100644 --- a/test/DemaConsulting.SysML2Tools.Tool.Tests/Cli/CliSubsystemTests.cs +++ b/test/DemaConsulting.SysML2Tools.Tool.Tests/Cli/CliSubsystemTests.cs @@ -32,7 +32,7 @@ public class CliSubsystemTests /// Test that Context and Program work together to handle version flag workflow. /// [Fact] - public void CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits() + public async Task CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits() { // Arrange: command line arguments with version flag; capture console output var args = new[] { "--version" }; @@ -45,7 +45,7 @@ public void CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits() // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: version flag is parsed, version text is displayed, and exit code is success Assert.True(context.Version, "Context should parse version flag"); @@ -62,7 +62,7 @@ public void CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits() /// Test that Context and Program work together to handle the -v short version flag. /// [Fact] - public void CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits_WithShortVFlag() + public async Task CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits_WithShortVFlag() { // Arrange: command line arguments with -v short version flag; capture console output var args = new[] { "-v" }; @@ -75,7 +75,7 @@ public void CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits_W // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: version flag is parsed, version text is displayed, and exit code is success Assert.True(context.Version, "Context should parse -v flag as version"); @@ -92,7 +92,7 @@ public void CliSubsystem_VersionFlow_ContextAndProgram_DisplaysVersionAndExits_W /// Test that Context and Program work together to handle help flag workflow. /// [Fact] - public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits() + public async Task CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits() { // Arrange: command line arguments with help flag; capture console output var args = new[] { "--help" }; @@ -105,7 +105,7 @@ public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits() // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: help flag is parsed, usage text is displayed, and exit code is success Assert.True(context.Help, "Context should parse help flag"); @@ -124,7 +124,7 @@ public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits() /// Test that Context and Program work together to handle the -? short help flag. /// [Fact] - public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithShortQuestionFlag() + public async Task CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithShortQuestionFlag() { // Arrange: command line arguments with -? short help flag; capture console output var args = new[] { "-?" }; @@ -137,7 +137,7 @@ public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithSho // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: help flag is parsed, usage text is displayed, and exit code is success Assert.True(context.Help, "Context should parse -? flag as help"); @@ -156,7 +156,7 @@ public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithSho /// Test that Context and Program work together to handle the -h short help flag. /// [Fact] - public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithShortHFlag() + public async Task CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithShortHFlag() { // Arrange: command line arguments with -h short help flag; capture console output var args = new[] { "-h" }; @@ -169,7 +169,7 @@ public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithSho // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: help flag is parsed, usage text is displayed, and exit code is success Assert.True(context.Help, "Context should parse -h flag as help"); @@ -188,7 +188,7 @@ public void CliSubsystem_HelpFlow_ContextAndProgram_DisplaysHelpAndExits_WithSho /// Test that Context and Program work together to handle validation flag workflow. /// [Fact] - public void CliSubsystem_ValidateFlow_ContextAndProgram_RunsValidationAndExits() + public async Task CliSubsystem_ValidateFlow_ContextAndProgram_RunsValidationAndExits() { // Arrange: command line arguments with validate flag; capture console output var args = new[] { "--validate" }; @@ -201,7 +201,7 @@ public void CliSubsystem_ValidateFlow_ContextAndProgram_RunsValidationAndExits() // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: validate flag is parsed, summary is output, and exit code is success Assert.True(context.Validate, "Context should parse validate flag"); @@ -218,7 +218,7 @@ public void CliSubsystem_ValidateFlow_ContextAndProgram_RunsValidationAndExits() /// Test that Context and Program work together to handle silent flag workflow. /// [Fact] - public void CliSubsystem_SilentFlow_ContextAndProgram_SuppressesOutput() + public async Task CliSubsystem_SilentFlow_ContextAndProgram_SuppressesOutput() { // Arrange: command line arguments with version and silent flags; capture console streams var args = new[] { "--version", "--silent" }; @@ -234,7 +234,7 @@ public void CliSubsystem_SilentFlow_ContextAndProgram_SuppressesOutput() // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: silent flag is parsed, exit code is success, and no console output is produced Assert.True(context.Silent, "Context should parse silent flag"); @@ -253,7 +253,7 @@ public void CliSubsystem_SilentFlow_ContextAndProgram_SuppressesOutput() /// Test that Context and Program work together to handle results flag workflow. /// [Fact] - public void CliSubsystem_ResultsFlow_ContextAndProgram_WritesResultsFile() + public async Task CliSubsystem_ResultsFlow_ContextAndProgram_WritesResultsFile() { // Arrange: temporary results file path and validation command with results output var tempDir = Path.GetTempPath(); @@ -264,7 +264,7 @@ public void CliSubsystem_ResultsFlow_ContextAndProgram_WritesResultsFile() { // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: results flag is parsed, validation runs, and results file is written Assert.Equal(resultsFile, context.ResultsFile); @@ -285,7 +285,7 @@ public void CliSubsystem_ResultsFlow_ContextAndProgram_WritesResultsFile() /// Test that Context and Program work together to handle log flag workflow. /// [Fact] - public void CliSubsystem_LogFlow_ContextAndProgram_WritesLogFile() + public async Task CliSubsystem_LogFlow_ContextAndProgram_WritesLogFile() { // Arrange: temporary log file path and version command with log output var tempDir = Path.GetTempPath(); @@ -297,7 +297,7 @@ public void CliSubsystem_LogFlow_ContextAndProgram_WritesLogFile() // Act: create context and run program logic using (var context = Context.Create(args)) { - Program.Run(context); + await Program.RunAsync(context); // Assert: version flag is parsed and exit code is success Assert.True(context.Version, "Context should parse version flag"); @@ -306,7 +306,7 @@ public void CliSubsystem_LogFlow_ContextAndProgram_WritesLogFile() // Assert: log file is written with version output Assert.True(File.Exists(logFile), "Log file should be created at specified path"); - var logContent = File.ReadAllText(logFile); + var logContent = await File.ReadAllTextAsync(logFile, TestContext.Current.CancellationToken); Assert.False(string.IsNullOrWhiteSpace(logContent), "Log file should contain version output"); } finally @@ -323,7 +323,7 @@ public void CliSubsystem_LogFlow_ContextAndProgram_WritesLogFile() /// Test that Program rejects unknown arguments, writes an error to stderr, and exits non-zero. /// [Fact] - public void CliSubsystem_InvalidArgs_ContextAndProgram_RejectsUnknownArgumentsAndExitsNonZero() + public async Task CliSubsystem_InvalidArgs_ContextAndProgram_RejectsUnknownArgumentsAndExitsNonZero() { // Arrange: unknown command-line argument var args = new[] { "--unknown-flag" }; @@ -335,7 +335,7 @@ public void CliSubsystem_InvalidArgs_ContextAndProgram_RejectsUnknownArgumentsAn Console.SetError(errWriter); // Act: invoke the actual CLI entry point with an unknown flag - var result = Program.Main(args); + var result = await Program.Main(args); // Assert: invalid arguments produce a non-zero exit code and an error on stderr Assert.Equal(1, result); @@ -353,7 +353,7 @@ public void CliSubsystem_InvalidArgs_ContextAndProgram_RejectsUnknownArgumentsAn /// Test that Context writes error messages to stderr. /// [Fact] - public void CliSubsystem_ErrorOutput_ContextAndProgram_WritesErrorToStderr() + public async Task CliSubsystem_ErrorOutput_ContextAndProgram_WritesErrorToStderr() { // Arrange: redirect stderr to capture error output var originalError = Console.Error; @@ -381,7 +381,7 @@ public void CliSubsystem_ErrorOutput_ContextAndProgram_WritesErrorToStderr() /// Test that Context and Program work together to handle the --result legacy alias for results. /// [Fact] - public void CliSubsystem_ResultAliasFlow_ContextAndProgram_WritesResultsFile() + public async Task CliSubsystem_ResultAliasFlow_ContextAndProgram_WritesResultsFile() { // Arrange: temporary results file path and validation command with legacy --result alias var tempDir = Path.GetTempPath(); @@ -392,7 +392,7 @@ public void CliSubsystem_ResultAliasFlow_ContextAndProgram_WritesResultsFile() { // Act: create context and run program logic using var context = Context.Create(args); - Program.Run(context); + await Program.RunAsync(context); // Assert: legacy --result alias is parsed, validation runs, and results file is written Assert.Equal(resultsFile, context.ResultsFile); @@ -413,7 +413,7 @@ public void CliSubsystem_ResultAliasFlow_ContextAndProgram_WritesResultsFile() /// Test that Context and Program work together to handle depth flag with self-validation. /// [Fact] - public void CliSubsystem_DepthFlow_ContextAndProgram_AdjustsHeadingDepth() + public async Task CliSubsystem_DepthFlow_ContextAndProgram_AdjustsHeadingDepth() { // Arrange: command line with --validate, --depth 2, and a log file to capture output var tempDir = Path.GetTempPath(); @@ -425,7 +425,7 @@ public void CliSubsystem_DepthFlow_ContextAndProgram_AdjustsHeadingDepth() // Act: create context and run program logic using (var context = Context.Create(args)) { - Program.Run(context); + await Program.RunAsync(context); // Assert: depth is parsed correctly Assert.Equal(2, context.HeadingDepth); @@ -433,7 +433,7 @@ public void CliSubsystem_DepthFlow_ContextAndProgram_AdjustsHeadingDepth() } // Assert: log contains level-2 heading - var logContent = File.ReadAllText(logFile); + var logContent = await File.ReadAllTextAsync(logFile, TestContext.Current.CancellationToken); Assert.Contains("## DEMA Consulting", logContent); } finally diff --git a/test/DemaConsulting.SysML2Tools.Tool.Tests/ProgramTests.cs b/test/DemaConsulting.SysML2Tools.Tool.Tests/ProgramTests.cs index 4ef118a5..ca2d647d 100644 --- a/test/DemaConsulting.SysML2Tools.Tool.Tests/ProgramTests.cs +++ b/test/DemaConsulting.SysML2Tools.Tool.Tests/ProgramTests.cs @@ -32,7 +32,7 @@ public class ProgramTests /// Test that Run with version flag displays version only. /// [Fact] - public void Program_Run_WithVersionFlag_DisplaysVersionOnly() + public async Task Program_Run_WithVersionFlag_DisplaysVersionOnly() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -43,7 +43,7 @@ public void Program_Run_WithVersionFlag_DisplaysVersionOnly() using var context = Context.Create(["--version"]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); @@ -62,7 +62,7 @@ public void Program_Run_WithVersionFlag_DisplaysVersionOnly() /// Test that Run with help flag displays usage information. /// [Fact] - public void Program_Run_WithHelpFlag_DisplaysUsageInformation() + public async Task Program_Run_WithHelpFlag_DisplaysUsageInformation() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -73,7 +73,7 @@ public void Program_Run_WithHelpFlag_DisplaysUsageInformation() using var context = Context.Create(["--help"]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); @@ -93,7 +93,7 @@ public void Program_Run_WithHelpFlag_DisplaysUsageInformation() /// Test that Run with validate flag runs validation. /// [Fact] - public void Program_Run_WithValidateFlag_RunsValidation() + public async Task Program_Run_WithValidateFlag_RunsValidation() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -104,7 +104,7 @@ public void Program_Run_WithValidateFlag_RunsValidation() using var context = Context.Create(["--validate"]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); @@ -121,7 +121,7 @@ public void Program_Run_WithValidateFlag_RunsValidation() /// Test that Run with no arguments displays default behavior. /// [Fact] - public void Program_Run_NoArguments_DisplaysDefaultBehavior() + public async Task Program_Run_NoArguments_DisplaysDefaultBehavior() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -132,7 +132,7 @@ public void Program_Run_NoArguments_DisplaysDefaultBehavior() using var context = Context.Create([]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); @@ -150,7 +150,7 @@ public void Program_Run_NoArguments_DisplaysDefaultBehavior() /// Test that version property returns non-empty version string. /// [Fact] - public void Program_Version_ReturnsNonEmptyString() + public async Task Program_Version_ReturnsNonEmptyString() { // Act: execute the operation being tested var version = Program.Version; @@ -163,7 +163,7 @@ public void Program_Version_ReturnsNonEmptyString() /// Test that Main with invalid arguments returns non-zero exit code. /// [Fact] - public void Program_Main_WithInvalidArgs_ReturnsNonZeroExitCode() + public async Task Program_Main_WithInvalidArgs_ReturnsNonZeroExitCode() { // Arrange: redirect stderr to suppress error output during test var originalError = Console.Error; @@ -173,7 +173,7 @@ public void Program_Main_WithInvalidArgs_ReturnsNonZeroExitCode() Console.SetError(errWriter); // Act: invoke Main with an invalid argument - var result = Program.Main(["--invalid-argument"]); + var result = await Program.Main(["--invalid-argument"]); // Assert: invalid arguments produce a non-zero exit code Assert.Equal(1, result); @@ -188,7 +188,7 @@ public void Program_Main_WithInvalidArgs_ReturnsNonZeroExitCode() /// Test that Run with short version flag -v displays version. /// [Fact] - public void Program_Run_WithShortVersionFlag_DisplaysVersion() + public async Task Program_Run_WithShortVersionFlag_DisplaysVersion() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -199,7 +199,7 @@ public void Program_Run_WithShortVersionFlag_DisplaysVersion() using var context = Context.Create(["-v"]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); @@ -216,7 +216,7 @@ public void Program_Run_WithShortVersionFlag_DisplaysVersion() /// Test that Run with short help flag -h displays usage. /// [Fact] - public void Program_Run_WithShortHelpFlag_DisplaysUsage() + public async Task Program_Run_WithShortHelpFlag_DisplaysUsage() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -227,7 +227,7 @@ public void Program_Run_WithShortHelpFlag_DisplaysUsage() using var context = Context.Create(["-h"]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); @@ -245,7 +245,7 @@ public void Program_Run_WithShortHelpFlag_DisplaysUsage() /// Test that Run with short help flag -? displays usage. /// [Fact] - public void Program_Run_WithQuestionMarkFlag_DisplaysUsage() + public async Task Program_Run_WithQuestionMarkFlag_DisplaysUsage() { // Arrange: setup test conditions var originalOut = Console.Out; @@ -256,7 +256,7 @@ public void Program_Run_WithQuestionMarkFlag_DisplaysUsage() using var context = Context.Create(["-?"]); // Act: execute the operation being tested - Program.Run(context); + await Program.RunAsync(context); // Assert: verify expected behavior var output = outWriter.ToString(); diff --git a/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/SelfTestSubsystemTests.cs b/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/SelfTestSubsystemTests.cs index d30156de..6c5ac3eb 100644 --- a/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/SelfTestSubsystemTests.cs +++ b/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/SelfTestSubsystemTests.cs @@ -33,14 +33,14 @@ public class SelfTestSubsystemTests /// Test that self-test subsystem can run validation workflow without result files. /// [Fact] - public void SelfTestSubsystem_ValidationWorkflow_NoResultFiles_CompletesSuccessfully() + public async Task SelfTestSubsystem_ValidationWorkflow_NoResultFiles_CompletesSuccessfully() { // Arrange: command line arguments for validation in silent mode var args = new[] { "--validate", "--silent" }; // Act: create context and run validation using var context = Context.Create(args); - Validation.Run(context); + await Validation.RunAsync(context); // Assert: validation completes successfully with correct flags set Assert.True(context.Validate, "Context should have validate flag set"); @@ -51,7 +51,7 @@ public void SelfTestSubsystem_ValidationWorkflow_NoResultFiles_CompletesSuccessf /// Test that self-test subsystem can run validation workflow with TRX result file. /// [Fact] - public void SelfTestSubsystem_ValidationWorkflow_WithTrxFile_GeneratesResults() + public async Task SelfTestSubsystem_ValidationWorkflow_WithTrxFile_GeneratesResults() { // Arrange: temporary TRX file path and validation command with results output var tempDir = Path.GetTempPath(); @@ -62,13 +62,13 @@ public void SelfTestSubsystem_ValidationWorkflow_WithTrxFile_GeneratesResults() { // Act: create context and run validation with TRX output using var context = Context.Create(args); - Validation.Run(context); + await Validation.RunAsync(context); // Assert: validation completes and generates TRX file with standard format Assert.True(context.Validate, "Context should have validate flag set"); Assert.Equal(0, context.ExitCode); Assert.True(File.Exists(trxFile), "TRX file should be generated"); - var trxContent = File.ReadAllText(trxFile); + var trxContent = await File.ReadAllTextAsync(trxFile, TestContext.Current.CancellationToken); Assert.Contains(" [Fact] - public void SelfTestSubsystem_ValidationWorkflow_WithJUnitFile_GeneratesResults() + public async Task SelfTestSubsystem_ValidationWorkflow_WithJUnitFile_GeneratesResults() { // Arrange: temporary JUnit XML file path and validation command with results output var tempDir = Path.GetTempPath(); @@ -96,13 +96,13 @@ public void SelfTestSubsystem_ValidationWorkflow_WithJUnitFile_GeneratesResults( { // Act: create context and run validation with JUnit XML output using var context = Context.Create(args); - Validation.Run(context); + await Validation.RunAsync(context); // Assert: validation completes and generates JUnit XML file with standard format Assert.True(context.Validate, "Context should have validate flag set"); Assert.Equal(0, context.ExitCode); Assert.True(File.Exists(junitFile), "JUnit file should be generated"); - var junitContent = File.ReadAllText(junitFile); + var junitContent = await File.ReadAllTextAsync(junitFile, TestContext.Current.CancellationToken); Assert.Contains(" [Fact] - public void SelfTestSubsystem_ValidationWorkflow_WithBothResultFiles_GeneratesBothResults() + public async Task SelfTestSubsystem_ValidationWorkflow_WithBothResultFiles_GeneratesBothResults() { // Arrange: setup validation arguments for both TRX and JUnit result file outputs var tempDir = Path.GetTempPath(); @@ -133,26 +133,26 @@ public void SelfTestSubsystem_ValidationWorkflow_WithBothResultFiles_GeneratesBo // Act: run validation with TRX output using (var trxContext = Context.Create(trxArgs)) { - Validation.Run(trxContext); + await Validation.RunAsync(trxContext); // Assert: verify validation completed and TRX result file was generated with standard format Assert.True(trxContext.Validate, "Context should have validate flag set for TRX run"); Assert.Equal(0, trxContext.ExitCode); Assert.True(File.Exists(trxFile), "TRX file should be generated"); - var trxContent = File.ReadAllText(trxFile); + var trxContent = await File.ReadAllTextAsync(trxFile, TestContext.Current.CancellationToken); Assert.Contains(" [Fact] - public void SelfTestSubsystem_ValidationWorkflow_WithUnsupportedExtension_EmitsErrorAndNoFile() + public async Task SelfTestSubsystem_ValidationWorkflow_WithUnsupportedExtension_EmitsErrorAndNoFile() { // Arrange: unsupported results file extension; capture stderr for error message assertion var tempDir = Path.GetTempPath(); @@ -190,7 +190,7 @@ public void SelfTestSubsystem_ValidationWorkflow_WithUnsupportedExtension_EmitsE // Act: create context and run validation with unsupported extension using var context = Context.Create(args); - Validation.Run(context); + await Validation.RunAsync(context); // Assert: error is reported, message identifies the format, and no file is created Assert.Equal(1, context.ExitCode); diff --git a/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/ValidationTests.cs b/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/ValidationTests.cs index ed62b275..c4882447 100644 --- a/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/ValidationTests.cs +++ b/test/DemaConsulting.SysML2Tools.Tool.Tests/SelfTest/ValidationTests.cs @@ -33,20 +33,20 @@ public class ValidationTests /// Test that Run throws ArgumentNullException when context is null. /// [Fact] - public void Validation_Run_NullContext_ThrowsArgumentNullException() + public async Task Validation_Run_NullContext_ThrowsArgumentNullException() { // Arrange: setup test conditions // No setup required — null is the input under test. // Act & Assert: invoke Run with null context and verify ArgumentNullException is thrown - Assert.Throws(() => Validation.Run(null!)); + await Assert.ThrowsAsync(() => Validation.RunAsync(null!)); } /// /// Test that Run prints a summary containing total, passed, and failed counts. /// [Fact] - public void Validation_Run_WithSilentContext_PrintsSummary() + public async Task Validation_Run_WithSilentContext_PrintsSummary() { // Arrange: setup unique log file path to capture silent context output var logFile = Path.Combine(Path.GetTempPath(), $"validation_test_{Guid.NewGuid()}.log"); @@ -55,11 +55,11 @@ public void Validation_Run_WithSilentContext_PrintsSummary() using (var context = Context.Create(["--silent", "--log", logFile])) { // Act: run validation with silent context and log file - Validation.Run(context); + await Validation.RunAsync(context); } // Assert: verify summary lines are written to log file - var logContent = File.ReadAllText(logFile); + var logContent = await File.ReadAllTextAsync(logFile, TestContext.Current.CancellationToken); Assert.Contains("Total Tests:", logContent); Assert.Contains("Passed:", logContent); Assert.Contains("Failed:", logContent); @@ -77,13 +77,13 @@ public void Validation_Run_WithSilentContext_PrintsSummary() /// Test that Run exits with code zero when all self-validation tests pass. /// [Fact] - public void Validation_Run_WithSilentContext_ExitCodeIsZero() + public async Task Validation_Run_WithSilentContext_ExitCodeIsZero() { // Arrange: create silent context for validation run using var context = Context.Create(["--silent"]); // Act: run validation with silent context - Validation.Run(context); + await Validation.RunAsync(context); // Assert: verify exit code is zero indicating successful validation Assert.Equal(0, context.ExitCode); @@ -93,7 +93,7 @@ public void Validation_Run_WithSilentContext_ExitCodeIsZero() /// Test that Run writes a valid TRX file when the results path ends with .trx. /// [Fact] - public void Validation_Run_WithTrxResultsFile_WritesTrxFile() + public async Task Validation_Run_WithTrxResultsFile_WritesTrxFile() { // Arrange: setup TRX file path for test results output var trxFile = Path.Combine(Path.GetTempPath(), $"validation_test_{Guid.NewGuid()}.trx"); @@ -102,11 +102,11 @@ public void Validation_Run_WithTrxResultsFile_WritesTrxFile() using var context = Context.Create(["--silent", "--results", trxFile]); // Act: run validation with TRX results output - Validation.Run(context); + await Validation.RunAsync(context); // Assert: verify TRX file is created with expected content Assert.True(File.Exists(trxFile)); - var content = File.ReadAllText(trxFile); + var content = await File.ReadAllTextAsync(trxFile, TestContext.Current.CancellationToken); Assert.Contains(" [Fact] - public void Validation_Run_WithXmlResultsFile_WritesXmlFile() + public async Task Validation_Run_WithXmlResultsFile_WritesXmlFile() { // Arrange: setup XML file path for JUnit results output var xmlFile = Path.Combine(Path.GetTempPath(), $"validation_test_{Guid.NewGuid()}.xml"); @@ -131,11 +131,11 @@ public void Validation_Run_WithXmlResultsFile_WritesXmlFile() using var context = Context.Create(["--silent", "--results", xmlFile]); // Act: run validation with XML results output - Validation.Run(context); + await Validation.RunAsync(context); // Assert: verify XML file is created with JUnit format content Assert.True(File.Exists(xmlFile)); - var content = File.ReadAllText(xmlFile); + var content = await File.ReadAllTextAsync(xmlFile, TestContext.Current.CancellationToken); Assert.Contains(" [Fact] - public void Validation_Run_WithUnsupportedResultsFormat_DoesNotWriteFile() + public async Task Validation_Run_WithUnsupportedResultsFormat_DoesNotWriteFile() { // Arrange: setup unsupported file extension and log file to capture error output var jsonFile = Path.Combine(Path.GetTempPath(), $"validation_test_{Guid.NewGuid()}.json"); @@ -161,7 +161,7 @@ public void Validation_Run_WithUnsupportedResultsFormat_DoesNotWriteFile() using (var context = Context.Create(["--silent", "--results", jsonFile, "--log", logFile])) { // Act: run validation with unsupported results file extension - Validation.Run(context); + await Validation.RunAsync(context); // Assert context state while still valid: no results file and non-zero exit code Assert.False(File.Exists(jsonFile)); @@ -170,7 +170,7 @@ public void Validation_Run_WithUnsupportedResultsFormat_DoesNotWriteFile() // Assert log content after disposal to ensure the log writer has been closed and flushed Assert.True(File.Exists(logFile)); - var logContent = File.ReadAllText(logFile); + var logContent = await File.ReadAllTextAsync(logFile, TestContext.Current.CancellationToken); Assert.Contains("Unsupported results file format", logContent); } finally From 8a54a50499975923aa1dd5dd1468d05d15d2c31e Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 22:00:33 -0400 Subject: [PATCH 07/15] docs: update parser and lint docs for async refactor and OMG model tests - WorkspaceParser.Parse() -> ParseAsync() in design interface and Design section - Document Lazy> stdlib caching and Task.WhenAll user-file parallelism - Verification: 7 tests -> 9 tests; add OMG test environment and two new test scenarios (Parse_OmgModels_NoSyntaxErrors, OmgModels_FileCount_IsExpected) - Update acceptance criteria to include OMG 251-model gate - LintCommand.Run -> RunAsync in design interface, design prose, and verification acceptance criteria Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/design/sysml2-tools-core/parser.md | 27 ++++++++----- docs/design/sysml2-tools-tool/lint.md | 22 +++++------ docs/verification/sysml2-tools-core/parser.md | 39 +++++++++++++------ docs/verification/sysml2-tools-tool/lint.md | 6 +-- 4 files changed, 60 insertions(+), 34 deletions(-) diff --git a/docs/design/sysml2-tools-core/parser.md b/docs/design/sysml2-tools-core/parser.md index 7cf891ce..bcb532c2 100644 --- a/docs/design/sysml2-tools-core/parser.md +++ b/docs/design/sysml2-tools-core/parser.md @@ -25,14 +25,15 @@ Supporting data types declared at the `Parser` namespace level: ### Interfaces -**WorkspaceParser.Parse**: Parses stdlib plus caller-supplied files. +**WorkspaceParser.ParseAsync**: Parses stdlib plus caller-supplied files asynchronously. -- *Type*: In-process .NET public static method. +- *Type*: In-process .NET public static async method. - *Role*: Provider. -- *Contract*: `public static WorkspaceParseResult Parse(IEnumerable filePaths)` — - loads all embedded `.sysml` stdlib files first, then reads and parses each caller-supplied - file path. Returns a `WorkspaceParseResult` containing every parsed file path and every - collected `SysmlDiagnostic`. +- *Contract*: `public static async Task ParseAsync(IEnumerable filePaths)` — + awaits the shared stdlib `Task` (started lazily on first call; reused on all subsequent calls), + then parses each caller-supplied file path in parallel on the thread pool via `Task.WhenAll`. + Returns a `WorkspaceParseResult` containing every parsed file path and every collected + `SysmlDiagnostic`. - *Constraints*: `filePaths` must not be null (`ArgumentNullException` is thrown); each path must be readable via `File.ReadAllText`. @@ -70,9 +71,17 @@ the central parse routine shared by both public methods: 6. Calls `parser.rootNamespace()` to trigger full parsing; the returned CST root is discarded in Phase 1. -`WorkspaceParser.Parse` collects file paths and diagnostics into shared lists, then wraps them -in a `WorkspaceParseResult`. Stdlib files are always parsed first so that user-file diagnostics -appear after stdlib diagnostics in the returned list. +`WorkspaceParser.ParseAsync` uses two parallelism strategies: + +- **Stdlib caching**: A `Lazy>` field holds the stdlib parse `Task`. + The factory runs exactly once — the first call to `ParseAsync` starts the `Task` on the thread + pool; every subsequent call (including concurrent ones) awaits the same shared `Task`. This + ensures the 58 stdlib files are parsed at most once per process. +- **User-file parallelism**: Caller-supplied files are dispatched to the thread pool via + `Task.WhenAll(filePaths.Select(path => Task.Run(...)))`, so all files parse concurrently. + +Stdlib file paths and diagnostics are prepended to the combined result so that stdlib diagnostics +appear before user-file diagnostics in the returned `WorkspaceParseResult`. #### SysmlDiagnosticListener diff --git a/docs/design/sysml2-tools-tool/lint.md b/docs/design/sysml2-tools-tool/lint.md index 4b68982d..4490c382 100644 --- a/docs/design/sysml2-tools-tool/lint.md +++ b/docs/design/sysml2-tools-tool/lint.md @@ -10,21 +10,21 @@ The subsystem contains one unit: `LintCommand`. ### Interfaces -**LintCommand.Run**: Entry point for the lint subcommand. +**LintCommand.RunAsync**: Entry point for the lint subcommand. -- *Type*: In-process .NET static method. +- *Type*: In-process .NET static async method. - *Role*: Provider. -- *Contract*: `internal static void Run(Context context)` — reads `context.Files` (the list of - glob patterns supplied as positional CLI arguments), resolves them to file paths, calls - `WorkspaceParser.Parse`, writes each diagnostic, and calls `context.WriteError` if any - error-severity diagnostics were found (which sets exit code 1). +- *Contract*: `internal static async Task RunAsync(Context context)` — reads `context.Files` + (the list of glob patterns supplied as positional CLI arguments), resolves them to file paths, + awaits `WorkspaceParser.ParseAsync`, writes each diagnostic, and calls `context.WriteError` + if any error-severity diagnostics were found (which sets exit code 1). - *Constraints*: If no files are resolved from the provided patterns, writes an error message and returns immediately without invoking the parser. ### Design -`LintCommand` is a static class containing the public `Run` method and a private `ResolveFiles` -helper. +`LintCommand` is a static class containing the public `RunAsync` method and a private +`ResolveFiles` helper. `ResolveFiles` iterates over the provided pattern list. For each pattern it splits the path into a directory component and a filename glob component using `Path.GetDirectoryName` and @@ -32,9 +32,9 @@ a directory component and a filename glob component using `Path.GetDirectoryName TopDirectoryOnly)` to enumerate matching files. If the directory does not exist but the pattern itself is an existing file path, it is added directly. -`Run` checks for an empty resolved file list and emits an error if no input files were found. -Otherwise it logs a `"Linting N file(s)..."` status line, calls `WorkspaceParser.Parse(files)`, -then iterates over `result.Diagnostics`. Error-severity diagnostics are written via +`RunAsync` checks for an empty resolved file list and emits an error if no input files were +found. Otherwise it logs a `"Linting N file(s)..."` status line, awaits +`WorkspaceParser.ParseAsync(files)`, then iterates over `result.Diagnostics`. Error-severity diagnostics are written via `context.WriteError`; all others via `context.WriteLine`. After reporting all diagnostics it writes either a summary error count (via `context.WriteError`) or a `"lint: no errors found."` message (via `context.WriteLine`). diff --git a/docs/verification/sysml2-tools-core/parser.md b/docs/verification/sysml2-tools-core/parser.md index a8bc1e0d..8053ea72 100644 --- a/docs/verification/sysml2-tools-core/parser.md +++ b/docs/verification/sysml2-tools-core/parser.md @@ -2,27 +2,34 @@ ### Verification Approach -The `Parser` subsystem is verified by unit tests in `WorkspaceParserTests.cs` in the -`DemaConsulting.SysML2Tools.Tests` project. Tests call `WorkspaceParser.Parse` and -`WorkspaceParser.ParseSource` directly with controlled inputs and assert on the returned -`WorkspaceParseResult` and `IReadOnlyList` values. No mocking is required; -`SysmlDiagnosticListener` and `StdlibLoader` are exercised through the public API. +The `Parser` subsystem is verified by unit tests in `WorkspaceParserTests.cs` and integration +tests in `OmgModelsTests.cs` in the `DemaConsulting.SysML2Tools.Tests` project. Tests call +`WorkspaceParser.ParseAsync` and `WorkspaceParser.ParseSource` directly with controlled inputs +and assert on the returned `Task` and `IReadOnlyList` +values. No mocking is required; `SysmlDiagnosticListener` and `StdlibLoader` are exercised +through the public API. ### Test Environment -N/A — standard test environment. No external files, services, or environment configuration are -required. Embedded stdlib resources are part of the assembly under test. +The `OmgModelsTests` class requires the `test/SysMLModels/OMG/` directory to be present in the +repository checkout. The directory contains 251 OMG reference `.sysml` files checked into the +repository under a MIT-compatible license. No external network access or services are required. +The test assembly locates the directory by walking up from `AppContext.BaseDirectory` to the +repository root. ### Acceptance Criteria -- All seven unit tests pass with zero failures across net8.0, net9.0, and net10.0. +- All nine unit tests pass with zero failures across net8.0, net9.0, and net10.0. - An empty source string produces zero diagnostics. - A valid SysML package declaration produces zero diagnostics. - A valid SysML part definition produces zero diagnostics. - Invalid SysML syntax produces at least one `Error`-severity diagnostic. - The file path supplied to `ParseSource` appears verbatim in all returned diagnostics. - All 58 embedded `.sysml` stdlib files parse without any error-severity diagnostic. -- `WorkspaceParser.Parse([])` returns a `Files` list containing at least 58 entries. +- `WorkspaceParser.ParseAsync([])` returns a `Files` list containing at least 58 entries. +- All 251 OMG reference model files in `test/SysMLModels/OMG/` parse without any error-severity + diagnostic. +- The `test/SysMLModels/OMG/` directory contains at least 251 `.sysml` files. ### Test Scenarios @@ -51,11 +58,21 @@ path `"my-model.sysml"` and invalid source `"@@@"`; every diagnostic in the retu `FilePath == "my-model.sysml"`, confirming that the virtual path is propagated correctly. This scenario is tested by `ParseSource_ErrorPath_MatchesSuppliedPath`. -**Parse_StdlibOnly_NoErrors**: `WorkspaceParser.Parse` is called with an empty file collection; +**Parse_StdlibOnly_NoErrors**: `WorkspaceParser.ParseAsync` is called with an empty file collection; `result.HasErrors` is false, confirming that all 58 embedded `.sysml` stdlib files parse without error. Any failures print the full diagnostic list to the assertion message. This scenario is tested by `Parse_StdlibOnly_NoErrors`. -**Parse_FilesCount_IncludesStdlib**: `WorkspaceParser.Parse` is called with an empty file +**Parse_FilesCount_IncludesStdlib**: `WorkspaceParser.ParseAsync` is called with an empty file collection; `result.Files.Count` is at least 58, confirming that the stdlib loader enumerates all `.sysml` resources. This scenario is tested by `Parse_FilesCount_IncludesStdlib`. + +**Parse_OmgModels_NoSyntaxErrors**: All 251 OMG reference `.sysml` files are discovered from +`test/SysMLModels/OMG/` and passed to `WorkspaceParser.ParseAsync`; the returned result +contains zero `Error`-severity diagnostics. Any failures print the full list of erroring files, +lines, and messages. This is the Phase 1 architecture gate. This scenario is tested by +`Parse_OmgModels_NoSyntaxErrors`. + +**OmgModels_FileCount_IsExpected**: The `test/SysMLModels/OMG/` directory tree is scanned for +`.sysml` files; the count must be at least 251, confirming the full OMG model set is present +in the repository. This scenario is tested by `OmgModels_FileCount_IsExpected`. diff --git a/docs/verification/sysml2-tools-tool/lint.md b/docs/verification/sysml2-tools-tool/lint.md index dbb58da3..2271438e 100644 --- a/docs/verification/sysml2-tools-tool/lint.md +++ b/docs/verification/sysml2-tools-tool/lint.md @@ -14,10 +14,10 @@ temporary directory and clean them up after each test. ### Acceptance Criteria -- `LintCommand.Run` with no resolved input files writes an error message and sets exit code 1. -- `LintCommand.Run` with valid SysML input writes a `"lint: no errors found."` message and +- `LintCommand.RunAsync` with no resolved input files writes an error message and sets exit code 1. +- `LintCommand.RunAsync` with valid SysML input writes a `"lint: no errors found."` message and returns exit code 0. -- `LintCommand.Run` with invalid SysML input writes at least one diagnostic in the +- `LintCommand.RunAsync` with invalid SysML input writes at least one diagnostic in the `path(line,col): severity: message` format and sets exit code 1. - Error-severity diagnostics are written via `context.WriteError`; informational diagnostics are written via `context.WriteLine`. From 89ca44820e079efb127f841879511e66705f177e Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 22:15:36 -0400 Subject: [PATCH 08/15] fix: update SysML2Tools-Core-Parser-Implementation review set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove deleted supporting-type files (DiagnosticSeverity.cs, SysmlDiagnostic.cs, WorkspaceParseResult.cs — consolidated into WorkspaceParser.cs) and add OmgModelsTests.cs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .reviewmark.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.reviewmark.yaml b/.reviewmark.yaml index 07c2d240..bb72c7d9 100644 --- a/.reviewmark.yaml +++ b/.reviewmark.yaml @@ -164,13 +164,11 @@ reviews: - docs/reqstream/sysml2-tools-core/parser.yaml - docs/design/sysml2-tools-core/parser.md paths: - - "src/DemaConsulting.SysML2Tools/Parser/DiagnosticSeverity.cs" - - "src/DemaConsulting.SysML2Tools/Parser/SysmlDiagnostic.cs" - - "src/DemaConsulting.SysML2Tools/Parser/WorkspaceParseResult.cs" - "src/DemaConsulting.SysML2Tools/Parser/WorkspaceParser.cs" - "src/DemaConsulting.SysML2Tools/Parser/Internal/SysmlDiagnosticListener.cs" - "src/DemaConsulting.SysML2Tools/Parser/Internal/StdlibLoader.cs" - "test/DemaConsulting.SysML2Tools.Tests/Parser/WorkspaceParserTests.cs" + - "test/DemaConsulting.SysML2Tools.Tests/Parser/OmgModelsTests.cs" # SysML2Tools SVG Renderer - id: SysML2Tools-Svg-Architecture From 4906c3a508c1a755f8a7f4f1342dde5fdd4c2ca5 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 22:24:53 -0400 Subject: [PATCH 09/15] fix: rename Parse->ParseAsync in core design doc and parser requirements - docs/design/sysml2-tools-core.md: ExternalInterfaces section now describes ParseAsync (async, Task); Data Flow updated to describe Lazy> stdlib caching and Task.WhenAll parallel user-file dispatch - docs/reqstream/sysml2-tools-core/parser.yaml: ParseGlobs requirement renamed to ParseAsync and justification updated to mention parallel parsing and stdlib caching Resolves findings from Core-Architecture, Core-Design, Core-Parser-Design, and Core-AllRequirements reviews. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/design/sysml2-tools-core.md | 34 +++++++++++--------- docs/reqstream/sysml2-tools-core/parser.yaml | 7 ++-- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/docs/design/sysml2-tools-core.md b/docs/design/sysml2-tools-core.md index 49eaf4f8..5c681e2a 100644 --- a/docs/design/sysml2-tools-core.md +++ b/docs/design/sysml2-tools-core.md @@ -26,14 +26,14 @@ flowchart TD ## External Interfaces -**WorkspaceParser.Parse**: Parses the embedded stdlib plus every file in the provided collection. +**WorkspaceParser.ParseAsync**: Parses the embedded stdlib plus every file in the provided collection asynchronously. -- *Type*: In-process .NET static method. +- *Type*: In-process .NET static async method. - *Role*: Provider. -- *Contract*: Accepts `IEnumerable filePaths`; returns `WorkspaceParseResult` containing - all parsed file paths and all collected diagnostics. -- *Constraints*: `filePaths` must not be null; each path must be a readable file. Stdlib files are - always parsed first. +- *Contract*: Accepts `IEnumerable filePaths`; returns `Task` containing + all parsed file paths and all collected diagnostics. Stdlib is parsed once and cached; user files + are parsed in parallel on the thread pool. +- *Constraints*: `filePaths` must not be null; each path must be a readable file. **WorkspaceParser.ParseSource**: Parses an in-memory source string with a caller-supplied virtual file path. @@ -44,7 +44,7 @@ file path. `IReadOnlyList` containing all diagnostics from parsing that single source. - *Constraints*: None. Both parameters are used as-is; `filePath` appears verbatim in diagnostics. -**WorkspaceParseResult**: Aggregate result record returned by `WorkspaceParser.Parse`. +**WorkspaceParseResult**: Aggregate result record returned by `WorkspaceParser.ParseAsync`. - *Type*: Sealed class. - *Role*: Provider. @@ -80,21 +80,23 @@ N/A — not a safety-classified software item. ## Data Flow -1. `WorkspaceParser.Parse` calls `StdlibLoader.LoadAll()`, which enumerates all embedded - manifest resources whose names match the `Stdlib.` prefix and end with `.sysml`, then - reads each resource stream into a `(virtualPath, content)` pair. -2. For each stdlib pair and then for each caller-supplied file path, `WorkspaceParser` reads - the file content and calls the internal `ParseSource` overload. +1. `WorkspaceParser.ParseAsync` awaits the shared `Lazy>` stdlib result. On first call + the factory fires `Task.Run(ParseStdlibInternal)`, which calls `StdlibLoader.LoadAll()` to + enumerate all embedded manifest resources matching the `Stdlib.` prefix and ending with + `.sysml`, reads each stream into a `(virtualPath, content)` pair, and parses each with the + internal `ParseSource` overload. +2. Concurrently, all caller-supplied file paths are dispatched to the thread pool via + `Task.WhenAll`, each reading its file content and calling the internal `ParseSource` overload. 3. The internal `ParseSource` creates a `SysmlDiagnosticListener` bound to the current file - path and a shared `List`. + path and a per-file `List`. 4. `SysMLv2Lexer` is constructed over an `AntlrInputStream`; the listener is registered on the lexer. A `CommonTokenStream` wraps the lexer. `SysMLv2Parser` is constructed over the token stream; the listener is also registered on the parser. 5. The entry rule `rootNamespace()` is invoked; the resulting CST root is discarded in Phase 1. Any lexer or parser errors invoke `SysmlDiagnosticListener.SyntaxError`, which appends a - new `SysmlDiagnostic(filePath, line, column, Error, message)` to the shared list. -6. After all files are processed, `WorkspaceParser.Parse` wraps the accumulated file list and - diagnostic list in a `WorkspaceParseResult` and returns it. + new `SysmlDiagnostic(filePath, line, column, Error, message)` to the per-file list. +6. After all async work completes, `WorkspaceParser.ParseAsync` concatenates stdlib and user-file + paths and diagnostics into a `WorkspaceParseResult` and returns it. ## Design Constraints diff --git a/docs/reqstream/sysml2-tools-core/parser.yaml b/docs/reqstream/sysml2-tools-core/parser.yaml index 574510b4..518c1bec 100644 --- a/docs/reqstream/sysml2-tools-core/parser.yaml +++ b/docs/reqstream/sysml2-tools-core/parser.yaml @@ -35,12 +35,13 @@ sections: - id: SysML2Tools-Core-Parser-ParseGlobs title: >- - WorkspaceParser.Parse shall accept a collection of file paths and parse each + WorkspaceParser.ParseAsync shall accept a collection of file paths and parse each file against the embedded stdlib. justification: | - A collection-based API allows callers to supply any number of pre-resolved + A collection-based async API allows callers to supply any number of pre-resolved file paths and receive a single aggregate result, simplifying integration - with CLI tools and test harnesses. + with CLI tools and test harnesses. User files are parsed in parallel on the + thread pool; the stdlib is parsed once and cached across concurrent callers. tests: - Parse_StdlibOnly_NoErrors - Parse_FilesCount_IncludesStdlib From e236059569282a206a124b75207d48cc3f3568d4 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 22:32:25 -0400 Subject: [PATCH 10/15] =?UTF-8?q?fix:=20lint=20=E2=80=94=20exclude=20Parse?= =?UTF-8?q?r/Antlr=20from=20cspell,=20add=20uppercased,=20fix=20MD013?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .cspell.yaml: add **/Parser/Antlr/** to ignorePaths so ANTLR4-generated SysML terms (Metaclass, Unioning, Superclassing, Subsetting, metaclass) are not flagged as spelling errors - .cspell.yaml: add 'uppercased' to words list (used in OMG README) - docs/design/introduction.md: wrap long line to satisfy MD013 (120 chars) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .cspell.yaml | 2 ++ docs/design/introduction.md | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.cspell.yaml b/.cspell.yaml index c68c6b53..155277a0 100644 --- a/.cspell.yaml +++ b/.cspell.yaml @@ -59,6 +59,7 @@ words: - daltskin - interp - Dlanguage + - uppercased - venv - versionmark - Weasyprint @@ -73,6 +74,7 @@ ignorePaths: - "**/third-party/**" - "**/3rd-party/**" - "**/generated/**" + - "**/Parser/Antlr/**" - "**/Stdlib/**" - "**/AGENT_REPORT_*.md" - "**/.agent-logs/**" diff --git a/docs/design/introduction.md b/docs/design/introduction.md index c0e6c0e1..1540be6e 100644 --- a/docs/design/introduction.md +++ b/docs/design/introduction.md @@ -31,7 +31,8 @@ The following topics are out of scope: The following list shows how the SysML2 Tools software items are organized across the system, subsystem, and unit levels: -- **DemaConsulting.SysML2Tools** (System) — core library: SysML v2 parsing engine, embedded stdlib, and future semantic model/layout +- **DemaConsulting.SysML2Tools** (System) — core library: SysML v2 parsing engine, embedded stdlib, + and future semantic model/layout - **Parser** (Subsystem) — SysML v2 parsing engine - **WorkspaceParser** (Unit) — public API: parses file glob patterns and source strings against the embedded stdlib - **Internal** (Subsystem) — internal implementation details From 57306c58cb5384b6250fb28106788a4127ff0649 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 23:23:39 -0400 Subject: [PATCH 11/15] fix: flatten nested mermaid subgraph in sysml2-tools-core.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nested subgraphs (subgraph inside subgraph) hang the mermaid-filter Puppeteer renderer in CI. Flatten the Parser/Internal hierarchy into a single subgraph — the Internal grouping is documented in prose. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/design/sysml2-tools-core.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/design/sysml2-tools-core.md b/docs/design/sysml2-tools-core.md index 5c681e2a..d5232084 100644 --- a/docs/design/sysml2-tools-core.md +++ b/docs/design/sysml2-tools-core.md @@ -15,10 +15,8 @@ API unit (`WorkspaceParser`) and an internal subsystem (`Internal`) containing flowchart TD subgraph Parser WorkspaceParser - subgraph Internal - SysmlDiagnosticListener - StdlibLoader - end + SysmlDiagnosticListener + StdlibLoader end WorkspaceParser --> StdlibLoader WorkspaceParser --> SysmlDiagnosticListener From b7619a5ef159d3a87f0ee81ed5bcd9e5e64b3517 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 23:25:33 -0400 Subject: [PATCH 12/15] fix: exclude Parser/Antlr from CodeQL analysis ANTLR4-generated files produce 567 false-positive warnings (cs/complex-condition, cs/missed-ternary-operator, cs/useless-assignment-to-local, cs/coupled-types). These are machine-generated and cannot be edited; exclude the whole directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/codeql-config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index 91c79b38..76fa57e6 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -4,6 +4,10 @@ name: "SysML2 Tools CodeQL Config" +# Exclude ANTLR4-generated parser files from all analysis +paths-ignore: + - src/DemaConsulting.SysML2Tools/Parser/Antlr + # Query filters to disable specific queries for certain paths query-filters: - exclude: From 16e23cc574376e22f0703cd763653e2499f8569b Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Wed, 24 Jun 2026 23:25:58 -0400 Subject: [PATCH 13/15] fix: mark Parser/Antlr files as linguist-generated for CodeQL exclusion paths-ignore in codeql-config.yml is not reliably honoured. The linguist-generated=true gitattributes flag is the authoritative mechanism CodeQL uses to skip generated files from analysis. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 2f098726..e30ae17f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,6 @@ # Windows batch files require CRLF line endings to function correctly. *.bat text eol=crlf *.cmd text eol=crlf + +# ANTLR4-generated parser files — excluded from CodeQL and language stats. +src/DemaConsulting.SysML2Tools/Parser/Antlr/*.cs linguist-generated=true From a61ce989074144cf47decafc4df93caa0d495719 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Thu, 25 Jun 2026 00:12:44 -0400 Subject: [PATCH 14/15] fix: suppress CodeQL false positives in ANTLR4-generated parser files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suppress cs/complex-condition, cs/useless-assignment-to-local, cs/virtual-call-in-constructor, cs/missed-ternary-operator, and cs/coupled-types for Parser/Antlr — these are mechanical artefacts of ANTLR4 code generation, not hand-written logic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/codeql-config.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index 76fa57e6..0e3b9f5a 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -20,3 +20,26 @@ query-filters: id: cs/path-combine paths: - src/DemaConsulting.SysML2Tools/PathHelpers.cs + + # Suppress false positives in ANTLR4-generated parser files. + # These are mechanical code generation artefacts, not hand-written logic. + - exclude: + id: cs/complex-condition + paths: + - src/DemaConsulting.SysML2Tools/Parser/Antlr + - exclude: + id: cs/useless-assignment-to-local + paths: + - src/DemaConsulting.SysML2Tools/Parser/Antlr + - exclude: + id: cs/virtual-call-in-constructor + paths: + - src/DemaConsulting.SysML2Tools/Parser/Antlr + - exclude: + id: cs/missed-ternary-operator + paths: + - src/DemaConsulting.SysML2Tools/Parser/Antlr + - exclude: + id: cs/coupled-types + paths: + - src/DemaConsulting.SysML2Tools/Parser/Antlr From 11b2531c3e4855e1daf973d51112901c4a500457 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Thu, 25 Jun 2026 00:17:34 -0400 Subject: [PATCH 15/15] test: add LintSubsystem tests to satisfy unsatisfied lint requirements Add 4 subsystem tests covering all SysML2Tools-Tool-Lint-* requirements: - LintSubsystem_Patterns_AcceptsGlobPatterns_ResolvesFiles - LintSubsystem_Parse_ValidFile_ParsesWithoutErrors - LintSubsystem_Report_InvalidFile_WritesDiagnosticInExpectedFormat - LintSubsystem_ExitCode_InvalidFile_ReturnsOne Also fix lint.yaml: WorkspaceParser.Parse -> ParseAsync in requirement title, and populate tests arrays for all 4 requirements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/reqstream/sysml2-tools-tool/lint.yaml | 16 +- .../Lint/LintSubsystemTests.cs | 174 ++++++++++++++++++ 2 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 test/DemaConsulting.SysML2Tools.Tool.Tests/Lint/LintSubsystemTests.cs diff --git a/docs/reqstream/sysml2-tools-tool/lint.yaml b/docs/reqstream/sysml2-tools-tool/lint.yaml index 86cc145b..60cd399c 100644 --- a/docs/reqstream/sysml2-tools-tool/lint.yaml +++ b/docs/reqstream/sysml2-tools-tool/lint.yaml @@ -17,17 +17,19 @@ sections: Users specify which SysML files to lint using file glob patterns (e.g., src/**/*.sysml). Accepting multiple patterns in a single invocation allows flexible targeting of file sets without requiring shell expansion. - tests: [] + tests: + - LintSubsystem_Patterns_AcceptsGlobPatterns_ResolvesFiles - id: SysML2Tools-Tool-Lint-Parse title: >- - The LintCommand shall invoke WorkspaceParser.Parse with the resolved file - paths derived from the provided patterns. + The LintCommand shall invoke WorkspaceParser.ParseAsync with the resolved + file paths derived from the provided patterns. justification: | Delegating parsing to WorkspaceParser ensures that all SysML files are validated against the embedded stdlib and that diagnostics are collected consistently for all user-supplied files. - tests: [] + tests: + - LintSubsystem_Parse_ValidFile_ParsesWithoutErrors - id: SysML2Tools-Tool-Lint-Report title: >- @@ -36,7 +38,8 @@ sections: justification: | A standard diagnostic format is recognized by IDEs, CI tools, and problem matchers, enabling automated parsing of lint results without custom tooling. - tests: [] + tests: + - LintSubsystem_Report_InvalidFile_WritesDiagnosticInExpectedFormat - id: SysML2Tools-Tool-Lint-ExitCode title: >- @@ -45,4 +48,5 @@ sections: justification: | A non-zero exit code enables CI/CD pipelines to detect and surface lint failures automatically, preventing silent acceptance of invalid SysML models. - tests: [] + tests: + - LintSubsystem_ExitCode_InvalidFile_ReturnsOne diff --git a/test/DemaConsulting.SysML2Tools.Tool.Tests/Lint/LintSubsystemTests.cs b/test/DemaConsulting.SysML2Tools.Tool.Tests/Lint/LintSubsystemTests.cs new file mode 100644 index 00000000..90f519ed --- /dev/null +++ b/test/DemaConsulting.SysML2Tools.Tool.Tests/Lint/LintSubsystemTests.cs @@ -0,0 +1,174 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using DemaConsulting.SysML2Tools.Cli; + +namespace DemaConsulting.SysML2Tools.Tests.Lint; + +/// +/// Subsystem tests for the Lint command covering pattern resolution, parsing, diagnostic +/// reporting, and exit-code behavior. +/// +[Collection("Sequential")] +public class LintSubsystemTests +{ + /// + /// LintCommand accepts a glob pattern as a positional argument and resolves it to files. + /// + [Fact] + public async Task LintSubsystem_Patterns_AcceptsGlobPatterns_ResolvesFiles() + { + // Arrange: a temp directory containing one valid SysML file + var tempDir = Path.Combine(Path.GetTempPath(), $"lint_test_{Guid.NewGuid():N}"); + Directory.CreateDirectory(tempDir); + var sysmlFile = Path.Combine(tempDir, "model.sysml"); + await File.WriteAllTextAsync(sysmlFile, "package TestPackage {}", TestContext.Current.CancellationToken); + + var originalOut = Console.Out; + try + { + using var outWriter = new StringWriter(); + Console.SetOut(outWriter); + + // Act: lint with a glob pattern; all files matching *.sysml should be resolved + var pattern = Path.Combine(tempDir, "*.sysml"); + using var context = Context.Create(["lint", pattern]); + await Program.RunAsync(context); + + // Assert: one file was resolved from the pattern and processed + Assert.Contains("Linting 1 file(s)", outWriter.ToString()); + Assert.Equal(0, context.ExitCode); + } + finally + { + Console.SetOut(originalOut); + Directory.Delete(tempDir, recursive: true); + } + } + + /// + /// LintCommand invokes WorkspaceParser.ParseAsync — a valid SysML file produces no errors. + /// + [Fact] + public async Task LintSubsystem_Parse_ValidFile_ParsesWithoutErrors() + { + // Arrange: a temp file containing a minimal valid SysML package + var tempFile = Path.Combine(Path.GetTempPath(), $"lint_test_{Guid.NewGuid():N}.sysml"); + await File.WriteAllTextAsync(tempFile, "package ValidPackage {}", TestContext.Current.CancellationToken); + + var originalOut = Console.Out; + try + { + using var outWriter = new StringWriter(); + Console.SetOut(outWriter); + + // Act: lint the valid file by passing its path as a positional argument + using var context = Context.Create(["lint", tempFile]); + await Program.RunAsync(context); + + // Assert: file is parsed via WorkspaceParser.ParseAsync and no errors are found + Assert.Contains("no errors found", outWriter.ToString()); + Assert.Equal(0, context.ExitCode); + } + finally + { + Console.SetOut(originalOut); + if (File.Exists(tempFile)) + { + File.Delete(tempFile); + } + } + } + + /// + /// LintCommand writes each diagnostic in the format: path(line,col): severity: message. + /// + [Fact] + public async Task LintSubsystem_Report_InvalidFile_WritesDiagnosticInExpectedFormat() + { + // Arrange: a temp file containing invalid SysML syntax that will produce error diagnostics + var tempFile = Path.Combine(Path.GetTempPath(), $"lint_test_{Guid.NewGuid():N}.sysml"); + await File.WriteAllTextAsync(tempFile, "@@@ NOT VALID SYSML @@@", TestContext.Current.CancellationToken); + + var originalOut = Console.Out; + var originalError = Console.Error; + try + { + using var outWriter = new StringWriter(); + using var errWriter = new StringWriter(); + Console.SetOut(outWriter); + Console.SetError(errWriter); + + // Act: lint the invalid file + using var context = Context.Create(["lint", tempFile]); + await Program.RunAsync(context); + + // Assert: at least one diagnostic in path(line,col): severity: message format appears on stderr + var errorOutput = errWriter.ToString(); + Assert.Matches(@".+\(\d+,\d+\): error: .+", errorOutput); + } + finally + { + Console.SetOut(originalOut); + Console.SetError(originalError); + if (File.Exists(tempFile)) + { + File.Delete(tempFile); + } + } + } + + /// + /// LintCommand returns exit code 1 when error-severity diagnostics are present. + /// + [Fact] + public async Task LintSubsystem_ExitCode_InvalidFile_ReturnsOne() + { + // Arrange: a temp file containing invalid SysML syntax that will produce error diagnostics + var tempFile = Path.Combine(Path.GetTempPath(), $"lint_test_{Guid.NewGuid():N}.sysml"); + await File.WriteAllTextAsync(tempFile, "@@@ NOT VALID SYSML @@@", TestContext.Current.CancellationToken); + + var originalOut = Console.Out; + var originalError = Console.Error; + try + { + using var outWriter = new StringWriter(); + using var errWriter = new StringWriter(); + Console.SetOut(outWriter); + Console.SetError(errWriter); + + // Act: lint the invalid file + using var context = Context.Create(["lint", tempFile]); + await Program.RunAsync(context); + + // Assert: exit code is 1 when error-severity diagnostics are present + Assert.Equal(1, context.ExitCode); + } + finally + { + Console.SetOut(originalOut); + Console.SetError(originalError); + if (File.Exists(tempFile)) + { + File.Delete(tempFile); + } + } + } +}