Skip to content

Commit

Permalink
Fall back to Z3 4.8.10 on AWSLC/BLST proofs
Browse files Browse the repository at this point in the history
This updates the `what4-solvers` snapshot to one that includes both Z3 4.8.10
and 4.8.14. While we continue to use 4.8.14 for most CI purposes, we fall back
to 4.8.10 specifically when running the AWSLC or BLST proofs, which have been
known to nondeterministically time out with those versions. Hopefully, this
should resolve our CI woes.

This avoids the main issue in #1772, although the underlying cause still has yet
to be investigated.
  • Loading branch information
RyanGlScott committed Dec 6, 2022
1 parent bde217a commit 62936cb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ zip_dist_with_solvers() {
cp "$BIN/cvc4" dist/bin/
cp "$BIN/yices" dist/bin/
cp "$BIN/yices-smt2" dist/bin/
# Z3 4.8.14 has been known to nondeterministically time out with the AWSLC
# and BLST proofs, so we include both 4.8.10 and 4.8.14 so that we can fall
# back to 4.8.10 (a version known to work with the AWSLC and BLST proofs)
# where necessary. See #1772.
cp "$BIN/z3" dist/bin/
cp "$BIN/z3-4.8.10" dist/bin/
cp "$BIN/z3-4.8.14" dist/bin/
cp -r dist "$sname"
tar -cvzf "$sname".tar.gz "$sname"
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
# ./saw-remote-api/Dockerfile
# ./s2nTests/scripts/blst-entrypoint.sh
# ./s2nTests/docker/saw.dockerfile
SOLVER_PKG_VERSION: "snapshot-20220902"
SOLVER_PKG_VERSION: "snapshot-20221205"

OCAML_VERSION: 4.09.x

Expand Down
3 changes: 3 additions & 0 deletions s2nTests/scripts/awslc-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cd /saw-script/aws-lc-verification/SAW
rm bin/saw
cp /saw-bin/saw bin/saw
cp /saw-bin/abc bin/abc
# Z3 4.8.14 has been known to nondeterministically time out with the AWSLC
# proofs, so fall back to 4.8.10 instead. See #1772.
cp /saw-bin/z3-4.8.10 bin/z3

export PATH=/saw-script/aws-lc-verification/SAW/bin:$PATH
export CRYPTOLPATH=/saw-script/aws-lc-verification/cryptol-specs
Expand Down
5 changes: 4 additions & 1 deletion s2nTests/scripts/blst-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ cd /workdir
./scripts/install.sh
cp /saw-bin/saw bin/saw

wget --quiet -O solvers.zip "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
wget --quiet -O solvers.zip "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20221205/ubuntu-22.04-bin.zip"
(cd bin && unzip -o ../solvers.zip)
chmod +x bin/*
# Z3 4.8.14 has been known to nondeterministically time out with the BLST
# proofs, so fall back to 4.8.10 instead. See #1772.
cp bin/z3-4.8.10 bin/z3

export PATH=/workdir/bin:$PATH
export CRYPTOLPATH=/workdir/cryptol-specs:/workdir/spec
Expand Down
2 changes: 1 addition & 1 deletion saw-remote-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN cabal v2-update && cabal v2-build -j exe:saw-remote-api
RUN mkdir -p /home/saw/rootfs/usr/local/bin
RUN cp $(cabal v2-exec which saw-remote-api) /home/saw/rootfs/usr/local/bin/saw-remote-api
WORKDIR /home/saw//rootfs/usr/local/bin
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20221205/ubuntu-22.04-bin.zip"
RUN unzip solvers.zip && rm solvers.zip && chmod +x *
USER root
RUN chown -R root:root /home/saw/rootfs
Expand Down
2 changes: 1 addition & 1 deletion saw/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN cabal v2-build
RUN mkdir -p /home/saw/rootfs/usr/local/bin
RUN cp $(cabal v2-exec which saw) /home/saw/rootfs/usr/local/bin/saw
WORKDIR /home/saw//rootfs/usr/local/bin
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20221205/ubuntu-22.04-bin.zip"
RUN unzip solvers.zip && rm solvers.zip && chmod +x *
USER root
RUN chown -R root:root /home/saw/rootfs
Expand Down

0 comments on commit 62936cb

Please sign in to comment.