Hello, I am new to TLA+ and is trying to play with cat puzzle:
https://github.com/tlaplus/Examples/tree/master/specifications/Moving_Cat_Puzzle
I created a little different code with hard coded initial observed_box =
2 /\ direction = "right"
I tried with a small number of boxes: 3. I don't understand is why there
are so many states in the dump:
State 1:
/\ direction = "right"
/\ cat_box = 1
/\ observed_box = 2
State 2:
/\ direction = "right"
/\ cat_box = 2
/\ observed_box = 2 <- the cat is caught
State 3:
/\ direction = "right"
/\ cat_box = 3
/\ observed_box = 2
--------------------------
State 4:
/\ direction = "left"
/\ cat_box = 2
/\ observed_box = 2 <- the cat is caught
--------------------------
State 5:
/\ direction = "right"
/\ cat_box = 1
/\ observed_box = 2<- duplicate of State 1
State 6:
/\ direction = "left"
/\ cat_box = 3
/\ observed_box = 2 <- this should be impossible, cat is already caught
State 7:
/\ direction = "left"
/\ cat_box = 1
/\ observed_box = 2 <- this should be impossible, cat is already caught
State 8:
/\ direction = "right"
/\ cat_box = 2
/\ observed_box = 2 <- duplicate of State 2
State 9:
/\ direction = "right"
/\ cat_box = 3
/\ observed_box = 2 <- duplicate of State 3
State 10:
/\ direction = "left"
/\ cat_box = 2
/\ observed_box = 2 <- duplicate of State 4
State 11:
/\ direction = "left"
/\ cat_box = 3
/\ observed_box = 2 <- this should be impossible, cat is already caught
State 12:
/\ direction = "left"
/\ cat_box = 1
/\ observed_box = 2 <- this should be impossible, cat is already caught
In reality only states 1 - 4 that are possible. How were states 5 - 12
created?
Maybe, there are not enough properties in the code and it's moving back
and forth?