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.

110 lines
3.3 KiB

  1. FROM debian:buster-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. python3 \
  19. libboost-system-dev \
  20. libboost-python-dev \
  21. libboost-filesystem-dev \
  22. clang \
  23. curl \
  24. git && \
  25. apt-get autoclean && apt-get clean && apt-get -y autoremove && \
  26. update-ca-certificates && \
  27. rm -rf /var/lib/apt/lists/* && \
  28. cd /root && \
  29. git clone https://github.com/YosysHQ/yosys.git yosys && \
  30. cd yosys && \
  31. make -j$(nproc) PREFIX=/opt/yosys && \
  32. make install PREFIX=/opt/yosys && \
  33. mkdir /opt/yosys/doc && \
  34. curl http://www.clifford.at/yosys/files/yosys_manual.pdf -o /opt/yosys/doc/yosys_manual.pdf
  35. # SymbiYosys, Solvers
  36. FROM yosys AS symbiyosys
  37. COPY packages/suprove /root/suprove
  38. COPY packages/fix_super_prove_build.txt /root/fix_super_prove_build.txt
  39. RUN apt-get update -qq && \
  40. DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
  41. autoconf \
  42. gperf \
  43. cmake \
  44. libgmp-dev \
  45. ninja-build \
  46. g++ \
  47. python-setuptools \
  48. python-pip \
  49. python-wheel \
  50. mercurial && \
  51. apt-get autoclean && apt-get clean && apt-get -y autoremove && \
  52. rm -rf /var/lib/apt/lists/* && \
  53. cd /root && \
  54. git clone https://github.com/YosysHQ/SymbiYosys.git symbiyosys && \
  55. cd symbiyosys && \
  56. make install PREFIX=/opt/symbiyosys && \
  57. mkdir /opt/symbiyosys/doc && \
  58. curl https://symbiyosys.readthedocs.io/_/downloads/en/latest/pdf/ -o /opt/symbiyosys/doc/symbiyosys_manual.pdf && \
  59. cd .. && \
  60. git clone https://github.com/Z3Prover/z3.git z3 && \
  61. cd z3 && \
  62. python scripts/mk_make.py && \
  63. cd build && \
  64. make -j$(nproc) PREFIX=/opt/z3 && \
  65. make install PREFIX=/opt/z3 && \
  66. cd /root && \
  67. git clone https://github.com/SRI-CSL/yices2.git yices2 && \
  68. cd yices2 && \
  69. autoconf && \
  70. ./configure --prefix=/opt/yices2 && \
  71. make -j$(nproc) && \
  72. make install && \
  73. cd /opt && \
  74. mkdir cvc4 && mkdir cvc4/bin && \
  75. curl -L -o cvc4/bin/cvc4 https://github.com/CVC4/CVC4/releases/download/1.7/cvc4-1.7-x86_64-linux-opt && \
  76. chmod +x cvc4/bin/cvc4 && \
  77. cd /root && \
  78. git clone https://github.com/boolector/boolector && \
  79. cd boolector && \
  80. ./contrib/setup-btor2tools.sh && \
  81. ./contrib/setup-lingeling.sh && \
  82. ./configure.sh && \
  83. make -C build -j$(nproc) PREFIX=/opt/boolector && \
  84. cd /root/boolector && \
  85. mkdir /opt/boolector && \
  86. mkdir /opt/boolector/bin && \
  87. cp build/bin/boolector /opt/boolector/bin/ && \
  88. cp build/bin/btor* /opt/boolector/bin/ && \
  89. cp deps/btor2tools/bin/btorsim /opt/boolector/bin/ && \
  90. cd /root && \
  91. git clone --recursive https://github.com/sterin/super-prove-build && \
  92. cd super-prove-build/abc-zz && \
  93. patch -p1 < /root/fix_super_prove_build.txt && \
  94. cd .. && \
  95. mkdir build && \
  96. cd build && \
  97. cmake -DCMAKE_BUILD_TYPE=Release -G Ninja .. && \
  98. ninja && \
  99. ninja package && \
  100. tar -C /opt -xzf super_prove*.tar.gz && \
  101. mv /root/suprove /opt/super_prove/bin/ && \
  102. chmod +x /opt/super_prove/bin/suprove && \
  103. rm -rf /root/*