added isabelle-process option -o;
authorwenzelm
Fri May 17 19:04:52 2013 +0200 (2013-05-17)
changeset 52056fc458f304f93
parent 52055 10bc73197a57
child 52057 69137d20ab0b
added isabelle-process option -o;
bin/isabelle-process
lib/Tools/build
src/Doc/System/Basics.thy
src/Doc/System/Sessions.thy
     1.1 --- a/bin/isabelle-process	Fri May 17 18:50:55 2013 +0200
     1.2 +++ b/bin/isabelle-process	Fri May 17 19:04:52 2013 +0200
     1.3 @@ -33,6 +33,7 @@
     1.4    echo "    -W IN:OUT    startup process wrapper, with input/output fifos"
     1.5    echo "    -e MLTEXT    pass MLTEXT to the ML session"
     1.6    echo "    -m MODE      add print mode for output"
     1.7 +  echo "    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)"
     1.8    echo "    -q           non-interactive session"
     1.9    echo "    -r           open heap file read-only"
    1.10    echo "    -w           reset write permissions on OUTPUT"
    1.11 @@ -63,11 +64,12 @@
    1.12  WRAPPER_FIFOS=""
    1.13  MLTEXT=""
    1.14  MODES=""
    1.15 +declare -a SYSTEM_OPTIONS=()
    1.16  TERMINATE=""
    1.17  READONLY=""
    1.18  NOWRITE=""
    1.19  
    1.20 -while getopts "IPST:W:e:m:qrw" OPT
    1.21 +while getopts "IPST:W:e:m:o:qrw" OPT
    1.22  do
    1.23    case "$OPT" in
    1.24      I)
    1.25 @@ -95,6 +97,9 @@
    1.26          MODES="\"$OPTARG\", $MODES"
    1.27        fi
    1.28        ;;
    1.29 +    o)
    1.30 +      SYSTEM_OPTIONS["${#SYSTEM_OPTIONS[@]}"]="$OPTARG"
    1.31 +      ;;
    1.32      q)
    1.33        TERMINATE=true
    1.34        ;;
    1.35 @@ -215,7 +220,8 @@
    1.36    MLTEXT="$MLTEXT; Isabelle_Process.init_fifos \"${FIFOS[0]}\" \"${FIFOS[1]}\";"
    1.37  else
    1.38    ISABELLE_PROCESS_OPTIONS="$ISABELLE_TMP/options"
    1.39 -  "$ISABELLE_TOOL" options -x "$ISABELLE_PROCESS_OPTIONS" || fail "Failed to retrieve options"
    1.40 +  "$ISABELLE_TOOL" options -x "$ISABELLE_PROCESS_OPTIONS" -- "${SYSTEM_OPTIONS[@]}" || \
    1.41 +    fail "Failed to retrieve Isabelle system options"
    1.42    if [ "$INPUT" != RAW_ML_SYSTEM -a "$INPUT" != RAW ]; then
    1.43      MLTEXT="Options.load_default () handle _ => exit 2; $MLTEXT"
    1.44    fi
     2.1 --- a/lib/Tools/build	Fri May 17 18:50:55 2013 +0200
     2.2 +++ b/lib/Tools/build	Fri May 17 19:04:52 2013 +0200
     2.3 @@ -36,7 +36,7 @@
     2.4    echo "    -j INT       maximum number of parallel jobs (default 1)"
     2.5    echo "    -l           list session source files"
     2.6    echo "    -n           no build -- test dependencies only"
     2.7 -  echo "    -o OPTION    override session configuration OPTION (via NAME=VAL or NAME)"
     2.8 +  echo "    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)"
     2.9    echo "    -s           system build mode: produce output in ISABELLE_HOME"
    2.10    echo "    -v           verbose"
    2.11    echo
     3.1 --- a/src/Doc/System/Basics.thy	Fri May 17 18:50:55 2013 +0200
     3.2 +++ b/src/Doc/System/Basics.thy	Fri May 17 19:04:52 2013 +0200
     3.3 @@ -379,6 +379,7 @@
     3.4      -W IN:OUT    startup process wrapper, with input/output fifos
     3.5      -e MLTEXT    pass MLTEXT to the ML session
     3.6      -m MODE      add print mode for output
     3.7 +    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
     3.8      -q           non-interactive session
     3.9      -r           open heap file read-only
    3.10      -w           reset write permissions on OUTPUT
    3.11 @@ -438,6 +439,9 @@
    3.12    option inhibits interaction, thus providing a pure batch mode
    3.13    facility.
    3.14  
    3.15 +  \medskip Option @{verbatim "-s"} allows to override Isabelle system
    3.16 +  options for this process, see also \secref{sec:system-options}.
    3.17 +
    3.18    \medskip The @{verbatim "-I"} option makes Isabelle enter Isar
    3.19    interaction mode on startup, instead of the primitive ML top-level.
    3.20    The @{verbatim "-P"} option configures the top-level loop for
     4.1 --- a/src/Doc/System/Sessions.thy	Fri May 17 18:50:55 2013 +0200
     4.2 +++ b/src/Doc/System/Sessions.thy	Fri May 17 19:04:52 2013 +0200
     4.3 @@ -275,8 +275,7 @@
     4.4      -j INT       maximum number of parallel jobs (default 1)
     4.5      -l           list session source files
     4.6      -n           no build -- test dependencies only
     4.7 -    -o OPTION    override session configuration OPTION
     4.8 -                 (via NAME=VAL or NAME)
     4.9 +    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
    4.10      -s           system build mode: produce output in ISABELLE_HOME
    4.11      -v           verbose
    4.12