-
Notifications
You must be signed in to change notification settings - Fork 182
Description
The documentation of Modelica.Utilities.Strings.hashString says:
This is consistent with ModelicaTest.Utilities.TestString:
ModelicaStandardLibrary/ModelicaTest/Utilities.mo
Lines 210 to 211 in 83189ce
| hash1 := Strings.hashString("this is a test"); | |
| assert(hash1 == 1827717433, "Strings.hashString 1 failed"); |
However, if I compute Modelica.Utilities.Strings.hashString("this is a test") with Dymola 2024x I get 1734720762, not 1827717433. In fact, ModelicaTest.Utilities fails in Dymola 2024x.
Apparently, this issue was discussed in the context of #3415 when looking for MSL 3.2.3->4.0.0 regressions and eventually dismissed as a "tool issue". Looking at PR #3442, the hash test was removed on Feb 24 2020 and re-introduced on Feb 25 2020 in the PR, which was then merged on master on Jan 19 2021.
Do I understand correctly that the intent is that hashString is tool-independent? This has consequences in real life, see OpenModelica/OpenModelica#12569
