diff --git a/data/scenarios/Challenges/Ranching/_capture/opponent.sw b/data/scenarios/Challenges/Ranching/_capture/opponent.sw index 8ad5fc901..43f46e92a 100644 --- a/data/scenarios/Challenges/Ranching/_capture/opponent.sw +++ b/data/scenarios/Challenges/Ranching/_capture/opponent.sw @@ -39,12 +39,9 @@ Iterate 4 times (once for each direction) def countBlocked = \n. if (n > 0) { isBlocked <- blocked; - // This assignment has to happen before the recursive - // "countBlocked" call due to #1032 - let localBlockCount = boolToInt isBlocked in turn left; lastCount <- countBlocked $ n - 1; - return $ lastCount + localBlockCount; + return $ lastCount + boolToInt isBlocked; } { return 0; } diff --git a/data/scenarios/Challenges/Ranching/_powerset/setup.sw b/data/scenarios/Challenges/Ranching/_powerset/setup.sw index 09963742d..6d3395f0e 100644 --- a/data/scenarios/Challenges/Ranching/_powerset/setup.sw +++ b/data/scenarios/Challenges/Ranching/_powerset/setup.sw @@ -138,13 +138,9 @@ Fisher-Yates would be more efficient, but requires a physical array. def naiveRandomStack = \valueFunc. \maxval. \bitmask. \n. val <- if (n > 1) { nextRandomVal <- getUnusedRandom maxval bitmask; - - // Recursion bug workaround (see #1032): - let blahNextRandomVal = nextRandomVal in - let newBitmask = bitmask + shiftLeft 1 nextRandomVal in naiveRandomStack valueFunc maxval newBitmask $ n - 1; - return blahNextRandomVal; + return nextRandomVal; } { // We're at the peak of the stack. // Now we unwind it. diff --git a/data/scenarios/Challenges/Sliding Puzzles/_sliding-puzzle/maintainer.sw b/data/scenarios/Challenges/Sliding Puzzles/_sliding-puzzle/maintainer.sw index ba3cbf0e6..19853d373 100644 --- a/data/scenarios/Challenges/Sliding Puzzles/_sliding-puzzle/maintainer.sw +++ b/data/scenarios/Challenges/Sliding Puzzles/_sliding-puzzle/maintainer.sw @@ -60,12 +60,8 @@ def getIndexesTotal = \boardWidth. \boardHeight. \n. let idx = n - 1 in teleport self (idx/boardHeight, -(mod idx boardWidth)); valueHere <- getValueHere; - - // This reassignment has to happen before the - // recursive call due to #1032 - let valueHereBlah = valueHere in runningTotal <- getIndexesTotal boardWidth boardHeight $ n - 1; - return $ valueHereBlah + runningTotal; + return $ valueHere + runningTotal; } { return 0; } diff --git a/data/scenarios/Challenges/_gallery/setup.sw b/data/scenarios/Challenges/_gallery/setup.sw index 30ba2198d..474b097aa 100644 --- a/data/scenarios/Challenges/_gallery/setup.sw +++ b/data/scenarios/Challenges/_gallery/setup.sw @@ -73,13 +73,9 @@ Fisher-Yates would be more efficient, but requires a physical array. def naiveRandomStack = \valueFunc. \maxval. \bitmask. \n. val <- if (n > 1) { nextRandomVal <- getUnusedRandom maxval bitmask; - - // Recursion bug workaround (see #1032): - let blahNextRandomVal = nextRandomVal in - let newBitmask = bitmask + shiftLeft 1 nextRandomVal in naiveRandomStack valueFunc maxval newBitmask $ n - 1; - return blahNextRandomVal; + return nextRandomVal; } { // We're at the peak of the stack. // Now we unwind it. diff --git a/data/scenarios/Challenges/_lights-out/assistant.sw b/data/scenarios/Challenges/_lights-out/assistant.sw index d4a23478c..ab504f571 100644 --- a/data/scenarios/Challenges/_lights-out/assistant.sw +++ b/data/scenarios/Challenges/_lights-out/assistant.sw @@ -189,13 +189,8 @@ def prepareBoardAllRows = \abortFunc. \boardWidth. \rowIdx. return (0, 0); } { advanceRowViaTeleport; - - // This reassignment has to happen before the recursive - // "prepareBoardAllRows" call due to #1032 - let rowCommonCountFoo = rowCommonCount in totalCommonCount <- prepareBoardAllRows abortFunc boardWidth $ rowIdx - 1; - - return $ sumTuples rowCommonCountFoo totalCommonCount + return $ sumTuples rowCommonCount totalCommonCount } } { return (0, 0);