sysmlpy 0.19.0__tar.gz → 0.19.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/PKG-INFO +1 -1
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/pyproject.toml +2 -2
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/classes.py +37 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/semantic.py +90 -2
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/LICENSE +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/README.md +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/usage.py +0 -0
- {sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/validator.py +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "sysmlpy"
|
|
9
|
-
version = "0.19.
|
|
9
|
+
version = "0.19.2"
|
|
10
10
|
description = "SysML v2.0 Parser"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Jon R. Fox (mycr0ft)", email="jon.fox@drfox.com" },
|
|
@@ -114,7 +114,7 @@ build_command = "pip install poetry && poetry build"
|
|
|
114
114
|
|
|
115
115
|
[tool.poetry]
|
|
116
116
|
name = "sysmlpy"
|
|
117
|
-
version = "0.19.
|
|
117
|
+
version = "0.19.2"
|
|
118
118
|
description = ""
|
|
119
119
|
authors = ["Jon R. Fox (mycr0ft) <jon.fox@drfox.com>"]
|
|
120
120
|
readme = "README.md"
|
|
@@ -15,7 +15,7 @@ __all__ = [
|
|
|
15
15
|
"analyze", "SemanticIssue", "SemanticAnalyzer",
|
|
16
16
|
]
|
|
17
17
|
__author__ = "Jon Fox"
|
|
18
|
-
__version__ = "0.
|
|
18
|
+
__version__ = "0.19.2"
|
|
19
19
|
|
|
20
20
|
from sysmlpy.usage import (
|
|
21
21
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -220,6 +220,10 @@ class DefinitionElement:
|
|
|
220
220
|
self.children.append(
|
|
221
221
|
SatisfyRequirementUsage(definition["ownedRelatedElement"])
|
|
222
222
|
)
|
|
223
|
+
elif de == "InterfaceUsage":
|
|
224
|
+
self.children.append(
|
|
225
|
+
InterfaceUsage(definition["ownedRelatedElement"])
|
|
226
|
+
)
|
|
223
227
|
else:
|
|
224
228
|
print(f"Unknown DefinitionElement type: {de}") # pragma: no cover
|
|
225
229
|
raise NotImplementedError # pragma: no cover
|
|
@@ -6311,6 +6315,13 @@ class InterfaceUsageDeclaration:
|
|
|
6311
6315
|
|
|
6312
6316
|
return " ".join(output)
|
|
6313
6317
|
|
|
6318
|
+
def get_definition(self):
|
|
6319
|
+
output = {"name": self.__class__.__name__}
|
|
6320
|
+
output["declaration"] = self.declaration.get_definition() if self.declaration else None
|
|
6321
|
+
output["part1"] = self.part.get_definition() if self.part else None
|
|
6322
|
+
output["part2"] = None
|
|
6323
|
+
return output
|
|
6324
|
+
|
|
6314
6325
|
|
|
6315
6326
|
class InterfacePart:
|
|
6316
6327
|
def __init__(self, definition):
|
|
@@ -6325,6 +6336,13 @@ class InterfacePart:
|
|
|
6325
6336
|
def dump(self):
|
|
6326
6337
|
return self.children.dump()
|
|
6327
6338
|
|
|
6339
|
+
def get_definition(self):
|
|
6340
|
+
return {
|
|
6341
|
+
"name": self.__class__.__name__,
|
|
6342
|
+
"binarypart": self.children.get_definition() if self.children else None,
|
|
6343
|
+
"narypart": None
|
|
6344
|
+
}
|
|
6345
|
+
|
|
6328
6346
|
|
|
6329
6347
|
class BinaryInterfacePart:
|
|
6330
6348
|
def __init__(self, definition):
|
|
@@ -6340,6 +6358,12 @@ class BinaryInterfacePart:
|
|
|
6340
6358
|
|
|
6341
6359
|
return self.children[0].dump() + " to " + self.children[1].dump()
|
|
6342
6360
|
|
|
6361
|
+
def get_definition(self):
|
|
6362
|
+
return {
|
|
6363
|
+
"name": self.__class__.__name__,
|
|
6364
|
+
"ownedRelationship": [c.get_definition() for c in self.children]
|
|
6365
|
+
}
|
|
6366
|
+
|
|
6343
6367
|
|
|
6344
6368
|
class InterfaceEndMember:
|
|
6345
6369
|
def __init__(self, definition):
|
|
@@ -6349,6 +6373,12 @@ class InterfaceEndMember:
|
|
|
6349
6373
|
def dump(self):
|
|
6350
6374
|
return self.child.dump()
|
|
6351
6375
|
|
|
6376
|
+
def get_definition(self):
|
|
6377
|
+
return {
|
|
6378
|
+
"name": self.__class__.__name__,
|
|
6379
|
+
"ownedRelatedElement": self.child.get_definition()
|
|
6380
|
+
}
|
|
6381
|
+
|
|
6352
6382
|
|
|
6353
6383
|
class InterfaceEnd:
|
|
6354
6384
|
def __init__(self, definition):
|
|
@@ -6379,6 +6409,13 @@ class InterfaceEnd:
|
|
|
6379
6409
|
|
|
6380
6410
|
return " ".join(output)
|
|
6381
6411
|
|
|
6412
|
+
def get_definition(self):
|
|
6413
|
+
return {
|
|
6414
|
+
"name": self.__class__.__name__,
|
|
6415
|
+
"declaredName": self.name,
|
|
6416
|
+
"ownedRelationship": [r.get_definition() for r in self.relationships]
|
|
6417
|
+
}
|
|
6418
|
+
|
|
6382
6419
|
|
|
6383
6420
|
class PortUsage:
|
|
6384
6421
|
def __init__(self, definition=None):
|
|
@@ -482,11 +482,14 @@ class SemanticAnalyzer:
|
|
|
482
482
|
symtab = SymbolTable()
|
|
483
483
|
symtab.build_from_model(model)
|
|
484
484
|
|
|
485
|
-
# Step 2:
|
|
485
|
+
# Step 2: Validate imports (check if import targets exist)
|
|
486
|
+
issues.extend(self._validate_imports(symtab))
|
|
487
|
+
|
|
488
|
+
# Step 3: Collect all references with scope paths
|
|
486
489
|
collector = ReferenceCollector()
|
|
487
490
|
references = collector.collect(model)
|
|
488
491
|
|
|
489
|
-
# Step
|
|
492
|
+
# Step 4: Cross-reference using scope-aware lookup
|
|
490
493
|
for ref_str, element, scope_path in references:
|
|
491
494
|
if self._is_resolved(ref_str, symtab, scope_path):
|
|
492
495
|
continue
|
|
@@ -501,6 +504,91 @@ class SemanticAnalyzer:
|
|
|
501
504
|
|
|
502
505
|
return issues
|
|
503
506
|
|
|
507
|
+
def _validate_imports(self, symtab: SymbolTable) -> list[SemanticIssue]:
|
|
508
|
+
"""Validate that all import targets exist in the model."""
|
|
509
|
+
issues: list[SemanticIssue] = []
|
|
510
|
+
self._check_imports_in_scope(symtab, symtab, issues)
|
|
511
|
+
return issues
|
|
512
|
+
|
|
513
|
+
def _check_imports_in_scope(
|
|
514
|
+
self, symtab: SymbolTable, table: SymbolTable, issues: list[SemanticIssue]
|
|
515
|
+
) -> None:
|
|
516
|
+
"""Check imports in this scope and recurse into children."""
|
|
517
|
+
for imp in table._imports:
|
|
518
|
+
self._validate_single_import(symtab, table, imp, issues)
|
|
519
|
+
|
|
520
|
+
for child_table in table._children.values():
|
|
521
|
+
self._check_imports_in_scope(symtab, child_table, issues)
|
|
522
|
+
|
|
523
|
+
def _validate_single_import(
|
|
524
|
+
self, symtab: SymbolTable, table: SymbolTable, imp: Any, issues: list[SemanticIssue]
|
|
525
|
+
) -> None:
|
|
526
|
+
"""Validate a single Import object."""
|
|
527
|
+
if not imp.children:
|
|
528
|
+
return
|
|
529
|
+
|
|
530
|
+
import_child = imp.children[0]
|
|
531
|
+
child_type = type(import_child).__name__
|
|
532
|
+
|
|
533
|
+
if child_type == "MembershipImport":
|
|
534
|
+
self._validate_membership_import(symtab, table, import_child, issues)
|
|
535
|
+
elif child_type == "NamespaceImport":
|
|
536
|
+
self._validate_namespace_import(symtab, table, import_child, issues)
|
|
537
|
+
|
|
538
|
+
def _validate_membership_import(
|
|
539
|
+
self, symtab: SymbolTable, table: SymbolTable, mem_import: Any, issues: list[SemanticIssue]
|
|
540
|
+
) -> None:
|
|
541
|
+
"""Validate a MembershipImport targets an existing element."""
|
|
542
|
+
imported_mem = getattr(mem_import, "membership", None)
|
|
543
|
+
if imported_mem is None:
|
|
544
|
+
return
|
|
545
|
+
|
|
546
|
+
qn = getattr(imported_mem, "name", None)
|
|
547
|
+
if qn is None:
|
|
548
|
+
return
|
|
549
|
+
|
|
550
|
+
names = getattr(qn, "names", [])
|
|
551
|
+
if not names:
|
|
552
|
+
return
|
|
553
|
+
|
|
554
|
+
ref_str = "::".join(names)
|
|
555
|
+
element = symtab._resolve_qualified_name(ref_str, table)
|
|
556
|
+
if element is None:
|
|
557
|
+
issues.append(SemanticIssue(
|
|
558
|
+
severity="error",
|
|
559
|
+
code="UNRESOLVED_IMPORT",
|
|
560
|
+
message=f"Import target '{ref_str}' does not exist",
|
|
561
|
+
element=None,
|
|
562
|
+
reference=ref_str,
|
|
563
|
+
))
|
|
564
|
+
|
|
565
|
+
def _validate_namespace_import(
|
|
566
|
+
self, symtab: SymbolTable, table: SymbolTable, ns_import: Any, issues: list[SemanticIssue]
|
|
567
|
+
) -> None:
|
|
568
|
+
"""Validate a NamespaceImport targets an existing namespace."""
|
|
569
|
+
imported_ns = getattr(ns_import, "namespace", None)
|
|
570
|
+
if imported_ns is None:
|
|
571
|
+
return
|
|
572
|
+
|
|
573
|
+
qn = getattr(imported_ns, "namespaces", None)
|
|
574
|
+
if qn is None:
|
|
575
|
+
return
|
|
576
|
+
|
|
577
|
+
names = getattr(qn, "names", [])
|
|
578
|
+
if not names:
|
|
579
|
+
return
|
|
580
|
+
|
|
581
|
+
ref_str = "::".join(names)
|
|
582
|
+
target_table = symtab._find_namespace_table(ref_str, table)
|
|
583
|
+
if target_table is None:
|
|
584
|
+
issues.append(SemanticIssue(
|
|
585
|
+
severity="error",
|
|
586
|
+
code="UNRESOLVED_IMPORT",
|
|
587
|
+
message=f"Import namespace '{ref_str}' does not exist",
|
|
588
|
+
element=None,
|
|
589
|
+
reference=ref_str,
|
|
590
|
+
))
|
|
591
|
+
|
|
504
592
|
def _is_resolved(self, ref_str: str, symtab: SymbolTable, scope_path: list[str]) -> bool:
|
|
505
593
|
"""Check if a qualified name reference can be resolved from the given scope."""
|
|
506
594
|
# Check known library symbols first
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.19.0 → sysmlpy-0.19.2}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|