]> matita.cs.unibo.it Git - helm.git/commitdiff
committed the base utils for TPTP processing
authorEnrico Tassi <enrico.tassi@inria.fr>
Mon, 29 May 2006 20:40:35 +0000 (20:40 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Mon, 29 May 2006 20:40:35 +0000 (20:40 +0000)
matita/tests/TPTP/README [new file with mode: 0644]
matita/tests/TPTP/classify.sh [new file with mode: 0755]
matita/tests/TPTP/try.sh [new file with mode: 0755]

diff --git a/matita/tests/TPTP/README b/matita/tests/TPTP/README
new file mode 100644 (file)
index 0000000..eba61fd
--- /dev/null
@@ -0,0 +1,30 @@
+to generate the problems:
+
+  cd ../../../components/binaries/tptp2grafite/
+  make generate
+  cd ../../../matita/tests/TPTP
+  ./classify.sh
+
+to start a run:
+
+  be sure to have matitac.opt in ../../
+  ./try | tee logname
+
+if you have a file containing the list of files to execute, like 
+
+  ...
+  Unsatisfiable/BOO001-1.ma
+  Unsatisfiable/BOO002-1.ma
+  Unsatisfiable/BOO004-2.ma
+  Unsatisfiable/LCL113-2.ma
+  ...
+
+  you can run 
+  
+  ./try filewithproblemlist | tee logname
+
+logname format
+
+  log.SECONDS.DAY-MONTH.MESSAGE
+
+
diff --git a/matita/tests/TPTP/classify.sh b/matita/tests/TPTP/classify.sh
new file mode 100755 (executable)
index 0000000..2fc71e0
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+mkdir Open
+mkdir Unknown
+mkdir Satisfiable
+mkdir Unsatisfiable
+
+for X in [A-Z]*.ma; do
+  echo $X
+  STATUS=`grep "^(\* *Status *:" $X`
+  if [ `echo $STATUS | grep Open | wc -l` -eq 1 ]; then
+    mv $X Open/
+  fi
+  if [ `echo $STATUS | grep Unknown | wc -l` -eq 1 ]; then
+    mv $X Unknown/
+  fi
+  if [ `echo $STATUS | grep Satisfiable | wc -l` -eq 1 ]; then
+    mv $X Satisfiable/
+  fi
+  if [ `echo $STATUS | grep Unsatisfiable | wc -l` -eq 1 ]; then
+    mv $X Unsatisfiable/
+  fi
+done
diff --git a/matita/tests/TPTP/try.sh b/matita/tests/TPTP/try.sh
new file mode 100755 (executable)
index 0000000..eb1c3f9
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+  TODO=Unsatisfiable/[A-Z]*.ma
+else
+  TODO=`cat $1`
+fi
+
+mkdir -p logs
+
+for X in $TODO; do
+  echo -n "$X ... "
+  LOGNAME=logs/log.`basename $X`
+  ../../matitac.opt $X > $LOGNAME 2>&1
+  if [ `grep "Found a proof" $LOGNAME | wc -l` -gt 0 ]; then
+    TIME=`grep "TIME NEEDED" $LOGNAME`
+    RATING=`grep "Rating" $X | sed 's/v.*//' | sed 's/(\*//'`
+    echo OK $TIME $RATING
+  else
+    echo FAIL
+  fi
+done