Skip to content

Commit

Permalink
add 'cvc4' workflow and dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeissner authored and eine committed Jan 13, 2021
1 parent 6016365 commit 63b9a3a
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/cvc4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Authors:
# Unai Martinez-Corral
# Torsten Meissner
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

name: 'cvc4'

on:
pull_request:
push:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:
repository_dispatch:
types: [ cvc4 ]

env:
DOCKER_BUILDKIT: 1

jobs:

cvc4:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

- run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH

- run: dockerBuild pkg:cvc4 cvc4

- run: dockerTestPkg cvc4

- name: Login to DockerHub
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- run: dockerPush pkg:cvc4
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
46 changes: 46 additions & 0 deletions cvc4.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Authors:
# Unai Martinez-Corral
# Torsten Meissner
#
# Copyright 2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

FROM hdlc/build:build AS build

RUN mkdir /usr/share/man/man1 \
&& apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
cmake \
openjdk-11-jre-headless \
libgmp-dev \
python3-toml \
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir /tmp/cvc4 && cd /tmp/cvc4 \
&& curl -fsSL https://codeload.github.com/CVC4/CVC4/tar.gz/master | tar xzf - --strip-components=1 \
&& ./contrib/get-antlr-3.4 \
&& ./contrib/get-cadical \
&& ./configure.sh --cadical \
&& cd build \
&& make -j$(nproc) \
&& make DESTDIR=/opt/cvc4 install

#---

FROM scratch
COPY --from=build /opt/cvc4 /cvc4
7 changes: 6 additions & 1 deletion doc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ To Do:

* https://github.com/khoapham/bitman[BitMan]
* https://hdl.github.io/awesome/items/cocotb[cocotb]
* https://github.com/CVC4/CVC4[CVC4]
* https://hdl.github.io/awesome/items/ecpprog[ecpprog]
* https://hdl.github.io/awesome/items/fujprog[fujprog]
* https://hdl.github.io/awesome/items/iverilog[iverilog]
Expand Down Expand Up @@ -121,6 +120,12 @@ include::shield_gha.adoc[]
* {blank}
+
--
:workflow: cvc4
include::shield_gha.adoc[]
--
* {blank}
+
--
:workflow: superprove
include::shield_gha.adoc[]
--
Expand Down
10 changes: 10 additions & 0 deletions doc/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ boolector:

#---

cvc4:
url: 'https://hdl.github.io/awesome/items/cvc4'
pkg:
- 'cvc4'
in:
- 'formal'
- 'formal:all'

#---

ghdl:
url: 'https://hdl.github.io/awesome/items/ghdl'
pkg:
Expand Down
1 change: 1 addition & 0 deletions formal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ FROM min AS latest

COPY --from=hdlc/pkg:yices2 /yices2 /
COPY --from=hdlc/pkg:boolector /boolector /
COPY --from=hdlc/pkg:cvc4 /cvc4 /

#---

Expand Down
25 changes: 25 additions & 0 deletions graph/graph.dot
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ digraph G {
{ node [shape=note, color=dodgerblue, fontcolor=dodgerblue]
d_base [label="base"];
d_boolector [label="boolector"];
d_cvc4 [label="cvc4"];
d_formal [label="formal"];
d_ghdl [label="ghdl"];
d_ghdlYosysPlugin [label="ghdl-yosys-plugin"];
Expand Down Expand Up @@ -63,6 +64,7 @@ digraph G {
}
{ node [color=mediumblue, fontcolor=mediumblue]
"pkg:boolector"
"pkg:cvc4"
"pkg:ghdl"
"pkg:ghdl-yosys-plugin"
"pkg:gtkwave"
Expand Down Expand Up @@ -342,6 +344,20 @@ digraph G {
"pkg:boolector" -> "t_pkg:boolector";
}

subgraph cluster_cvc4 {
{ rank=same
node [shape=cylinder, color=grey, fontcolor=grey]
"p_cvc4_scratch" [label="scratch"]
"p_cvc4_build:build" [label="build:build"]
}

d_cvc4 -> "pkg:cvc4" [style=dotted];

"t_pkg:cvc4" [shape=folder, color=red, fontcolor=red, label="cvc4.pkg"];

"pkg:cvc4" -> "t_pkg:cvc4";
}

subgraph cluster_superprove {
{ rank=same
node [shape=cylinder, color=grey, fontcolor=grey]
Expand Down Expand Up @@ -388,6 +404,7 @@ digraph G {
{ rank=same
node [shape=cylinder, color=grey, fontcolor=grey]
"p_formal_boolector" [label="pkg:boolector"]
"p_formal_cvc4" [label="pkg:cvc4"]
"p_formal_ghdl" [label="ghdl:yosys"]
"p_formal_symbiyosys" [label="pkg:symbiyosys"]
"p_formal_superprove" [label="pkg:superprove"]
Expand Down Expand Up @@ -429,6 +446,7 @@ digraph G {

{ rank=same
d_boolector
d_cvc4
d_superprove
d_symbiyosys
d_yices2
Expand All @@ -442,9 +460,13 @@ digraph G {
"build:build" -> "p_boolector_build:build" -> d_boolector;
"scratch" -> "p_boolector_scratch" -> d_boolector;

"build:build" -> "p_cvc4_build:build" -> d_cvc4;
"scratch" -> "p_cvc4_scratch" -> d_cvc4;

"ghdl:yosys" -> "p_formal_ghdl" -> d_formal;
"pkg:symbiyosys" -> "p_formal_symbiyosys" -> d_formal;
"pkg:boolector" -> "p_formal_boolector" -> d_formal;
"pkg:cvc4" -> "p_formal_cvc4" -> d_formal;
"pkg:yices2" -> "p_formal_yices2" -> d_formal;
"pkg:superprove" -> "p_formal_superprove" -> d_formal;
"pkg:z3" -> "p_formal_z3" -> d_formal;
Expand Down Expand Up @@ -505,6 +527,8 @@ digraph G {

"p_boolector_scratch" -> "pkg:boolector";

"p_cvc4_scratch" -> "pkg:cvc4";

"p_ghdl_scratch" -> "pkg:ghdl";
"p_ghdl_build:base" -> "ghdl";

Expand Down Expand Up @@ -553,6 +577,7 @@ digraph G {

{
"p_formal_boolector",
"p_formal_cvc4",
"p_formal_yices2"
} -> "formal";

Expand Down
28 changes: 28 additions & 0 deletions test/cvc4.pkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# Authors:
# Unai Martinez-Corral
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./_tree.sh

./_todo.sh

0 comments on commit 63b9a3a

Please sign in to comment.