Skip to content

Commit

Permalink
Fix dafny
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlaif committed Dec 26, 2024
1 parent b4a3cb3 commit d3b1099
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions dafny/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ mkdir -p "$(dirname "$OUT")"

cd "$(dirname "$0")/dafny"
OUTPUT=$(Binaries/Dafny /deprecation:0 /compile:0 /timeLimit:$3 /print:$OUT.bpl /vcsCores:1 /proverLog:$OUT-@[email protected] "$1")

# Check if "$1.expect" exists and if so if it contains " Error:", then it's ok for the above to fail
if [ $? -eq 0 ] || ([ -f "$1.expect" ] && grep -q " Error:" "$1.expect"); then
if [ $? -eq 0 ]; then
exit 0
else
echo "[ERROR] $OUTPUT"
exit 1
fi
while read -r out_line; do
# Return error if the output line contains " Error:" but does not start with
# the filename. This means it's not a verification error pointing to the file.
if grep -q " Error:" <<< "$out_line" && ! [[ "$1" =~ "$(echo "$out_line" | sed "s|\.dfy.*|.dfy|g")" ]]; then
echo "[ERROR] $OUTPUT"
exit 1
fi
done <<< "$OUTPUT"
2 changes: 1 addition & 1 deletion make_smt2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

VERIFIERS="$@"
if [ -z "$VERIFIERS" ]; then
VERIFIERS="silicon carbon"
VERIFIERS="dafny silicon carbon"
fi

git submodule update --init --recursive &> /dev/null
Expand Down

0 comments on commit d3b1099

Please sign in to comment.