Skip to content

Commit

Permalink
Merge pull request #132 from nuprl/fixes
Browse files Browse the repository at this point in the history
Fixes for Coq and Lean
  • Loading branch information
cassanof authored Feb 18, 2024
2 parents 773d609 + 34dcc46 commit 3609be3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions evaluation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ RUN wget https://binaries2.erlang-solutions.com/ubuntu/pool/contrib/e/elixir/eli
RUN mkdir -p /root/dafny
RUN wget https://github.com/dafny-lang/dafny/releases/download/v4.3.0/dafny-4.3.0-x64-ubuntu-20.04.zip -O /tmp/dafny.zip && unzip /tmp/dafny.zip -d /root/dafny/ && ln -s /root/dafny/dafny/dafny /bin/dafny

# Coq
RUN apt-get install -yqq coq

# Lean
RUN wget https://github.com/leanprover/lean4/releases/download/v4.6.0-rc1/lean-4.6.0-rc1-linux.zip -O /tmp/lean.zip && unzip /tmp/lean.zip -d /root/lean/ && ln -s /root/lean/bin/lean /bin/lean

COPY src /code
WORKDIR /code
ENTRYPOINT ["python3", "main.py"]
4 changes: 2 additions & 2 deletions evaluation/src/containerized_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import eval_matlab
import eval_hs
import eval_elixir
import eval_coq
import eval_v
import eval_lean
import tempfile

Expand Down Expand Up @@ -57,7 +57,7 @@
"m": (eval_matlab.eval_script, ".m"),
"hs": (eval_hs.eval_script, ".hs"),
"elixir": (eval_elixir.eval_script, ".exs"),
"coq": (eval_coq.eval_script, ".v"),
"coq": (eval_v.eval_script, ".v"),
"lean": (eval_lean.eval_script, ".lean"),
}

Expand Down
2 changes: 1 addition & 1 deletion evaluation/src/eval_coq.py → evaluation/src/eval_v.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def eval_script(path: Path):

try:
# sadly there seems to be no way to verify proofs in a coq file without compiling
output = subprocess.run(["coqc -noglob", str(path)], capture_output=True, timeout=5)
output = subprocess.run(["coqc", "-noglob", str(path)], capture_output=True, timeout=5)
outmessage = str(output)

if output.returncode == 0:
Expand Down

0 comments on commit 3609be3

Please sign in to comment.