You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.6 KiB

3 years ago
  1. FROM debian:bullseye-slim as yosys
  2. ## YOSYS ##
  3. # Get yosys dependencies
  4. RUN apt-get update -qq && \
  5. DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
  6. ca-certificates \
  7. gcc \
  8. make \
  9. bison \
  10. flex \
  11. libreadline-dev \
  12. gawk \
  13. tcl-dev \
  14. libffi-dev \
  15. graphviz \
  16. xdot \
  17. pkg-config \
  18. libboost-system-dev \
  19. libboost-python-dev \
  20. libboost-filesystem-dev \
  21. clang \
  22. curl \
  23. git && \
  24. apt-get autoclean && apt-get clean && apt-get -y autoremove && \
  25. update-ca-certificates && \
  26. rm -rf /var/lib/apt/lists/* && \
  27. cd /root && \
  28. git clone https://github.com/YosysHQ/yosys.git yosys && \
  29. cd yosys && \
  30. make -j$(nproc) PREFIX=/opt/yosys && \
  31. make install PREFIX=/opt/yosys && \
  32. mkdir /opt/yosys/doc && \
  33. curl https://github.com/YosysHQ/yosys-manual-build/releases/download/manual/manual.pdf -o /opt/yosys/doc/yosys_manual.pdf
  34. # SymbiYosys, Solvers
  35. FROM yosys AS symbiyosys
  36. COPY packages/suprove /root/suprove
  37. RUN apt-get update -qq && \
  38. DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
  39. autoconf \
  40. gperf \
  41. cmake \
  42. libgmp-dev \
  43. ninja-build \
  44. g++ \
  45. python-setuptools \
  46. python3-pip \
  47. python-wheel-common \
  48. python-dev-is-python2 \
  49. mercurial && \
  50. apt-get autoclean && apt-get clean && apt-get -y autoremove && \
  51. rm -rf /var/lib/apt/lists/* && \
  52. cd /root && \
  53. git clone https://github.com/YosysHQ/SymbiYosys.git symbiyosys && \
  54. cd symbiyosys && \
  55. make install PREFIX=/opt/symbiyosys && \
  56. mkdir /opt/symbiyosys/doc && \
  57. curl https://symbiyosys.readthedocs.io/_/downloads/en/latest/pdf/ -o /opt/symbiyosys/doc/symbiyosys_manual.pdf && \
  58. cd .. && \
  59. git clone https://github.com/Z3Prover/z3.git z3 && \
  60. cd z3 && \
  61. python3 scripts/mk_make.py && \
  62. cd build && \
  63. make -j$(nproc) PREFIX=/opt/z3 && \
  64. make install PREFIX=/opt/z3 && \
  65. cd /root && \
  66. git clone https://github.com/SRI-CSL/yices2.git yices2 && \
  67. cd yices2 && \
  68. autoconf && \
  69. ./configure --prefix=/opt/yices2 && \
  70. make -j$(nproc) && \
  71. make install && \
  72. cd /opt && \
  73. mkdir cvc4 && mkdir cvc4/bin && \
  74. curl -L -o cvc4/bin/cvc4 https://github.com/CVC4/CVC4/releases/download/1.7/cvc4-1.7-x86_64-linux-opt && \
  75. chmod +x cvc4/bin/cvc4 && \
  76. cd /root && \
  77. git clone https://github.com/boolector/boolector && \
  78. cd boolector && \
  79. ./contrib/setup-btor2tools.sh && \
  80. ./contrib/setup-lingeling.sh && \
  81. ./configure.sh && \
  82. make -C build -j$(nproc) PREFIX=/opt/boolector && \
  83. cd /root/boolector && \
  84. mkdir /opt/boolector && \
  85. mkdir /opt/boolector/bin && \
  86. cp build/bin/boolector /opt/boolector/bin/ && \
  87. cp build/bin/btor* /opt/boolector/bin/ && \
  88. cp deps/btor2tools/bin/btorsim /opt/boolector/bin/ && \
  89. cd /root && \
  90. git clone https://github.com/bitwuzla/bitwuzla && \
  91. cd bitwuzla && \
  92. ./contrib/setup-btor2tools.sh && \
  93. ./contrib/setup-lingeling.sh && \
  94. ./contrib/setup-symfpu.sh && \
  95. ./configure.sh && \
  96. make -C build -j$(nproc) PREFIX=/opt/bitwuzla && \
  97. mkdir -p /opt/bitwuzla/bin && \
  98. cp build/bin/bitwuzla /opt/bitwuzla/bin/ && \
  99. cd /root && \
  100. git clone --recursive https://github.com/sterin/super-prove-build && \
  101. cd super-prove-build && \
  102. mkdir build && \
  103. cd build && \
  104. cmake -DCMAKE_BUILD_TYPE=Release -G Ninja .. && \
  105. ninja && \
  106. ninja package && \
  107. tar -C /opt -xzf super_prove*.tar.gz && \
  108. mv /root/suprove /opt/super_prove/bin/ && \
  109. chmod +x /opt/super_prove/bin/suprove && \
  110. rm -rf /root/*