Skip to content

Commit

Permalink
improving script
Browse files Browse the repository at this point in the history
  • Loading branch information
HanielB committed Mar 2, 2024
1 parent 7b9592f commit a22a83d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions contrib/get-alethe-checker
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ cat << EOF > $BASE_DIR/bin/cvc5-alethe-check.sh
#!/usr/bin/env bash
echo "=== Generate proof: \$@"
$BASE_DIR/bin/cvc5-alethe-proof.sh \$@
echo "> \$2.alethe"
$BASE_DIR/bin/cvc5-alethe-proof.sh \$@ > \$2.alethe
echo "=== Check proof with Carcara"
$BASE_DIR/bin/alethe-check.sh \$2.proof \$2
$BASE_DIR/bin/alethe-check.sh \$2.alethe \$2
EOF
chmod +x $BASE_DIR/bin/cvc5-alethe-check.sh

cat << EOF > $BASE_DIR/bin/cvc5-alethe-proof.sh
#!/usr/bin/env bash
# call cvc5 and remove the first line of the output (should be "unsat")
\$@ --dump-proofs --proof-format=alethe | tail -n +2 > \$2.alethe
\$@ --dump-proofs --proof-format=alethe | tail -n +2
EOF
chmod +x $BASE_DIR/bin/cvc5-alethe-proof.sh

Expand All @@ -66,9 +67,9 @@ chmod +x $BASE_DIR/bin/alethe-check.sh

echo ""
echo "========== How to use Carcara =========="
echo "Generate a Alethe proof with cvc5:"
echo " $CVC_DIR/deps/bin/cvc5-alethe-proof.sh cvc5 <input file>"
echo "Generate a Alethe proof with cvc5 (for terms printed without sharing, use --dag-thresh=0):"
echo " $CVC_DIR/deps/bin/cvc5-alethe-proof.sh cvc5 <input file> <options>"
echo "Check a generated proof:"
echo " $CVC_DIR/deps/bin/alethe-check.sh <proof file> <input file>"
echo "Run cvc5 and check the generated proof:"
echo " $CVC_DIR/deps/bin/cvc5-alethe-check.sh cvc5 <input file>"
echo " $CVC_DIR/deps/bin/cvc5-alethe-check.sh cvc5 <input file> <options>"

0 comments on commit a22a83d

Please sign in to comment.