sysmlpy 0.28.1__tar.gz → 0.30.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.28.1 → sysmlpy-0.30.0}/PKG-INFO +1 -1
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/pyproject.toml +2 -2
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/definition.py +18 -12
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/classes.py +120 -32
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/semantic.py +7 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/store.py +19 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/usage.py +45 -32
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/LICENSE +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/README.md +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/validator.py +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "sysmlpy"
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.30.0"
|
|
10
10
|
description = "SysML v2.0 Parser"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Jon R. Fox (mycr0ft)", email="jon.fox@drfox.com" },
|
|
@@ -114,7 +114,7 @@ build_command = "pip install poetry && poetry build"
|
|
|
114
114
|
|
|
115
115
|
[tool.poetry]
|
|
116
116
|
name = "sysmlpy"
|
|
117
|
-
version = "0.
|
|
117
|
+
version = "0.30.0"
|
|
118
118
|
description = ""
|
|
119
119
|
authors = ["Jon R. Fox (mycr0ft) <jon.fox@drfox.com>"]
|
|
120
120
|
readme = "README.md"
|
|
@@ -20,7 +20,7 @@ __all__ = [
|
|
|
20
20
|
"analyze", "SemanticIssue", "SemanticAnalyzer",
|
|
21
21
|
]
|
|
22
22
|
__author__ = "Jon Fox"
|
|
23
|
-
__version__ = "0.
|
|
23
|
+
__version__ = "0.30.0"
|
|
24
24
|
|
|
25
25
|
from sysmlpy.usage import (
|
|
26
26
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -399,25 +399,31 @@ class Package(Searchable):
|
|
|
399
399
|
self._set_name(shortname, short=True)
|
|
400
400
|
|
|
401
401
|
def __repr__(self):
|
|
402
|
-
"""Return a
|
|
402
|
+
"""Return a constructor-mirroring string representation.
|
|
403
403
|
|
|
404
404
|
Returns
|
|
405
405
|
-------
|
|
406
406
|
str
|
|
407
|
-
String showing name and shortname for debugging.
|
|
408
407
|
"""
|
|
409
408
|
name = getattr(self, 'name', None)
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
# Suppress auto-generated UUID names
|
|
410
|
+
if name and len(name) == 36 and name.count('-') == 4:
|
|
411
|
+
name = None
|
|
412
|
+
|
|
413
|
+
try:
|
|
414
|
+
shortname = getattr(self.grammar.declaration.identification, 'declaredShortName', None)
|
|
415
|
+
if shortname:
|
|
416
|
+
shortname = shortname.strip('<').strip('>')
|
|
417
|
+
except (AttributeError, TypeError):
|
|
418
|
+
shortname = None
|
|
419
|
+
|
|
412
420
|
cls_name = self.__class__.__name__
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
else:
|
|
420
|
-
return f"{cls_name}()"
|
|
421
|
+
parts = []
|
|
422
|
+
if name:
|
|
423
|
+
parts.append(f'name={name!r}')
|
|
424
|
+
if shortname:
|
|
425
|
+
parts.append(f'shortname={shortname!r}')
|
|
426
|
+
return f"{cls_name}({', '.join(parts)})"
|
|
421
427
|
|
|
422
428
|
def _set_name(self, name, short=False):
|
|
423
429
|
"""Set the declared name or short name on the package grammar.
|
|
@@ -1412,10 +1412,11 @@ class ActionNodeUsageDeclaration:
|
|
|
1412
1412
|
self.declaration = UsageDeclaration(definition["declaration"])
|
|
1413
1413
|
|
|
1414
1414
|
def dump(self):
|
|
1415
|
+
# Only output keyword if there's a declaration (explicit "action" keyword)
|
|
1415
1416
|
if self.declaration is not None:
|
|
1416
1417
|
return " ".join([self.keyword, self.declaration.dump()])
|
|
1417
1418
|
else:
|
|
1418
|
-
return
|
|
1419
|
+
return "" # No keyword when no declaration
|
|
1419
1420
|
|
|
1420
1421
|
def get_definition(self):
|
|
1421
1422
|
return {
|
|
@@ -2251,8 +2252,8 @@ class AcceptParameterPart:
|
|
|
2251
2252
|
|
|
2252
2253
|
class SenderReceiverPart:
|
|
2253
2254
|
# SenderReceiverPart :
|
|
2254
|
-
# 'via' nodeParameterMember 'to'
|
|
2255
|
-
# | 'to'
|
|
2255
|
+
# 'via' nodeParameterMember 'to' nodeParameterMember
|
|
2256
|
+
# | 'to' nodeParameterMember
|
|
2256
2257
|
# ;
|
|
2257
2258
|
def __init__(self, definition):
|
|
2258
2259
|
self.via = None
|
|
@@ -2261,7 +2262,7 @@ class SenderReceiverPart:
|
|
|
2261
2262
|
if definition.get("via") is not None:
|
|
2262
2263
|
self.via = NodeParameterMember(definition["via"])
|
|
2263
2264
|
if definition.get("to") is not None:
|
|
2264
|
-
self.to =
|
|
2265
|
+
self.to = NodeParameterMember(definition["to"])
|
|
2265
2266
|
|
|
2266
2267
|
def dump(self):
|
|
2267
2268
|
output = []
|
|
@@ -2758,85 +2759,114 @@ class AcceptNode:
|
|
|
2758
2759
|
|
|
2759
2760
|
class IfNode:
|
|
2760
2761
|
# IfNode :
|
|
2761
|
-
# prefix=OccurrenceUsagePrefix
|
|
2762
|
+
# prefix=OccurrenceUsagePrefix IF condition thenBody (ELSE elseBody)?
|
|
2762
2763
|
# ;
|
|
2763
2764
|
def __init__(self, definition):
|
|
2764
2765
|
self.prefix = None
|
|
2765
|
-
self.
|
|
2766
|
-
self.
|
|
2766
|
+
self.condition = None
|
|
2767
|
+
self.thenBody = None
|
|
2768
|
+
self.elseBody = None
|
|
2769
|
+
self.elseIf = None
|
|
2767
2770
|
if valid_definition(definition, self.__class__.__name__):
|
|
2768
2771
|
if definition.get("prefix") is not None:
|
|
2769
2772
|
self.prefix = OccurrenceUsagePrefix(definition["prefix"])
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2773
|
+
self.condition = definition.get("condition")
|
|
2774
|
+
if definition.get("thenBody") is not None:
|
|
2775
|
+
self.thenBody = ActionBody(definition["thenBody"])
|
|
2776
|
+
if definition.get("elseBody") is not None:
|
|
2777
|
+
self.elseBody = ActionBody(definition["elseBody"])
|
|
2778
|
+
if definition.get("elseIf") is not None:
|
|
2779
|
+
self.elseIf = IfNode(definition["elseIf"])
|
|
2774
2780
|
|
|
2775
2781
|
def dump(self):
|
|
2776
2782
|
output = []
|
|
2777
2783
|
if self.prefix is not None:
|
|
2778
2784
|
output.append(self.prefix.dump())
|
|
2779
|
-
if
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2785
|
+
output.append("if")
|
|
2786
|
+
if self.condition is not None:
|
|
2787
|
+
output.append(self.condition)
|
|
2788
|
+
if self.thenBody is not None:
|
|
2789
|
+
output.append(self.thenBody.dump())
|
|
2790
|
+
if self.elseIf is not None:
|
|
2791
|
+
output.append("else")
|
|
2792
|
+
output.append(self.elseIf.dump())
|
|
2793
|
+
elif self.elseBody is not None:
|
|
2794
|
+
output.append("else")
|
|
2795
|
+
output.append(self.elseBody.dump())
|
|
2783
2796
|
return " ".join(output)
|
|
2784
2797
|
|
|
2785
2798
|
def get_definition(self):
|
|
2786
2799
|
output = {
|
|
2787
2800
|
"name": self.__class__.__name__,
|
|
2788
2801
|
"prefix": None,
|
|
2789
|
-
"
|
|
2790
|
-
"
|
|
2802
|
+
"condition": None,
|
|
2803
|
+
"thenBody": None,
|
|
2804
|
+
"elseBody": None,
|
|
2805
|
+
"elseIf": None,
|
|
2791
2806
|
}
|
|
2792
2807
|
if self.prefix is not None:
|
|
2793
2808
|
output["prefix"] = self.prefix.get_definition()
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2809
|
+
output["condition"] = self.condition
|
|
2810
|
+
if self.thenBody is not None:
|
|
2811
|
+
output["thenBody"] = self.thenBody.get_definition()
|
|
2812
|
+
if self.elseBody is not None:
|
|
2813
|
+
output["elseBody"] = self.elseBody.get_definition()
|
|
2814
|
+
if self.elseIf is not None:
|
|
2815
|
+
output["elseIf"] = self.elseIf.get_definition()
|
|
2798
2816
|
return output
|
|
2799
2817
|
|
|
2800
2818
|
|
|
2801
2819
|
class WhileLoopNode:
|
|
2802
2820
|
# WhileLoopNode :
|
|
2803
|
-
# prefix=OccurrenceUsagePrefix
|
|
2821
|
+
# prefix=OccurrenceUsagePrefix (WHILE condition | LOOP) body (UNTIL untilCondition)?
|
|
2804
2822
|
# ;
|
|
2805
2823
|
def __init__(self, definition):
|
|
2806
2824
|
self.prefix = None
|
|
2807
|
-
self.
|
|
2825
|
+
self.keyword = None
|
|
2826
|
+
self.condition = None
|
|
2808
2827
|
self.body = None
|
|
2828
|
+
self.until = None
|
|
2809
2829
|
if valid_definition(definition, self.__class__.__name__):
|
|
2810
2830
|
if definition.get("prefix") is not None:
|
|
2811
2831
|
self.prefix = OccurrenceUsagePrefix(definition["prefix"])
|
|
2812
|
-
|
|
2813
|
-
|
|
2832
|
+
self.keyword = definition.get("keyword")
|
|
2833
|
+
self.condition = definition.get("condition")
|
|
2814
2834
|
if definition.get("body") is not None:
|
|
2815
2835
|
self.body = ActionBody(definition["body"])
|
|
2836
|
+
self.until = definition.get("until")
|
|
2816
2837
|
|
|
2817
2838
|
def dump(self):
|
|
2818
2839
|
output = []
|
|
2819
2840
|
if self.prefix is not None:
|
|
2820
2841
|
output.append(self.prefix.dump())
|
|
2821
|
-
if self.
|
|
2822
|
-
output.append(self.
|
|
2842
|
+
if self.keyword is not None:
|
|
2843
|
+
output.append(self.keyword)
|
|
2844
|
+
if self.condition is not None:
|
|
2845
|
+
output.append(self.condition)
|
|
2823
2846
|
if self.body is not None:
|
|
2824
2847
|
output.append(self.body.dump())
|
|
2848
|
+
if self.until is not None:
|
|
2849
|
+
output.append("until")
|
|
2850
|
+
output.append(self.until)
|
|
2851
|
+
output.append(";")
|
|
2825
2852
|
return " ".join(output)
|
|
2826
2853
|
|
|
2827
2854
|
def get_definition(self):
|
|
2828
2855
|
output = {
|
|
2829
2856
|
"name": self.__class__.__name__,
|
|
2830
2857
|
"prefix": None,
|
|
2831
|
-
"
|
|
2858
|
+
"keyword": None,
|
|
2859
|
+
"condition": None,
|
|
2832
2860
|
"body": None,
|
|
2861
|
+
"until": None,
|
|
2833
2862
|
}
|
|
2834
2863
|
if self.prefix is not None:
|
|
2835
2864
|
output["prefix"] = self.prefix.get_definition()
|
|
2836
|
-
|
|
2837
|
-
|
|
2865
|
+
output["keyword"] = self.keyword
|
|
2866
|
+
output["condition"] = self.condition
|
|
2838
2867
|
if self.body is not None:
|
|
2839
2868
|
output["body"] = self.body.get_definition()
|
|
2869
|
+
output["until"] = self.until
|
|
2840
2870
|
return output
|
|
2841
2871
|
|
|
2842
2872
|
|
|
@@ -2884,16 +2914,62 @@ class ForLoopNode:
|
|
|
2884
2914
|
|
|
2885
2915
|
class ControlNode:
|
|
2886
2916
|
# ControlNode :
|
|
2887
|
-
# prefix=OccurrenceUsagePrefix
|
|
2917
|
+
# prefix=OccurrenceUsagePrefix keyword actionBody
|
|
2918
|
+
# ;
|
|
2919
|
+
def __init__(self, definition):
|
|
2920
|
+
self.prefix = None
|
|
2921
|
+
self.keyword = None
|
|
2922
|
+
self.body = None
|
|
2923
|
+
if valid_definition(definition, self.__class__.__name__):
|
|
2924
|
+
if definition.get("prefix") is not None:
|
|
2925
|
+
self.prefix = OccurrenceUsagePrefix(definition["prefix"])
|
|
2926
|
+
self.keyword = definition.get("keyword")
|
|
2927
|
+
if definition.get("body") is not None:
|
|
2928
|
+
self.body = ActionBody(definition["body"])
|
|
2929
|
+
|
|
2930
|
+
def dump(self):
|
|
2931
|
+
output = []
|
|
2932
|
+
if self.prefix is not None:
|
|
2933
|
+
output.append(self.prefix.dump())
|
|
2934
|
+
if self.keyword is not None:
|
|
2935
|
+
output.append(self.keyword)
|
|
2936
|
+
if self.body is not None:
|
|
2937
|
+
output.append(self.body.dump())
|
|
2938
|
+
return " ".join(output)
|
|
2939
|
+
|
|
2940
|
+
def get_definition(self):
|
|
2941
|
+
output = {
|
|
2942
|
+
"name": self.__class__.__name__,
|
|
2943
|
+
"prefix": None,
|
|
2944
|
+
"keyword": None,
|
|
2945
|
+
"body": None,
|
|
2946
|
+
}
|
|
2947
|
+
if self.prefix is not None:
|
|
2948
|
+
output["prefix"] = self.prefix.get_definition()
|
|
2949
|
+
output["keyword"] = self.keyword
|
|
2950
|
+
if self.body is not None:
|
|
2951
|
+
output["body"] = self.body.get_definition()
|
|
2952
|
+
return output
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
class TerminateNode:
|
|
2956
|
+
# TerminateNode :
|
|
2957
|
+
# prefix=OccurrenceUsagePrefix actionNodeUsageDeclaration? TERMINATE nodeParameterMember? actionBody
|
|
2888
2958
|
# ;
|
|
2889
2959
|
def __init__(self, definition):
|
|
2890
2960
|
self.prefix = None
|
|
2891
2961
|
self.declaration = None
|
|
2962
|
+
self.target = None
|
|
2963
|
+
self.body = None
|
|
2892
2964
|
if valid_definition(definition, self.__class__.__name__):
|
|
2893
2965
|
if definition.get("prefix") is not None:
|
|
2894
2966
|
self.prefix = OccurrenceUsagePrefix(definition["prefix"])
|
|
2895
2967
|
if definition.get("declaration") is not None:
|
|
2896
|
-
self.declaration =
|
|
2968
|
+
self.declaration = ActionNodeUsageDeclaration(definition["declaration"])
|
|
2969
|
+
if definition.get("target") is not None:
|
|
2970
|
+
self.target = NodeParameterMember(definition["target"])
|
|
2971
|
+
if definition.get("body") is not None:
|
|
2972
|
+
self.body = ActionBody(definition["body"])
|
|
2897
2973
|
|
|
2898
2974
|
def dump(self):
|
|
2899
2975
|
output = []
|
|
@@ -2901,6 +2977,11 @@ class ControlNode:
|
|
|
2901
2977
|
output.append(self.prefix.dump())
|
|
2902
2978
|
if self.declaration is not None:
|
|
2903
2979
|
output.append(self.declaration.dump())
|
|
2980
|
+
output.append("terminate")
|
|
2981
|
+
if self.target is not None:
|
|
2982
|
+
output.append(self.target.dump())
|
|
2983
|
+
if self.body is not None:
|
|
2984
|
+
output.append(self.body.dump())
|
|
2904
2985
|
return " ".join(output)
|
|
2905
2986
|
|
|
2906
2987
|
def get_definition(self):
|
|
@@ -2908,11 +2989,17 @@ class ControlNode:
|
|
|
2908
2989
|
"name": self.__class__.__name__,
|
|
2909
2990
|
"prefix": None,
|
|
2910
2991
|
"declaration": None,
|
|
2992
|
+
"target": None,
|
|
2993
|
+
"body": None,
|
|
2911
2994
|
}
|
|
2912
2995
|
if self.prefix is not None:
|
|
2913
2996
|
output["prefix"] = self.prefix.get_definition()
|
|
2914
2997
|
if self.declaration is not None:
|
|
2915
2998
|
output["declaration"] = self.declaration.get_definition()
|
|
2999
|
+
if self.target is not None:
|
|
3000
|
+
output["target"] = self.target.get_definition()
|
|
3001
|
+
if self.body is not None:
|
|
3002
|
+
output["body"] = self.body.get_definition()
|
|
2916
3003
|
return output
|
|
2917
3004
|
|
|
2918
3005
|
|
|
@@ -2925,6 +3012,7 @@ class ActionNode:
|
|
|
2925
3012
|
# | node=WhileLoopNode
|
|
2926
3013
|
# | node=ForLoopNode
|
|
2927
3014
|
# | node=ControlNode
|
|
3015
|
+
# | node=TerminateNode
|
|
2928
3016
|
# ;
|
|
2929
3017
|
def __init__(self, definition):
|
|
2930
3018
|
if valid_definition(definition, self.__class__.__name__):
|
|
@@ -257,6 +257,10 @@ class SymbolTable:
|
|
|
257
257
|
self._definition_features: dict[str, dict[str, Any]] = {} # definition_name -> {element, features, supertypes}
|
|
258
258
|
self._duplicate_names: list[tuple[str, Any]] = [] # (name, element) for duplicates
|
|
259
259
|
|
|
260
|
+
def __repr__(self) -> str:
|
|
261
|
+
return (f"SymbolTable(symbols={len(self._symbols)}, "
|
|
262
|
+
f"children={len(self._children)})")
|
|
263
|
+
|
|
260
264
|
# -- public API ----------------------------------------------------------
|
|
261
265
|
|
|
262
266
|
def register(self, name: str, element: Any) -> None:
|
|
@@ -934,6 +938,9 @@ _KNOWN_LIBRARY_SYMBOLS = frozenset({
|
|
|
934
938
|
class SemanticAnalyzer:
|
|
935
939
|
"""Analyzes a parsed SysML model for semantic issues."""
|
|
936
940
|
|
|
941
|
+
def __repr__(self) -> str:
|
|
942
|
+
return "SemanticAnalyzer()"
|
|
943
|
+
|
|
937
944
|
def analyze(
|
|
938
945
|
self,
|
|
939
946
|
model: Any,
|
|
@@ -238,6 +238,11 @@ class InMemoryStore(Store):
|
|
|
238
238
|
self._parents: dict[str, list[str]] = {}
|
|
239
239
|
self._edges: dict[str, list[tuple[str, str, dict]]] = {}
|
|
240
240
|
|
|
241
|
+
def __repr__(self) -> str:
|
|
242
|
+
n_elem = len(self._elements)
|
|
243
|
+
n_edge = sum(len(v) for v in self._edges.values())
|
|
244
|
+
return f"InMemoryStore(elements={n_elem}, edges={n_edge})"
|
|
245
|
+
|
|
241
246
|
def put(self, element_id: str, data: dict,
|
|
242
247
|
parent_id: Optional[str] = None,
|
|
243
248
|
rel_type: str = REL_PARENT_CHILD) -> None:
|
|
@@ -473,12 +478,17 @@ class NetworkXStore(Store):
|
|
|
473
478
|
a MultiGraph for undirected relationships.
|
|
474
479
|
"""
|
|
475
480
|
import networkx as nx
|
|
481
|
+
self._directed = directed
|
|
476
482
|
if directed:
|
|
477
483
|
self._graph = nx.MultiDiGraph()
|
|
478
484
|
else:
|
|
479
485
|
self._graph = nx.MultiGraph()
|
|
480
486
|
self._nx = nx
|
|
481
487
|
|
|
488
|
+
def __repr__(self) -> str:
|
|
489
|
+
return (f"NetworkXStore(nodes={self._graph.number_of_nodes()}, "
|
|
490
|
+
f"edges={self._graph.number_of_edges()}, directed={self._directed})")
|
|
491
|
+
|
|
482
492
|
def put(self, element_id: str, data: dict,
|
|
483
493
|
parent_id: Optional[str] = None,
|
|
484
494
|
rel_type: str = REL_PARENT_CHILD) -> None:
|
|
@@ -852,10 +862,14 @@ class KuzuStore(Store):
|
|
|
852
862
|
Path to the database directory, or ":memory:" for in-memory mode.
|
|
853
863
|
"""
|
|
854
864
|
import kuzu
|
|
865
|
+
self._database = database
|
|
855
866
|
self._db = kuzu.Database(database)
|
|
856
867
|
self._conn = kuzu.Connection(self._db)
|
|
857
868
|
self._init_schema()
|
|
858
869
|
|
|
870
|
+
def __repr__(self) -> str:
|
|
871
|
+
return f"KuzuStore(database={self._database!r})"
|
|
872
|
+
|
|
859
873
|
def _init_schema(self) -> None:
|
|
860
874
|
"""Create the node and relationship tables if they don't exist."""
|
|
861
875
|
self._conn.execute(
|
|
@@ -1422,10 +1436,15 @@ class CayleyStore(Store):
|
|
|
1422
1436
|
label : str
|
|
1423
1437
|
Quad label namespace for isolating data.
|
|
1424
1438
|
"""
|
|
1439
|
+
self._host = host
|
|
1440
|
+
self._port = port
|
|
1425
1441
|
self._base_url = f"http://{host}:{port}"
|
|
1426
1442
|
self._label = label
|
|
1427
1443
|
self._session = None
|
|
1428
1444
|
|
|
1445
|
+
def __repr__(self) -> str:
|
|
1446
|
+
return f"CayleyStore(host={self._host!r}, port={self._port}, label={self._label!r})"
|
|
1447
|
+
|
|
1429
1448
|
def _get_session(self):
|
|
1430
1449
|
"""Get or create a requests session."""
|
|
1431
1450
|
if self._session is None:
|
|
@@ -18,6 +18,20 @@ import os
|
|
|
18
18
|
|
|
19
19
|
ureg = pint.UnitRegistry()
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
def _is_uuid(s: str) -> bool:
|
|
23
|
+
"""Return True if *s* looks like an auto-generated UUID4 string."""
|
|
24
|
+
if not isinstance(s, str) or len(s) != 36:
|
|
25
|
+
return False
|
|
26
|
+
parts = s.split('-')
|
|
27
|
+
if len(parts) != 5:
|
|
28
|
+
return False
|
|
29
|
+
lengths = [8, 4, 4, 4, 12]
|
|
30
|
+
return all(
|
|
31
|
+
len(p) == n and all(c in '0123456789abcdef' for c in p.lower())
|
|
32
|
+
for p, n in zip(parts, lengths)
|
|
33
|
+
)
|
|
34
|
+
|
|
21
35
|
# Load custom US Customary unit definitions
|
|
22
36
|
_us_customary_path = os.path.join(os.path.dirname(__file__), "us_customary_units.txt")
|
|
23
37
|
if os.path.exists(_us_customary_path):
|
|
@@ -300,57 +314,56 @@ class Usage(Searchable):
|
|
|
300
314
|
return classtree(self._get_definition(child)).dump()
|
|
301
315
|
|
|
302
316
|
def __repr__(self):
|
|
303
|
-
"""Return a
|
|
317
|
+
"""Return a constructor-mirroring string representation.
|
|
318
|
+
|
|
319
|
+
Output can be passed back to the class constructor to recreate an
|
|
320
|
+
equivalent (though unpopulated-grammar) instance::
|
|
304
321
|
|
|
305
|
-
|
|
322
|
+
Part(definition=True, name='Engine')
|
|
323
|
+
Part(name='wheel', shortname='w')
|
|
324
|
+
Action()
|
|
306
325
|
|
|
307
326
|
Returns
|
|
308
327
|
-------
|
|
309
328
|
str
|
|
310
|
-
String representation suitable for debugging.
|
|
311
329
|
"""
|
|
312
|
-
#
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
id_obj = getattr(id_obj.declaration, 'declaration', None)
|
|
319
|
-
if id_obj:
|
|
320
|
-
name = getattr(id_obj.identification, 'declaredName', None)
|
|
321
|
-
except (AttributeError, TypeError):
|
|
330
|
+
# Use the is_definition property — reliable across all 29 subclasses
|
|
331
|
+
is_def = self.is_definition
|
|
332
|
+
|
|
333
|
+
# Suppress auto-generated UUID names (they are meaningless to callers)
|
|
334
|
+
name = getattr(self, 'name', None)
|
|
335
|
+
if name and _is_uuid(name):
|
|
322
336
|
name = None
|
|
323
|
-
|
|
324
|
-
#
|
|
337
|
+
|
|
338
|
+
# Shortname from grammar when present — path differs by definition vs usage
|
|
339
|
+
shortname = None
|
|
325
340
|
try:
|
|
326
|
-
shortname = None
|
|
327
341
|
id_obj = getattr(self.grammar, 'usage', None)
|
|
328
342
|
if id_obj:
|
|
329
343
|
id_obj = getattr(id_obj.declaration, 'declaration', None)
|
|
330
344
|
if id_obj:
|
|
331
345
|
shortname = getattr(id_obj.identification, 'declaredShortName', None)
|
|
346
|
+
if not shortname:
|
|
347
|
+
# Definition path: grammar.definition.declaration.identification.declaredShortName
|
|
348
|
+
def_obj = getattr(self.grammar, 'definition', None)
|
|
349
|
+
if def_obj:
|
|
350
|
+
id_obj = getattr(def_obj, 'declaration', None)
|
|
351
|
+
if id_obj:
|
|
352
|
+
shortname = getattr(id_obj.identification, 'declaredShortName', None)
|
|
332
353
|
if shortname:
|
|
333
354
|
shortname = shortname.strip('<').strip('>')
|
|
334
355
|
except (AttributeError, TypeError):
|
|
335
356
|
shortname = None
|
|
336
|
-
|
|
337
|
-
is_def = hasattr(self.grammar, 'definition')
|
|
357
|
+
|
|
338
358
|
cls_name = self.__class__.__name__
|
|
339
|
-
|
|
359
|
+
parts = []
|
|
340
360
|
if is_def:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
else:
|
|
348
|
-
if name and shortname:
|
|
349
|
-
return f"{cls_name}(name={name!r}, shortname={shortname!r})"
|
|
350
|
-
elif name:
|
|
351
|
-
return f"{cls_name}(name={name!r})"
|
|
352
|
-
else:
|
|
353
|
-
return f"{cls_name}()"
|
|
361
|
+
parts.append('definition=True')
|
|
362
|
+
if name:
|
|
363
|
+
parts.append(f'name={name!r}')
|
|
364
|
+
if shortname:
|
|
365
|
+
parts.append(f'shortname={shortname!r}')
|
|
366
|
+
return f"{cls_name}({', '.join(parts)})"
|
|
354
367
|
|
|
355
368
|
def _set_name(self, name, short=False):
|
|
356
369
|
"""Set the declared name or short name on the grammar element.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.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.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.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.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.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.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.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.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.28.1 → sysmlpy-0.30.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.28.1 → sysmlpy-0.30.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
|