diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 370df16..bfe2949 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -12,7 +12,7 @@ ARG JASMIN_COMMIT=f2cd3bf19df5a2d1fa5e35a6d5fefd090849b626 ARG EASYCRYPT_COMMIT=2b3bbadffa084466fd3450f367b2102e032c1301 ARG ALTERGO_VERSION=2.5.2 -# note: CVC4_VERSION is not set. Below, you can find and replace the url. +# note: CVC4_VERSION cannot be set here. Below, you can find and replace the corresponding url. ARG Z3_VERSION=4.12.4 SHELL ["/bin/bash", "-c"] @@ -25,9 +25,10 @@ RUN apt-get --quiet --assume-yes update && \ sudo wget curl git time xz-utils libicu-dev \ ocaml ocaml-native-compilers camlp4-extra opam \ autoconf debianutils libgmp-dev pkg-config zlib1g-dev \ - vim build-essential python3 python3-pip m4 libgsl-dev \ + vim build-essential python3 python3-pip m4 libgsl-dev \ libpcre3-dev jq parallel valgrind bash-completion \ - qemu-user-static binutils-arm-linux-gnueabi* gcc-arm-linux-gnueabi + qemu-user-static binutils-arm-linux-gnueabi* gcc-arm-linux-gnueabi \ + bsdmainutils RUN apt-get --quiet --assume-yes clean @@ -57,8 +58,10 @@ RUN cd jasmin_$JASMIN_COMMIT/ && \ # easycrypt ################################################################### +ENV OPAMYES=true OPAMVERBOSE=0 + # alt-ergo (via opam) -RUN export OPAMYES=true OPAMVERBOSE=0 OPAMJOBS=$(nproc) && \ +RUN export OPAMJOBS=$(nproc) && \ opam init --disable-sandboxing && \ opam install opam-depext && \ opam pin add -n alt-ergo $ALTERGO_VERSION && \ @@ -67,9 +70,9 @@ RUN export OPAMYES=true OPAMVERBOSE=0 OPAMJOBS=$(nproc) && \ # cvc4 (for a different version replace the following url) RUN wget --no-verbose --show-progress --progress=bar:force:noscroll --timeout=10 --waitretry=5 --tries=5 \ - -O cvc4 https://github.com/CVC4/CVC4-archived/releases/download/1.8/cvc4-1.8-x86_64-linux-opt && \ + -O cvc4 https://github.com/CVC4/CVC4-archived/releases/download/1.8/cvc4-1.8-x86_64-linux-opt && \ sudo install -D cvc4 /usr/local/bin/ - + # z3 RUN wget --no-verbose --show-progress --progress=bar:force:noscroll --timeout=10 --waitretry=5 --tries=5 \ https://github.com/Z3Prover/z3/releases/download/z3-$Z3_VERSION/z3-$Z3_VERSION-x64-glibc-2.31.zip && \ @@ -77,19 +80,19 @@ RUN wget --no-verbose --show-progress --progress=bar:force:noscroll --timeout=10 sudo install -D z3 /usr/local/bin/ # easycrypt -RUN git clone https://github.com/EasyCrypt/easycrypt.git easycrypt_$EASYCRYPT_COMMIT -RUN eval $(opam env) && \ - cd easycrypt_$EASYCRYPT_COMMIT/ && \ - git checkout $EASYCRYPT_COMMIT && \ - USER=$USER source /home/$USER/.nix-profile/etc/profile.d/nix.sh && \ - export NIXPKGS_ALLOW_UNFREE=1 && \ - nix-channel --update && \ - nix-shell --command "make" && \ - nix-shell --command "./ec.native why3config -why3 why3config.conf" +RUN export OPAMJOBS=$(nproc) && \ + opam pin add -n easycrypt https://github.com/EasyCrypt/easycrypt.git#${EASYCRYPT_COMMIT} && \ + opam depext easycrypt && \ + opam install easycrypt && \ + opam clean + +RUN opam config exec -- why3 config detect + +RUN echo "eval $(opam env)" >> /home/$USER/.bashrc -RUN cd easycrypt_$EASYCRYPT_COMMIT/ && \ - echo -e "#!/bin/bash\n$(pwd)/ec.native -I Jasmin:/home/$USER/jasmin_$JASMIN_COMMIT/eclib/ "\$@" -why3 $(pwd)/why3config.conf" > easycrypt && \ - sudo install -D easycrypt /usr/local/bin/ +RUN mkdir -p /home/$USER/.config/easycrypt/ && \ + echo "[general]" > /home/$USER/.config/easycrypt/easycrypt.conf && \ + echo "idirs = Jasmin:/home/$USER/jasmin_$JASMIN_COMMIT/eclib/" >> /home/$USER/.config/easycrypt/easycrypt.conf # formosa-25519 ############################################################### diff --git a/scripts/reporter/jlog b/scripts/reporter/jlog index b30c7ce..da40785 100755 --- a/scripts/reporter/jlog +++ b/scripts/reporter/jlog @@ -37,7 +37,7 @@ cat_c_file() file=$2 echo -e "${color}" - sed '/\r/d' $file | uniq | cat - + cat $file | col -b echo -e "${RESET}" }