squaresLab / genprog-code

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

Errors when running example tests #39

Open xinzhuohuZJU opened 6 months ago

xinzhuohuZJU commented 6 months ago

Hi, I think I have successfully built Genprog using opam 4.12.0 on my Linux desktop. My OS is Ubuntu 22.04.4 LTS.

I tried running some test scripts located in the test/ directory, however, none of them can run continuously and generate a repaired code. I really have no idea what can be the roots of these problem, and I would be immensely grateful if someone could offer some insights or suggestions!

The following are my terminal's output when executing these tests:

When I tried to execute ./gcd-0-runsatall.test, it aborted due to the compilation failure of coverage.c file.

cachingRepresentation: sanity checking begins
    n1: false (0)
    p1: true (1)
    p2: true (1)
    p3: true (1)
    p4: true (1)
    p5: true (1)
cachingRepresentation: sanity checking passed (time_taken = 1.0222)
faultLocRep: compute_localization: fault_scheme: path, fix_scheme: default
Rep: coverage_sourcename: /home/xinzhuo/Projects/SE/genprog-code/test/gcd-test/./coverage.c
cilRep: instrumenting for fault localization
cilRep: done instrumenting for fault localization
    /home/xinzhuo/Projects/SE/genprog-code/test/gcd-test/./coverage.c original fails to compile

ABORT:

ERROR: faultLocRep: compute_localization: cannot compile /home/xinzhuo/Projects/SE/genprog-code/test/gcd-test/./coverage.c

Variant Test Case Queries: 0
"Test Suite Evaluations": 0

Compile Failures: 1
Wall-Clock Seconds Elapsed: 1.03757
  Activity Name                     Count Seconds = Percent of Total Time
  sanity_check                          1   0.000 = 0.0422026%
  compile                               2   0.018 = 1.7089%
  test                                  6   1.008 = 98.2401%
  TOTAL                                     1.026 = 98.7187% (avg CPU usage)
xinzhuohuZJU commented 6 months ago

Another error I have encounter: when I tried to execute ./gcd-string-0-runsatall.test in the test directory, it is aborted due to 2 sys_errors loading "gcd.cache" and "./#include" unsuccessfully.

Exception in loading: Sys_error("gcd.cache: No such file or directory")
../../src/repair aborting: Sys_error("./#include <stdio.h>: No such file or directory")
Rep: saving test cache

Variant Test Case Queries: 0
"Test Suite Evaluations": 0

Compile Failures: 0
Wall-Clock Seconds Elapsed: 0.000425816
  Activity Name                     Count Seconds = Percent of Total Time
  TOTAL                                     0.000 = 0% (avg CPU usage)
Fatal error: exception Sys_error("./#include <stdio.h>: No such file or directory")