src/HOL/Mirabelle/lib/Tools/mirabelle
changeset 32521 f20cc66b2c74
parent 32496 4ab00a2642c3
child 32522 1b70db55c811
equal deleted inserted replaced
32518:e3c4e337196c 32521:f20cc66b2c74
    24   echo "  Options are:"
    24   echo "  Options are:"
    25   echo "    -L LOGIC     parent logic to use (default $ISABELLE_LOGIC)"
    25   echo "    -L LOGIC     parent logic to use (default $ISABELLE_LOGIC)"
    26   echo "    -T THEORY    parent theory to use (default $MIRABELLE_THEORY)"
    26   echo "    -T THEORY    parent theory to use (default $MIRABELLE_THEORY)"
    27   echo "    -O DIR       output directory for test data (default $out)"
    27   echo "    -O DIR       output directory for test data (default $out)"
    28   echo "    -t TIMEOUT   timeout for each action in seconds (default $timeout)"
    28   echo "    -t TIMEOUT   timeout for each action in seconds (default $timeout)"
       
    29   echo "    -q           be quiet (suppress output of Isabelle process)" 
    29   echo
    30   echo
    30   echo "  Apply the given actions (i.e., automated proof tools)"
    31   echo "  Apply the given actions (i.e., automated proof tools)"
    31   echo "  at all proof steps in the given theory files."
    32   echo "  at all proof steps in the given theory files."
    32   echo
    33   echo
    33   echo "  ACTIONS is a colon-separated list of actions, where each action is"
    34   echo "  ACTIONS is a colon-separated list of actions, where each action is"
    44 
    45 
    45 ## process command line
    46 ## process command line
    46 
    47 
    47 # options
    48 # options
    48 
    49 
    49 while getopts "L:T:O:t:?" OPT
    50 while getopts "L:T:O:t:q?" OPT
    50 do
    51 do
    51   case "$OPT" in
    52   case "$OPT" in
    52     L)
    53     L)
    53       MIRABELLE_LOGIC="$OPTARG"
    54       MIRABELLE_LOGIC="$OPTARG"
    54       ;;
    55       ;;
    59       MIRABELLE_OUTPUT_PATH="$OPTARG"
    60       MIRABELLE_OUTPUT_PATH="$OPTARG"
    60       ;;
    61       ;;
    61     t)
    62     t)
    62       MIRABELLE_TIMEOUT="$OPTARG"
    63       MIRABELLE_TIMEOUT="$OPTARG"
    63       ;;
    64       ;;
       
    65     q)
       
    66       MIRABELLE_QUIET="true"
       
    67       ;;
    64     \?)
    68     \?)
    65       usage
    69       usage
    66       ;;
    70       ;;
    67   esac
    71   esac
    68 done
    72 done
    69 
    73 
       
    74 export MIRABELLE_QUIET
       
    75 
    70 shift $(($OPTIND - 1))
    76 shift $(($OPTIND - 1))
    71 
    77 
    72 ACTIONS="$1"
    78 export MIRABELLE_ACTIONS="$1"
    73 
    79 
    74 shift
    80 shift
    75 
    81 
    76 
    82 
    77 # setup
    83 # setup
    81 
    87 
    82 ## main
    88 ## main
    83 
    89 
    84 for FILE in "$@"
    90 for FILE in "$@"
    85 do
    91 do
    86   perl -w "$MIRABELLE_HOME/lib/scripts/mirabelle.pl" "$ACTIONS" "$FILE"
    92   perl -w "$MIRABELLE_HOME/lib/scripts/mirabelle.pl" "$FILE"
    87 done
    93 done
    88 
    94