bin/isabelle_process
changeset 58842 22b87ab47d3b
parent 57581 74bbe9317aa4
child 58846 98c03412079b
equal deleted inserted replaced
58840:f4bb3068d819 58842:22b87ab47d3b
    26   echo "Usage: $PRG [OPTIONS] [INPUT] [OUTPUT]"
    26   echo "Usage: $PRG [OPTIONS] [INPUT] [OUTPUT]"
    27   echo
    27   echo
    28   echo "  Options are:"
    28   echo "  Options are:"
    29   echo "    -I           startup Isar interaction mode"
    29   echo "    -I           startup Isar interaction mode"
    30   echo "    -O           system options from given YXML file"
    30   echo "    -O           system options from given YXML file"
    31   echo "    -P           startup Proof General interaction mode"
       
    32   echo "    -S           secure mode -- disallow critical operations"
    31   echo "    -S           secure mode -- disallow critical operations"
    33   echo "    -T ADDR      startup process wrapper, with socket address"
    32   echo "    -T ADDR      startup process wrapper, with socket address"
    34   echo "    -W IN:OUT    startup process wrapper, with input/output fifos"
    33   echo "    -W IN:OUT    startup process wrapper, with input/output fifos"
    35   echo "    -e MLTEXT    pass MLTEXT to the ML session"
    34   echo "    -e MLTEXT    pass MLTEXT to the ML session"
    36   echo "    -m MODE      add print mode for output"
    35   echo "    -m MODE      add print mode for output"
    58 
    57 
    59 # options
    58 # options
    60 
    59 
    61 ISAR=""
    60 ISAR=""
    62 OPTIONS_FILE=""
    61 OPTIONS_FILE=""
    63 PROOFGENERAL=""
       
    64 SECURE=""
    62 SECURE=""
    65 WRAPPER_SOCKET=""
    63 WRAPPER_SOCKET=""
    66 WRAPPER_FIFOS=""
    64 WRAPPER_FIFOS=""
    67 MLTEXT=""
    65 MLTEXT=""
    68 MODES=""
    66 MODES=""
    69 declare -a SYSTEM_OPTIONS=()
    67 declare -a SYSTEM_OPTIONS=()
    70 TERMINATE=""
    68 TERMINATE=""
    71 READONLY=""
    69 READONLY=""
    72 NOWRITE=""
    70 NOWRITE=""
    73 
    71 
    74 while getopts "IO:PST:W:e:m:o:qrw" OPT
    72 while getopts "IO:ST:W:e:m:o:qrw" OPT
    75 do
    73 do
    76   case "$OPT" in
    74   case "$OPT" in
    77     I)
    75     I)
    78       ISAR=true
    76       ISAR=true
    79       ;;
    77       ;;
    80     O)
    78     O)
    81       OPTIONS_FILE="$OPTARG"
    79       OPTIONS_FILE="$OPTARG"
    82       ;;
       
    83     P)
       
    84       PROOFGENERAL=true
       
    85       ;;
    80       ;;
    86     S)
    81     S)
    87       SECURE=true
    82       SECURE=true
    88       ;;
    83       ;;
    89     T)
    84     T)
   235       fail "Failed to retrieve Isabelle system options"
   230       fail "Failed to retrieve Isabelle system options"
   236   fi
   231   fi
   237   if [ "$INPUT" != RAW_ML_SYSTEM -a "$INPUT" != RAW ]; then
   232   if [ "$INPUT" != RAW_ML_SYSTEM -a "$INPUT" != RAW ]; then
   238     MLTEXT="Exn.capture_exit 2 Options.load_default (); $MLTEXT"
   233     MLTEXT="Exn.capture_exit 2 Options.load_default (); $MLTEXT"
   239   fi
   234   fi
   240   if [ -n "$PROOFGENERAL" ]; then
   235   if [ -n "$ISAR" ]; then
   241     MLTEXT="$MLTEXT; ProofGeneral.init ();"
       
   242   elif [ -n "$ISAR" ]; then
       
   243     MLTEXT="$MLTEXT; Isar.main ();"
   236     MLTEXT="$MLTEXT; Isar.main ();"
   244   else
   237   else
   245     NICE=""
   238     NICE=""
   246   fi
   239   fi
   247 fi
   240 fi