Re: [PATCHv2 0/4] tools/memory-model: Define more of LKMM in tools/memory-model
From: Jonas Oberhauser
Date: Mon Jul 29 2024 - 12:06:11 EST
Am 7/29/2024 um 5:53 PM schrieb Hernan Ponce de Leon:
On 7/29/2024 5:44 PM, Jonas Oberhauser wrote:
I don't think this is a problem. If the old version is the default,
and we define it in the .cfg file for the tree version of LKMM, then
it will work correctly for both the old and new versions. People
playing around with Memory Models should be careful enough not to
intentionally break the model by passing bogus options.
The same was true for my implementation using the lkmm-legacy option
Yeah, I'm fine with that one. (Although it may be better to have a
version number as value instead of just a boolean flag, like
-model-version=x_y_z - just in case this is not the last time).
rather than the model variant, but this was still considered to break
backward compatibility.
https://github.com/herd/herdtools7/pull/865#issuecomment-2229930493
I think Akira is a bit overzealous here. What if a user accidentally
puts -lkmm-legacy false and accidentally also adds the version number
into the litmus test and/or model?
The request can be fulfilled, by defining some relation in the bell file
that has a magic name like version_x_y_z and checks that the x_y_z
matches the -model-version=x_y_z provided as an argument.
But I don't think we need to go that far.
jonas