sysmlpy 0.88.0__tar.gz → 0.89.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.88.0 → sysmlpy-0.89.0}/PKG-INFO +1 -1
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/pyproject.toml +1 -1
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr_visitor.py +49 -414
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/definition.py +17 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/sim.py +491 -76
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/usage.py +50 -5
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/LICENSE +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/README.md +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/dfa_cache.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/diff.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/evaluator.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/interchange.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/lsp/__init__.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/lsp/__main__.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/lsp/protocol.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/lsp/server.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/lsp/stdio.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/semantic.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/spreadsheet.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/traceability.py +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.88.0 → sysmlpy-0.89.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.89.0"
|
|
38
38
|
|
|
39
39
|
from sysmlpy.usage import (
|
|
40
40
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -4622,7 +4622,10 @@ def _visit_transition_usage(ctx):
|
|
|
4622
4622
|
"declaredShortName": shortname,
|
|
4623
4623
|
"declaredName": decl_name
|
|
4624
4624
|
},
|
|
4625
|
-
|
|
4625
|
+
# v0.88.1: ``transition t1 : T first e1;`` — the
|
|
4626
|
+
# usageDeclaration can carry a typing; it was
|
|
4627
|
+
# hardcoded to None and silently dropped.
|
|
4628
|
+
"specialization": _build_full_specialization_from_ud(ud)
|
|
4626
4629
|
}
|
|
4627
4630
|
}
|
|
4628
4631
|
|
|
@@ -5433,24 +5436,6 @@ def _visit_trigger_action_member(ctx):
|
|
|
5433
5436
|
}
|
|
5434
5437
|
|
|
5435
5438
|
|
|
5436
|
-
def _visit_accept_action_usage(ctx):
|
|
5437
|
-
"""Visit an acceptActionUsage (trigger in transition) and return a TriggerAction dict."""
|
|
5438
|
-
if ctx is None:
|
|
5439
|
-
return None
|
|
5440
|
-
|
|
5441
|
-
# Get accept parameter part
|
|
5442
|
-
part = None
|
|
5443
|
-
if hasattr(ctx, 'acceptParameterPart') and ctx.acceptParameterPart():
|
|
5444
|
-
app = ctx.acceptParameterPart()
|
|
5445
|
-
if isinstance(app, list):
|
|
5446
|
-
app = app[0]
|
|
5447
|
-
if app:
|
|
5448
|
-
part = _visit_accept_parameter_part(app)
|
|
5449
|
-
|
|
5450
|
-
return {
|
|
5451
|
-
"name": "TriggerAction",
|
|
5452
|
-
"part": part
|
|
5453
|
-
}
|
|
5454
5439
|
|
|
5455
5440
|
|
|
5456
5441
|
def _visit_accept_parameter_part(ctx):
|
|
@@ -11255,69 +11240,11 @@ def _is_binary_operator_token(text):
|
|
|
11255
11240
|
return text in _PRECEDENCE_RANK
|
|
11256
11241
|
|
|
11257
11242
|
|
|
11258
|
-
def _is_unary_prefix_token(text):
|
|
11259
|
-
"""True if the token text is a recognized unary prefix operator."""
|
|
11260
|
-
return text in _UNARY_PREFIX_TOKENS
|
|
11261
11243
|
|
|
11262
11244
|
|
|
11263
|
-
def _find_split_index(children, left_assoc=True):
|
|
11264
|
-
"""Find the index of the operator that should be the TOP of the tree.
|
|
11265
11245
|
|
|
11266
|
-
Walks ``children`` (the ANTLR children list of an ownedExpression
|
|
11267
|
-
context, alternating OwnedExpr/TerminalNode) and finds the operator
|
|
11268
|
-
with the LOWEST precedence rank. For left-associative operators
|
|
11269
|
-
at the same rank, returns the RIGHTMOST index (so ``a - b - c``
|
|
11270
|
-
becomes ``(a - b) - c``). For right-associative (``**``/``^``),
|
|
11271
|
-
returns the LEFTMOST index.
|
|
11272
|
-
|
|
11273
|
-
Returns (op_index, op_text) or (None, None) if no binary operator
|
|
11274
|
-
is found.
|
|
11275
|
-
"""
|
|
11276
|
-
best_idx = None
|
|
11277
|
-
best_text = None
|
|
11278
|
-
best_rank = None
|
|
11279
|
-
for i, c in enumerate(children):
|
|
11280
|
-
type_name = type(c).__name__
|
|
11281
|
-
if type_name != "TerminalNodeImpl":
|
|
11282
|
-
continue
|
|
11283
|
-
text = c.getText().strip()
|
|
11284
|
-
if text in _FIELD_ACCESS_TOKENS:
|
|
11285
|
-
continue
|
|
11286
|
-
if not _is_binary_operator_token(text):
|
|
11287
|
-
continue
|
|
11288
|
-
rank = _PRECEDENCE_RANK[text]
|
|
11289
|
-
right_assoc = text in ("**", "^")
|
|
11290
|
-
if best_idx is None:
|
|
11291
|
-
best_idx, best_text, best_rank = i, text, rank
|
|
11292
|
-
continue
|
|
11293
|
-
if rank < best_rank:
|
|
11294
|
-
# Lower precedence → becomes the new top
|
|
11295
|
-
best_idx, best_text, best_rank = i, text, rank
|
|
11296
|
-
elif rank == best_rank:
|
|
11297
|
-
# Same precedence: prefer the rightmost for left-assoc,
|
|
11298
|
-
# leftmost for right-assoc
|
|
11299
|
-
if right_assoc:
|
|
11300
|
-
if i < best_idx:
|
|
11301
|
-
best_idx, best_text = i, text
|
|
11302
|
-
else:
|
|
11303
|
-
if i > best_idx:
|
|
11304
|
-
best_idx, best_text = i, text
|
|
11305
|
-
return best_idx, best_text
|
|
11306
11246
|
|
|
11307
11247
|
|
|
11308
|
-
def _build_binary_chain(op_text, lhs_owned_ctx, rhs_owned_ctx):
|
|
11309
|
-
"""Build a chain for ``lhs OP rhs`` by recursing on each side and
|
|
11310
|
-
splicing the operator at the right layer.
|
|
11311
|
-
|
|
11312
|
-
The lhs and rhs are ANTLR ownedExpression contexts. We recursively
|
|
11313
|
-
emit each, then splice ``op_text`` at the layer corresponding to
|
|
11314
|
-
its precedence. The result is a single OwnedExpression chain
|
|
11315
|
-
with the operator populated at the right layer.
|
|
11316
|
-
"""
|
|
11317
|
-
lhs_chain = _emit_structured_expression(lhs_owned_ctx)
|
|
11318
|
-
rhs_chain = _emit_structured_expression(rhs_owned_ctx)
|
|
11319
|
-
return _splice_operator(lhs_chain, _OPERATOR_TO_LAYER[op_text], op_text, rhs_chain)
|
|
11320
|
-
|
|
11321
11248
|
|
|
11322
11249
|
def _splice_operator(lhs_chain, layer_name, op_text, rhs_chain):
|
|
11323
11250
|
"""Splice ``op_text`` at ``layer_name`` into ``lhs_chain`` with
|
|
@@ -12218,62 +12145,10 @@ def _emit_structured_expression(oe_ctx):
|
|
|
12218
12145
|
}
|
|
12219
12146
|
|
|
12220
12147
|
|
|
12221
|
-
def _layer_rank(layer_name):
|
|
12222
|
-
"""Return the precedence rank of a layer (using one of its operators)."""
|
|
12223
|
-
ops = _LAYER_TO_OPERATORS.get(layer_name, [])
|
|
12224
|
-
if not ops:
|
|
12225
|
-
return -1
|
|
12226
|
-
return _PRECEDENCE_RANK.get(ops[0], -1)
|
|
12227
12148
|
|
|
12228
12149
|
|
|
12229
|
-
def _get_top_op_text(chain):
|
|
12230
|
-
"""Return the operator text at the top op layer of a chain, or None."""
|
|
12231
|
-
top = _rhs_top_op_layer(chain)
|
|
12232
|
-
if top is None:
|
|
12233
|
-
return None
|
|
12234
|
-
path = _LAYER_PATHS.get(top)
|
|
12235
|
-
if not path:
|
|
12236
|
-
return None
|
|
12237
|
-
node = _walk_chain(chain, path)
|
|
12238
|
-
if not isinstance(node, dict):
|
|
12239
|
-
return None
|
|
12240
|
-
op_field = _LAYER_OP_FIELDS.get(top)
|
|
12241
|
-
if op_field == "operation":
|
|
12242
|
-
ops = node.get("operation", [])
|
|
12243
|
-
if ops:
|
|
12244
|
-
return ops[0].get("operator")
|
|
12245
|
-
elif op_field == "operator":
|
|
12246
|
-
op_val = node.get("operator")
|
|
12247
|
-
if isinstance(op_val, list) and op_val:
|
|
12248
|
-
return op_val[0]
|
|
12249
|
-
if isinstance(op_val, str) and op_val:
|
|
12250
|
-
return op_val
|
|
12251
|
-
return None
|
|
12252
12150
|
|
|
12253
12151
|
|
|
12254
|
-
def _get_top_op_rhs_chain(chain):
|
|
12255
|
-
"""Return the rhs chain at the top op layer of a chain, or None."""
|
|
12256
|
-
top = _rhs_top_op_layer(chain)
|
|
12257
|
-
if top is None:
|
|
12258
|
-
return None
|
|
12259
|
-
path = _LAYER_PATHS.get(top)
|
|
12260
|
-
if not path:
|
|
12261
|
-
return None
|
|
12262
|
-
node = _walk_chain(chain, path)
|
|
12263
|
-
if not isinstance(node, dict):
|
|
12264
|
-
return None
|
|
12265
|
-
op_field = _LAYER_OP_FIELDS.get(top)
|
|
12266
|
-
if op_field == "operation":
|
|
12267
|
-
ops = node.get("operation", [])
|
|
12268
|
-
if ops:
|
|
12269
|
-
return ops[0].get("operand")
|
|
12270
|
-
elif op_field == "operator":
|
|
12271
|
-
op_val = node.get("operand")
|
|
12272
|
-
if isinstance(op_val, list) and op_val:
|
|
12273
|
-
return op_val[0]
|
|
12274
|
-
if isinstance(op_val, dict):
|
|
12275
|
-
return op_val
|
|
12276
|
-
return None
|
|
12277
12152
|
|
|
12278
12153
|
|
|
12279
12154
|
def _add_op_to_layer(sub_dict, layer_name, op_text, rhs_ctx):
|
|
@@ -12352,16 +12227,6 @@ def _make_op_dict(layer_name, op_text, operand_dict):
|
|
|
12352
12227
|
return {"name": "Operand", "operator": op_text, "operand": operand_dict}
|
|
12353
12228
|
|
|
12354
12229
|
|
|
12355
|
-
def _embed_layer_at_path(lhs_chain, rhs_chain, layer_name):
|
|
12356
|
-
"""Copy the operator-bearing fields from ``rhs_chain`` at
|
|
12357
|
-
``layer_name`` into ``lhs_chain`` at the same layer."""
|
|
12358
|
-
lhs_node = _walk_chain(lhs_chain, _LAYER_PATHS.get(layer_name, []))
|
|
12359
|
-
rhs_node = _walk_chain(rhs_chain, _LAYER_PATHS.get(layer_name, []))
|
|
12360
|
-
if not isinstance(lhs_node, dict) or not isinstance(rhs_node, dict):
|
|
12361
|
-
return
|
|
12362
|
-
op_field = _LAYER_OP_FIELDS.get(layer_name, "operation")
|
|
12363
|
-
if op_field in rhs_node:
|
|
12364
|
-
lhs_node[op_field] = rhs_node[op_field]
|
|
12365
12230
|
|
|
12366
12231
|
|
|
12367
12232
|
_LAYER_PATHS = {
|
|
@@ -12398,54 +12263,8 @@ def _emit_unary_chain(operand_chain, op_text):
|
|
|
12398
12263
|
return operand_chain
|
|
12399
12264
|
|
|
12400
12265
|
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
is at the UnaryExpression layer in the chain."""
|
|
12404
|
-
return _emit_unary_chain(operand_chain, op_text)
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
def _emit_base_expression(oe_ctx):
|
|
12408
|
-
"""Emit a base expression (no binary operators). This handles
|
|
12409
|
-
literal values, feature references, invocations, and the
|
|
12410
|
-
field-access chains (a.b.c)."""
|
|
12411
|
-
# Try literal first
|
|
12412
|
-
if hasattr(oe_ctx, "baseExpression") and oe_ctx.baseExpression():
|
|
12413
|
-
be_ctx = oe_ctx.baseExpression()
|
|
12414
|
-
text = be_ctx.getText().strip() if hasattr(be_ctx, "getText") else ""
|
|
12415
|
-
# Literal?
|
|
12416
|
-
if hasattr(be_ctx, "literalExpression") and be_ctx.literalExpression():
|
|
12417
|
-
lit_ctx = be_ctx.literalExpression()
|
|
12418
|
-
lit_text = lit_ctx.getText().strip() if hasattr(lit_ctx, "getText") else ""
|
|
12419
|
-
try:
|
|
12420
|
-
value = int(lit_text)
|
|
12421
|
-
primary = _make_literal_integer_primary(value)
|
|
12422
|
-
return _wrap_expression_layers(primary)
|
|
12423
|
-
except ValueError:
|
|
12424
|
-
pass
|
|
12425
|
-
try:
|
|
12426
|
-
value = float(lit_text)
|
|
12427
|
-
primary = _make_literal_real_primary(value)
|
|
12428
|
-
return _wrap_expression_layers(primary)
|
|
12429
|
-
except ValueError:
|
|
12430
|
-
pass
|
|
12431
|
-
if lit_text.startswith('"') and lit_text.endswith('"'):
|
|
12432
|
-
primary = _make_literal_string_primary(lit_text)
|
|
12433
|
-
return _wrap_expression_layers(primary)
|
|
12434
|
-
# Invocation: base has qualifiedName AND argumentList
|
|
12435
|
-
has_args = hasattr(be_ctx, "argumentList") and be_ctx.argumentList()
|
|
12436
|
-
if has_args and hasattr(be_ctx, "qualifiedName") and be_ctx.qualifiedName():
|
|
12437
|
-
qn_ctx = be_ctx.qualifiedName()
|
|
12438
|
-
names = _extract_qualified_name_parts(qn_ctx)
|
|
12439
|
-
primary = _build_invocation_primary(names, be_ctx.argumentList())
|
|
12440
|
-
return _wrap_expression_layers(primary)
|
|
12441
|
-
# Feature reference (possibly with field access)
|
|
12442
|
-
if hasattr(be_ctx, "qualifiedName") and be_ctx.qualifiedName():
|
|
12443
|
-
# Extract qualified name parts
|
|
12444
|
-
qn_ctx = be_ctx.qualifiedName()
|
|
12445
|
-
names = _extract_qualified_name_parts(qn_ctx)
|
|
12446
|
-
primary = _make_feature_reference_chain(names)
|
|
12447
|
-
return _wrap_expression_layers(primary)
|
|
12448
|
-
return _fallback_to_text(oe_ctx)
|
|
12266
|
+
|
|
12267
|
+
|
|
12449
12268
|
|
|
12450
12269
|
|
|
12451
12270
|
def _build_invocation_primary(names, arg_list_ctx):
|
|
@@ -13110,6 +12929,48 @@ def _visit_nested_definition_element(def_elem):
|
|
|
13110
12929
|
return _make_constraint_definition_dict(
|
|
13111
12930
|
def_elem.constraintDefinition(), None
|
|
13112
12931
|
)
|
|
12932
|
+
elif hasattr(def_elem, 'actionDefinition') and def_elem.actionDefinition():
|
|
12933
|
+
# v0.88.1: ``part p { action def A; }`` (and the sibling
|
|
12934
|
+
# definition kinds below) was silently dropped — the nested
|
|
12935
|
+
# dispatcher only covered 7 kinds while the package-level one
|
|
12936
|
+
# covers ~25. All makers exist and are exercised at package
|
|
12937
|
+
# level, so these are safe reuses.
|
|
12938
|
+
return _make_action_definition_dict(def_elem.actionDefinition(), None)
|
|
12939
|
+
elif hasattr(def_elem, 'stateDefinition') and def_elem.stateDefinition():
|
|
12940
|
+
return _make_state_definition_dict(def_elem.stateDefinition(), None)
|
|
12941
|
+
elif hasattr(def_elem, 'requirementDefinition') and def_elem.requirementDefinition():
|
|
12942
|
+
return _make_requirement_definition_dict(def_elem.requirementDefinition(), None)
|
|
12943
|
+
elif hasattr(def_elem, 'useCaseDefinition') and def_elem.useCaseDefinition():
|
|
12944
|
+
return _make_use_case_definition_dict(def_elem.useCaseDefinition(), None)
|
|
12945
|
+
elif hasattr(def_elem, 'enumerationDefinition') and def_elem.enumerationDefinition():
|
|
12946
|
+
return _make_enumeration_definition_dict(def_elem.enumerationDefinition(), None)
|
|
12947
|
+
elif hasattr(def_elem, 'viewDefinition') and def_elem.viewDefinition():
|
|
12948
|
+
return _make_view_definition_dict(def_elem.viewDefinition(), None)
|
|
12949
|
+
elif hasattr(def_elem, 'viewpointDefinition') and def_elem.viewpointDefinition():
|
|
12950
|
+
return _make_viewpoint_definition_dict(def_elem.viewpointDefinition(), None)
|
|
12951
|
+
elif hasattr(def_elem, 'concernDefinition') and def_elem.concernDefinition():
|
|
12952
|
+
return _make_concern_definition_dict(def_elem.concernDefinition(), None)
|
|
12953
|
+
elif hasattr(def_elem, 'verificationCaseDefinition') and def_elem.verificationCaseDefinition():
|
|
12954
|
+
return _make_verification_case_definition_dict(def_elem.verificationCaseDefinition(), None)
|
|
12955
|
+
elif hasattr(def_elem, 'analysisCaseDefinition') and def_elem.analysisCaseDefinition():
|
|
12956
|
+
return _make_analysis_case_definition_dict(def_elem.analysisCaseDefinition(), None)
|
|
12957
|
+
elif hasattr(def_elem, 'caseDefinition') and def_elem.caseDefinition():
|
|
12958
|
+
return _make_case_definition_dict(def_elem.caseDefinition(), None)
|
|
12959
|
+
elif hasattr(def_elem, 'individualDefinition') and def_elem.individualDefinition():
|
|
12960
|
+
return _make_individual_definition_dict(def_elem.individualDefinition(), None)
|
|
12961
|
+
elif hasattr(def_elem, 'renderingDefinition') and def_elem.renderingDefinition():
|
|
12962
|
+
return _make_rendering_definition_dict(def_elem.renderingDefinition(), None)
|
|
12963
|
+
elif hasattr(def_elem, 'allocationDefinition') and def_elem.allocationDefinition():
|
|
12964
|
+
return _make_allocation_definition_dict(def_elem.allocationDefinition(), None)
|
|
12965
|
+
elif hasattr(def_elem, 'connectionDefinition') and def_elem.connectionDefinition():
|
|
12966
|
+
return _make_connection_definition_dict(def_elem.connectionDefinition(), None)
|
|
12967
|
+
elif hasattr(def_elem, 'flowDefinition') and def_elem.flowDefinition():
|
|
12968
|
+
return _make_flow_connection_definition_dict(def_elem.flowDefinition(), None)
|
|
12969
|
+
elif hasattr(def_elem, 'metadataDefinition') and def_elem.metadataDefinition():
|
|
12970
|
+
return _make_metadata_definition_dict(def_elem.metadataDefinition(), None)
|
|
12971
|
+
elif hasattr(def_elem, 'dependency') and def_elem.dependency():
|
|
12972
|
+
# Issue #4 sibling: nested dependency statements dropped too
|
|
12973
|
+
return _make_dependency_dict(def_elem.dependency(), None)
|
|
13113
12974
|
elif hasattr(def_elem, 'annotatingElement') and def_elem.annotatingElement():
|
|
13114
12975
|
ann_ctx = def_elem.annotatingElement()
|
|
13115
12976
|
ann_dict = _visit_annotating_element_dict(ann_ctx)
|
|
@@ -13183,198 +13044,8 @@ def _make_nested_usage_element(usage_type, name, shortname, prefix, body_items=N
|
|
|
13183
13044
|
}
|
|
13184
13045
|
|
|
13185
13046
|
|
|
13186
|
-
def _visit_nested_definition(def_elem_ctx):
|
|
13187
|
-
"""Visit a nested definition within a body."""
|
|
13188
|
-
if hasattr(def_elem_ctx, 'partDefinition') and def_elem_ctx.partDefinition():
|
|
13189
|
-
ctx = def_elem_ctx.partDefinition()
|
|
13190
|
-
return _make_part_definition_dict(ctx)
|
|
13191
|
-
elif hasattr(def_elem_ctx, 'attributeDefinition') and def_elem_ctx.attributeDefinition():
|
|
13192
|
-
ctx = def_elem_ctx.attributeDefinition()
|
|
13193
|
-
return _make_attribute_definition_dict(ctx)
|
|
13194
|
-
elif hasattr(def_elem_ctx, 'portDefinition') and def_elem_ctx.portDefinition():
|
|
13195
|
-
ctx = def_elem_ctx.portDefinition()
|
|
13196
|
-
return _make_port_definition_dict(ctx)
|
|
13197
|
-
# Add more types as needed
|
|
13198
|
-
|
|
13199
|
-
return None
|
|
13200
13047
|
|
|
13201
13048
|
|
|
13202
|
-
def _visit_nested_usage(usage_elem_ctx):
|
|
13203
|
-
"""Visit a nested usage within a body."""
|
|
13204
|
-
# Check for occurrence usage (part, item, port)
|
|
13205
|
-
if hasattr(usage_elem_ctx, 'occurrenceUsageElement') and usage_elem_ctx.occurrenceUsageElement():
|
|
13206
|
-
occ_elem = usage_elem_ctx.occurrenceUsageElement()
|
|
13207
|
-
|
|
13208
|
-
# Check structure usage elements
|
|
13209
|
-
if hasattr(occ_elem, 'structureUsageElement') and occ_elem.structureUsageElement():
|
|
13210
|
-
struct_elem = occ_elem.structureUsageElement()
|
|
13211
|
-
|
|
13212
|
-
if hasattr(struct_elem, 'partUsage') and struct_elem.partUsage():
|
|
13213
|
-
ctx = struct_elem.partUsage()
|
|
13214
|
-
name, shortname = _get_usage_identification(ctx)
|
|
13215
|
-
body_items = _get_usage_body_items(ctx)
|
|
13216
|
-
occ_prefix = _get_occurrence_usage_prefix(ctx)
|
|
13217
|
-
specialization = _build_full_specialization_from_ctx(ctx)
|
|
13218
|
-
valuepart = _get_usage_value_part(ctx)
|
|
13219
|
-
return _make_nested_usage_element("PartUsage", name, shortname, occ_prefix, body_items, specialization, valuepart)
|
|
13220
|
-
elif hasattr(struct_elem, 'itemUsage') and struct_elem.itemUsage():
|
|
13221
|
-
ctx = struct_elem.itemUsage()
|
|
13222
|
-
name, shortname = _get_usage_identification(ctx)
|
|
13223
|
-
body_items = _get_usage_body_items(ctx)
|
|
13224
|
-
occ_prefix = _get_occurrence_usage_prefix(ctx)
|
|
13225
|
-
specialization = _build_full_specialization_from_ctx(ctx)
|
|
13226
|
-
valuepart = _get_usage_value_part(ctx)
|
|
13227
|
-
return _make_nested_usage_element("ItemUsage", name, shortname, occ_prefix, body_items, specialization, valuepart)
|
|
13228
|
-
elif hasattr(struct_elem, 'portUsage') and struct_elem.portUsage():
|
|
13229
|
-
ctx = struct_elem.portUsage()
|
|
13230
|
-
name, shortname = _get_usage_identification(ctx)
|
|
13231
|
-
body_items = _get_usage_body_items(ctx)
|
|
13232
|
-
occ_prefix = _get_occurrence_usage_prefix(ctx)
|
|
13233
|
-
specialization = _build_full_specialization_from_ctx(ctx)
|
|
13234
|
-
valuepart = _get_usage_value_part(ctx)
|
|
13235
|
-
return _make_nested_usage_element("PortUsage", name, shortname, occ_prefix, body_items, specialization, valuepart)
|
|
13236
|
-
elif hasattr(struct_elem, 'portionUsage') and struct_elem.portionUsage():
|
|
13237
|
-
ctx = struct_elem.portionUsage()
|
|
13238
|
-
name, shortname = _get_usage_identification(ctx)
|
|
13239
|
-
body_items = _get_usage_body_items(ctx)
|
|
13240
|
-
occ_prefix = _make_portion_usage_prefix(ctx)
|
|
13241
|
-
specialization = _build_full_specialization_from_ctx(ctx)
|
|
13242
|
-
valuepart = _get_usage_value_part(ctx)
|
|
13243
|
-
return _make_nested_usage_element("PortionUsage", name, shortname, occ_prefix, body_items, specialization, valuepart)
|
|
13244
|
-
elif hasattr(struct_elem, 'individualUsage') and struct_elem.individualUsage():
|
|
13245
|
-
ctx = struct_elem.individualUsage()
|
|
13246
|
-
name, shortname = _get_usage_identification(ctx)
|
|
13247
|
-
body_items = _get_usage_body_items(ctx)
|
|
13248
|
-
occ_prefix = _make_portion_usage_prefix(ctx)
|
|
13249
|
-
specialization = _build_full_specialization_from_ctx(ctx)
|
|
13250
|
-
valuepart = _get_usage_value_part(ctx)
|
|
13251
|
-
return _make_nested_usage_element("PortionUsage", name, shortname, occ_prefix, body_items, specialization, valuepart)
|
|
13252
|
-
|
|
13253
|
-
# Check behavior usage elements (action)
|
|
13254
|
-
if hasattr(occ_elem, 'behaviorUsageElement') and occ_elem.behaviorUsageElement():
|
|
13255
|
-
behav_elem = occ_elem.behaviorUsageElement()
|
|
13256
|
-
|
|
13257
|
-
if hasattr(behav_elem, 'actionUsage') and behav_elem.actionUsage():
|
|
13258
|
-
ctx = behav_elem.actionUsage()
|
|
13259
|
-
name = None
|
|
13260
|
-
if ctx.actionUsageDeclaration():
|
|
13261
|
-
aud = ctx.actionUsageDeclaration()
|
|
13262
|
-
if hasattr(aud, 'usageDeclaration') and aud.usageDeclaration():
|
|
13263
|
-
ud = aud.usageDeclaration()
|
|
13264
|
-
if hasattr(ud, 'getText'):
|
|
13265
|
-
text = ud.getText().strip()
|
|
13266
|
-
if text and text != 'ACTION':
|
|
13267
|
-
name = text
|
|
13268
|
-
return {
|
|
13269
|
-
"name": "UsageElement",
|
|
13270
|
-
"ownedRelatedElement": {
|
|
13271
|
-
"name": "OccurrenceUsageElement",
|
|
13272
|
-
"ownedRelatedElement": {
|
|
13273
|
-
"name": "BehaviorUsageElement",
|
|
13274
|
-
"ownedRelationship": {
|
|
13275
|
-
"name": "ActionUsage",
|
|
13276
|
-
"prefix": None,
|
|
13277
|
-
"declaration": {
|
|
13278
|
-
"name": "ActionUsageDeclaration",
|
|
13279
|
-
"declaration": {
|
|
13280
|
-
"name": "UsageDeclaration",
|
|
13281
|
-
"declaration": {
|
|
13282
|
-
"name": "FeatureDeclaration",
|
|
13283
|
-
"identification": {
|
|
13284
|
-
"name": "Identification",
|
|
13285
|
-
"declaredShortName": None,
|
|
13286
|
-
"declaredName": name
|
|
13287
|
-
},
|
|
13288
|
-
"specialization": None
|
|
13289
|
-
}
|
|
13290
|
-
},
|
|
13291
|
-
"valuepart": None
|
|
13292
|
-
},
|
|
13293
|
-
"body": {
|
|
13294
|
-
"name": "ActionBody",
|
|
13295
|
-
"items": []
|
|
13296
|
-
}
|
|
13297
|
-
}
|
|
13298
|
-
}
|
|
13299
|
-
}
|
|
13300
|
-
}
|
|
13301
|
-
|
|
13302
|
-
if hasattr(behav_elem, 'assertConstraintUsage') and behav_elem.assertConstraintUsage():
|
|
13303
|
-
ctx = behav_elem.assertConstraintUsage()
|
|
13304
|
-
result = _make_assert_constraint_usage_dict(ctx, None)
|
|
13305
|
-
if result:
|
|
13306
|
-
return {
|
|
13307
|
-
"name": "UsageElement",
|
|
13308
|
-
"ownedRelatedElement": {
|
|
13309
|
-
"name": "OccurrenceUsageElement",
|
|
13310
|
-
"ownedRelatedElement": {
|
|
13311
|
-
"name": "BehaviorUsageElement",
|
|
13312
|
-
"ownedRelationship": result
|
|
13313
|
-
}
|
|
13314
|
-
}
|
|
13315
|
-
}
|
|
13316
|
-
return None
|
|
13317
|
-
|
|
13318
|
-
if hasattr(behav_elem, 'calculationUsage') and behav_elem.calculationUsage():
|
|
13319
|
-
ctx = behav_elem.calculationUsage()
|
|
13320
|
-
result = _make_calculation_usage_dict(ctx, None)
|
|
13321
|
-
if result and result.get("name") == "PackageMember":
|
|
13322
|
-
return result.get("ownedRelatedElement")
|
|
13323
|
-
return result
|
|
13324
|
-
|
|
13325
|
-
if hasattr(behav_elem, 'constraintUsage') and behav_elem.constraintUsage():
|
|
13326
|
-
ctx = behav_elem.constraintUsage()
|
|
13327
|
-
result = _make_constraint_usage_dict(ctx, None)
|
|
13328
|
-
if result and result.get("name") == "PackageMember":
|
|
13329
|
-
return result.get("ownedRelatedElement")
|
|
13330
|
-
return result
|
|
13331
|
-
|
|
13332
|
-
# Check for non-occurrence usage (attribute, calculation)
|
|
13333
|
-
if hasattr(usage_elem_ctx, 'nonOccurrenceUsageElement') and usage_elem_ctx.nonOccurrenceUsageElement():
|
|
13334
|
-
non_occ = usage_elem_ctx.nonOccurrenceUsageElement()
|
|
13335
|
-
|
|
13336
|
-
if hasattr(non_occ, 'attributeUsage') and non_occ.attributeUsage():
|
|
13337
|
-
ctx = non_occ.attributeUsage()
|
|
13338
|
-
name = None
|
|
13339
|
-
if hasattr(ctx, 'identifier'):
|
|
13340
|
-
ids = ctx.identifier()
|
|
13341
|
-
if isinstance(ids, list) and ids:
|
|
13342
|
-
name = ids[0].getText()
|
|
13343
|
-
return {
|
|
13344
|
-
"name": "UsageElement",
|
|
13345
|
-
"ownedRelatedElement": {
|
|
13346
|
-
"name": "AttributeUsage",
|
|
13347
|
-
"prefix": None,
|
|
13348
|
-
"usage": {
|
|
13349
|
-
"name": "Usage",
|
|
13350
|
-
"declaration": {
|
|
13351
|
-
"name": "UsageDeclaration",
|
|
13352
|
-
"declaration": {
|
|
13353
|
-
"name": "FeatureDeclaration",
|
|
13354
|
-
"identification": {
|
|
13355
|
-
"name": "Identification",
|
|
13356
|
-
"declaredShortName": None,
|
|
13357
|
-
"declaredName": name
|
|
13358
|
-
},
|
|
13359
|
-
"specialization": None
|
|
13360
|
-
}
|
|
13361
|
-
},
|
|
13362
|
-
"completion": {
|
|
13363
|
-
"name": "UsageCompletion",
|
|
13364
|
-
"valuepart": None,
|
|
13365
|
-
"body": {
|
|
13366
|
-
"name": "UsageBody",
|
|
13367
|
-
"body": {
|
|
13368
|
-
"name": "DefinitionBody",
|
|
13369
|
-
"ownedRelatedElement": []
|
|
13370
|
-
}
|
|
13371
|
-
}
|
|
13372
|
-
}
|
|
13373
|
-
}
|
|
13374
|
-
}
|
|
13375
|
-
}
|
|
13376
|
-
|
|
13377
|
-
return None
|
|
13378
13049
|
|
|
13379
13050
|
|
|
13380
13051
|
def _visit_usage_element_dict(usage_elem_ctx, prefix=None):
|
|
@@ -14453,42 +14124,6 @@ def _extract_body_from_usage_ctx(ctx):
|
|
|
14453
14124
|
return []
|
|
14454
14125
|
|
|
14455
14126
|
|
|
14456
|
-
def _get_usage_typed_by(ctx):
|
|
14457
|
-
"""Extract the typed-by reference from a usage context.
|
|
14458
|
-
|
|
14459
|
-
Returns the qualified name of the type, or None.
|
|
14460
|
-
"""
|
|
14461
|
-
if ctx is None:
|
|
14462
|
-
return None
|
|
14463
|
-
|
|
14464
|
-
# Get usage -> usageDeclaration -> featureSpecializationPart
|
|
14465
|
-
usage = None
|
|
14466
|
-
if hasattr(ctx, 'usage') and ctx.usage():
|
|
14467
|
-
usage = ctx.usage()
|
|
14468
|
-
|
|
14469
|
-
ud = None
|
|
14470
|
-
if usage and hasattr(usage, 'usageDeclaration') and usage.usageDeclaration():
|
|
14471
|
-
ud = usage.usageDeclaration()
|
|
14472
|
-
|
|
14473
|
-
if ud and hasattr(ud, 'featureSpecializationPart') and ud.featureSpecializationPart():
|
|
14474
|
-
fsp = ud.featureSpecializationPart()
|
|
14475
|
-
# Only look for Typings (': TypeName'), not subsets/redefines/specializes
|
|
14476
|
-
if hasattr(fsp, 'featureSpecialization') and fsp.featureSpecialization():
|
|
14477
|
-
specs = fsp.featureSpecialization()
|
|
14478
|
-
if not isinstance(specs, list):
|
|
14479
|
-
specs = [specs]
|
|
14480
|
-
for spec in specs:
|
|
14481
|
-
if hasattr(spec, 'typings') and spec.typings():
|
|
14482
|
-
typings = spec.typings()
|
|
14483
|
-
if hasattr(typings, 'getText'):
|
|
14484
|
-
text = typings.getText()
|
|
14485
|
-
if text.startswith(':'):
|
|
14486
|
-
text = text[1:].strip()
|
|
14487
|
-
return text
|
|
14488
|
-
# NOTE: Do NOT fall back to fsp.getText() — that would return
|
|
14489
|
-
# 'redefines X', 'subsets X', or ':> X' which are NOT types.
|
|
14490
|
-
|
|
14491
|
-
return None
|
|
14492
14127
|
|
|
14493
14128
|
|
|
14494
14129
|
def _get_usage_subsetted_by(ctx):
|
|
@@ -15104,4 +14739,4 @@ def _visit_non_occurrence_usage_member(nom):
|
|
|
15104
14739
|
}
|
|
15105
14740
|
|
|
15106
14741
|
|
|
15107
|
-
__all__ = ['parse_to_dict']
|
|
14742
|
+
__all__ = ['parse_to_dict']
|
|
@@ -1170,6 +1170,20 @@ class Package(Searchable):
|
|
|
1170
1170
|
self.children.append(child)
|
|
1171
1171
|
elif inner_class == "SatisfyRequirementUsage":
|
|
1172
1172
|
child = Requirement().load_from_grammar(inner_element)
|
|
1173
|
+
# v0.88.1: the ``satisfy s1 : R`` form is the ors+fsp
|
|
1174
|
+
# alternative (no UsageDeclaration) — the member is
|
|
1175
|
+
# *anonymous* by design: ``ors`` is the requirement
|
|
1176
|
+
# being satisfied (the trace target), not the member's
|
|
1177
|
+
# name, so it stays UUID-named (reverting the initial
|
|
1178
|
+
# ors-as-name wiring, which broke resolve/trace
|
|
1179
|
+
# semantics). The declaration form
|
|
1180
|
+
# (``satisfy requirement r1 { ... }``) carries a real
|
|
1181
|
+
# declared name — extract it. The typing on ``fsp`` is
|
|
1182
|
+
# extracted by load_from_grammar
|
|
1183
|
+
# (_extract_specialization_info).
|
|
1184
|
+
ident = getattr(getattr(getattr(inner_element, 'declaration', None), 'declaration', None), 'identification', None)
|
|
1185
|
+
if ident is not None and getattr(ident, 'declaredName', None):
|
|
1186
|
+
child.name = ident.declaredName
|
|
1173
1187
|
child.parent = self
|
|
1174
1188
|
self.children.append(child)
|
|
1175
1189
|
elif inner_class == "ConstraintDefinition":
|
|
@@ -1538,6 +1552,9 @@ class Package(Searchable):
|
|
|
1538
1552
|
feat_decl = decl.declaration
|
|
1539
1553
|
if hasattr(feat_decl, 'identification') and feat_decl.identification:
|
|
1540
1554
|
r.name = feat_decl.identification.declaredName
|
|
1555
|
+
# v0.88.1: the ors+fsp form carries no member name
|
|
1556
|
+
# (``ors`` is the requirement reference — see the
|
|
1557
|
+
# package-level branch above).
|
|
1541
1558
|
r.parent = self
|
|
1542
1559
|
self.children.append(r)
|
|
1543
1560
|
elif inner_class == "Dependency":
|