lib/Tools/fixsome
author oheimb
Wed, 03 Apr 2002 10:21:13 +0200
changeset 13076 70704dd48bd5
parent 10555 2323ec838401
child 14981 e73f8140af78
permissions -rwxr-xr-x
bugfix concerning claset(), added limited support for ALLGOALS + fast_tac etc.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10555
2323ec838401 /usr/bin/env bash;
wenzelm
parents: 10511
diff changeset
     1
#!/usr/bin/env bash
9966
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     2
#
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     3
# $Id$
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     4
# Author: Markus Wenzel, TU Muenchen
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     6
#
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     7
# DESCRIPTION: fix theorem names related to SOME (Eps) in HOL
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     8
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
     9
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    10
## diagnostics
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    11
10511
wenzelm
parents: 9995
diff changeset
    12
PRG="$(basename "$0")"
9966
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    13
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    14
function usage()
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    15
{
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    16
  echo
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    17
  echo "Usage: $PRG [FILES|DIRS...]"
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    18
  echo
9995
wenzelm
parents: 9966
diff changeset
    19
  echo "  Recursively find .thy/.ML files, fixing theorem names related"
9966
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    20
  echo "  to SOME (Eps) in HOL."
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    21
  echo
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    22
  echo "  Renames old versions of FILES by appending \"~~\"."
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    23
  echo
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    24
  exit 1
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    25
}
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    26
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    27
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    28
## process command line
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    29
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    30
[ "$#" -eq 0 -o "$1" = "-?" ] && usage
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    31
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    32
SPECS="$@"; shift "$#"
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    33
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    34
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    35
## main
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    36
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    37
#set by configure
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    38
AUTO_PERL=perl
e2ddb6a12427 fix theorem names related to SOME (Eps) in HOL;
wenzelm
parents:
diff changeset
    39
9995
wenzelm
parents: 9966
diff changeset
    40
find $SPECS \( -name \*.ML -o -name \*.thy \) -print | \
wenzelm
parents: 9966
diff changeset
    41
  xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/fixsome.pl"