We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem you can find in the following test:
, testCase "Complex items sum refactor" $ let -- Start algorithm: -- tmp1, tmp2 = a + b -- tmp3, tmp4 = c + d -- res1 = one + tmp1 + tmp3 -- res2 = two + tmp2 + tmp4 -- res = res1 + res2 -- Result algorithm: -- res = one + a + b + c + d + two + a + b + c + d func1 = acc [Push Plus (I "a"), Push Plus (I "b"), Pull (O $ S.fromList ["tmp1", "tmp2"])] func2 = acc [Push Plus (I "c"), Push Plus (I "d"), Pull (O $ S.fromList ["tmp3", "tmp4"])] func3 = acc [Push Plus (I "one"), Push Plus (I "tmp1"), Push Plus (I "tmp3"), Pull (O $ S.fromList ["res1"])] func4 = acc [Push Plus (I "two"), Push Plus (I "tmp2"), Push Plus (I "tmp4"), Pull (O $ S.fromList ["res2"])] func5 = acc [Push Plus (I "res1"), Push Plus (I "res2"), Pull (O $ S.fromList ["res"])] funcRes = acc [ Push Plus (I "one") , Push Plus (I "a") , Push Plus (I "b") , Push Plus (I "c") , Push Plus (I "d") , Push Plus (I "two") , Push Plus (I "a") , Push Plus (I "b") , Push Plus (I "c") , Push Plus (I "d") , Pull (O $ S.fromList ["res"]) ] :: F String Int in [func1, func2, func3, func4, func5] `refactorTo` [funcRes]
Complex items sum refactor: FAIL test/NITTA/Model/Problems/Refactor/Accum/Tests.hs:155: expected: fromList [Acc(+one +a +b +c +d +two +a +b +c +d = res)] but got: fromList [Acc(+a +b = tmp1 = tmp2),Acc(+c +d = tmp3 = tmp4),Acc(+one +tmp1 +tmp3 +two +tmp2 +tmp4 = res)] Use -p '/Complex items sum refactor/' to rerun this test only.
As you see, after refactoring we have a lot of buffer variables. They should be merged in one function to reduce numbers of transactions.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The problem you can find in the following test:
As you see, after refactoring we have a lot of buffer variables. They should be merged in one function to reduce numbers of transactions.
The text was updated successfully, but these errors were encountered: