1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
#!/usr/bin/env sh
frobby=../../bin/frobby
testhelper=../testScripts/testhelper
test="$1"
tmpFile=./frobbyEulerRadicalTmp
tmpFileInverted=./frobbyEulerRadicalInvertedTmp
tmpFileTransposed=./frobbyEulerRadicalTransposedTmp
genPivots="rarevar popvar maxsupp minsupp any random rarest raremax"
stdPivots="popvar rarevar popgcd any random"
shift
$frobby transform -radical -minimize -trimVariables < $test.test > $tmpFile \
2> /dev/null
if [ "$1" = "_full" ];
then
shift;
# try hybrid too
$testhelper euler $tmpFile $test.euler -pivot hybrid $*
if [ $? != 0 ]; then exit 1; fi
# inverting twice should give the same answer
$frobby transform -swap01 < $tmpFile > $tmpFileInverted 2>/dev/null
$testhelper euler $tmpFileInverted $test.euler -swap01 $*
if [ $? != 0 ]; then exit 1; fi
# no transpose
$testhelper euler $tmpFile $test.euler -pivot gen -autotranspose off $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot std -autotranspose off $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot hybrid -autotranspose off $*
if [ $? != 0 ]; then exit 1; fi
# e2, e4, e13, e15, e16 and t24 are mathematical counterexamples
# to the transpose having the same Euler characteristic.
if [ "$test" != "e2" ]; then
if [ "$test" != "e4" ]; then
if [ "$test" != "e13" ]; then
if [ "$test" != "e15" ]; then
if [ "$test" != "e16" ]; then
if [ "$test" != "t24" ]; then
# forced transpose
$frobby transform -transpose < $tmpFile > $tmpFileTransposed 2>/dev/null
$testhelper euler $tmpFileTransposed $test.euler \
-pivot gen -autotranspose off $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFileTransposed $test.euler \
-pivot std -autotranspose off $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFileTransposed $test.euler \
-pivot hybrid -autotranspose off $*
if [ $? != 0 ]; then exit 1; fi
fi fi fi fi fi fi
# try gen pivot selection strategies
for genp in $genPivots; do
$testhelper euler $tmpFile $test.euler -pivot gen -genPivot $genp $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot gen -genPivot $genp -stats $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot gen \
-genPivot ${genp}_maxsupp_${genp}_any $* # composite strategy
if [ $? != 0 ]; then exit 1; fi
done
# try std pivot selection strategies
for stdp in $stdPivots; do
$testhelper euler $tmpFile $test.euler -pivot std -stdPivot $stdp $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot std -stdPivot $stdp -stats $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot std \
-stdPivot widen_${stdp} $* # composite strategy
if [ $? != 0 ]; then exit 1; fi
done
fi
$testhelper euler $tmpFile $test.euler -pivot gen $*
if [ $? != 0 ]; then exit 1; fi
$testhelper euler $tmpFile $test.euler -pivot std $*
if [ $? != 0 ]; then exit 1; fi
rm -f $tmpFile $tmpFileInverted $tmpFileTransposed
|