Tritlo / PropR

Genetic program repair using GHC
MIT License
30 stars 2 forks source link

Fix function fit scope #89

Closed Tritlo closed 3 years ago

Tritlo commented 3 years ago

It fixes the function fits issue, but it's givin weird results for the Main module faked (probably due to the faking, i.e. it's in scope in a weird way):

      tests/TestUtils.hs:98:
      Fix mismatch!
      Expected:
      diff --git a/tests/cases/mainMod.hs b/tests/cases/mainMod.hs
      --- a/tests/cases/mainMod.hs
      +++ b/tests/cases/mainMod.hs
      @@ -6,1 +6,1 @@ x = B
      -x = B
      +x = A

      But got:

      Actual fixes were:

and then there's the refinement hole fits:

      tests/TestUtils.hs:156:
      Fix mismatch!
      Expected:
      diff --git a/tests/cases/SimpleRefinement.hs b/tests/cases/SimpleRefinement.hs
      --- a/tests/cases/SimpleRefinement.hs
      +++ b/tests/cases/SimpleRefinement.hs
      @@ -4,1 +4,1 @@ f = foldr (-) 1
      -f = foldr (-) 1
      +f = (foldl (+) two)

      diff --git a/tests/cases/SimpleRefinement.hs b/tests/cases/SimpleRefinement.hs
      --- a/tests/cases/SimpleRefinement.hs
      +++ b/tests/cases/SimpleRefinement.hs
      @@ -4,1 +4,1 @@ f = foldr (-) 1
      -f = foldr (-) 1
      +f = (foldr (+) two)

      But got:

      Actual fixes were:

      Number of fixes:
      0

but at least it's not cauing errors when we try to check fixes!

Tritlo commented 3 years ago

It works!