9966
|
1 |
#!/bin/bash
|
|
2 |
#
|
|
3 |
# $Id$
|
|
4 |
# Author: Markus Wenzel, TU Muenchen
|
|
5 |
# License: GPL (GNU GENERAL PUBLIC LICENSE)
|
|
6 |
#
|
|
7 |
# DESCRIPTION: fix theorem names related to SOME (Eps) in HOL
|
|
8 |
|
|
9 |
|
|
10 |
## diagnostics
|
|
11 |
|
|
12 |
PRG=$(basename "$0")
|
|
13 |
|
|
14 |
function usage()
|
|
15 |
{
|
|
16 |
echo
|
|
17 |
echo "Usage: $PRG [FILES|DIRS...]"
|
|
18 |
echo
|
9995
|
19 |
echo " Recursively find .thy/.ML files, fixing theorem names related"
|
9966
|
20 |
echo " to SOME (Eps) in HOL."
|
|
21 |
echo
|
|
22 |
echo " Renames old versions of FILES by appending \"~~\"."
|
|
23 |
echo
|
|
24 |
exit 1
|
|
25 |
}
|
|
26 |
|
|
27 |
|
|
28 |
## process command line
|
|
29 |
|
|
30 |
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
|
|
31 |
|
|
32 |
SPECS="$@"; shift "$#"
|
|
33 |
|
|
34 |
|
|
35 |
## main
|
|
36 |
|
|
37 |
#set by configure
|
|
38 |
AUTO_PERL=perl
|
|
39 |
|
9995
|
40 |
find $SPECS \( -name \*.ML -o -name \*.thy \) -print | \
|
|
41 |
xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixsome.pl"
|