wu-haoze / Lemur-program-verification

3 stars 0 forks source link

Error while running the tool #1

Open adharshkamath opened 6 months ago

adharshkamath commented 6 months ago

I tried running the run_exp_gpt4.sh script in the code2inv/ directory with the following arguments:

./run_exp_gpt4.sh ./benchmarks/code2inv/c/1

and I got the following exception:

Traceback (most recent call last):
  File "/mnt/c/Users/user/repos/Lemur-program-verification/code2inv/./src/run.py", line 41, in <module>
    v = Verifier(task, VERIFIERS, args)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/user/repos/Lemur-program-verification/code2inv/src/verifier.py", line 38, in __init__
    self.program = Program(r.lines_to_verify, r.replacement)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/user/repos/Lemur-program-verification/code2inv/src/program.py", line 61, in __init__
    if line.strip().split()[0] in ["for", "do", "while"]:
       ~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Before running the run_exp_gpt4.sh script, I installed the packages in requirements.txt and ran the ./build.sh script. I tried running the tool with python 3.11 and python 3.8

Is there any additional setup I need to complete for the tool before running it? Or pass any other CLI arguments?

wu-haoze commented 6 months ago

Hi @adharshkamath , I think those should be sufficient dependencies. I can't seem to reproduce the issue on my end. I'm running python 3.10. Have you installed clang-format on your machine?

adharshkamath commented 6 months ago

Thanks for the response! Yes, I have clang-format-15 installed on my machine from running the build.sh script.

wu-haoze commented 5 months ago

@adharshkamath perhaps try the package versions here?