src/Doc/System/Sessions.thy
changeset 75161 95612f330c93
parent 74873 0ab2ed1489eb
child 75556 1f6fc2416a48
equal deleted inserted replaced
75160:d48998648281 75161:95612f330c93
   168   patterns\<close> specifies theory exports that may get written to the file-system,
   168   patterns\<close> specifies theory exports that may get written to the file-system,
   169   e.g. via @{tool_ref build} with option \<^verbatim>\<open>-e\<close> (\secref{sec:tool-build}). The
   169   e.g. via @{tool_ref build} with option \<^verbatim>\<open>-e\<close> (\secref{sec:tool-build}). The
   170   \<open>target_dir\<close> specification is relative to the session root directory; its
   170   \<open>target_dir\<close> specification is relative to the session root directory; its
   171   default is \<^verbatim>\<open>export\<close>. Exports are selected via \<open>patterns\<close> as in @{tool_ref
   171   default is \<^verbatim>\<open>export\<close>. Exports are selected via \<open>patterns\<close> as in @{tool_ref
   172   export} (\secref{sec:tool-export}). The number given in brackets (default:
   172   export} (\secref{sec:tool-export}). The number given in brackets (default:
   173   0) specifies elements that should be pruned from each name: it allows to
   173   0) specifies the prefix of elements that should be removed from each name:
   174   reduce the resulting directory hierarchy at the danger of overwriting files
   174   it allows to reduce the resulting directory hierarchy at the danger of
   175   due to loss of uniqueness.
   175   overwriting files due to loss of uniqueness.
   176 \<close>
   176 \<close>
   177 
   177 
   178 
   178 
   179 subsubsection \<open>Examples\<close>
   179 subsubsection \<open>Examples\<close>
   180 
   180 
   214 
   214 
   215     \<^item> @{system_option_def "document_echo"} informs about document file names
   215     \<^item> @{system_option_def "document_echo"} informs about document file names
   216     during session presentation.
   216     during session presentation.
   217 
   217 
   218     \<^item> @{system_option_def "document_variants"} specifies document variants as
   218     \<^item> @{system_option_def "document_variants"} specifies document variants as
   219     a colon-separated list of \<open>name=tags\<close> entries. The default name
   219     a colon-separated list of \<open>name=tags\<close> entries. The default name is
   220     \<^verbatim>\<open>document\<close>, without additional tags.
   220     \<^verbatim>\<open>document\<close>, without additional tags.
   221 
   221 
   222     Tags are specified as a comma separated list of modifier/name pairs and
   222     Tags are specified as a comma separated list of modifier/name pairs and
   223     tell {\LaTeX} how to interpret certain Isabelle command regions:
   223     tell {\LaTeX} how to interpret certain Isabelle command regions:
   224     ``\<^verbatim>\<open>+\<close>\<open>foo\<close>'' (or just ``\<open>foo\<close>'') means to keep, ``\<^verbatim>\<open>-\<close>\<open>foo\<close>'' to drop,
   224     ``\<^verbatim>\<open>+\<close>\<open>foo\<close>'' (or just ``\<open>foo\<close>'') means to keep, ``\<^verbatim>\<open>-\<close>\<open>foo\<close>'' to drop,
   258     \<^verbatim>\<open>\isamarkupsection\<close>.
   258     \<^verbatim>\<open>\isamarkupsection\<close>.
   259 
   259 
   260     \<^item> @{system_option_def "threads"} determines the number of worker threads
   260     \<^item> @{system_option_def "threads"} determines the number of worker threads
   261     for parallel checking of theories and proofs. The default \<open>0\<close> means that a
   261     for parallel checking of theories and proofs. The default \<open>0\<close> means that a
   262     sensible maximum value is determined by the underlying hardware. For
   262     sensible maximum value is determined by the underlying hardware. For
   263     machines with many cores or with hyperthreading, this is often requires
   263     machines with many cores or with hyperthreading, this sometimes requires
   264     manual adjustment (on the command-line or within personal settings or
   264     manual adjustment (on the command-line or within personal settings or
   265     preferences, not within a session \<^verbatim>\<open>ROOT\<close>).
   265     preferences, not within a session \<^verbatim>\<open>ROOT\<close>).
   266 
   266 
   267     \<^item> @{system_option_def "condition"} specifies a comma-separated list of
   267     \<^item> @{system_option_def "condition"} specifies a comma-separated list of
   268     process environment variables (or Isabelle settings) that are required for
   268     process environment variables (or Isabelle settings) that are required for
   429 
   429 
   430   \<^medskip>
   430   \<^medskip>
   431   Option \<^verbatim>\<open>-P\<close> enables PDF/HTML presentation in the given directory, where
   431   Option \<^verbatim>\<open>-P\<close> enables PDF/HTML presentation in the given directory, where
   432   ``\<^verbatim>\<open>-P:\<close>'' refers to the default @{setting_ref ISABELLE_BROWSER_INFO} (or
   432   ``\<^verbatim>\<open>-P:\<close>'' refers to the default @{setting_ref ISABELLE_BROWSER_INFO} (or
   433   @{setting_ref ISABELLE_BROWSER_INFO_SYSTEM}). This applies only to
   433   @{setting_ref ISABELLE_BROWSER_INFO_SYSTEM}). This applies only to
   434   explicitly selected sessions; note that option \<open>-R\<close> allows to select all
   434   explicitly selected sessions; note that option \<^verbatim>\<open>-R\<close> allows to select all
   435   requirements separately.
   435   requirements separately.
   436 
   436 
   437   \<^medskip>
   437   \<^medskip>
   438   Option \<^verbatim>\<open>-b\<close> ensures that heap images are produced for all selected
   438   Option \<^verbatim>\<open>-b\<close> ensures that heap images are produced for all selected
   439   sessions. By default, images are only saved for inner nodes of the hierarchy
   439   sessions. By default, images are only saved for inner nodes of the hierarchy
   469   \<^medskip>
   469   \<^medskip>
   470   Option \<^verbatim>\<open>-N\<close> enables cyclic shuffling of NUMA CPU nodes. This may help
   470   Option \<^verbatim>\<open>-N\<close> enables cyclic shuffling of NUMA CPU nodes. This may help
   471   performance tuning on Linux servers with separate CPU/memory modules.
   471   performance tuning on Linux servers with separate CPU/memory modules.
   472 
   472 
   473   \<^medskip>
   473   \<^medskip>
   474   Option \<^verbatim>\<open>-v\<close> increases the general level of verbosity. Option \<^verbatim>\<open>-l\<close> lists
   474   Option \<^verbatim>\<open>-v\<close> increases the general level of verbosity.
   475   the source files that contribute to a session.
   475 
   476 
   476   \<^medskip>
   477   \<^medskip>
   477   Option \<^verbatim>\<open>-l\<close> lists the source files that contribute to a session.
   478   Option \<^verbatim>\<open>-k\<close> specifies a newly proposed keyword for outer syntax (multiple
   478 
   479   uses allowed). The theory sources are checked for conflicts wrt.\ this
   479   \<^medskip>
   480   hypothetical change of syntax, e.g.\ to reveal occurrences of identifiers
   480   Option \<^verbatim>\<open>-k\<close> specifies a newly proposed keyword for outer syntax. It is
   481   that need to be quoted.
   481   possible to use option \<^verbatim>\<open>-k\<close> repeatedly to check multiple keywords. The
       
   482   theory sources are checked for conflicts wrt.\ this hypothetical change of
       
   483   syntax, e.g.\ to reveal occurrences of identifiers that need to be quoted.
   482 \<close>
   484 \<close>
   483 
   485 
   484 
   486 
   485 subsubsection \<open>Examples\<close>
   487 subsubsection \<open>Examples\<close>
   486 
   488 
   567   database, notably via @{system_option system_heaps}, or @{system_option
   569   database, notably via @{system_option system_heaps}, or @{system_option
   568   build_database_server} and its relatives.
   570   build_database_server} and its relatives.
   569 
   571 
   570   \<^medskip> Option \<^verbatim>\<open>-T\<close> restricts output to given theories: multiple entries are
   572   \<^medskip> Option \<^verbatim>\<open>-T\<close> restricts output to given theories: multiple entries are
   571   possible by repeating this option on the command-line. The default is to
   573   possible by repeating this option on the command-line. The default is to
   572   refer to \<^emph>\<open>all\<close> theories that were used in original session build process.
   574   refer to \<^emph>\<open>all\<close> theories used in the original session build process.
   573 
   575 
   574   \<^medskip> Options \<^verbatim>\<open>-m\<close> and \<^verbatim>\<open>-U\<close> modify pretty printing and output of Isabelle
   576   \<^medskip> Options \<^verbatim>\<open>-m\<close> and \<^verbatim>\<open>-U\<close> modify pretty printing and output of Isabelle
   575   symbols. The default is for an old-fashioned ASCII terminal at 80 characters
   577   symbols. The default is for an old-fashioned ASCII terminal at 80 characters
   576   per line (76 + 4 characters to prefix warnings or errors).
   578   per line (76 + 4 characters to prefix warnings or errors).
   577 
   579 
   600     -d DIR       include session directory
   602     -d DIR       include session directory
   601     -l           list exports
   603     -l           list exports
   602     -n           no build of session
   604     -n           no build of session
   603     -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
   605     -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
   604     -p NUM       prune path of exported files by NUM elements
   606     -p NUM       prune path of exported files by NUM elements
   605     -x PATTERN   extract files matching pattern (e.g.\ "*:**" for all)
   607     -x PATTERN   extract files matching pattern (e.g. "*:**" for all)
   606 
   608 
   607   List or export theory exports for SESSION: named blobs produced by
   609   List or export theory exports for SESSION: named blobs produced by
   608   isabelle build. Option -l or -x is required; option -x may be repeated.
   610   isabelle build. Option -l or -x is required; option -x may be repeated.
   609 
   611 
   610   The PATTERN language resembles glob patterns in the shell, with ? and *
   612   The PATTERN language resembles glob patterns in the shell, with ? and *
   733     -a           select all sessions
   735     -a           select all sessions
   734     -b NAME      base logic image (default "Pure")
   736     -b NAME      base logic image (default "Pure")
   735     -d DIR       include session directory
   737     -d DIR       include session directory
   736     -g NAME      select session group NAME
   738     -g NAME      select session group NAME
   737     -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
   739     -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
   738     -u OPT       overide update option: shortcut for "-o update_OPT"
   740     -u OPT       override "update" option: shortcut for "-o update_OPT"
   739     -v           verbose
   741     -v           verbose
   740     -x NAME      exclude session NAME and all descendants
   742     -x NAME      exclude session NAME and all descendants
   741 
   743 
   742   Update theory sources based on PIDE markup.\<close>}
   744   Update theory sources based on PIDE markup.\<close>}
   743 
   745 
   754   \<^medskip> Option \<^verbatim>\<open>-o\<close> overrides Isabelle system options as for @{tool build}
   756   \<^medskip> Option \<^verbatim>\<open>-o\<close> overrides Isabelle system options as for @{tool build}
   755   (\secref{sec:tool-build}). Option \<^verbatim>\<open>-u\<close> refers to specific \<^verbatim>\<open>update\<close>
   757   (\secref{sec:tool-build}). Option \<^verbatim>\<open>-u\<close> refers to specific \<^verbatim>\<open>update\<close>
   756   options, by relying on naming convention: ``\<^verbatim>\<open>-u\<close>~\<open>OPT\<close>'' is a shortcut for
   758   options, by relying on naming convention: ``\<^verbatim>\<open>-u\<close>~\<open>OPT\<close>'' is a shortcut for
   757   ``\<^verbatim>\<open>-o\<close>~\<^verbatim>\<open>update_\<close>\<open>OPT\<close>''.
   759   ``\<^verbatim>\<open>-o\<close>~\<^verbatim>\<open>update_\<close>\<open>OPT\<close>''.
   758 
   760 
   759   \<^medskip> The following update options are supported:
   761   \<^medskip> The following \<^verbatim>\<open>update\<close> options are supported:
   760 
   762 
   761     \<^item> @{system_option update_inner_syntax_cartouches} to update inner syntax
   763     \<^item> @{system_option update_inner_syntax_cartouches} to update inner syntax
   762     (types, terms, etc.)~to use cartouches, instead of double-quoted strings
   764     (types, terms, etc.)~to use cartouches, instead of double-quoted strings
   763     or atomic identifiers. For example, ``\<^theory_text>\<open>lemma \<doublequote>x =
   765     or atomic identifiers. For example, ``\<^theory_text>\<open>lemma \<doublequote>x =
   764     x\<doublequote>\<close>'' is replaced by ``\<^theory_text>\<open>lemma \<open>x = x\<close>\<close>'', and ``\<^theory_text>\<open>assume
   766     x\<doublequote>\<close>'' is replaced by ``\<^theory_text>\<open>lemma \<open>x = x\<close>\<close>'', and ``\<^theory_text>\<open>assume
   796   \<^verbatim>\<open>HOL-Analysis\<close> (and ancestors):
   798   \<^verbatim>\<open>HOL-Analysis\<close> (and ancestors):
   797 
   799 
   798   @{verbatim [display] \<open>isabelle update -u mixfix_cartouches HOL-Analysis\<close>}
   800   @{verbatim [display] \<open>isabelle update -u mixfix_cartouches HOL-Analysis\<close>}
   799 
   801 
   800   \<^smallskip> Update the same for all application sessions based on \<^verbatim>\<open>HOL-Analysis\<close> ---
   802   \<^smallskip> Update the same for all application sessions based on \<^verbatim>\<open>HOL-Analysis\<close> ---
   801   using its image is taken starting point (for reduced resource requirements):
   803   using its image as starting point (for reduced resource requirements):
   802 
   804 
   803   @{verbatim [display] \<open>isabelle update -u mixfix_cartouches -b HOL-Analysis -B HOL-Analysis\<close>}
   805   @{verbatim [display] \<open>isabelle update -u mixfix_cartouches -b HOL-Analysis -B HOL-Analysis\<close>}
   804 
   806 
   805   \<^smallskip> Update sessions that build on \<^verbatim>\<open>HOL-Proofs\<close>, which need to be run
   807   \<^smallskip> Update sessions that build on \<^verbatim>\<open>HOL-Proofs\<close>, which need to be run
   806   separately with special options as follows:
   808   separately with special options as follows: