Skip to content

Commit

Permalink
add compile and clean up scripts for coq
Browse files Browse the repository at this point in the history
  • Loading branch information
jyluo committed May 10, 2018
1 parent 8a6711b commit bf85971
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ dist/
build/
testdata/tmp

# coq source files
coq-proof/coq-source
coq-proof/V8.8.0.tar.gz

# coq proof output files
coq-proof/*.aux
coq-proof/*.vo
coq-proof/*.glob

# corpus
corpus/
worked-benchmarks/
Expand Down Expand Up @@ -48,7 +57,3 @@ manual-tests/insertionTest

# temp files
manual-tests/unused*

# coq files
coq-proof/coq-source
coq-proof/V8.8.0.tar.gz
5 changes: 5 additions & 0 deletions coq-proof/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

rm .*.aux
rm *.vo
rm *.glob
53 changes: 53 additions & 0 deletions coq-proof/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash

# Fail the whole script if any command fails
set -e

myDir="`dirname $0`"
case `uname -s` in
CYGWIN*)
myDir=`cygpath -m $mydir`
;;
esac

if [ "$myDir" = "" ];
then
myDir="."
fi

ROOT=$(cd ${myDir} && pwd)

# use system installed coqc if available
if [[ $(command -v coqc) ]] && [[ $(coqc -v | grep 8.8.0) ]] ; then
COQC=$(command -v coqc)
fi
if [ -z "$COQC" ] && [ -e $ROOT/coq-source/bin/coqc ] ; then
COQC="$ROOT/coq-source/bin/coqc"
fi
echo "Using coqc at $COQC"
$COQC -v

# Compile options
COQC="$COQC -opt"

$COQC TacticalLemmas.v
$COQC IDDefs.v
$COQC MapsDefs.v

$COQC UnitsDefs.v

$COQC ValueDefs.v
$COQC GammaDefs.v
$COQC HeapDefs.v
$COQC SubtypingDefs.v
$COQC GammaHeapCorrespondence.v

$COQC UnitsArithmetics.v

$COQC FieldsDefs.v
$COQC ExpressionsDefs.v
$COQC StatementDefs.v
$COQC ProgramDefs.v
$COQC UnitsSoundness.v

echo "Compilation complete."

0 comments on commit bf85971

Please sign in to comment.