| author | wenzelm |
| Wed, 03 Jul 2013 23:42:07 +0200 | |
| changeset 52518 | c9a9359e0285 |
| parent 52124 | c54170ee898b |
| child 54434 | e275d520f49d |
| permissions | -rwxr-xr-x |
| 46319 | 1 |
#!/usr/bin/env bash |
2 |
# |
|
3 |
# Author: Jasmin Blanchette |
|
4 |
# |
|
5 |
# DESCRIPTION: Sledgehammer for TPTP |
|
6 |
||
7 |
||
8 |
PRG="$(basename "$0")" |
|
9 |
||
10 |
function usage() {
|
|
11 |
echo |
|
| 47670 | 12 |
echo "Usage: isabelle $PRG TIMEOUT FILES" |
| 46319 | 13 |
echo |
14 |
echo " Runs Sledgehammer on TPTP problems." |
|
| 47670 | 15 |
echo " Each problem is allocated at most TIMEOUT seconds." |
| 46319 | 16 |
echo |
17 |
exit 1 |
|
18 |
} |
|
19 |
||
20 |
[ "$#" -eq 0 -o "$1" = "-?" ] && usage |
|
21 |
||
22 |
SCRATCH="Scratch_${PRG}_$$_${RANDOM}"
|
|
23 |
||
| 47670 | 24 |
TIMEOUT=$1 |
25 |
shift |
|
26 |
||
| 46319 | 27 |
for FILE in "$@" |
28 |
do |
|
| 46324 | 29 |
echo "theory $SCRATCH imports \"$TPTP_HOME/ATP_Problem_Import\" begin \ |
|
47794
4ad62c5f9f88
thread theory cleanly and use "smt" method rather than Sledgehammer for Z3 (because of obscure debilitating bug)
blanchet
parents:
47670
diff
changeset
|
30 |
ML {* ATP_Problem_Import.sledgehammer_tptp_file @{theory} ($TIMEOUT) \"$FILE\" *} end;" \
|
| 46319 | 31 |
> /tmp/$SCRATCH.thy |
|
52124
c54170ee898b
pass noninteractive flag -- necessary to run under CASC's "runsolver" program
blanchet
parents:
52096
diff
changeset
|
32 |
"$ISABELLE_PROCESS" -q -e "use_thy \"/tmp/$SCRATCH\"; exit 1;" HOL-TPTP | grep --line-buffered -v "^###\|^PROOF FAILED for depth\|^Failure node\|inferences so far. Searching to depth\|^val it = (): unit" |
| 46319 | 33 |
done |