625 \<^bold>\<open>type\<close> \<open>session_build_args =\<close> \\ |
625 \<^bold>\<open>type\<close> \<open>session_build_args =\<close> \\ |
626 \quad\<open>{session: string,\<close> \\ |
626 \quad\<open>{session: string,\<close> \\ |
627 \quad~~\<open>preferences?: string,\<close> & \<^bold>\<open>default:\<close> server preferences \\ |
627 \quad~~\<open>preferences?: string,\<close> & \<^bold>\<open>default:\<close> server preferences \\ |
628 \quad~~\<open>options?: [string],\<close> \\ |
628 \quad~~\<open>options?: [string],\<close> \\ |
629 \quad~~\<open>dirs?: [string],\<close> \\ |
629 \quad~~\<open>dirs?: [string],\<close> \\ |
630 \quad~~\<open>ancestor_session?: string,\<close> \\ |
|
631 \quad~~\<open>all_known?: bool,\<close> \\ |
630 \quad~~\<open>all_known?: bool,\<close> \\ |
632 \quad~~\<open>focus_session?: bool,\<close> \\ |
|
633 \quad~~\<open>required_session?: bool,\<close> \\ |
|
634 \quad~~\<open>system_mode?: bool,\<close> \\ |
631 \quad~~\<open>system_mode?: bool,\<close> \\ |
635 \quad~~\<open>verbose?: bool}\<close> \\[2ex] |
632 \quad~~\<open>verbose?: bool}\<close> \\[2ex] |
636 |
633 \end{tabular} |
|
634 |
|
635 \begin{tabular}{ll} |
637 \<^bold>\<open>type\<close> \<open>session_build_result =\<close> \\ |
636 \<^bold>\<open>type\<close> \<open>session_build_result =\<close> \\ |
638 \quad\<open>{session: string,\<close> \\ |
637 \quad\<open>{session: string,\<close> \\ |
639 \quad~~\<open>ok: bool,\<close> \\ |
638 \quad~~\<open>ok: bool,\<close> \\ |
640 \quad~~\<open>return_code: int,\<close> \\ |
639 \quad~~\<open>return_code: int,\<close> \\ |
641 \quad~~\<open>timeout: bool,\<close> \\ |
640 \quad~~\<open>timeout: bool,\<close> \\ |
667 |
666 |
668 |
667 |
669 subsubsection \<open>Arguments\<close> |
668 subsubsection \<open>Arguments\<close> |
670 |
669 |
671 text \<open> |
670 text \<open> |
672 The \<open>session\<close> field is mandatory. It specifies the target session name: |
671 The \<open>session\<close> field specifies the target session name. The build process |
673 either directly (default) or indirectly (if \<open>required_session\<close> is \<^verbatim>\<open>true\<close>). |
672 will produce all required ancestor images according to the overall session |
674 The build process will produce all required ancestor images for the |
673 graph. |
675 specified target. |
|
676 |
674 |
677 \<^medskip> |
675 \<^medskip> |
678 The environment of Isabelle system options is determined from \<open>preferences\<close> |
676 The environment of Isabelle system options is determined from \<open>preferences\<close> |
679 that are augmented by \<open>options\<close>, which is a list individual updates of the |
677 that are augmented by \<open>options\<close>, which is a list individual updates of the |
680 form the \<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close> or \<open>name\<close> (the latter abbreviates |
678 form the \<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close> or \<open>name\<close> (the latter abbreviates |
689 The \<open>dirs\<close> field specifies additional directories for session ROOT and ROOTS |
687 The \<open>dirs\<close> field specifies additional directories for session ROOT and ROOTS |
690 files (\secref{sec:session-root}). This augments the name space of available |
688 files (\secref{sec:session-root}). This augments the name space of available |
691 sessions; see also option \<^verbatim>\<open>-d\<close> in @{tool build}. |
689 sessions; see also option \<^verbatim>\<open>-d\<close> in @{tool build}. |
692 |
690 |
693 \<^medskip> |
691 \<^medskip> |
694 The \<open>ancestor_session\<close> field specifies an alternative image as starting |
|
695 point for the target image. The default is to use the parent session |
|
696 according to the ROOT entry; see also option \<^verbatim>\<open>-A\<close> in @{tool jedit}. This |
|
697 can lead to a more light-weight build process, by skipping intermediate |
|
698 session images of the hierarchy that are not used later on. |
|
699 |
|
700 \<^medskip> |
|
701 The \<open>all_known\<close> field set to \<^verbatim>\<open>true\<close> includes all sessions from reachable |
692 The \<open>all_known\<close> field set to \<^verbatim>\<open>true\<close> includes all sessions from reachable |
702 ROOT entries into the name space of theories. This is relevant for proper |
693 ROOT entries into the name space of theories. This is relevant for proper |
703 session-qualified names, instead of referring to theory file names. The |
694 session-qualified names, instead of referring to theory file names. The |
704 option enables the \<^verbatim>\<open>use_theories\<close> command |
695 option enables the \<^verbatim>\<open>use_theories\<close> command |
705 (\secref{sec:command-use-theories}) to refer to arbitrary theories from |
696 (\secref{sec:command-use-theories}) to refer to arbitrary theories from |
706 other sessions, but considerable time is required to explore all accessible |
697 other sessions, but considerable time is required to explore all accessible |
707 session directories and theory dependencies. |
698 session directories and theory dependencies. |
708 |
699 |
709 \<^medskip> |
700 \<^medskip> |
710 The \<open>focus_session\<close> field set to \<^verbatim>\<open>true\<close> focuses on the target session: |
|
711 the accessible name space of theories is restricted to sessions that are |
|
712 connected to it in the imports graph. |
|
713 |
|
714 \<^medskip> |
|
715 The \<open>required_session\<close> field set to \<^verbatim>\<open>true\<close> indicates that the target image |
|
716 should not be the \<open>session\<close>, but its parent (or ancestor according to |
|
717 \<open>ancestor_session\<close>). Thus it prepares a session context where theories from |
|
718 the \<open>session\<close> itself can be loaded. |
|
719 |
|
720 \<^medskip> |
|
721 The \<open>system_mode\<close> field set to \<^verbatim>\<open>true\<close> stores resulting session images and |
701 The \<open>system_mode\<close> field set to \<^verbatim>\<open>true\<close> stores resulting session images and |
722 log files in @{path "$ISABELLE_HOME/heaps"} instead of the default location |
702 log files in @{path "$ISABELLE_HOME/heaps"} instead of the default location |
723 @{setting ISABELLE_OUTPUT} (which is normally in @{setting |
703 @{setting ISABELLE_OUTPUT} (which is normally in @{setting |
724 ISABELLE_HOME_USER}). See also option \<^verbatim>\<open>-s\<close> in @{tool build}. |
704 ISABELLE_HOME_USER}). See also option \<^verbatim>\<open>-s\<close> in @{tool build}. |
725 |
705 |
769 Build of a session image from the Isabelle distribution: |
749 Build of a session image from the Isabelle distribution: |
770 @{verbatim [display] \<open>session_build {"session": "HOL-Word"}\<close>} |
750 @{verbatim [display] \<open>session_build {"session": "HOL-Word"}\<close>} |
771 |
751 |
772 Build a session image from the Archive of Formal Proofs: |
752 Build a session image from the Archive of Formal Proofs: |
773 @{verbatim [display] \<open>session_build {"session": "Coinductive", "dirs": ["$AFP_BASE/thys"]}\<close>} |
753 @{verbatim [display] \<open>session_build {"session": "Coinductive", "dirs": ["$AFP_BASE/thys"]}\<close>} |
774 |
|
775 Build of a session image of \<^verbatim>\<open>HOL-Number_Theory\<close> directly on top of \<^verbatim>\<open>HOL\<close>: |
|
776 @{verbatim [display] \<open>session_build {"session": "HOL-Number_Theory", "ancestor_session": "HOL"}\<close>} |
|
777 \<close> |
754 \<close> |
778 |
755 |
779 |
756 |
780 subsection \<open>Command \<^verbatim>\<open>session_start\<close> \label{sec:command-session-start}\<close> |
757 subsection \<open>Command \<^verbatim>\<open>session_start\<close> \label{sec:command-session-start}\<close> |
781 |
758 |