Skip to content

Comments

ST6RI-606-1 Code generator tooling for ISQ, SI, US Customary Units libraries#634

Merged
seidewitz merged 4 commits intomasterfrom
ST6RI-606
Mar 13, 2025
Merged

ST6RI-606-1 Code generator tooling for ISQ, SI, US Customary Units libraries#634
seidewitz merged 4 commits intomasterfrom
ST6RI-606

Conversation

@hpdekoning
Copy link
Member

This PR is an amendment on PR#621 that provides a new quantities_lib_generator tool under tool-support.

This tool is able to reproduce the SysML release 2024-12 ISQ library packages with a few differences that are all due to minor naming mistakes in the published release 2024-12 libraries and also three editorial issues.

In particular the naming of coordinate frames in release 2024-12 was inconsistent:

  • Most vector quantities and related coordinate frames were using e.g. Cartesian3dXxxVector instead of CartesianXxx3dVector, The latter is the correct naming convention that naturally fits with the quantity taxonomy. More specialized concepts prepend qualifiers to the name, e.g., a specialization chain from VectorQuantityValue to '3dVectorQuantityValue' to Position3dVector to CartesianPosition3dVector or CylindricalPosition3dVector.
  • Also VectorQuantityValue was used in many places instead of the correct '3dVectorQuantityValue'. Same for VectorMeasurementReference instead of '3dCoordinateFrame'.

Also, the following editorial issues were found and fixed:

  1. In ISQCondensedMatter.sysml Item 12-19 Hall coefficient: replaced erroneous unit m^3/Cm^3s^-1A^-1 with correct m^3/C, m^3s^-1*A^-1 (in the Excel workbook data/iso-iec-80000/iso_iec_80000_quantities_and_units.xlsx). As a consequence, the declaration of attribute def HallCoefficientUnit was changed.
  2. ISQSpaceTime.sysml contained redundant private import ScalarValues::String; . It was not generated, which is in line with all other ISQ libraries.
  3. The ISO/IEC 80000 references were checked and where needed updated to the latest correct titles, editions and URIs. This results in minor editorial corrections in the doc content of the libraries.

A detailed review of all differences between the ISQ library packages in folder libs_baseline_release-2024-12 and the auto-generated library packages in folder libs_generated has been performed. No other differences than those documented above have been found.

There are currently no changes to the generation of SI and USCustomaryUnits.

@hpdekoning
Copy link
Member Author

hpdekoning commented Mar 13, 2025

@seidewitz
This PR fixes the remaining problems with PR#621:

  • Two minor corrections to the iso_iec_80000_quantities_and_units.xlsx Excel workbook
  • Fix to the quantities_lib_generator so that the generated ISQ standard libraries correctly validate and parse in the latest Eclipse reference implementation. The problems concerned correct naming of vector quantities, related coordinate frames and vector quantity aliases.

I found one appearance of readonly in generated library ISQSpaceTime.sysml line 188:
readonly attribute universalCartesianSpatial3dCoordinateFrame ...
I did not change that yet, because I could not yet validate use of a replacement by const .

@seidewitz
Copy link
Member

seidewitz commented Mar 13, 2025

For SysML, readonly has been replaced by constant, but this can no longer be used on package-level usages. So the one case of readonly simply needs to be removed.

Everything else looks good.

@hpdekoning
Copy link
Member Author

For SysML, readonly has been replaced by constant, but this can no longer be used on package-level usages. So the one case of readonly simply needs to be removed.

Just committed the removal in this commit.

@seidewitz seidewitz merged commit 2c9307b into master Mar 13, 2025
2 checks passed
@seidewitz seidewitz added this to the 2025-02 milestone May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants