Skip to content

Commit 66c8d2a

Browse files
committed
updates WireGuard oracle to Python3, updates Dockerfile such that it builds again
1 parent 63cbc50 commit 66c8d2a

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

tamarin-docker/Dockerfile

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
# the image for verifying the Tamarin model is based on Python2 because `wireguard.oracle`
2-
# is a Python file that has to be executed with Python2.
3-
FROM python:2.7
1+
FROM debian:bookworm-slim@sha256:df52e55e3361a81ac1bead266f3373ee55d29aa50cf0975d440c2be3483d8ed3
2+
# note that trixie does not have `libtinfo5` anymore (but `libtinfo6` which doesn't work with the current Maude version)
43

54
RUN apt-get update && \
65
apt-get install -y \
76
curl \
8-
zip \
9-
locales \
10-
graphviz \
117
# libtinfo5 is needed by maude
12-
libtinfo5
8+
libtinfo5 \
9+
locales \
10+
# we need python for our Tamarin oracle:
11+
python3 \
12+
# vim is only provided for convenience:
13+
vim \
14+
wget \
15+
zip \
16+
make \
17+
git
1318

1419
# `/.local/bin` is the installation location of Tamarin and its dependencies
1520
RUN mkdir -p /.local/bin
1621
ENV PATH=/.local/bin:$PATH
1722

18-
# install Haskell stack
19-
RUN curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C /.local/bin '*/stack' && \
20-
chmod a+x /.local/bin/stack && \
21-
stack --no-terminal setup
22-
2323
# install Maude
24-
ENV TAMARIN_VERSION 1.6.0
25-
ENV MAUDE_URL https://github.com/tamarin-prover/tamarin-prover/releases/download/$TAMARIN_VERSION/Maude-2.7.1-linux.zip
24+
ENV TAMARIN_RELEASE_VERSION_FOR_MAUDE="1.6.0"
25+
ENV MAUDE_VERSION="2.7.1"
26+
ENV MAUDE_URL="https://github.com/tamarin-prover/tamarin-prover/releases/download/$TAMARIN_RELEASE_VERSION_FOR_MAUDE/Maude-$MAUDE_VERSION-linux.zip"
2627
RUN curl -q -s -S -L --create-dirs -o maude.zip $MAUDE_URL && \
2728
unzip maude.zip -d /.local/bin/ && \
2829
rm maude.zip && \
2930
mv /.local/bin/maude.linux64 /.local/bin/maude && \
3031
chmod a+x /.local/bin/maude
3132

3233
# install tamarin-prover
34+
ENV TAMARIN_VERSION="1.10.0"
3335
RUN curl -q -s -S -L --create-dirs -o tamarin.tar.gz https://github.com/tamarin-prover/tamarin-prover/releases/download/$TAMARIN_VERSION/tamarin-prover-$TAMARIN_VERSION-linux64-ubuntu.tar.gz && \
3436
tar -x -C /.local/bin/ -f tamarin.tar.gz && \
3537
rm tamarin.tar.gz && \
@@ -39,9 +41,9 @@ RUN curl -q -s -S -L --create-dirs -o tamarin.tar.gz https://github.com/tamarin-
3941
USER root
4042
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
4143
locale-gen
42-
ENV LANG en_US.UTF-8
43-
ENV LANGUAGE en_US:en
44-
ENV LC_ALL en_US.UTF-8
44+
ENV LANG="en_US.UTF-8"
45+
ENV LANGUAGE="en_US:en"
46+
ENV LC_ALL="en_US.UTF-8"
4547

4648
WORKDIR /tamarin
4749
COPY dh/model/dh.spthy .

wireguard/model/wireguard.oracle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#!/usr/bin/python2
1+
#!/usr/bin/python3
22

33
import re
4-
import os
54
import sys
6-
debug = True
75

86
lines = sys.stdin.readlines()
97
lemma = sys.argv[1]
@@ -17,7 +15,7 @@ lemma = sys.argv[1]
1715

1816
rank = [] # list of list of goals, main list is ordered by priority
1917
maxPrio = 110
20-
for i in range(0,maxPrio):
18+
for i in range(0, maxPrio):
2119
rank.append([])
2220

2321
# SOURCES LEMMAS
@@ -39,5 +37,4 @@ else:
3937
for listGoals in reversed(rank):
4038
for goal in listGoals:
4139
sys.stderr.write(goal)
42-
print goal
43-
40+
print(goal)

0 commit comments

Comments
 (0)