sysmlpy 0.69.0__tar.gz → 0.70.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.69.0 → sysmlpy-0.70.0}/PKG-INFO +1 -1
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/pyproject.toml +1 -1
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/semantic.py +270 -5
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/LICENSE +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/README.md +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/evaluator.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/interchange.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/lsp/__init__.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/lsp/__main__.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/lsp/protocol.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/lsp/server.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/lsp/stdio.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/sim.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/spreadsheet.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/traceability.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/usage.py +0 -0
- {sysmlpy-0.69.0 → sysmlpy-0.70.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.70.0"
|
|
38
38
|
|
|
39
39
|
from sysmlpy.usage import (
|
|
40
40
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -1236,6 +1236,55 @@ class ExpressionIdentifierCollector:
|
|
|
1236
1236
|
self._walk(child, results, child_scope)
|
|
1237
1237
|
|
|
1238
1238
|
|
|
1239
|
+
def _find_payload_parameters(node: Any) -> list:
|
|
1240
|
+
"""Locate every ``PayloadParameter`` dict in a grammar tree."""
|
|
1241
|
+
out: list = []
|
|
1242
|
+
|
|
1243
|
+
def walk(n: Any) -> None:
|
|
1244
|
+
if isinstance(n, dict):
|
|
1245
|
+
if n.get("name") == "PayloadParameter":
|
|
1246
|
+
out.append(n)
|
|
1247
|
+
for v in n.values():
|
|
1248
|
+
if isinstance(v, (dict, list)):
|
|
1249
|
+
walk(v)
|
|
1250
|
+
elif isinstance(n, list):
|
|
1251
|
+
for item in n:
|
|
1252
|
+
if isinstance(item, (dict, list)):
|
|
1253
|
+
walk(item)
|
|
1254
|
+
|
|
1255
|
+
walk(node)
|
|
1256
|
+
return out
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
def _payload_reference(payload: Any) -> str | None:
|
|
1260
|
+
"""The name a ``PayloadParameter`` refers to, if any.
|
|
1261
|
+
|
|
1262
|
+
Bare ``accept Sig`` → the OwnedFeatureTyping QualifiedName.
|
|
1263
|
+
Guarded ``accept Sig when ...`` → ``identification.declaredName``
|
|
1264
|
+
(only when no typing is present — with both, the identification
|
|
1265
|
+
is a fresh declaration, not a reference).
|
|
1266
|
+
"""
|
|
1267
|
+
if not isinstance(payload, dict):
|
|
1268
|
+
return None
|
|
1269
|
+
feature = payload.get("feature") or {}
|
|
1270
|
+
rels = feature.get("ownedRelationship")
|
|
1271
|
+
rel_list = rels if isinstance(rels, list) else [rels] if isinstance(rels, dict) else []
|
|
1272
|
+
for rel in rel_list:
|
|
1273
|
+
t = ((rel.get("type") or {}).get("type") or {}) \
|
|
1274
|
+
if isinstance(rel, dict) else {}
|
|
1275
|
+
names = t.get("names")
|
|
1276
|
+
if isinstance(names, list) and names:
|
|
1277
|
+
return "::".join(str(n) for n in names)
|
|
1278
|
+
if rel_list:
|
|
1279
|
+
return None # typed payload — identification is a declaration
|
|
1280
|
+
ident = payload.get("identification")
|
|
1281
|
+
if isinstance(ident, dict):
|
|
1282
|
+
name = ident.get("declaredName")
|
|
1283
|
+
if name:
|
|
1284
|
+
return str(name)
|
|
1285
|
+
return None
|
|
1286
|
+
|
|
1287
|
+
|
|
1239
1288
|
def _find_owned_expressions(node: Any) -> list[dict]:
|
|
1240
1289
|
"""Locate every ``OwnedExpression`` dict in a grammar definition tree."""
|
|
1241
1290
|
out: list[dict] = []
|
|
@@ -2329,6 +2378,9 @@ class SemanticAnalyzer:
|
|
|
2329
2378
|
issues.extend(self._check_connector_ends_compatible(model))
|
|
2330
2379
|
issues.extend(self._check_multiplicity_bounds_valid(model))
|
|
2331
2380
|
issues.extend(self._check_state_machines(model))
|
|
2381
|
+
issues.extend(self._check_trigger_payloads(model, symtab, lib_roots))
|
|
2382
|
+
issues.extend(self._check_requirement_coverage(model))
|
|
2383
|
+
issues.extend(self._check_trace_targets(model, symtab, lib_roots))
|
|
2332
2384
|
|
|
2333
2385
|
# Step 6: Stylistic checks (warnings, not errors)
|
|
2334
2386
|
if style_checks:
|
|
@@ -2914,6 +2966,219 @@ class SemanticAnalyzer:
|
|
|
2914
2966
|
|
|
2915
2967
|
# -- OCL well-formedness constraints ------------------------------------
|
|
2916
2968
|
|
|
2969
|
+
def _check_trigger_payloads(
|
|
2970
|
+
self,
|
|
2971
|
+
model: Any,
|
|
2972
|
+
symtab: "SymbolTable",
|
|
2973
|
+
lib_roots: list,
|
|
2974
|
+
) -> list[SemanticIssue]:
|
|
2975
|
+
"""Resolve ``accept <Sig>`` trigger payload references (Goal 9).
|
|
2976
|
+
|
|
2977
|
+
The shorthand ``accept <Sig> [when <expr>]`` binds a transition
|
|
2978
|
+
trigger to a payload/signal definition. A typo there is
|
|
2979
|
+
silent today: the transition simply never fires, and nothing
|
|
2980
|
+
in analyze() looks at payload names. Two parse shapes exist
|
|
2981
|
+
(both verified against the visitor output):
|
|
2982
|
+
|
|
2983
|
+
- bare ``accept Sig`` — PayloadParameter carries an
|
|
2984
|
+
OwnedFeatureTyping → QualifiedName reference;
|
|
2985
|
+
- guarded ``accept Sig when expr`` — the visitor parks the
|
|
2986
|
+
name in ``identification.declaredName`` with no typing.
|
|
2987
|
+
|
|
2988
|
+
In both the name is meant as a reference to a declared
|
|
2989
|
+
definition, so each payload name is resolved against the
|
|
2990
|
+
symbol table in the transition's scope. Unresolved payloads
|
|
2991
|
+
produce UNRESOLVED_TRIGGER_PAYLOAD errors. When both an
|
|
2992
|
+
identification and a typing are present (``accept e : T``),
|
|
2993
|
+
only the typing is a reference — the identification is a
|
|
2994
|
+
fresh declaration.
|
|
2995
|
+
"""
|
|
2996
|
+
issues: list[SemanticIssue] = []
|
|
2997
|
+
try:
|
|
2998
|
+
from sysmlpy.sim import load_model_grammar
|
|
2999
|
+
visit = load_model_grammar(model)
|
|
3000
|
+
except Exception:
|
|
3001
|
+
return issues
|
|
3002
|
+
|
|
3003
|
+
for element, scope_path in self._walk_usages(model):
|
|
3004
|
+
# Transitions live inside State definitions' grammar trees
|
|
3005
|
+
# (no TransitionUsage object of their own) — extracting at
|
|
3006
|
+
# the State level attributes each payload to exactly one
|
|
3007
|
+
# element and keeps the scope path correct.
|
|
3008
|
+
if type(element).__name__ != "State":
|
|
3009
|
+
continue
|
|
3010
|
+
grammar_def = None
|
|
3011
|
+
grammar = getattr(element, "grammar", None)
|
|
3012
|
+
if grammar is None:
|
|
3013
|
+
continue
|
|
3014
|
+
try:
|
|
3015
|
+
grammar_def = grammar.get_definition()
|
|
3016
|
+
except Exception:
|
|
3017
|
+
continue
|
|
3018
|
+
if not isinstance(grammar_def, dict):
|
|
3019
|
+
continue
|
|
3020
|
+
for payload in _find_payload_parameters(grammar_def):
|
|
3021
|
+
ref = _payload_reference(payload)
|
|
3022
|
+
if not ref:
|
|
3023
|
+
continue
|
|
3024
|
+
if self._is_resolved(ref, symtab, scope_path, lib_roots):
|
|
3025
|
+
continue
|
|
3026
|
+
issues.append(SemanticIssue(
|
|
3027
|
+
severity="error",
|
|
3028
|
+
code="UNRESOLVED_TRIGGER_PAYLOAD",
|
|
3029
|
+
message=(
|
|
3030
|
+
f"Accept trigger payload '{ref}' in "
|
|
3031
|
+
f"{type(element).__name__} "
|
|
3032
|
+
f"'{getattr(element, 'name', '<anonymous>')}' "
|
|
3033
|
+
"does not resolve to a defined symbol; the "
|
|
3034
|
+
"transition can never fire"),
|
|
3035
|
+
element=element,
|
|
3036
|
+
reference=ref,
|
|
3037
|
+
))
|
|
3038
|
+
return issues
|
|
3039
|
+
|
|
3040
|
+
@staticmethod
|
|
3041
|
+
def _walk_usages(model: Any):
|
|
3042
|
+
"""Yield ``(element, scope_path)`` for every usage-like element."""
|
|
3043
|
+
def walk(element, scope_path):
|
|
3044
|
+
name = getattr(element, "name", None)
|
|
3045
|
+
elem_type = type(element).__name__
|
|
3046
|
+
is_container = getattr(element, "is_definition", False) or elem_type == "Package"
|
|
3047
|
+
child_scope = scope_path
|
|
3048
|
+
if is_container and name is not None and elem_type != "Model":
|
|
3049
|
+
child_scope = scope_path + [name]
|
|
3050
|
+
yield element, scope_path
|
|
3051
|
+
for child in getattr(element, "children", []):
|
|
3052
|
+
yield from walk(child, child_scope)
|
|
3053
|
+
|
|
3054
|
+
yield from walk(model, [])
|
|
3055
|
+
|
|
3056
|
+
def _check_requirement_coverage(self, model: Any) -> list[SemanticIssue]:
|
|
3057
|
+
"""Cross-check requirement traceability coverage (Goal 9).
|
|
3058
|
+
|
|
3059
|
+
Reuses the Goal 2 traceability extractor: every requirement
|
|
3060
|
+
*usage* with no ``satisfy`` *and* no ``verify`` relationship
|
|
3061
|
+
yields a REQUIREMENT_UNCOVERED warning. ``requirement def``
|
|
3062
|
+
declarations are categories/templates, not traceable
|
|
3063
|
+
instances, and are never flagged. Partially covered
|
|
3064
|
+
requirements (satisfied but unverified or vice versa) are not
|
|
3065
|
+
flagged — that is a project-progress signal, not a
|
|
3066
|
+
well-formedness problem.
|
|
3067
|
+
"""
|
|
3068
|
+
issues: list[SemanticIssue] = []
|
|
3069
|
+
try:
|
|
3070
|
+
from sysmlpy.traceability import extract_traceability
|
|
3071
|
+
report = extract_traceability(model)
|
|
3072
|
+
except Exception:
|
|
3073
|
+
return issues
|
|
3074
|
+
for trace in report.uncovered():
|
|
3075
|
+
if getattr(trace, "is_definition", False):
|
|
3076
|
+
continue
|
|
3077
|
+
issues.append(SemanticIssue(
|
|
3078
|
+
severity="warning",
|
|
3079
|
+
code="REQUIREMENT_UNCOVERED",
|
|
3080
|
+
message=(
|
|
3081
|
+
f"Requirement '{trace.name}' has no satisfy and "
|
|
3082
|
+
"no verify relationships"),
|
|
3083
|
+
reference=trace.name,
|
|
3084
|
+
))
|
|
3085
|
+
return issues
|
|
3086
|
+
|
|
3087
|
+
def _check_trace_targets(
|
|
3088
|
+
self,
|
|
3089
|
+
model: Any,
|
|
3090
|
+
symtab: "SymbolTable",
|
|
3091
|
+
lib_roots: list,
|
|
3092
|
+
) -> list[SemanticIssue]:
|
|
3093
|
+
"""Resolve ``satisfy <req> by <part>`` targets (Goal 9).
|
|
3094
|
+
|
|
3095
|
+
A typo'd satisfy target is silent today — worse, the Goal 2
|
|
3096
|
+
traceability extractor materializes the dangling edge as a
|
|
3097
|
+
*phantom requirement* in coverage reports, so the real
|
|
3098
|
+
requirement reads uncovered while a fake one appears traced.
|
|
3099
|
+
Each satisfy target reference is resolved against the symbol
|
|
3100
|
+
table in the satisfying part's scope; unresolved targets
|
|
3101
|
+
produce UNRESOLVED_TRACE_TARGET errors.
|
|
3102
|
+
"""
|
|
3103
|
+
issues: list[SemanticIssue] = []
|
|
3104
|
+
for element, scope_path in self._walk_usages(model):
|
|
3105
|
+
grammar = getattr(element, "grammar", None)
|
|
3106
|
+
if grammar is None or \
|
|
3107
|
+
grammar.__class__.__name__ != "SatisfyRequirementUsage":
|
|
3108
|
+
continue
|
|
3109
|
+
ors = getattr(grammar, "ors", None)
|
|
3110
|
+
if ors is None:
|
|
3111
|
+
continue
|
|
3112
|
+
try:
|
|
3113
|
+
ref = ors.dump().strip().rstrip(";").strip()
|
|
3114
|
+
except Exception:
|
|
3115
|
+
continue
|
|
3116
|
+
if not ref:
|
|
3117
|
+
continue
|
|
3118
|
+
if self._is_resolved(ref, symtab, scope_path, lib_roots):
|
|
3119
|
+
# Kind check: the target must be a requirement.
|
|
3120
|
+
# (Library-resolved targets yield no element here and
|
|
3121
|
+
# are left alone — conservative by design.)
|
|
3122
|
+
found = self._resolve_element(ref, symtab, scope_path)
|
|
3123
|
+
if found is not None and \
|
|
3124
|
+
type(found).__name__ != "Requirement":
|
|
3125
|
+
issues.append(SemanticIssue(
|
|
3126
|
+
severity="warning",
|
|
3127
|
+
code="TRACE_TARGET_NOT_REQUIREMENT",
|
|
3128
|
+
message=(
|
|
3129
|
+
f"satisfy target '{ref}' resolves to a "
|
|
3130
|
+
f"{type(found).__name__}, not a "
|
|
3131
|
+
"requirement"),
|
|
3132
|
+
element=element,
|
|
3133
|
+
reference=ref,
|
|
3134
|
+
))
|
|
3135
|
+
continue
|
|
3136
|
+
issues.append(SemanticIssue(
|
|
3137
|
+
severity="error",
|
|
3138
|
+
code="UNRESOLVED_TRACE_TARGET",
|
|
3139
|
+
message=(
|
|
3140
|
+
f"satisfy target '{ref}' in "
|
|
3141
|
+
f"{type(element).__name__} "
|
|
3142
|
+
f"'{getattr(element, 'name', '<anonymous>')}' does "
|
|
3143
|
+
"not resolve to a defined requirement"),
|
|
3144
|
+
element=element,
|
|
3145
|
+
reference=ref,
|
|
3146
|
+
))
|
|
3147
|
+
return issues
|
|
3148
|
+
|
|
3149
|
+
@staticmethod
|
|
3150
|
+
def _resolve_element(
|
|
3151
|
+
ref_str: str,
|
|
3152
|
+
symtab: "SymbolTable",
|
|
3153
|
+
scope_path: list[str],
|
|
3154
|
+
):
|
|
3155
|
+
"""The model element *ref_str* resolves to, if any.
|
|
3156
|
+
|
|
3157
|
+
Mirrors the symbol-table walk of :meth:`_is_resolved` (without
|
|
3158
|
+
the library-index shortcuts, which resolve to no model
|
|
3159
|
+
element).
|
|
3160
|
+
"""
|
|
3161
|
+
current = symtab
|
|
3162
|
+
for scope_name in scope_path:
|
|
3163
|
+
child = current._children.get(scope_name)
|
|
3164
|
+
if child is not None:
|
|
3165
|
+
current = child
|
|
3166
|
+
else:
|
|
3167
|
+
break
|
|
3168
|
+
found = current.lookup(ref_str)
|
|
3169
|
+
if found is not None:
|
|
3170
|
+
return found
|
|
3171
|
+
if "::" in ref_str:
|
|
3172
|
+
parts = ref_str.split("::")
|
|
3173
|
+
table = current
|
|
3174
|
+
for part in parts[:-1]:
|
|
3175
|
+
found = table.lookup(part)
|
|
3176
|
+
if found is None:
|
|
3177
|
+
return None
|
|
3178
|
+
table = table._children.get(part, table)
|
|
3179
|
+
return table.lookup(parts[-1])
|
|
3180
|
+
return None
|
|
3181
|
+
|
|
2917
3182
|
def _check_state_machines(self, model: Any) -> list[SemanticIssue]:
|
|
2918
3183
|
"""OCL well-formedness for ``state def`` machines (Goal 9).
|
|
2919
3184
|
|
|
@@ -2930,12 +3195,12 @@ class SemanticAnalyzer:
|
|
|
2930
3195
|
issues: list[SemanticIssue] = []
|
|
2931
3196
|
try:
|
|
2932
3197
|
# Lazy import: sim pulls the boxes-view collector and the
|
|
2933
|
-
# evaluator; no import cycle at module level.
|
|
3198
|
+
# evaluator; no import cycle at module level. The sim
|
|
3199
|
+
# extra is optional — skip these checks without it.
|
|
2934
3200
|
from sysmlpy.sim import SimulationError, build_state_machine
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
visit = _bv # noqa: F841 — ensures boxes_view loads once
|
|
3201
|
+
except ImportError:
|
|
3202
|
+
return issues
|
|
3203
|
+
try:
|
|
2939
3204
|
machines = self._collect_machines(model)
|
|
2940
3205
|
except SimulationError:
|
|
2941
3206
|
return issues
|
|
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.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.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.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.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.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.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.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.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.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.69.0 → sysmlpy-0.70.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.69.0 → sysmlpy-0.70.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
|