Skip to content

Commit 760ec8f

Browse files
committed
session files
2 parents e95b6e8 + df89a2e commit 760ec8f

File tree

12 files changed

+246
-72
lines changed

12 files changed

+246
-72
lines changed
+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: replay-why3-proofs
2+
run-name: ${{ github.actor }} setting up environment
3+
on: [push]
4+
env:
5+
CVC4_URL: "https://github.com/CVC4/CVC4-archived/releases/download/1.8/cvc4-1.8-x86_64-linux-opt"
6+
CVC5_URL: "https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.3/cvc5-Linux"
7+
Z3_URL: "https://github.com/Z3Prover/z3/releases/download/z3-4.11.2/z3-4.11.2-x64-glibc-2.31.zip"
8+
jobs:
9+
install-and-test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository code
13+
uses: actions/checkout@v3
14+
- name: Use OCaml
15+
uses: ocaml/setup-ocaml@v2
16+
with:
17+
ocaml-compiler: 4.13.x
18+
- name: install tools with opam
19+
run: |
20+
opam update
21+
opam install why3.1.6.0
22+
opam install alt-ergo.2.4.2
23+
opam install eprover.2.6
24+
# it's possible to install z3 as follows
25+
# opam install z3.4.11.2
26+
- name: download z3, cvc4, and cvc5
27+
run: |
28+
mkdir downloads
29+
cd downloads
30+
wget $CVC4_URL
31+
chmod +x ${CVC4_URL##*/}
32+
mv ${CVC4_URL##*/} /usr/local/bin/cvc4
33+
# echo "deb http://cvc4.cs.nyu.edu/debian/ unstable/" | sudo tee -a /etc/apt/sources.list
34+
# echo "deb-src http://cvc4.cs.nyu.edu/debian/ unstable/" | sudo tee -a /etc/apt/sources.list
35+
# sudo apt-get update
36+
# sudo apt-get install cvc4 --force-yes
37+
wget $CVC5_URL
38+
chmod +x ${CVC5_URL##*/}
39+
mv ${CVC5_URL##*/} /usr/local/bin/cvc5
40+
# also possible to use opam to install z3, but the compilation is very slow
41+
wget $Z3_URL
42+
z3folder=${Z3_URL##*/}
43+
unzip $z3folder
44+
mv ${z3folder%.*}/bin/z3 /usr/local/bin
45+
- name: test installation
46+
run: |
47+
eval $(opam env)
48+
echo "which why3"
49+
which why3
50+
echo "why3 version"
51+
why3 --version
52+
echo "which alt-ergo"
53+
which alt-ergo
54+
echo "alt-ergo --version"
55+
alt-ergo --version
56+
echo "which z3"
57+
which z3
58+
echo "z3 --version"
59+
z3 --version
60+
echo "which cvc4"
61+
which cvc4
62+
echo "cvc4 --version"
63+
cvc4 --version
64+
echo "which cvc5"
65+
which cvc5
66+
echo "cvc5 --version"
67+
cvc5 --version
68+
- name: replay proofs
69+
run: |
70+
echo "eval $(opam env)"
71+
eval $(opam env)
72+
echo "why3 config detect"
73+
why3 config detect
74+
echo "why3 config list-provers"
75+
why3 config list-provers
76+
echo "cd $GITHUB_WORKSPACE"
77+
cd $GITHUB_WORKSPACE
78+
echo "# Replay Status" > $GITHUB_STEP_SUMMARY
79+
echo "./test.sh"
80+
./test.sh

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# Why3-do
2+
3+
[![Why3 proof replay][workflow-badge]][workflow]
4+
5+
[workflow]: https://github.com/haslab/why3do/actions/workflows/set-up-environment.yml
6+
[workflow-badge]: https://img.shields.io/github/actions/workflow/status/haslab/why3do/set-up-environment.yml?label=Proof%20Replay&logo=github
7+
28
A WhyML library for reasoning about state machine specifications and distributed systems
39

410
## Library Modules
511

612
* [stateMachineModels](stateMachineModels): theories for
713
inductive invariants and refinement mappings of state machine
8-
specifications
14+
specifications
915
* [networkModels](networkModels): theories for reasoning about
1016
distributed systems with different network semantics
1117

@@ -20,10 +26,10 @@ A WhyML library for reasoning about state machine specifications and distributed
2026
* [twoPhase](examples/twoPhase): Two-phase handshake protocol, refined
2127
from abstract specification
2228
* [counter](examples/counter): Concurrent counter using a lock,
23-
by refinement from abstract specification
29+
by refinement from abstract specification
2430
* [mutualExclusionConcurrent](examples/mutualExclusionConcurrent):
2531
Mutual exclusion algorithms for concurrent processes, refined from
26-
an abstract specification
32+
an abstract specification
2733
* [waitFreeRegister](examples/waitFreeRegister): Wait-free
2834
implementation of a shared register using non-atomic registers
2935
* [leaderElection](examples/leaderElection/): Chang-Roberts leader
@@ -38,11 +44,11 @@ A WhyML library for reasoning about state machine specifications and distributed
3844

3945
## Example commands
4046

41-
* `why3 ide examples/leaderElection/ChangRoberts.mlw -L examples/leaderElection -L stateMachineModels`: (executed in the top-level folder) launches the Why3 IDE with file `ChangRoberts.mlw`
47+
* `why3 ide examples/leaderElection/ChangRoberts.mlw -L examples/leaderElection -L stateMachineModels`: (executed in the top-level folder) launches the Why3 IDE with file `ChangRoberts.mlw`
4248
* `why3 replay examples/leaderElection/ChangRoberts -L
4349
examples/leaderElection -L stateMachineModels`: replays the proof
4450
session of the same example (assuming all the required SMT solvers are present in the local setup)
4551
* `why3 replay --smoke-detector=top examples/leaderElection/ChangRoberts -L
4652
examples/leaderElection -L stateMachineModels`: runs inconsistency
47-
detection on the proof session of the same example
53+
detection on the proof session of the same example
4854

examples/distributedLockNetwork/LDTDupl/why3session.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<proof prover="7" timelimit="1"><result status="valid" time="0.77" steps="6255"/></proof>
127127
</goal>
128128
<goal name="handleMsg&#39;refn&#39;vc.0.0.0.0.5" expl="postcondition" proved="true">
129-
<proof prover="7" timelimit="5"><result status="valid" time="2.68" steps="42422"/></proof>
129+
<proof prover="5" timelimit="10" memlimit="1000"><result status="valid" time="1.22" steps="158463"/></proof>
130130
</goal>
131131
<goal name="handleMsg&#39;refn&#39;vc.0.0.0.0.6" expl="postcondition" proved="true">
132132
<proof prover="5"><result status="valid" time="1.15" steps="84540"/></proof>

examples/leaderElection/ChangRoberts/why3session.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<goal name="act&#39;vc.0.9.0" expl="postcondition" proved="true">
5757
<transf name="split_vc" proved="true" >
5858
<goal name="act&#39;vc.0.9.0.0" expl="postcondition" proved="true">
59-
<proof prover="3" memlimit="2000"><result status="valid" time="1.51" steps="125186"/></proof>
59+
<proof prover="3" timelimit="20"><result status="valid" time="13.78" steps="904149"/></proof>
6060
</goal>
6161
</transf>
6262
</goal>

0 commit comments

Comments
 (0)