squaresLab / genprog-code

GenProg: heuristic, GP-based automatic program repair for C.
89 stars 27 forks source link

genprog assertion failure when --edit-script and --minimization are both supplied #28

Open pdreiter opened 5 years ago

pdreiter commented 5 years ago

when the minimal set is found by genprog, get an assertion

Entering delta, pass number 7...
genprog aborting: File "minimization.ml", line 128, characters 9-15: Assertion failed
Rep: saving test cache

Variant Test Case Queries: 39
"Test Suite Evaluations": 9.75

Compile Failures: 0
Wall-Clock Seconds Elapsed: 1.78932
  Activity Name                     Count Seconds = Percent of Total Time
  rebuild files                       250   0.663 = 99.9983%
  TOTAL                                     0.663 = 36.9023% (avg CPU usage)
Fatal error: exception File "minimization.ml", line 128, characters 9-15: Assertion failed

I did some debugging and it looks like this is because min_rep#construct_rep from delta_debugging @ src/minimization.ml line 280 doesn't take into account that the minimized input is an edit list and always treats the input as a diff.

pdreiter commented 5 years ago

How to duplicate [minimal case] @jlacomis :

1) Build manybugs bug gzip-2009-09-26-a1d3d4019d-f17cbd13a1 2) Launch bugzoo container --with genprog for gzip-2009-09-26-a1d3d4019d-f17cbd13a1 3) Run echo "a(485,306)" > test.0.incoming.txt && genprog configuration-default --minimization --edit-script --incoming-pop test.0.incoming.txt