-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alannah Carr
committed
Jan 22, 2024
1 parent
32f429b
commit 7308f25
Showing
11 changed files
with
117 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
:load ntt.cry | ||
:! printf "\nCan't prove the naive NTT.\n" | ||
:! printf "Check the naive NTT.\n" | ||
:check naive_ntt_correct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
:l kyber.tex | ||
|
||
:set tests=3 | ||
|
||
:! printf "\nRunning 'check' commands for concatPlusCorrect property\n\n" | ||
:check concatPlusCorrect`{x=4, y=4} | ||
|
||
:! printf "\nRunning 'check' command for CorrectnessEncodeDecode' property\n\n" | ||
:check CorrectnessEncodeDecode' | ||
|
||
:! printf "\nRunning 'check' command for CorrectnessEncodeDecode property\n\n" | ||
:check CorrectnessEncodeDecode | ||
|
||
:! printf "\nRunning 'check' command for CorrectnessPKE property\n\n" | ||
:check CorrectnessPKE | ||
|
||
:! printf "\nRunning 'check' command for CorrectnessKEM property\n\n" | ||
:check CorrectnessKEM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
pushd $DIR/.. > /dev/null | ||
|
||
NUM_FILES=0 | ||
NUM_BATCH_FILES=0 | ||
BATCH_FILES=() | ||
NUM_FAILS=0 | ||
FAILS=() | ||
|
||
run_batch() { | ||
for FILE in "$1"/*; do | ||
if [ -d "$FILE" ]; then | ||
run_batch "$FILE" | ||
elif [[ -f "$FILE" && "$FILE" == *"$STAGE".bat ]]; then | ||
NUM_FILES=$(($NUM_FILES+1)) | ||
echo "Running $FILE..." | ||
result=$(cryptol -e --batch $FILE) | ||
echo "$result" | ||
if grep -q "Counterexample" <<< "$result"; then | ||
NUM_FAILS=$(($NUM_FAILS+1)) | ||
FAILS+=("$FILE") | ||
else | ||
NUM_BATCH_FILES=$(($NUM_BATCH_FILES+1)) | ||
BATCH_FILES+=("$FILE") | ||
fi | ||
fi | ||
done | ||
} | ||
|
||
run_batch "Common" | ||
run_batch "Primitive" | ||
|
||
echo "" | ||
echo "=== Done running $NUM_FILES Cryptol batch file(s) ===" | ||
|
||
if (( $NUM_BATCH_FILES != 0 )); then | ||
echo "$NUM_BATCH_FILES Cryptol batch files ran:" | ||
for FILE in "${BATCH_FILES[@]}"; do | ||
echo " $FILE" | ||
done | ||
fi | ||
|
||
if (( $NUM_FAILS != 0 )); then | ||
echo "$NUM_FAILS batch file(s) failed:" | ||
for prop in "${FAILS[@]}"; do | ||
echo " $prop" | ||
done | ||
exit 1 | ||
else | ||
echo "All batch files succeeded." | ||
exit 0 | ||
fi | ||
|
||
popd > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters