Skip to content

Instantly share code, notes, and snippets.

@KPCCoiL
Created November 4, 2019 13:38
Show Gist options
  • Save KPCCoiL/0d244ca274923782573e7f2fb15aefa2 to your computer and use it in GitHub Desktop.
Save KPCCoiL/0d244ca274923782573e7f2fb15aefa2 to your computer and use it in GitHub Desktop.
Super rough stuff with no security consideration
#!/bin/sh
COOKIE="cookie.txt"
CURL="curl -b $COOKIE"
TOPPROVER='https://top-prover.top'
cat <<EOF > Makefile
login:
curl -X POST -F 'user=$TOPPROVER_USER' -F 'password=$TOPPROVER_PASSWORD' $TOPPROVER/login -c $COOKIE
retrieve: login
$CURL $TOPPROVER/problem_content/$1 > Problem.v
coqc Problem.v &
$CURL $TOPPROVER/example_content/$1 > Solution.v
$CURL $TOPPROVER/checker_content/$1 > Checker.v
submit: login
coqc Checker.v && exit 1
$CURL -X POST -F 'solution=@Solution.v' $TOPPROVER/submit/$1
clean:
rm $COOKIE Checker.v
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment