sysmlpy 0.72.0__tar.gz → 0.73.0__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.72.0 → sysmlpy-0.73.0}/PKG-INFO +1 -1
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/pyproject.toml +1 -1
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/semantic.py +208 -23
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/LICENSE +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/README.md +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/evaluator.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/interchange.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/lsp/__init__.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/lsp/__main__.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/lsp/protocol.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/lsp/server.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/lsp/stdio.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/sim.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/spreadsheet.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/traceability.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/usage.py +0 -0
- {sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/validator.py +0 -0
|
@@ -34,7 +34,7 @@ __all__ = [
|
|
|
34
34
|
"render_state_transition_view_svg", "boxes_view",
|
|
35
35
|
]
|
|
36
36
|
__author__ = "Jon Fox"
|
|
37
|
-
__version__ = "0.
|
|
37
|
+
__version__ = "0.73.0"
|
|
38
38
|
|
|
39
39
|
from sysmlpy.usage import (
|
|
40
40
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -3344,11 +3344,67 @@ class SemanticAnalyzer:
|
|
|
3344
3344
|
reference=ref,
|
|
3345
3345
|
))
|
|
3346
3346
|
|
|
3347
|
+
# superclassifier map for subject-type compatibility: walk
|
|
3348
|
+
# part/item definitions and collect ``:>`` targets
|
|
3349
|
+
supertypes: dict = {}
|
|
3350
|
+
for element, scope_path in self._walk_usages(model):
|
|
3351
|
+
if type(element).__name__ not in ("Part", "Item"):
|
|
3352
|
+
continue
|
|
3353
|
+
if not getattr(element, "is_definition", False):
|
|
3354
|
+
continue
|
|
3355
|
+
grammar = getattr(element, "grammar", None)
|
|
3356
|
+
if grammar is None:
|
|
3357
|
+
continue
|
|
3358
|
+
try:
|
|
3359
|
+
d = grammar.get_definition()
|
|
3360
|
+
except Exception:
|
|
3361
|
+
continue
|
|
3362
|
+
if not isinstance(d, dict):
|
|
3363
|
+
continue
|
|
3364
|
+
defn = d.get("definition") or {}
|
|
3365
|
+
decl = defn.get("declaration") or {}
|
|
3366
|
+
scp = decl.get("subclassificationpart") or {}
|
|
3367
|
+
sups = set()
|
|
3368
|
+
for rel in _as_list_dicts(scp.get("ownedRelationship")):
|
|
3369
|
+
if rel.get("name") != "OwnedSubclassification":
|
|
3370
|
+
continue
|
|
3371
|
+
sc = rel.get("superclassifier") or {}
|
|
3372
|
+
names = sc.get("names")
|
|
3373
|
+
if isinstance(names, list) and names:
|
|
3374
|
+
sups.add("::".join(str(n) for n in names))
|
|
3375
|
+
if sups and element.name:
|
|
3376
|
+
supertypes.setdefault(element.name, set()).update(sups)
|
|
3377
|
+
|
|
3378
|
+
def _is_subtype(sub: str, sup: str, seen=None) -> bool:
|
|
3379
|
+
if sub == sup:
|
|
3380
|
+
return True
|
|
3381
|
+
if seen is None:
|
|
3382
|
+
seen = set()
|
|
3383
|
+
if sub in seen:
|
|
3384
|
+
return False
|
|
3385
|
+
seen.add(sub)
|
|
3386
|
+
for st in supertypes.get(sub, ()):
|
|
3387
|
+
if _is_subtype(st, sup, seen):
|
|
3388
|
+
return True
|
|
3389
|
+
return False
|
|
3390
|
+
|
|
3391
|
+
def subject_issue(req_name, subj_type, part_name, part_type):
|
|
3392
|
+
issues.append(SemanticIssue(
|
|
3393
|
+
severity="warning",
|
|
3394
|
+
code="SATISFY_SUBJECT_TYPE_MISMATCH",
|
|
3395
|
+
message=(
|
|
3396
|
+
f"satisfy 'by {part_name}' ({part_type}) is not "
|
|
3397
|
+
f"related to requirement '{req_name}' subject "
|
|
3398
|
+
f"type '{subj_type}'"),
|
|
3399
|
+
reference=req_name,
|
|
3400
|
+
))
|
|
3401
|
+
|
|
3347
3402
|
for element, scope_path in self._walk_usages(model):
|
|
3348
3403
|
gname = (element.grammar.__class__.__name__
|
|
3349
3404
|
if getattr(element, "grammar", None) is not None else "")
|
|
3350
3405
|
if gname == "SatisfyRequirementUsage":
|
|
3351
|
-
# package-level wrapper; .ssm dump is the by reference
|
|
3406
|
+
# package-level wrapper; .ssm dump is the by reference,
|
|
3407
|
+
# .ors dump the target requirement
|
|
3352
3408
|
g = element.grammar
|
|
3353
3409
|
ssm = getattr(g, "ssm", None)
|
|
3354
3410
|
if ssm is None:
|
|
@@ -3358,6 +3414,14 @@ class SemanticAnalyzer:
|
|
|
3358
3414
|
continue
|
|
3359
3415
|
if not self._is_resolved(ref, symtab, scope_path, lib_roots):
|
|
3360
3416
|
issue(element, ref)
|
|
3417
|
+
ors = getattr(g, "ors", None)
|
|
3418
|
+
target = ors.dump().strip().rstrip(";").strip() \
|
|
3419
|
+
if ors is not None else None
|
|
3420
|
+
if target:
|
|
3421
|
+
self._check_subject_type(
|
|
3422
|
+
element, target, ref, symtab, scope_path,
|
|
3423
|
+
lib_roots, supertypes, _is_subtype,
|
|
3424
|
+
subject_issue)
|
|
3361
3425
|
continue
|
|
3362
3426
|
if gname not in ("RequirementDefinition", "RequirementUsage"):
|
|
3363
3427
|
continue
|
|
@@ -3379,8 +3443,65 @@ class SemanticAnalyzer:
|
|
|
3379
3443
|
if not self._is_resolved(
|
|
3380
3444
|
by_ref, symtab, scope_path, lib_roots):
|
|
3381
3445
|
issue(element, by_ref)
|
|
3446
|
+
ors = sat.get("ors") or {}
|
|
3447
|
+
rf = ors.get("referencedFeature") or {}
|
|
3448
|
+
names = rf.get("names") if isinstance(rf, dict) else None
|
|
3449
|
+
if names:
|
|
3450
|
+
target = "::".join(str(n) for n in names)
|
|
3451
|
+
self._check_subject_type(
|
|
3452
|
+
element, target, by_ref, symtab, scope_path,
|
|
3453
|
+
lib_roots, supertypes, _is_subtype,
|
|
3454
|
+
subject_issue)
|
|
3382
3455
|
return issues
|
|
3383
3456
|
|
|
3457
|
+
def _check_subject_type(
|
|
3458
|
+
self,
|
|
3459
|
+
satisfy_obj: Any,
|
|
3460
|
+
target_ref: str,
|
|
3461
|
+
by_ref: str,
|
|
3462
|
+
symtab: "SymbolTable",
|
|
3463
|
+
scope_path: list[str],
|
|
3464
|
+
lib_roots: list,
|
|
3465
|
+
supertypes: dict,
|
|
3466
|
+
is_subtype,
|
|
3467
|
+
issue_fn,
|
|
3468
|
+
) -> None:
|
|
3469
|
+
"""SATISFY_SUBJECT_TYPE_MISMATCH (warning, conservative).
|
|
3470
|
+
|
|
3471
|
+
``satisfy <req> by <part>`` binds *part* as the satisfying
|
|
3472
|
+
element of *req*'s subject. When both the subject's type and
|
|
3473
|
+
the by-part's type are known model definitions and neither is
|
|
3474
|
+
a (transitive) specialization of the other, flag a warning.
|
|
3475
|
+
Anything unresolvable — library types, untyped parts,
|
|
3476
|
+
requirements without a typed subject — is skipped.
|
|
3477
|
+
"""
|
|
3478
|
+
target = self._resolve_element(target_ref, symtab, scope_path)
|
|
3479
|
+
if target is None:
|
|
3480
|
+
return
|
|
3481
|
+
subject = getattr(target, "subject", None)
|
|
3482
|
+
if not subject:
|
|
3483
|
+
return
|
|
3484
|
+
subj_type = subject[1]
|
|
3485
|
+
if not subj_type or subj_type not in supertypes and (
|
|
3486
|
+
subj_type not in getattr(symtab, "_definition_features",
|
|
3487
|
+
{})):
|
|
3488
|
+
return
|
|
3489
|
+
by_el = self._resolve_element(by_ref, symtab, scope_path)
|
|
3490
|
+
if by_el is None:
|
|
3491
|
+
return
|
|
3492
|
+
part_type = self._get_element_type(by_el)
|
|
3493
|
+
if not part_type:
|
|
3494
|
+
return
|
|
3495
|
+
# both sides must be model-known (skip library typings)
|
|
3496
|
+
if part_type not in supertypes and (
|
|
3497
|
+
part_type not in getattr(symtab, "_definition_features",
|
|
3498
|
+
{})):
|
|
3499
|
+
return
|
|
3500
|
+
if is_subtype(part_type, subj_type) or is_subtype(
|
|
3501
|
+
subj_type, part_type):
|
|
3502
|
+
return
|
|
3503
|
+
issue_fn(target_ref, subj_type, by_ref, part_type)
|
|
3504
|
+
|
|
3384
3505
|
def _check_verify_targets(
|
|
3385
3506
|
self,
|
|
3386
3507
|
model: Any,
|
|
@@ -3457,9 +3578,10 @@ class SemanticAnalyzer:
|
|
|
3457
3578
|
except Exception:
|
|
3458
3579
|
return issues
|
|
3459
3580
|
|
|
3460
|
-
scope_ports: dict = {} # def/usage name -> {port: direction}
|
|
3581
|
+
scope_ports: dict = {} # def/usage name -> {port: direction|None}
|
|
3461
3582
|
part_typing: dict = {} # part usage name -> typed-by name
|
|
3462
3583
|
member_typing: dict = {} # (container name, member) -> typed-by
|
|
3584
|
+
supertypes: dict = {} # def name -> {superclassifier names}
|
|
3463
3585
|
connections: list = [] # (name, scope_stack, [chain, ...])
|
|
3464
3586
|
|
|
3465
3587
|
def walk2(node, scope_stack):
|
|
@@ -3471,11 +3593,39 @@ class SemanticAnalyzer:
|
|
|
3471
3593
|
nm.endswith("Usage") or nm.endswith("Definition")):
|
|
3472
3594
|
if nm != "PortUsage":
|
|
3473
3595
|
new_stack = scope_stack + [declared]
|
|
3596
|
+
if nm.endswith("Definition"):
|
|
3597
|
+
# superclassifiers (``part def A :> B``) ride the
|
|
3598
|
+
# definition dict's declaration.subclassificationpart
|
|
3599
|
+
sups = set()
|
|
3600
|
+
defn = node.get("definition") or {}
|
|
3601
|
+
decl = defn.get("declaration") or {}
|
|
3602
|
+
scp = decl.get("subclassificationpart") or {}
|
|
3603
|
+
for rel in _as_list_dicts(
|
|
3604
|
+
scp.get("ownedRelationship")):
|
|
3605
|
+
if rel.get("name") != "OwnedSubclassification":
|
|
3606
|
+
continue
|
|
3607
|
+
sc = rel.get("superclassifier") or {}
|
|
3608
|
+
names = sc.get("names")
|
|
3609
|
+
if isinstance(names, list) and names:
|
|
3610
|
+
sups.add("::".join(
|
|
3611
|
+
str(n) for n in names))
|
|
3612
|
+
if sups:
|
|
3613
|
+
supertypes.setdefault(declared, set()).update(
|
|
3614
|
+
sups)
|
|
3474
3615
|
if nm == "PortUsage":
|
|
3475
3616
|
d = _port_direction(node)
|
|
3476
|
-
if
|
|
3617
|
+
if scope_stack:
|
|
3618
|
+
# record even undirected ports: existence
|
|
3619
|
+
# drives end resolution, None direction
|
|
3620
|
+
# just skips the direction check
|
|
3477
3621
|
scope_ports.setdefault(
|
|
3478
3622
|
scope_stack[-1], {})[declared] = d
|
|
3623
|
+
t = _usage_typed_by(node)
|
|
3624
|
+
if t:
|
|
3625
|
+
part_typing[declared] = t
|
|
3626
|
+
if scope_stack:
|
|
3627
|
+
member_typing[(scope_stack[-1],
|
|
3628
|
+
declared)] = t
|
|
3479
3629
|
elif nm == "ConnectionUsage":
|
|
3480
3630
|
chains = []
|
|
3481
3631
|
part = node.get("part") or {}
|
|
@@ -3509,25 +3659,33 @@ class SemanticAnalyzer:
|
|
|
3509
3659
|
|
|
3510
3660
|
walk2(visit, [])
|
|
3511
3661
|
|
|
3512
|
-
def
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3662
|
+
def end_resolve(chain, scope_stack):
|
|
3663
|
+
"""(direction|None, fully_resolved) for an end chain.
|
|
3664
|
+
|
|
3665
|
+
``fully_resolved`` is False only when a segment provably
|
|
3666
|
+
does not exist in a *known, non-specializing* container —
|
|
3667
|
+
containers typed by library defs, unknown names and
|
|
3668
|
+
subclasses (inherited members) resolve as "present but
|
|
3669
|
+
direction-unknown" to stay conservative.
|
|
3670
|
+
"""
|
|
3671
|
+
if not chain:
|
|
3672
|
+
return None, True
|
|
3519
3673
|
if len(chain) == 1:
|
|
3520
3674
|
port_name = chain[0]
|
|
3521
3675
|
for scope in reversed(scope_stack):
|
|
3522
|
-
|
|
3523
|
-
|
|
3676
|
+
ports = scope_ports.get(scope)
|
|
3677
|
+
if ports is not None and port_name in ports:
|
|
3678
|
+
return ports[port_name], True
|
|
3524
3679
|
t = part_typing.get(scope)
|
|
3525
|
-
if t
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3680
|
+
if t:
|
|
3681
|
+
ports = scope_ports.get(t)
|
|
3682
|
+
if ports is not None and port_name in ports:
|
|
3683
|
+
return ports[port_name], True
|
|
3684
|
+
if t not in supertypes and t not in scope_ports:
|
|
3685
|
+
# known library/external type: cannot
|
|
3686
|
+
# verify members
|
|
3687
|
+
return None, True
|
|
3688
|
+
return None, False
|
|
3531
3689
|
first = chain[0]
|
|
3532
3690
|
cur = part_typing.get(first)
|
|
3533
3691
|
if cur is None:
|
|
@@ -3537,20 +3695,47 @@ class SemanticAnalyzer:
|
|
|
3537
3695
|
cur = t
|
|
3538
3696
|
break
|
|
3539
3697
|
if cur is None:
|
|
3540
|
-
return None
|
|
3698
|
+
return None, False
|
|
3541
3699
|
for seg in chain[1:-1]:
|
|
3542
3700
|
t = member_typing.get((cur, seg))
|
|
3543
3701
|
if t is None:
|
|
3544
3702
|
# members declared on the seg0 *usage* itself
|
|
3545
3703
|
t = member_typing.get((first, seg))
|
|
3546
3704
|
if t is None:
|
|
3547
|
-
return None
|
|
3705
|
+
return None, cur in supertypes or (
|
|
3706
|
+
cur not in scope_ports
|
|
3707
|
+
and cur not in part_typing)
|
|
3548
3708
|
cur = t
|
|
3549
|
-
|
|
3709
|
+
ports = scope_ports.get(cur)
|
|
3710
|
+
if ports is not None and chain[-1] in ports:
|
|
3711
|
+
return ports[chain[-1]], True
|
|
3712
|
+
if cur in supertypes:
|
|
3713
|
+
return None, True # inherited port possible
|
|
3714
|
+
if cur in scope_ports:
|
|
3715
|
+
return None, False # known container, no such port
|
|
3716
|
+
return None, True # external/library type: skip
|
|
3550
3717
|
|
|
3551
3718
|
for cname, cstack, chains in connections:
|
|
3552
|
-
d1 =
|
|
3553
|
-
d2 =
|
|
3719
|
+
d1, r1 = end_resolve(chains[0], cstack)
|
|
3720
|
+
d2, r2 = end_resolve(chains[1], cstack)
|
|
3721
|
+
if not r1:
|
|
3722
|
+
issues.append(SemanticIssue(
|
|
3723
|
+
severity="error",
|
|
3724
|
+
code="UNRESOLVED_CONNECTOR_END",
|
|
3725
|
+
message=(
|
|
3726
|
+
f"Connection '{cname}' end "
|
|
3727
|
+
f"'{'.'.join(chains[0])}' does not resolve"),
|
|
3728
|
+
reference=cname,
|
|
3729
|
+
))
|
|
3730
|
+
if not r2:
|
|
3731
|
+
issues.append(SemanticIssue(
|
|
3732
|
+
severity="error",
|
|
3733
|
+
code="UNRESOLVED_CONNECTOR_END",
|
|
3734
|
+
message=(
|
|
3735
|
+
f"Connection '{cname}' end "
|
|
3736
|
+
f"'{'.'.join(chains[1])}' does not resolve"),
|
|
3737
|
+
reference=cname,
|
|
3738
|
+
))
|
|
3554
3739
|
if not d1 or not d2:
|
|
3555
3740
|
continue
|
|
3556
3741
|
if d1 == "inout" or d2 == "inout":
|
|
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.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/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.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.72.0 → sysmlpy-0.73.0}/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.72.0 → sysmlpy-0.73.0}/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
|
|
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
|