Skip to content

Commit

Permalink
changes in gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
alex28sh committed Sep 22, 2024
1 parent ecdb6be commit a07712c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 51 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ run_nagini.py
/tmp
results
results/*
/log_tries/
/log_tries/*
43 changes: 0 additions & 43 deletions benchesResults/Nagini-Bench/tries_16_09.json

This file was deleted.

23 changes: 15 additions & 8 deletions verified_cogen/tools/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ def __init__(self, shell: str, verifier_cmd: str, timeout: int = 60):
self.timeout = timeout

def verify(self, file_path: Path) -> Optional[tuple[bool, str, str]]:
proc = subprocess.Popen(
[self.shell, "-i", "-l", "-c", f'{self.verifier_cmd} "{file_path}"'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
try:
out, err = proc.communicate(timeout=self.timeout)
return proc.returncode == 0, out.decode(), err.decode()
res = subprocess.run(
'{} -i -l -c "{} "{}""; exit'.format(
self.shell, self.verifier_cmd, file_path
),
capture_output=True,
shell=True,
timeout=self.timeout,
)
except subprocess.TimeoutExpired:
os.killpg(os.getpgid(proc.pid), signal.SIGTERM)
os.system("killall z3")
return None
return (
res.returncode == 0,
res.stdout.decode("utf-8"),
res.stderr.decode("utf-8"),
)

0 comments on commit a07712c

Please sign in to comment.