Browse Source

Include super_prove in SymbiYosys Image

T. Meissner 1 month ago
parent
commit
1130c8e27f
4 changed files with 55 additions and 4 deletions
  1. 3
    2
      ghdl-formal.Dockerfile
  2. 25
    0
      packages/fix_super_prove_build.txt
  3. 3
    0
      packages/suprove
  4. 24
    2
      symbiyosys.Dockerfile

+ 3
- 2
ghdl-formal.Dockerfile View File

@@ -48,7 +48,8 @@ RUN apt-get update -qq && \
48 48
     libc6-dev \
49 49
     zlib1g-dev \
50 50
     make \
51
-    python3 && \
51
+    python3 \
52
+    libpython2.7 && \
52 53
     apt-get -y upgrade && apt-get autoclean && apt-get clean && apt-get -y autoremove && \
53 54
     update-ca-certificates && \
54 55
     rm -rf /var/lib/apt/lists/*
@@ -57,4 +58,4 @@ RUN apt-get update -qq && \
57 58
 COPY --from=symbiyosys-ghdlsynth /opt /opt
58 59
 
59 60
 # Enhance path variable
60
-ENV PATH "/opt/ghdl/bin:/opt/symbiyosys/bin:/opt/yosys/bin:/opt/z3/bin:/opt/yices2/bin:/opt/cvc4/bin:/opt/boolector/bin:$PATH"
61
+ENV PATH "/opt/ghdl/bin:/opt/symbiyosys/bin:/opt/yosys/bin:/opt/z3/bin:/opt/yices2/bin:/opt/cvc4/bin:/opt/boolector/bin:/opt/super_prove/bin:$PATH"

+ 25
- 0
packages/fix_super_prove_build.txt View File

@@ -0,0 +1,25 @@
1
+diff -r bde167bca3cd Bip/Main_bip.cc
2
+--- a/Bip/Main_bip.cc	Thu Sep 14 01:44:08 2017 -0700
3
++++ b/Bip/Main_bip.cc	Thu Aug 08 15:02:00 2019 +0200
4
+@@ -508,8 +508,8 @@
5
+ void writeCex(Out& out, NetlistRef N, const Cex& cex, uint orig_num_pis)
6
+ {
7
+     Vec<Pair<int,GLit> > ffs, pis;
8
+-    For_Gatetype(N, gate_Flop, w) ffs.push(tuple(attr_Flop(w).number, w));
9
+-    For_Gatetype(N, gate_PI  , w) pis.push(tuple(attr_PI  (w).number, w));
10
++    For_Gatetype(N, gate_Flop, w) ffs.push(::tuple(attr_Flop(w).number, w));
11
++    For_Gatetype(N, gate_PI  , w) pis.push(::tuple(attr_PI  (w).number, w));
12
+     sort(ffs);
13
+     sort(pis);
14
+
15
+diff -r bde167bca3cd MetaSat/MiniSat2/System.cc
16
+--- a/MetaSat/MiniSat2/System.cc	Thu Sep 14 01:44:08 2017 -0700
17
++++ b/MetaSat/MiniSat2/System.cc	Thu Aug 08 15:02:00 2019 +0200
18
+@@ -20,6 +20,7 @@
19
+
20
+ #include <signal.h>
21
+ #include <stdio.h>
22
++#include <stdlib.h>
23
+
24
+ #include "System.hh"
25
+

+ 3
- 0
packages/suprove View File

@@ -0,0 +1,3 @@
1
+#!/bin/bash
2
+tool=super_prove; if [ "$1" != "${1#+}" ]; then tool="${1#+}"; shift; fi
3
+exec /opt/super_prove/bin/${tool}.sh "$@"

+ 24
- 2
symbiyosys.Dockerfile View File

@@ -37,13 +37,21 @@ RUN apt-get update -qq && \
37 37
 
38 38
 FROM yosys AS symbiyosys
39 39
 
40
+COPY packages/suprove /root/suprove
41
+COPY packages/fix_super_prove_build.txt /root/fix_super_prove_build.txt
42
+
40 43
 RUN apt-get update -qq && \
41 44
     DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
42 45
     autoconf \
43 46
     gperf  \
44 47
     cmake \
45 48
     curl \
46
-    libgmp-dev && \
49
+    libgmp-dev \
50
+    ninja-build \
51
+    g++ \
52
+    python-setuptools \
53
+    python-pip \
54
+    mercurial && \
47 55
     apt-get autoclean && apt-get clean && apt-get -y autoremove && \
48 56
     rm -rf /var/lib/apt/lists/* && \
49 57
     cd /root && \
@@ -80,4 +88,18 @@ RUN apt-get update -qq && \
80 88
     mkdir /opt/boolector/bin && \
81 89
     cp build/bin/boolector /opt/boolector/bin/ && \
82 90
     cp build/bin/btor* /opt/boolector/bin/ && \
83
-    cp deps/btor2tools/bin/btorsim /opt/boolector/bin/
91
+    cp deps/btor2tools/bin/btorsim /opt/boolector/bin/ && \
92
+    cd /root && \
93
+    git clone --recursive https://github.com/sterin/super-prove-build && \
94
+    cd super-prove-build/abc-zz && \
95
+    patch -p1 < /root/fix_super_prove_build.txt && \
96
+    cd .. && \
97
+    mkdir build && \
98
+    cd build && \
99
+    cmake -DCMAKE_BUILD_TYPE=Release -G Ninja .. && \
100
+    ninja && \
101
+    ninja package && \
102
+    tar -C /opt -xzf super_prove*.tar.gz && \
103
+    mv /root/suprove /opt/super_prove/bin/ && \
104
+    chmod +x /opt/super_prove/bin/suprove && \
105
+    rm -rf /root/*