| 1 |
#!/bin/bash |
| 2 |
cvc5=cvc5 |
| 3 |
DIR=${CVC5_HOME} |
| 4 |
|
| 5 |
# To be run in the build directory where cvc5 is built. |
| 6 |
|
| 7 |
echo "[install-rare-rewrites] Generate cvc5 API include files..." |
| 8 |
make gen-rewrites |
| 9 |
cp include/cvc5/cvc5_proof_rule.h $DIR/include/cvc5/cvc5_proof_rule.h |
| 10 |
|
| 11 |
echo "[install-rare-rewrites] Install cvc5..." |
| 12 |
make -j$(nproc) |
| 13 |
|
| 14 |
echo "[install-rare-rewrites] Generate CPC Eunoia signature..." |
| 15 |
|
| 16 |
REWRITE_SIG=$DIR/proofs/eo/cpc/rules/Rewrites.eo |
| 17 |
|
| 18 |
cat << EOF > $REWRITE_SIG |
| 19 |
(include "../theories/Builtin.eo") |
| 20 |
(include "../theories/Arrays.eo") |
| 21 |
(include "../theories/Arith.eo") |
| 22 |
(include "../theories/ArithBvConv.eo") |
| 23 |
(include "../theories/Reals.eo") |
| 24 |
(include "../theories/BitVectors.eo") |
| 25 |
(include "../theories/Strings.eo") |
| 26 |
(include "../theories/Sets.eo") |
| 27 |
|
| 28 |
EOF |
| 29 |
|
| 30 |
echo "(check-sat)" | $cvc5 -o rare-db --force-logic=ALL --produce-proofs --proof-granularity=dsl-rewrite | sed '$ d' >> $REWRITE_SIG |
| 31 |
|
| 32 |
# use eo::define instead of let |
| 33 |
sed -i 's/(let/(eo::define/g' $REWRITE_SIG |
| 34 |
|
| 35 |
echo "[install-rare-rewrites] Generate expert CPC Eunoia signature..." |
| 36 |
|
| 37 |
EXPERT_REWRITE_SIG=$DIR/proofs/eo/cpc/expert/rules/RewritesExpert.eo |
| 38 |
|
| 39 |
cat << EOF > $EXPERT_REWRITE_SIG |
| 40 |
(include "../../theories/Reals.eo") |
| 41 |
|
| 42 |
(include "../theories/SetsExt.eo") |
| 43 |
(include "../theories/Transcendentals.eo") |
| 44 |
|
| 45 |
EOF |
| 46 |
|
| 47 |
|
| 48 |
echo "(check-sat)" | $cvc5 -o rare-db-expert --force-logic=ALL --produce-proofs --proof-granularity=dsl-rewrite | sed '$ d' >> $EXPERT_REWRITE_SIG |
| 49 |
|
| 50 |
# use eo::define instead of let |
| 51 |
sed -i 's/(let/(eo::define/g' $EXPERT_REWRITE_SIG |