sysmlpy 0.75.0__tar.gz → 0.76.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.75.0 → sysmlpy-0.76.0}/PKG-INFO +1 -1
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/pyproject.toml +1 -1
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/project.py +66 -10
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/semantic.py +77 -1
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/LICENSE +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/README.md +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/diff.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/evaluator.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/interchange.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/lsp/__init__.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/lsp/__main__.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/lsp/protocol.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/lsp/server.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/lsp/stdio.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/sim.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/spreadsheet.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/traceability.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/usage.py +0 -0
- {sysmlpy-0.75.0 → sysmlpy-0.76.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.76.0"
|
|
38
38
|
|
|
39
39
|
from sysmlpy.usage import (
|
|
40
40
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -233,17 +233,73 @@ def _extract_imports(content: str) -> list[str]:
|
|
|
233
233
|
Returns a list of qualified names like ``['ScalarValues', 'ISQ']``.
|
|
234
234
|
Handles quoted package names (e.g., ``'Some Package'``) and the
|
|
235
235
|
``all`` keyword (e.g., ``import all Types::*``).
|
|
236
|
+
|
|
237
|
+
Since v0.76.0 this scans the SysML v2 lexer token stream instead
|
|
238
|
+
of a regex over raw text (Goal 10 "regex to parser" item), which
|
|
239
|
+
fixes three defects of the old regex:
|
|
240
|
+
|
|
241
|
+
- a bare ``import X::Y;`` (no visibility keyword) was missed —
|
|
242
|
+
the visibility prefix is optional per the SysML grammar and is
|
|
243
|
+
now correctly treated as such
|
|
244
|
+
- imports inside comments produced false positives
|
|
245
|
+
- imports inside string literals (e.g. ``doc about "..."``)
|
|
246
|
+
produced false positives
|
|
247
|
+
|
|
248
|
+
Syntax-error tolerance: the lexer keeps producing tokens for
|
|
249
|
+
partially broken sources (dependency scanning must not require a
|
|
250
|
+
parseable file), so scanning continues past stray tokens; an
|
|
251
|
+
import with a stray token in its name run is skipped.
|
|
236
252
|
"""
|
|
237
|
-
imports = []
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
imports: list[str] = []
|
|
254
|
+
try:
|
|
255
|
+
from sysmlpy.antlr_parser import _make_parser
|
|
256
|
+
from sysmlpy.antlr.SysMLv2Lexer import SysMLv2Lexer
|
|
257
|
+
_lexer, token_stream, _parser = _make_parser(content)
|
|
258
|
+
token_stream.fill()
|
|
259
|
+
tokens = token_stream.tokens
|
|
260
|
+
except Exception:
|
|
261
|
+
return imports
|
|
262
|
+
|
|
263
|
+
from antlr4.Token import Token
|
|
264
|
+
|
|
265
|
+
visible = [t for t in tokens
|
|
266
|
+
if t.type != Token.EOF
|
|
267
|
+
and t.channel == Token.DEFAULT_CHANNEL]
|
|
268
|
+
|
|
269
|
+
NAME_TYPES = frozenset((SysMLv2Lexer.IDENTIFIER, SysMLv2Lexer.STRING))
|
|
270
|
+
COLON_COLON = SysMLv2Lexer.COLON_COLON
|
|
271
|
+
STAR = SysMLv2Lexer.STAR
|
|
272
|
+
STAR_STAR = SysMLv2Lexer.STAR_STAR
|
|
273
|
+
SEMI = SysMLv2Lexer.SEMI
|
|
274
|
+
ALL = SysMLv2Lexer.ALL
|
|
275
|
+
|
|
276
|
+
i = 0
|
|
277
|
+
n = len(visible)
|
|
278
|
+
while i < n:
|
|
279
|
+
tok = visible[i]
|
|
280
|
+
if tok.type != SysMLv2Lexer.IMPORT:
|
|
281
|
+
i += 1
|
|
282
|
+
continue
|
|
283
|
+
# Collect the import run up to the terminating ';'
|
|
284
|
+
j = i + 1
|
|
285
|
+
parts: list[str] = []
|
|
286
|
+
aborted = False
|
|
287
|
+
while j < n and visible[j].type != SEMI:
|
|
288
|
+
t = visible[j]
|
|
289
|
+
if t.type in NAME_TYPES:
|
|
290
|
+
parts.append(t.text)
|
|
291
|
+
elif t.type in (ALL, COLON_COLON, STAR, STAR_STAR):
|
|
292
|
+
pass # 'all' keyword, namespace separators, wildcards
|
|
293
|
+
else:
|
|
294
|
+
aborted = True # stray token — not a well-formed import
|
|
295
|
+
break
|
|
296
|
+
j += 1
|
|
297
|
+
if parts and not aborted:
|
|
298
|
+
imports.append("::".join(parts))
|
|
299
|
+
# advance past the run (or the aborted token) and its ';' if present
|
|
300
|
+
i = j
|
|
301
|
+
if i < n and visible[i].type == SEMI:
|
|
302
|
+
i += 1
|
|
247
303
|
return imports
|
|
248
304
|
|
|
249
305
|
|
|
@@ -3845,7 +3845,7 @@ class SemanticAnalyzer:
|
|
|
3845
3845
|
return issues
|
|
3846
3846
|
|
|
3847
3847
|
def _check_connector_directions(self, model: Any) -> list[SemanticIssue]:
|
|
3848
|
-
"""Check connection
|
|
3848
|
+
"""Check connection ends: directions (Goal 9) + types (Goal 10).
|
|
3849
3849
|
|
|
3850
3850
|
``connection c connect a.p1 to b.p2;`` — when both end ports
|
|
3851
3851
|
carry explicit directions and neither is ``inout``, wiring
|
|
@@ -3855,6 +3855,14 @@ class SemanticAnalyzer:
|
|
|
3855
3855
|
error). Ends without a direction keyword, ``inout`` ends,
|
|
3856
3856
|
chains deeper than two segments and unresolvable parts are
|
|
3857
3857
|
skipped.
|
|
3858
|
+
|
|
3859
|
+
Goal 10 (connector-end compatibility depth): when both ends
|
|
3860
|
+
resolve to typings that are local ``port def`` names and
|
|
3861
|
+
neither is a (transitive) specialization of the other, the
|
|
3862
|
+
connection flags CONNECTOR_END_TYPE_MISMATCH (warning) —
|
|
3863
|
+
conjugation only makes ports of the *same* (or related) port
|
|
3864
|
+
definition compatible. Ends typed by library/external port
|
|
3865
|
+
definitions are skipped (no local subclass data).
|
|
3858
3866
|
"""
|
|
3859
3867
|
issues: list[SemanticIssue] = []
|
|
3860
3868
|
try:
|
|
@@ -3867,6 +3875,7 @@ class SemanticAnalyzer:
|
|
|
3867
3875
|
part_typing: dict = {} # part usage name -> typed-by name
|
|
3868
3876
|
member_typing: dict = {} # (container name, member) -> typed-by
|
|
3869
3877
|
supertypes: dict = {} # def name -> {superclassifier names}
|
|
3878
|
+
port_defs: set = set() # local port def names (Goal 10)
|
|
3870
3879
|
connections: list = [] # (name, scope_stack, [chain, ...])
|
|
3871
3880
|
|
|
3872
3881
|
def walk2(node, scope_stack):
|
|
@@ -3897,6 +3906,8 @@ class SemanticAnalyzer:
|
|
|
3897
3906
|
if sups:
|
|
3898
3907
|
supertypes.setdefault(declared, set()).update(
|
|
3899
3908
|
sups)
|
|
3909
|
+
if nm == "PortDefinition":
|
|
3910
|
+
port_defs.add(declared)
|
|
3900
3911
|
if nm == "PortUsage":
|
|
3901
3912
|
d = _port_direction(node)
|
|
3902
3913
|
if scope_stack:
|
|
@@ -4000,6 +4011,55 @@ class SemanticAnalyzer:
|
|
|
4000
4011
|
return None, False # known container, no such port
|
|
4001
4012
|
return None, True # external/library type: skip
|
|
4002
4013
|
|
|
4014
|
+
def end_typing(chain, scope_stack):
|
|
4015
|
+
"""Typed-by name of an end chain's final segment, or None."""
|
|
4016
|
+
if not chain:
|
|
4017
|
+
return None
|
|
4018
|
+
if len(chain) == 1:
|
|
4019
|
+
name = chain[0]
|
|
4020
|
+
for scope in reversed(scope_stack):
|
|
4021
|
+
t = member_typing.get((scope, name))
|
|
4022
|
+
if t:
|
|
4023
|
+
return t
|
|
4024
|
+
return part_typing.get(name)
|
|
4025
|
+
first = chain[0]
|
|
4026
|
+
cur = part_typing.get(first)
|
|
4027
|
+
if cur is None:
|
|
4028
|
+
for scope in reversed(scope_stack):
|
|
4029
|
+
t = member_typing.get((scope, first))
|
|
4030
|
+
if t:
|
|
4031
|
+
cur = t
|
|
4032
|
+
break
|
|
4033
|
+
if cur is None:
|
|
4034
|
+
return None
|
|
4035
|
+
for seg in chain[1:-1]:
|
|
4036
|
+
t = member_typing.get((cur, seg))
|
|
4037
|
+
if t is None:
|
|
4038
|
+
t = member_typing.get((first, seg))
|
|
4039
|
+
if t is None:
|
|
4040
|
+
return None
|
|
4041
|
+
cur = t
|
|
4042
|
+
t = member_typing.get((cur, chain[-1]))
|
|
4043
|
+
if t is None:
|
|
4044
|
+
t = member_typing.get((first, chain[-1]))
|
|
4045
|
+
return t
|
|
4046
|
+
|
|
4047
|
+
def _sub(a, b):
|
|
4048
|
+
"""True when a is b or a (transitively) specializes b."""
|
|
4049
|
+
if a == b:
|
|
4050
|
+
return True
|
|
4051
|
+
seen = set()
|
|
4052
|
+
stack = [a]
|
|
4053
|
+
while stack:
|
|
4054
|
+
cur = stack.pop()
|
|
4055
|
+
if cur == b:
|
|
4056
|
+
return True
|
|
4057
|
+
if cur in seen:
|
|
4058
|
+
continue
|
|
4059
|
+
seen.add(cur)
|
|
4060
|
+
stack.extend(supertypes.get(cur, ()))
|
|
4061
|
+
return False
|
|
4062
|
+
|
|
4003
4063
|
for cname, cstack, chains in connections:
|
|
4004
4064
|
d1, r1 = end_resolve(chains[0], cstack)
|
|
4005
4065
|
d2, r2 = end_resolve(chains[1], cstack)
|
|
@@ -4021,6 +4081,22 @@ class SemanticAnalyzer:
|
|
|
4021
4081
|
f"'{'.'.join(chains[1])}' does not resolve"),
|
|
4022
4082
|
reference=cname,
|
|
4023
4083
|
))
|
|
4084
|
+
# Goal 10: end-type compatibility (port defs, local only)
|
|
4085
|
+
t1 = end_typing(chains[0], cstack)
|
|
4086
|
+
t2 = end_typing(chains[1], cstack)
|
|
4087
|
+
if (t1 and t2 and t1 in port_defs and t2 in port_defs
|
|
4088
|
+
and not _sub(t1, t2) and not _sub(t2, t1)):
|
|
4089
|
+
issues.append(SemanticIssue(
|
|
4090
|
+
severity="warning",
|
|
4091
|
+
code="CONNECTOR_END_TYPE_MISMATCH",
|
|
4092
|
+
message=(
|
|
4093
|
+
f"Connection '{cname}' binds "
|
|
4094
|
+
f"'{'.'.join(chains[0])}' (typed '{t1}') to "
|
|
4095
|
+
f"'{'.'.join(chains[1])}' (typed '{t2}'); "
|
|
4096
|
+
"connected port definitions are unrelated"
|
|
4097
|
+
),
|
|
4098
|
+
reference=cname,
|
|
4099
|
+
))
|
|
4024
4100
|
if not d1 or not d2:
|
|
4025
4101
|
continue
|
|
4026
4102
|
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.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.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
|
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.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.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.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.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.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.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.75.0 → sysmlpy-0.76.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.75.0 → sysmlpy-0.76.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
|