Issue1173

Title Wrong Parameter Order for MergeAndShrinkAlgorithm
Priority urgent Status resolved
Superseder Nosy List davidspeck, jendrik, malte, silvan, simon
Assigned To davidspeck Keywords
Optional summary
We (Simon and I) found a bug in the parameter order for constructing the M&S 
algorithm inside of the constructor of MergeAndShrinkHeuristic, which sets the 
transition system sizes to wrong values. This is because the expected order is 
bool 
prune_unreachable_states, bool prune_irrelevant_states, int max_states, int 
max_states_before_merge, int threshold_before_merge. However, the current order 
is 
int max_states, int max_states_before_merge, int threshold_before_merge, bool 
prune_unreachable_states, bool prune_irrelevant_states. For example, this sets 
the 
value for max_states to zero or one because the boolean prune_unreachable_state 
is 
passed.

This also occurs in the latest release, which may give a reason to update it.

Created on 2025-02-06.13:39:22 by davidspeck, last changed by davidspeck.

Summary
We (Simon and I) found a bug in the parameter order for constructing the M&S 
algorithm inside of the constructor of MergeAndShrinkHeuristic, which sets the 
transition system sizes to wrong values. This is because the expected order is 
bool 
prune_unreachable_states, bool prune_irrelevant_states, int max_states, int 
max_states_before_merge, int threshold_before_merge. However, the current order 
is 
int max_states, int max_states_before_merge, int threshold_before_merge, bool 
prune_unreachable_states, bool prune_irrelevant_states. For example, this sets 
the 
value for max_states to zero or one because the boolean prune_unreachable_state 
is 
passed.

This also occurs in the latest release, which may give a reason to update it.
Messages
msg11775 (view) Author: davidspeck Date: 2025-02-06.14:36:56
From my understanding, it is planned to run some experiment for issue1171 related 
to M&S. I think this fix should be merged before running the experiments.
msg11774 (view) Author: malte Date: 2025-02-06.14:26:59
OK. (I thought it was important to check this because from the pull request it looks like the bug was not related to the parameters passed to MergeAndShrinkHeuristic itself but to an internal class called MergeAndShrinkAlgorithm, and since this is not a plugin class I wasn't sure if this previously used the Options class.)

If you're convinced that the parameter order is now correct, please merge.
We should then make a plan for a release.

I think in addition to other aspects, a point release will probably be less disruptive to the other currently ongoing activity during the sprint, compared to a major release.
msg11772 (view) Author: simon Date: 2025-02-06.14:18:35
The bug does not exist in previous releases. In 2023.06 the constructor had no 
parameter order but just expected an Options object.
msg11771 (view) Author: davidspeck Date: 2025-02-06.14:16:31
PR: https://github.com/aibasel/downward/pull/248
msg11770 (view) Author: malte Date: 2025-02-06.14:08:19
Good catch!

I mentioned that we could perhaps fix this with a new 2024.12 release (or whatever we want to call it), but Simon pointed out that perhaps we want a new point release 2024.06.1 anyway to make it more likely that people using 2024.06 will end up with a working version. And I guess a point release is less work than a regular release.

Can you check that, among the released versions, this bug is limited to 2024.06, i.e., didn't exist in the previous release?
History
Date User Action Args
2025-02-07 16:39:44davidspecksetstatus: chatting -> resolved
2025-02-07 06:54:10silvansetnosy: + silvan
2025-02-06 14:36:56davidspecksetmessages: + msg11775
2025-02-06 14:26:59maltesetmessages: + msg11774
2025-02-06 14:18:35simonsetmessages: + msg11772
2025-02-06 14:16:31davidspecksetmessages: + msg11771
summary: We (Simon and I) found a bug in the parameter order for constructing the M&S algorithm inside of the constructor of MergeAndShrinkHeuristic, which sets the transition system sizes to wrong values. This is because the expected order is bool prune_unreachable_states, bool prune_irrelevant_states, int max_states, int max_states_before_merge, int threshold_before_merge. However, the current order is int max_states, int max_states_before_merge, int threshold_before_merge, bool prune_unreachable_states, bool prune_irrelevant_states. For example, this sets the value for max_states to zero or one because the boolean prune_unreachable_state is passed. This also occurs in the latest release, which may give a reason to update it. -> We (Simon and I) found a bug in the parameter order for constructing the M&S algorithm inside of the constructor of MergeAndShrinkHeuristic, which sets the transition system sizes to wrong values. This is because the expected order is bool prune_unreachable_states, bool prune_irrelevant_states, int max_states, int max_states_before_merge, int threshold_before_merge. However, the current order is int max_states, int max_states_before_merge, int threshold_before_merge, bool prune_unreachable_states, bool prune_irrelevant_states. For example, this sets the value for max_states to zero or one because the boolean prune_unreachable_state is passed. This also occurs in the latest release, which may give a reason to update it.
2025-02-06 14:08:19maltesetstatus: unread -> chatting
messages: + msg11770
2025-02-06 13:39:22davidspeckcreate