sysmlpy 0.47.0__tar.gz → 0.48.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.47.0 → sysmlpy-0.48.0}/PKG-INFO +1 -1
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/pyproject.toml +1 -1
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr_visitor.py +28 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/usage.py +142 -8
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/LICENSE +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/README.md +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/semantic.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/validator.py +0 -0
|
@@ -25,7 +25,7 @@ __all__ = [
|
|
|
25
25
|
"render_state_transition_view_svg", "boxes_view",
|
|
26
26
|
]
|
|
27
27
|
__author__ = "Jon Fox"
|
|
28
|
-
__version__ = "0.
|
|
28
|
+
__version__ = "0.48.0"
|
|
29
29
|
|
|
30
30
|
from sysmlpy.usage import (
|
|
31
31
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -9802,6 +9802,16 @@ def _visit_nested_occurrence_usage(occ_elem):
|
|
|
9802
9802
|
elif hasattr(struct_elem, 'connectionUsage') and struct_elem.connectionUsage():
|
|
9803
9803
|
ctx = struct_elem.connectionUsage()
|
|
9804
9804
|
return _make_nested_connection_usage_dict(ctx, None)
|
|
9805
|
+
elif hasattr(struct_elem, 'allocationUsage') and struct_elem.allocationUsage():
|
|
9806
|
+
# Phase 0: allocation usages inside a definition body.
|
|
9807
|
+
ctx = struct_elem.allocationUsage()
|
|
9808
|
+
result = _make_allocation_usage_dict(ctx, None)
|
|
9809
|
+
if result and result.get("name") == "PackageMember":
|
|
9810
|
+
# Unwrap the PackageMember -> UsageElement chain so the
|
|
9811
|
+
# body builder sees an OccurrenceUsageElement at the
|
|
9812
|
+
# expected position.
|
|
9813
|
+
return result.get("ownedRelatedElement")
|
|
9814
|
+
return result
|
|
9805
9815
|
elif hasattr(struct_elem, 'portionUsage') and struct_elem.portionUsage():
|
|
9806
9816
|
ctx = struct_elem.portionUsage()
|
|
9807
9817
|
name, shortname = _get_usage_identification(ctx)
|
|
@@ -10021,6 +10031,24 @@ def _visit_nested_occurrence_usage(occ_elem):
|
|
|
10021
10031
|
if result and result.get("name") == "PackageMember":
|
|
10022
10032
|
return result.get("ownedRelatedElement")
|
|
10023
10033
|
return result
|
|
10034
|
+
elif hasattr(behav_elem, 'stateUsage') and behav_elem.stateUsage():
|
|
10035
|
+
# Phase 0: state usages live in a BehaviorUsageElement too.
|
|
10036
|
+
ctx = behav_elem.stateUsage()
|
|
10037
|
+
result = _make_state_usage_dict(ctx, None)
|
|
10038
|
+
if result and result.get("name") == "PackageMember":
|
|
10039
|
+
inner = result.get("ownedRelatedElement", {})
|
|
10040
|
+
return inner
|
|
10041
|
+
return result
|
|
10042
|
+
elif hasattr(behav_elem, 'allocationUsage') and behav_elem.allocationUsage():
|
|
10043
|
+
# Phase 0: allocation usages inside a definition body.
|
|
10044
|
+
ctx = behav_elem.allocationUsage()
|
|
10045
|
+
result = _make_allocation_usage_dict(ctx, None)
|
|
10046
|
+
if result and result.get("name") == "PackageMember":
|
|
10047
|
+
# Unwrap the PackageMember -> UsageElement chain so the
|
|
10048
|
+
# body builder sees an OccurrenceUsageElement at the
|
|
10049
|
+
# expected position.
|
|
10050
|
+
return result.get("ownedRelatedElement")
|
|
10051
|
+
return result
|
|
10024
10052
|
|
|
10025
10053
|
# print(f"DEBUG: No match found in _visit_nested_occurrence_usage")
|
|
10026
10054
|
# Fall through to check structure usage elements
|
|
@@ -798,23 +798,23 @@ class Usage(Searchable):
|
|
|
798
798
|
self.__init__()
|
|
799
799
|
self.grammar = grammar
|
|
800
800
|
children = []
|
|
801
|
-
|
|
801
|
+
|
|
802
802
|
# Check if this is a definition or usage
|
|
803
803
|
# Some definition types use 'definition' (PartDefinition, AttributeDefinition)
|
|
804
804
|
# Others use 'declaration' directly (RequirementDefinition, UseCaseDefinition)
|
|
805
805
|
# PartDefinition: has .definition which is a Definition object
|
|
806
806
|
# Usage: has .declaration directly
|
|
807
|
-
|
|
807
|
+
|
|
808
808
|
# First check if grammar has 'definition' (for definitions like PartDefinition)
|
|
809
809
|
defn = getattr(grammar, 'definition', None)
|
|
810
810
|
if defn:
|
|
811
811
|
# This type uses 'definition' (PartDefinition, etc.)
|
|
812
812
|
# Get name from definition.declaration.identification.declaredName
|
|
813
813
|
u_name = defn.declaration.identification.declaredName
|
|
814
|
-
|
|
814
|
+
|
|
815
815
|
# Get body from definition.body
|
|
816
816
|
body = defn.body if hasattr(defn, 'body') else None
|
|
817
|
-
|
|
817
|
+
|
|
818
818
|
# body is DefinitionBody with .children
|
|
819
819
|
if body and hasattr(body, 'children') and body.children:
|
|
820
820
|
children_list = []
|
|
@@ -847,7 +847,7 @@ class Usage(Searchable):
|
|
|
847
847
|
u_name = None
|
|
848
848
|
else:
|
|
849
849
|
u_name = None
|
|
850
|
-
|
|
850
|
+
|
|
851
851
|
# Extract children from usage body: grammar.usage.completion.body.body.children
|
|
852
852
|
# This mirrors the PartDefinition path: grammar.definition.body.children
|
|
853
853
|
try:
|
|
@@ -874,7 +874,7 @@ class Usage(Searchable):
|
|
|
874
874
|
# This type uses 'declaration' directly (RequirementDefinition, UseCaseDefinition, some usages)
|
|
875
875
|
decl = grammar.declaration
|
|
876
876
|
u_name = None
|
|
877
|
-
|
|
877
|
+
|
|
878
878
|
# Check nested declaration for Usage (UsageDeclaration -> FeatureDeclaration)
|
|
879
879
|
nested_decl = getattr(decl, 'declaration', None)
|
|
880
880
|
if nested_decl and hasattr(nested_decl, 'identification') and nested_decl.identification:
|
|
@@ -922,10 +922,10 @@ class Usage(Searchable):
|
|
|
922
922
|
sc = child.children if hasattr(child, 'children') else child
|
|
923
923
|
else:
|
|
924
924
|
continue
|
|
925
|
-
|
|
925
|
+
|
|
926
926
|
# Process the child
|
|
927
927
|
class_name = sc.__class__.__name__ if not hasattr(sc, '__class__') else sc.__class__.__name__
|
|
928
|
-
|
|
928
|
+
|
|
929
929
|
if class_name == "PartDefinition":
|
|
930
930
|
c = Part(definition=True).load_from_grammar(sc)
|
|
931
931
|
c.parent = self
|
|
@@ -977,10 +977,37 @@ class Usage(Searchable):
|
|
|
977
977
|
c = Flow().load_from_grammar(inner)
|
|
978
978
|
c.parent = self
|
|
979
979
|
self.children.append(c)
|
|
980
|
+
elif inner.__class__.__name__ == "AllocationUsage":
|
|
981
|
+
# Phase 0: allocation usages inside a definition
|
|
982
|
+
# body live in StructureUsageElement -> AllocationUsage.
|
|
983
|
+
a = Allocation()
|
|
984
|
+
a.grammar = inner
|
|
985
|
+
a.parent = self
|
|
986
|
+
self.children.append(a)
|
|
980
987
|
elif inner.__class__.__name__ == "PortionUsage":
|
|
981
988
|
c = Part().load_from_grammar(inner)
|
|
982
989
|
c.parent = self
|
|
983
990
|
self.children.append(c)
|
|
991
|
+
elif class_name == "BehaviorUsageElement":
|
|
992
|
+
# Phase 0 of docs/v0.46.0_expression_capture_plan.md:
|
|
993
|
+
# assert / constraint / calc / state / action / requirement /
|
|
994
|
+
# satisfy / allocation usages live inside a BehaviorUsageElement
|
|
995
|
+
# when they appear in a definition body. The previous
|
|
996
|
+
# dispatch dropped the entire BehaviorUsageElement.
|
|
997
|
+
if hasattr(sc, 'children'):
|
|
998
|
+
inner = sc.children
|
|
999
|
+
inner_name = inner.__class__.__name__
|
|
1000
|
+
c = _load_behavior_child(self, inner, inner_name)
|
|
1001
|
+
if c is not None:
|
|
1002
|
+
c.parent = self
|
|
1003
|
+
self.children.append(c)
|
|
1004
|
+
elif class_name == "InterfaceUsage":
|
|
1005
|
+
# Same phase 0: interface usages are wrapped as
|
|
1006
|
+
# OccurrenceUsageElement -> InterfaceUsage directly (not
|
|
1007
|
+
# through StructureUsageElement).
|
|
1008
|
+
c = Interface().load_from_grammar(sc)
|
|
1009
|
+
c.parent = self
|
|
1010
|
+
self.children.append(c)
|
|
984
1011
|
elif class_name == "StructureDefinitionElement":
|
|
985
1012
|
if hasattr(sc, 'children'):
|
|
986
1013
|
inner = sc.children
|
|
@@ -1039,6 +1066,113 @@ class Usage(Searchable):
|
|
|
1039
1066
|
# raise AttributeError("Invalid Feature Name or Chain")
|
|
1040
1067
|
|
|
1041
1068
|
|
|
1069
|
+
def _load_behavior_child(parent, inner, inner_name):
|
|
1070
|
+
"""Construct a public-API element for a usage that lives inside a
|
|
1071
|
+
``BehaviorUsageElement`` when it appears in a definition body.
|
|
1072
|
+
|
|
1073
|
+
Phase 0 of docs/v0.46.0_expression_capture_plan.md: this helper
|
|
1074
|
+
closes the gap that caused ``assert constraint``, ``constraint``,
|
|
1075
|
+
``calc``, ``state``, ``action``, ``requirement``, ``satisfy``, and
|
|
1076
|
+
``allocate`` usages to be silently dropped when they appeared inside
|
|
1077
|
+
a ``part def``, ``item def``, etc. body.
|
|
1078
|
+
|
|
1079
|
+
Parameters
|
|
1080
|
+
----------
|
|
1081
|
+
parent : Usage
|
|
1082
|
+
The Part / Item / / etc. that owns the new child (for ``.parent``).
|
|
1083
|
+
inner : object
|
|
1084
|
+
The inner grammar element (e.g. ``AssertConstraintUsage``,
|
|
1085
|
+
``ConstraintUsage``, ``CalculationUsage`` ...). Used for
|
|
1086
|
+
``.grammar`` so the existing round-trip machinery keeps working.
|
|
1087
|
+
inner_name : str
|
|
1088
|
+
Class name of ``inner`` — selects which public-API class to
|
|
1089
|
+
instantiate.
|
|
1090
|
+
|
|
1091
|
+
Returns
|
|
1092
|
+
-------
|
|
1093
|
+
Usage or None
|
|
1094
|
+
A fresh public-API element (e.g. ``Constraint``, ``Calculation``,
|
|
1095
|
+
``State``, ``Action``, ``Requirement``, ``Allocation``) with
|
|
1096
|
+
``.grammar`` wired up and ``.parent`` set. Returns ``None`` if
|
|
1097
|
+
the inner kind is unknown to this helper — the caller treats that
|
|
1098
|
+
as a no-op.
|
|
1099
|
+
"""
|
|
1100
|
+
def _name_from_declaration(elem):
|
|
1101
|
+
"""Extract a human-readable name from an element's declaration,
|
|
1102
|
+
mirroring the pattern at definition.py:1269-1290."""
|
|
1103
|
+
if not hasattr(elem, "declaration") or elem.declaration is None:
|
|
1104
|
+
return None
|
|
1105
|
+
decl = elem.declaration
|
|
1106
|
+
# AssertConstraintUsage has a different layout: declaration may
|
|
1107
|
+
# be wrapped under .usageDeclaration.
|
|
1108
|
+
if hasattr(decl, "usageDeclaration") and decl.usageDeclaration():
|
|
1109
|
+
inner_decl = decl.usageDeclaration()
|
|
1110
|
+
if hasattr(inner_decl, "identification") and inner_decl.identification:
|
|
1111
|
+
ident = inner_decl.identification
|
|
1112
|
+
if hasattr(ident, "declaredName"):
|
|
1113
|
+
return ident.declaredName
|
|
1114
|
+
if hasattr(ident, "name"):
|
|
1115
|
+
name_obj = ident.name()
|
|
1116
|
+
if name_obj:
|
|
1117
|
+
if isinstance(name_obj, list):
|
|
1118
|
+
return name_obj[-1].getText()
|
|
1119
|
+
return name_obj.getText()
|
|
1120
|
+
if hasattr(decl, "declaration") and decl.declaration:
|
|
1121
|
+
feat_decl = decl.declaration
|
|
1122
|
+
if hasattr(feat_decl, "identification") and feat_decl.identification:
|
|
1123
|
+
ident = feat_decl.identification
|
|
1124
|
+
if hasattr(ident, "declaredName"):
|
|
1125
|
+
return ident.declaredName
|
|
1126
|
+
if hasattr(ident, "name"):
|
|
1127
|
+
name_obj = ident.name()
|
|
1128
|
+
if name_obj:
|
|
1129
|
+
if isinstance(name_obj, list):
|
|
1130
|
+
return name_obj[-1].getText()
|
|
1131
|
+
return name_obj.getText()
|
|
1132
|
+
return None
|
|
1133
|
+
|
|
1134
|
+
if inner_name == "AssertConstraintUsage":
|
|
1135
|
+
c = Constraint()
|
|
1136
|
+
c.grammar = inner
|
|
1137
|
+
c.name = _name_from_declaration(inner)
|
|
1138
|
+
return c
|
|
1139
|
+
if inner_name == "ConstraintUsage":
|
|
1140
|
+
c = Constraint()
|
|
1141
|
+
c.grammar = inner
|
|
1142
|
+
c.name = _name_from_declaration(inner)
|
|
1143
|
+
return c
|
|
1144
|
+
if inner_name == "CalculationUsage":
|
|
1145
|
+
c = Calculation()
|
|
1146
|
+
c.grammar = inner
|
|
1147
|
+
c.name = _name_from_declaration(inner)
|
|
1148
|
+
return c
|
|
1149
|
+
if inner_name == "StateUsage":
|
|
1150
|
+
c = State()
|
|
1151
|
+
c.grammar = inner
|
|
1152
|
+
c.name = _name_from_declaration(inner)
|
|
1153
|
+
return c
|
|
1154
|
+
if inner_name == "ActionUsage":
|
|
1155
|
+
c = Action(grammar=inner).load_from_grammar(inner)
|
|
1156
|
+
return c
|
|
1157
|
+
if inner_name == "RequirementUsage":
|
|
1158
|
+
c = Requirement()
|
|
1159
|
+
c.grammar = inner
|
|
1160
|
+
c.name = _name_from_declaration(inner)
|
|
1161
|
+
return c
|
|
1162
|
+
if inner_name == "SatisfyRequirementUsage":
|
|
1163
|
+
c = Requirement()
|
|
1164
|
+
c.grammar = inner
|
|
1165
|
+
c.name = _name_from_declaration(inner)
|
|
1166
|
+
return c
|
|
1167
|
+
if inner_name == "AllocationUsage":
|
|
1168
|
+
c = Allocation()
|
|
1169
|
+
c.grammar = inner
|
|
1170
|
+
c.name = _name_from_declaration(inner)
|
|
1171
|
+
return c
|
|
1172
|
+
return None
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1042
1176
|
class Attribute(Usage):
|
|
1043
1177
|
"""SysML v2 Attribute usage/definition.
|
|
1044
1178
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.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
|
{sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.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.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.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.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.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.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.47.0 → sysmlpy-0.48.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.47.0 → sysmlpy-0.48.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
|