Open kerimoyle opened 4 years ago
If I assume that the reset rule doc is wrong and the order is based on the variable
not the test_variable
, then under what conditions will reset #2 ever be activated?
You're right the rule should be on the (equivalent set of the) reset variable, not on the test variable
So that means the example is invalid, as both resets are on B, so they need to have a different order
as long as a variable is inside its own "equivalent variable set" (which should be obvious, but isn't quite, especially as we have no equivalences defined ... )
Hadn't thought of this one! But I think we're ok actually: 3.10.1 says every variable is in the "variable equivalence network"; then 3.10.11 says all subgraphs are equivalent variable sets. I think that says each var is in its own subset, regardles of the points 3.10.2-3.10.10 which concern map_variableses
Thanks @MichaelClerx ... and now to continue ... If I change the order of reset 2 such that it has order = 2, will it ever be applied?
reset #1:
test_variable: A
test_value: 1
order: 1
reset_variable: B
reset_value: 2
reset #2:
test_variable: C
test_value: 1
order: 2
reset_variable: B
reset_value: 200
Hadn't thought of this one! But I think we're ok actually: 3.10.1 says every variable is in the "variable equivalence network"; then 3.10.11 says all subgraphs are equivalent variable sets. I think that says each var is in its own subset, regardles of the points 3.10.2-3.10.10 which concern map_variableses
Yeah, exactly ... I think we're safe, it's just not super clear. I'll mention it in the informative stuff.
Thanks!
Thanks @MichaelClerx ... and now to continue ... If I change the order of reset 2 such that it has order = 2, will it ever be applied?
reset #1: test_variable: A test_value: 1 order: 1 reset_variable: B reset_value: 2 reset #2: test_variable: C test_value: 1 order: 2 reset_variable: B reset_value: 200
If C == 1 but A != 1
Ahh, of course (facepalm...) But it is possible to write entirely hidden resets? eg:
reset #1:
test_variable: A
test_value: 1
order: 1
reset_variable: B
reset_value: 2
reset #2:
test_variable: A
test_value: 1
order: 2
reset_variable: B
reset_value: 200
... or does that get evaluated in the second iteration?
Yeah that would just never get reached
I'm still struggling to get my head around resets after reading the rule examples doc. What happens in this situation if the variables (A, B, C) = (1, 1, 1)? All are in the same component, and none have equivalences.
The spec says:
This implies that the above would not be valid - as long as a variable is inside its own "equivalent variable set" (which should be obvious, but isn't quite, especially as we have no equivalences defined ... )
But the reset rules doc says:
... which tells me that the test variable is the one which should have no order clashes, when I reckon it should be the reset variable?