sysmlpy 0.45.0__tar.gz → 0.47.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.45.0 → sysmlpy-0.47.0}/PKG-INFO +1 -1
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/pyproject.toml +1 -1
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/__init__.py +2 -2
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr_visitor.py +180 -8
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/definition.py +11 -1
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/classes.py +67 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/usage.py +67 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/LICENSE +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/README.md +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/semantic.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/validator.py +0 -0
|
@@ -25,14 +25,14 @@ __all__ = [
|
|
|
25
25
|
"render_state_transition_view_svg", "boxes_view",
|
|
26
26
|
]
|
|
27
27
|
__author__ = "Jon Fox"
|
|
28
|
-
__version__ = "0.
|
|
28
|
+
__version__ = "0.47.0"
|
|
29
29
|
|
|
30
30
|
from sysmlpy.usage import (
|
|
31
31
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
32
32
|
State, Constraint, Connection, Flow, Calculation, Enumeration,
|
|
33
33
|
Allocation, Metadata, Rendering, Individual, FlowDef,
|
|
34
34
|
View, Viewpoint, Concern,
|
|
35
|
-
Case, AnalysisCase, VerificationCase,
|
|
35
|
+
Case, AnalysisCase, VerificationCase, Dependency,
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
from sysmlpy.definition import Model, Package
|
|
@@ -826,6 +826,12 @@ def _visit_definition_element_dict(def_elem_ctx, prefix=None):
|
|
|
826
826
|
# the round-trip dict preserves the `standard library` keywords.
|
|
827
827
|
ctx = def_elem_ctx.libraryPackage()
|
|
828
828
|
return _make_nested_package_dict(ctx, prefix, is_standard_library=True)
|
|
829
|
+
elif hasattr(def_elem_ctx, 'dependency') and def_elem_ctx.dependency():
|
|
830
|
+
# Issue #4: dependency statements were silently dropped. The grammar
|
|
831
|
+
# class Dependency is fully implemented but no visitor dispatch
|
|
832
|
+
# constructed it.
|
|
833
|
+
ctx = def_elem_ctx.dependency()
|
|
834
|
+
return _make_dependency_dict(ctx, prefix)
|
|
829
835
|
elif hasattr(def_elem_ctx, 'itemDefinition') and def_elem_ctx.itemDefinition():
|
|
830
836
|
ctx = def_elem_ctx.itemDefinition()
|
|
831
837
|
return _make_item_definition_dict(ctx, prefix)
|
|
@@ -7470,14 +7476,15 @@ def _make_nested_connection_usage_dict(ctx, prefix=None):
|
|
|
7470
7476
|
|
|
7471
7477
|
def _build_connector_part_dict(ctx):
|
|
7472
7478
|
"""Build a ConnectorPart dictionary from a connectorPart context.
|
|
7473
|
-
|
|
7479
|
+
|
|
7474
7480
|
Grammar:
|
|
7475
7481
|
connectorPart : binaryConnectorPart | naryConnectorPart ;
|
|
7476
7482
|
binaryConnectorPart : connectorEndMember TO connectorEndMember ;
|
|
7483
|
+
naryConnectorPart : LPAREN connectorEndMember (COMMA connectorEndMember)* RPAREN ;
|
|
7477
7484
|
"""
|
|
7478
7485
|
if ctx is None:
|
|
7479
7486
|
return None
|
|
7480
|
-
|
|
7487
|
+
|
|
7481
7488
|
if hasattr(ctx, 'binaryConnectorPart') and ctx.binaryConnectorPart():
|
|
7482
7489
|
bcp = ctx.binaryConnectorPart()
|
|
7483
7490
|
owned_rel = []
|
|
@@ -7489,7 +7496,7 @@ def _build_connector_part_dict(ctx):
|
|
|
7489
7496
|
end_dict = _visit_connector_end_member(end)
|
|
7490
7497
|
if end_dict:
|
|
7491
7498
|
owned_rel.append(end_dict)
|
|
7492
|
-
|
|
7499
|
+
|
|
7493
7500
|
return {
|
|
7494
7501
|
"name": "ConnectorPart",
|
|
7495
7502
|
"part": {
|
|
@@ -7497,7 +7504,27 @@ def _build_connector_part_dict(ctx):
|
|
|
7497
7504
|
"ownedRelationship": owned_rel
|
|
7498
7505
|
}
|
|
7499
7506
|
}
|
|
7500
|
-
|
|
7507
|
+
|
|
7508
|
+
if hasattr(ctx, 'naryConnectorPart') and ctx.naryConnectorPart():
|
|
7509
|
+
ncp = ctx.naryConnectorPart()
|
|
7510
|
+
owned_rel = []
|
|
7511
|
+
if hasattr(ncp, 'connectorEndMember') and ncp.connectorEndMember():
|
|
7512
|
+
ends = ncp.connectorEndMember()
|
|
7513
|
+
if not isinstance(ends, list):
|
|
7514
|
+
ends = [ends]
|
|
7515
|
+
for end in ends:
|
|
7516
|
+
end_dict = _visit_connector_end_member(end)
|
|
7517
|
+
if end_dict:
|
|
7518
|
+
owned_rel.append(end_dict)
|
|
7519
|
+
|
|
7520
|
+
return {
|
|
7521
|
+
"name": "ConnectorPart",
|
|
7522
|
+
"part": {
|
|
7523
|
+
"name": "NaryConnectorPart",
|
|
7524
|
+
"ownedRelationship": owned_rel
|
|
7525
|
+
}
|
|
7526
|
+
}
|
|
7527
|
+
|
|
7501
7528
|
return None
|
|
7502
7529
|
|
|
7503
7530
|
|
|
@@ -7918,20 +7945,30 @@ def _make_concern_usage_dict(ctx, prefix=None):
|
|
|
7918
7945
|
|
|
7919
7946
|
def _make_allocation_usage_dict(ctx, prefix=None):
|
|
7920
7947
|
"""Create an AllocationUsage dictionary.
|
|
7921
|
-
|
|
7948
|
+
|
|
7922
7949
|
allocationUsage: occurrenceUsagePrefix allocationUsageDeclaration usageBody
|
|
7950
|
+
allocationUsageDeclaration
|
|
7951
|
+
: ALLOCATION usageDeclaration? (ALLOCATE connectorPart)?
|
|
7952
|
+
| ALLOCATE connectorPart
|
|
7953
|
+
;
|
|
7954
|
+
|
|
7955
|
+
Issue #5: the connector endpoints (`allocate X to Y`) were silently
|
|
7956
|
+
dropped before reaching the dict. Mirror the InterfaceUsage pattern:
|
|
7957
|
+
walk `aud.connectorPart()` (when present) and emit a ConnectorPart
|
|
7958
|
+
dict with binary or nary ends.
|
|
7923
7959
|
"""
|
|
7924
7960
|
name = None
|
|
7925
7961
|
shortname = None
|
|
7962
|
+
connector_part = None
|
|
7926
7963
|
if ctx is not None:
|
|
7927
7964
|
aud = None
|
|
7928
7965
|
if hasattr(ctx, 'allocationUsageDeclaration') and ctx.allocationUsageDeclaration():
|
|
7929
7966
|
aud = ctx.allocationUsageDeclaration()
|
|
7930
|
-
|
|
7967
|
+
|
|
7931
7968
|
ud = None
|
|
7932
7969
|
if aud and hasattr(aud, 'usageDeclaration') and aud.usageDeclaration():
|
|
7933
7970
|
ud = aud.usageDeclaration()
|
|
7934
|
-
|
|
7971
|
+
|
|
7935
7972
|
if ud and hasattr(ud, 'identification') and ud.identification():
|
|
7936
7973
|
ident = ud.identification()
|
|
7937
7974
|
if hasattr(ident, 'name'):
|
|
@@ -7943,7 +7980,13 @@ def _make_allocation_usage_dict(ctx, prefix=None):
|
|
|
7943
7980
|
elif len(name_list) == 1:
|
|
7944
7981
|
name_text = name_list[0].getText()
|
|
7945
7982
|
name, shortname = _extract_name_shortname(name_text)
|
|
7946
|
-
|
|
7983
|
+
|
|
7984
|
+
# Issue #5: capture the `allocate X to Y` (or `allocate X, Y to Z`)
|
|
7985
|
+
# connector part. Either standalone or appended after the
|
|
7986
|
+
# allocation keyword + optional usageDeclaration.
|
|
7987
|
+
if aud and hasattr(aud, 'connectorPart') and aud.connectorPart():
|
|
7988
|
+
connector_part = _build_connector_part_dict(aud.connectorPart())
|
|
7989
|
+
|
|
7947
7990
|
return {
|
|
7948
7991
|
"name": "PackageMember",
|
|
7949
7992
|
"prefix": None,
|
|
@@ -7968,6 +8011,7 @@ def _make_allocation_usage_dict(ctx, prefix=None):
|
|
|
7968
8011
|
"specialization": None
|
|
7969
8012
|
}
|
|
7970
8013
|
},
|
|
8014
|
+
"connectorPart": connector_part,
|
|
7971
8015
|
"body": {
|
|
7972
8016
|
"name": "UsageBody",
|
|
7973
8017
|
"body": {
|
|
@@ -8117,6 +8161,134 @@ def _make_individual_usage_dict(ctx, prefix=None):
|
|
|
8117
8161
|
}
|
|
8118
8162
|
|
|
8119
8163
|
|
|
8164
|
+
def _make_dependency_dict(ctx, member_prefix=None):
|
|
8165
|
+
"""Create a Dependency dictionary.
|
|
8166
|
+
|
|
8167
|
+
Grammar (SysML v2):
|
|
8168
|
+
dependency
|
|
8169
|
+
: (prefixMetadataAnnotation)* DEPENDENCY (identification? FROM)?
|
|
8170
|
+
qualifiedName (COMMA qualifiedName)* TO qualifiedName
|
|
8171
|
+
(COMMA qualifiedName)* relationshipBody
|
|
8172
|
+
| (prefixMetadataAnnotation)* DEPENDENCY dependencyDeclaration
|
|
8173
|
+
relationshipBody
|
|
8174
|
+
;
|
|
8175
|
+
|
|
8176
|
+
Wrapped in PackageMember + DefinitionElement so the loader places it in
|
|
8177
|
+
the enclosing package / namespace body.
|
|
8178
|
+
"""
|
|
8179
|
+
if ctx is None:
|
|
8180
|
+
return None
|
|
8181
|
+
|
|
8182
|
+
identification = None
|
|
8183
|
+
clients = []
|
|
8184
|
+
suppliers = []
|
|
8185
|
+
body = {"name": "RelationshipBody", "ownedRelationship": []}
|
|
8186
|
+
|
|
8187
|
+
if hasattr(ctx, 'dependencyDeclaration') and ctx.dependencyDeclaration():
|
|
8188
|
+
# Alternative 2: dependencyDeclaration carries identification / FROM /
|
|
8189
|
+
# client-list / supplier-list / TO. relationshipBody is the next
|
|
8190
|
+
# sibling on the dependency context.
|
|
8191
|
+
dep_decl = ctx.dependencyDeclaration()
|
|
8192
|
+
if hasattr(dep_decl, 'identification') and dep_decl.identification():
|
|
8193
|
+
identification = _build_identification_dict(dep_decl.identification())
|
|
8194
|
+
qn_list = dep_decl.qualifiedName()
|
|
8195
|
+
if not isinstance(qn_list, list):
|
|
8196
|
+
qn_list = [qn_list] if qn_list is not None else []
|
|
8197
|
+
# Split on TO: first batch is clients, second batch is suppliers.
|
|
8198
|
+
to_token = dep_decl.TO()
|
|
8199
|
+
if to_token is not None:
|
|
8200
|
+
# ANTLR TerminalNodeImpl doesn't expose `.start` directly; use
|
|
8201
|
+
# `.symbol.start` (the underlying token's char position).
|
|
8202
|
+
to_start = to_token.symbol.start
|
|
8203
|
+
split_idx = len(qn_list)
|
|
8204
|
+
for i, qn in enumerate(qn_list):
|
|
8205
|
+
if qn.start.start > to_start:
|
|
8206
|
+
split_idx = i
|
|
8207
|
+
break
|
|
8208
|
+
clients = qn_list[:split_idx]
|
|
8209
|
+
suppliers = qn_list[split_idx:]
|
|
8210
|
+
else:
|
|
8211
|
+
clients = qn_list
|
|
8212
|
+
# relationshipBody sits on the parent dependency context
|
|
8213
|
+
if hasattr(ctx, 'relationshipBody') and ctx.relationshipBody():
|
|
8214
|
+
body = _visit_dependency_relationship_body_dict(ctx.relationshipBody())
|
|
8215
|
+
else:
|
|
8216
|
+
# Alternative 1: bare `dependency [ident]? [from]? qn , qn , ... to qn , qn , ... {body}`
|
|
8217
|
+
if hasattr(ctx, 'identification') and ctx.identification():
|
|
8218
|
+
identification = _build_identification_dict(ctx.identification())
|
|
8219
|
+
qn_list = ctx.qualifiedName()
|
|
8220
|
+
if not isinstance(qn_list, list):
|
|
8221
|
+
qn_list = [qn_list] if qn_list is not None else []
|
|
8222
|
+
to_token = ctx.TO()
|
|
8223
|
+
if to_token is not None:
|
|
8224
|
+
to_start = to_token.symbol.start
|
|
8225
|
+
split_idx = len(qn_list)
|
|
8226
|
+
for i, qn in enumerate(qn_list):
|
|
8227
|
+
if qn.start.start > to_start:
|
|
8228
|
+
split_idx = i
|
|
8229
|
+
break
|
|
8230
|
+
clients = qn_list[:split_idx]
|
|
8231
|
+
suppliers = qn_list[split_idx:]
|
|
8232
|
+
else:
|
|
8233
|
+
clients = qn_list
|
|
8234
|
+
if hasattr(ctx, 'relationshipBody') and ctx.relationshipBody():
|
|
8235
|
+
body = _visit_dependency_relationship_body_dict(ctx.relationshipBody())
|
|
8236
|
+
|
|
8237
|
+
return {
|
|
8238
|
+
"name": "PackageMember",
|
|
8239
|
+
"prefix": member_prefix,
|
|
8240
|
+
"ownedRelatedElement": {
|
|
8241
|
+
"name": "DefinitionElement",
|
|
8242
|
+
"ownedRelatedElement": {
|
|
8243
|
+
"name": "Dependency",
|
|
8244
|
+
"identification": identification,
|
|
8245
|
+
"clients": [
|
|
8246
|
+
{"name": "QualifiedName", "names": qn.getText().split("::")}
|
|
8247
|
+
for qn in clients if qn is not None
|
|
8248
|
+
],
|
|
8249
|
+
"suppliers": [
|
|
8250
|
+
{"name": "QualifiedName", "names": qn.getText().split("::")}
|
|
8251
|
+
for qn in suppliers if qn is not None
|
|
8252
|
+
],
|
|
8253
|
+
"body": body,
|
|
8254
|
+
}
|
|
8255
|
+
}
|
|
8256
|
+
}
|
|
8257
|
+
|
|
8258
|
+
|
|
8259
|
+
def _visit_dependency_relationship_body_dict(rb_ctx):
|
|
8260
|
+
"""Capture a dependency's relationshipBody.
|
|
8261
|
+
|
|
8262
|
+
Mirrors the aliasMember pattern: walk the body for any
|
|
8263
|
+
OwnedAnnotation / CommentSysML so doc comments survive the round-trip.
|
|
8264
|
+
For the `;` form (empty body), returns the empty shape.
|
|
8265
|
+
"""
|
|
8266
|
+
if rb_ctx is None:
|
|
8267
|
+
return {"name": "RelationshipBody", "ownedRelationship": []}
|
|
8268
|
+
owned = []
|
|
8269
|
+
for child in rb_ctx.children:
|
|
8270
|
+
if type(child).__name__ == 'RelationshipOwnedElementContext':
|
|
8271
|
+
for c2 in child.children:
|
|
8272
|
+
if type(c2).__name__ == 'OwnedAnnotationContext':
|
|
8273
|
+
for c3 in c2.children:
|
|
8274
|
+
if type(c3).__name__ == 'AnnotatingElementContext':
|
|
8275
|
+
owned.append({
|
|
8276
|
+
"name": "OwnedAnnotation",
|
|
8277
|
+
"ownedRelatedElement": [
|
|
8278
|
+
{
|
|
8279
|
+
"name": "AnnotatingElement",
|
|
8280
|
+
"ownedRelatedElement": {
|
|
8281
|
+
"name": "CommentSysML",
|
|
8282
|
+
"body": c3.getText(),
|
|
8283
|
+
"identification": None,
|
|
8284
|
+
"ownedRelationship": []
|
|
8285
|
+
}
|
|
8286
|
+
}
|
|
8287
|
+
]
|
|
8288
|
+
})
|
|
8289
|
+
return {"name": "RelationshipBody", "ownedRelationship": owned}
|
|
8290
|
+
|
|
8291
|
+
|
|
8120
8292
|
def _make_enumeration_definition_dict(ctx, member_prefix=None):
|
|
8121
8293
|
"""Create an EnumerationDefinition dictionary.
|
|
8122
8294
|
|
|
@@ -20,7 +20,7 @@ from sysmlpy.grammar.classes import (
|
|
|
20
20
|
)
|
|
21
21
|
from sysmlpy.grammar.classes import Package as PackageGrammar
|
|
22
22
|
|
|
23
|
-
from sysmlpy import Part, Item, Port, Requirement, UseCase, Attribute, Action, Case, AnalysisCase, VerificationCase, Interface, Message
|
|
23
|
+
from sysmlpy import Part, Item, Port, Requirement, UseCase, Attribute, Action, Case, AnalysisCase, VerificationCase, Interface, Message, Dependency
|
|
24
24
|
from sysmlpy.usage import (
|
|
25
25
|
State, Constraint, Connection, Flow, Calculation, Enumeration,
|
|
26
26
|
Allocation, Metadata, Rendering, Individual, FlowDef,
|
|
@@ -1299,6 +1299,16 @@ class Package(Searchable):
|
|
|
1299
1299
|
r.name = feat_decl.identification.declaredName
|
|
1300
1300
|
r.parent = self
|
|
1301
1301
|
self.children.append(r)
|
|
1302
|
+
elif inner_class == "Dependency":
|
|
1303
|
+
# Issue #4: dependency statements were silently dropped
|
|
1304
|
+
# because no visitor dispatch produced a Dependency dict and
|
|
1305
|
+
# Package.load_from_grammar had no branch for it.
|
|
1306
|
+
d = Dependency()
|
|
1307
|
+
d.grammar = inner_element
|
|
1308
|
+
if hasattr(inner_element, 'identification') and inner_element.identification:
|
|
1309
|
+
d.name = inner_element.identification.declaredName
|
|
1310
|
+
d.parent = self
|
|
1311
|
+
self.children.append(d)
|
|
1302
1312
|
else:
|
|
1303
1313
|
print(f"[Package.load_from_grammar] Unknown class: {inner_class} - skipping") # pragma: no cover
|
|
1304
1314
|
|
|
@@ -226,6 +226,17 @@ class DefinitionElement:
|
|
|
226
226
|
self.children.append(
|
|
227
227
|
InterfaceUsage(definition["ownedRelatedElement"])
|
|
228
228
|
)
|
|
229
|
+
elif de == "Dependency":
|
|
230
|
+
# Issue #4: dependency statements were silently dropped
|
|
231
|
+
# because no visitor dispatch produced a Dependency dict and
|
|
232
|
+
# no DefinitionElement branch constructed it.
|
|
233
|
+
self.children.append(Dependency(definition["ownedRelatedElement"]))
|
|
234
|
+
elif de == "LibraryPackage":
|
|
235
|
+
# `standard library package Foo { ... }` shares the same
|
|
236
|
+
# {identification, body} shape as `package Foo { ... }` plus
|
|
237
|
+
# an isStandardLibrary flag. Reuse Package; the flag is read
|
|
238
|
+
# from the dict in Package.__init__.
|
|
239
|
+
self.children.append(Package(definition["ownedRelatedElement"]))
|
|
229
240
|
else:
|
|
230
241
|
print(f"Unknown DefinitionElement type: {de}") # pragma: no cover
|
|
231
242
|
|
|
@@ -7375,6 +7386,8 @@ class ConnectorPart:
|
|
|
7375
7386
|
if valid_definition(definition, self.__class__.__name__):
|
|
7376
7387
|
if definition["part"]["name"] == "BinaryConnectorPart":
|
|
7377
7388
|
self.part = BinaryConnectorPart(definition["part"])
|
|
7389
|
+
elif definition["part"]["name"] == "NaryConnectorPart":
|
|
7390
|
+
self.part = NaryConnectorPart(definition["part"])
|
|
7378
7391
|
else:
|
|
7379
7392
|
print(f"ConnectorPart: unhandled {definition['part']['name']}") # pragma: no cover
|
|
7380
7393
|
self.part = None # pragma: no cover
|
|
@@ -7406,6 +7419,23 @@ class BinaryConnectorPart:
|
|
|
7406
7419
|
}
|
|
7407
7420
|
|
|
7408
7421
|
|
|
7422
|
+
class NaryConnectorPart:
|
|
7423
|
+
def __init__(self, definition):
|
|
7424
|
+
if valid_definition(definition, self.__class__.__name__):
|
|
7425
|
+
self.children = []
|
|
7426
|
+
for relationship in definition["ownedRelationship"]:
|
|
7427
|
+
self.children.append(ConnectorEndMember(relationship))
|
|
7428
|
+
|
|
7429
|
+
def dump(self):
|
|
7430
|
+
return "(" + ", ".join([child.dump() for child in self.children]) + ")"
|
|
7431
|
+
|
|
7432
|
+
def get_definition(self):
|
|
7433
|
+
return {
|
|
7434
|
+
"name": self.__class__.__name__,
|
|
7435
|
+
"ownedRelationship": [c.get_definition() for c in self.children],
|
|
7436
|
+
}
|
|
7437
|
+
|
|
7438
|
+
|
|
7409
7439
|
class ConnectorEndMember:
|
|
7410
7440
|
def __init__(self, definition):
|
|
7411
7441
|
if valid_definition(definition, self.__class__.__name__):
|
|
@@ -9778,6 +9808,12 @@ class Dependency:
|
|
|
9778
9808
|
output = [self.keyword]
|
|
9779
9809
|
if self.identification is not None:
|
|
9780
9810
|
output.append(self.identification.dump())
|
|
9811
|
+
# Issue #4: the ANTLR grammar ambiguity means an unnamed-form
|
|
9812
|
+
# `dependency name a to X;` is unparseable — `name` is taken as
|
|
9813
|
+
# the identification and `a` then has nowhere to go. To round-trip
|
|
9814
|
+
# safely we always emit `from` between the identification and the
|
|
9815
|
+
# client list.
|
|
9816
|
+
output.append("from")
|
|
9781
9817
|
output.append(", ".join([c.dump() for c in self.clients]))
|
|
9782
9818
|
output.append("to")
|
|
9783
9819
|
output.append(", ".join([s.dump() for s in self.suppliers]))
|
|
@@ -9845,8 +9881,39 @@ class _PrefixedUsageBase:
|
|
|
9845
9881
|
|
|
9846
9882
|
class AllocationUsage(_PrefixedUsageBase):
|
|
9847
9883
|
# allocationUsage : occurrenceUsagePrefix ALLOCATION usageDeclaration? usageBody
|
|
9884
|
+
# allocationUsageDeclaration : ALLOCATION usageDeclaration? (ALLOCATE connectorPart)?
|
|
9885
|
+
# | ALLOCATE connectorPart
|
|
9848
9886
|
keyword = "allocation"
|
|
9849
9887
|
|
|
9888
|
+
def __init__(self, definition=None):
|
|
9889
|
+
super().__init__(definition)
|
|
9890
|
+
self.connectorPart = None
|
|
9891
|
+
if definition is not None and valid_definition(definition, self.__class__.__name__):
|
|
9892
|
+
if definition.get("connectorPart") is not None:
|
|
9893
|
+
self.connectorPart = ConnectorPart(definition["connectorPart"])
|
|
9894
|
+
|
|
9895
|
+
def dump(self):
|
|
9896
|
+
parts = []
|
|
9897
|
+
if self.prefix is not None:
|
|
9898
|
+
parts.append(self.prefix.dump())
|
|
9899
|
+
# Render as `allocation [name] [allocate X to Y]`
|
|
9900
|
+
parts.append(self.keyword)
|
|
9901
|
+
if self.declaration is not None:
|
|
9902
|
+
decl_dump = self.declaration.dump()
|
|
9903
|
+
if decl_dump:
|
|
9904
|
+
parts.append(decl_dump)
|
|
9905
|
+
if self.connectorPart is not None:
|
|
9906
|
+
parts.append("allocate")
|
|
9907
|
+
parts.append(self.connectorPart.dump())
|
|
9908
|
+
if self.body is not None:
|
|
9909
|
+
parts.append(self.body.dump())
|
|
9910
|
+
return " ".join(parts)
|
|
9911
|
+
|
|
9912
|
+
def get_definition(self):
|
|
9913
|
+
output = super().get_definition()
|
|
9914
|
+
output["connectorPart"] = self.connectorPart.get_definition() if self.connectorPart else None
|
|
9915
|
+
return output
|
|
9916
|
+
|
|
9850
9917
|
|
|
9851
9918
|
class RenderingUsage(_PrefixedUsageBase):
|
|
9852
9919
|
# renderingUsage : occurrenceUsagePrefix RENDERING usage
|
|
@@ -4285,3 +4285,70 @@ class DefaultReference(Usage):
|
|
|
4285
4285
|
# )
|
|
4286
4286
|
|
|
4287
4287
|
# return package
|
|
4288
|
+
|
|
4289
|
+
|
|
4290
|
+
class Dependency(Usage):
|
|
4291
|
+
"""SysML v2 Dependency usage.
|
|
4292
|
+
|
|
4293
|
+
Represents a UML-style dependency between model elements.
|
|
4294
|
+
Usage:
|
|
4295
|
+
Dependency() # dependency ;
|
|
4296
|
+
Dependency(name='D') # dependency D from x to y;
|
|
4297
|
+
"""
|
|
4298
|
+
sysml_type = 'dependency'
|
|
4299
|
+
|
|
4300
|
+
def __init__(self, name=None, clients=None, suppliers=None, shortname=None):
|
|
4301
|
+
Usage.__init__(self)
|
|
4302
|
+
self.grammar = None
|
|
4303
|
+
self.clients = clients or []
|
|
4304
|
+
self.suppliers = suppliers or []
|
|
4305
|
+
# Usage.__init__ assigns a UUID-based name; override to None when
|
|
4306
|
+
# the dependency is anonymous (the common case for
|
|
4307
|
+
# `dependency b to A;`).
|
|
4308
|
+
self.name = name
|
|
4309
|
+
if shortname is not None:
|
|
4310
|
+
self._set_name(shortname, short=True)
|
|
4311
|
+
|
|
4312
|
+
def dump(self):
|
|
4313
|
+
# Issue #4: dependencies are emitted from the grammar tree; this
|
|
4314
|
+
# method exists for compatibility with the Usage API.
|
|
4315
|
+
if self.grammar is not None and hasattr(self.grammar, 'dump'):
|
|
4316
|
+
return self.grammar.dump()
|
|
4317
|
+
return "dependency"
|
|
4318
|
+
|
|
4319
|
+
def _get_definition(self, child=None):
|
|
4320
|
+
"""Build a PackageMember-wrapped Dependency dict for the model tree.
|
|
4321
|
+
|
|
4322
|
+
The Dependency grammar class returns the bare inner shape
|
|
4323
|
+
(`{"name": "Dependency", "identification": ..., "clients": ...,
|
|
4324
|
+
"suppliers": ..., "body": ...}`). For inclusion in a package body
|
|
4325
|
+
we wrap it the same way other definitions are wrapped:
|
|
4326
|
+
`PackageMember -> DefinitionElement -> Dependency`.
|
|
4327
|
+
"""
|
|
4328
|
+
if self.grammar is not None and hasattr(self.grammar, 'get_definition'):
|
|
4329
|
+
grammar_def = self.grammar.get_definition()
|
|
4330
|
+
else:
|
|
4331
|
+
grammar_def = {
|
|
4332
|
+
"name": "Dependency",
|
|
4333
|
+
"identification": None,
|
|
4334
|
+
"clients": [],
|
|
4335
|
+
"suppliers": [],
|
|
4336
|
+
"body": None,
|
|
4337
|
+
}
|
|
4338
|
+
# Sync identification name
|
|
4339
|
+
if self.name is not None and grammar_def.get("identification"):
|
|
4340
|
+
grammar_def["identification"]["declaredName"] = self.name
|
|
4341
|
+
elif self.name is not None:
|
|
4342
|
+
grammar_def["identification"] = {
|
|
4343
|
+
"name": "Identification",
|
|
4344
|
+
"declaredName": self.name,
|
|
4345
|
+
"declaredShortName": None,
|
|
4346
|
+
}
|
|
4347
|
+
return {
|
|
4348
|
+
"name": "PackageMember",
|
|
4349
|
+
"prefix": None,
|
|
4350
|
+
"ownedRelatedElement": {
|
|
4351
|
+
"name": "DefinitionElement",
|
|
4352
|
+
"ownedRelatedElement": grammar_def,
|
|
4353
|
+
},
|
|
4354
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.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
|
{sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.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.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.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.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.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.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.45.0 → sysmlpy-0.47.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.45.0 → sysmlpy-0.47.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
|