src/Doc/System/Sessions.thy
changeset 75558 cf69c9112d09
parent 75557 df14a62129e9
child 75559 5340239ff468
equal deleted inserted replaced
75557:df14a62129e9 75558:cf69c9112d09
   486 
   486 
   487 subsubsection \<open>Examples\<close>
   487 subsubsection \<open>Examples\<close>
   488 
   488 
   489 text \<open>
   489 text \<open>
   490   Build a specific logic image:
   490   Build a specific logic image:
   491   @{verbatim [display] \<open>isabelle build -b HOLCF\<close>}
   491   @{verbatim [display] \<open>  isabelle build -b HOLCF\<close>}
   492 
   492 
   493   \<^smallskip>
   493   \<^smallskip>
   494   Build the main group of logic images:
   494   Build the main group of logic images:
   495   @{verbatim [display] \<open>isabelle build -b -g main\<close>}
   495   @{verbatim [display] \<open>  isabelle build -b -g main\<close>}
   496 
   496 
   497   \<^smallskip>
   497   \<^smallskip>
   498   Build all descendants (and requirements) of \<^verbatim>\<open>FOL\<close> and \<^verbatim>\<open>ZF\<close>:
   498   Build all descendants (and requirements) of \<^verbatim>\<open>FOL\<close> and \<^verbatim>\<open>ZF\<close>:
   499   @{verbatim [display] \<open>isabelle build -B FOL -B ZF\<close>}
   499   @{verbatim [display] \<open>  isabelle build -B FOL -B ZF\<close>}
   500 
   500 
   501   \<^smallskip>
   501   \<^smallskip>
   502   Build all sessions where sources have changed (ignoring heaps):
   502   Build all sessions where sources have changed (ignoring heaps):
   503   @{verbatim [display] \<open>isabelle build -a -S\<close>}
   503   @{verbatim [display] \<open>  isabelle build -a -S\<close>}
   504 
   504 
   505   \<^smallskip>
   505   \<^smallskip>
   506   Provide a general overview of the status of all Isabelle sessions, without
   506   Provide a general overview of the status of all Isabelle sessions, without
   507   building anything:
   507   building anything:
   508   @{verbatim [display] \<open>isabelle build -a -n -v\<close>}
   508   @{verbatim [display] \<open>  isabelle build -a -n -v\<close>}
   509 
   509 
   510   \<^smallskip>
   510   \<^smallskip>
   511   Build all sessions with HTML browser info and PDF document preparation:
   511   Build all sessions with HTML browser info and PDF document preparation:
   512   @{verbatim [display] \<open>isabelle build -a -o browser_info -o document\<close>}
   512   @{verbatim [display] \<open>  isabelle build -a -o browser_info -o document\<close>}
   513 
   513 
   514   \<^smallskip>
   514   \<^smallskip>
   515   Build all sessions with a maximum of 8 parallel prover processes and 4
   515   Build all sessions with a maximum of 8 parallel prover processes and 4
   516   worker threads each (on a machine with many cores):
   516   worker threads each (on a machine with many cores):
   517   @{verbatim [display] \<open>isabelle build -a -j8 -o threads=4\<close>}
   517   @{verbatim [display] \<open>  isabelle build -a -j8 -o threads=4\<close>}
   518 
   518 
   519   \<^smallskip>
   519   \<^smallskip>
   520   Build some session images with cleanup of their descendants, while retaining
   520   Build some session images with cleanup of their descendants, while retaining
   521   their ancestry:
   521   their ancestry:
   522   @{verbatim [display] \<open>isabelle build -b -c HOL-Library HOL-Algebra\<close>}
   522   @{verbatim [display] \<open>  isabelle build -b -c HOL-Library HOL-Algebra\<close>}
   523 
   523 
   524   \<^smallskip>
   524   \<^smallskip>
   525   Clean all sessions without building anything:
   525   Clean all sessions without building anything:
   526   @{verbatim [display] \<open>isabelle build -a -n -c\<close>}
   526   @{verbatim [display] \<open>  isabelle build -a -n -c\<close>}
   527 
   527 
   528   \<^smallskip>
   528   \<^smallskip>
   529   Build all sessions from some other directory hierarchy, according to the
   529   Build all sessions from some other directory hierarchy, according to the
   530   settings variable \<^verbatim>\<open>AFP\<close> that happens to be defined inside the Isabelle
   530   settings variable \<^verbatim>\<open>AFP\<close> that happens to be defined inside the Isabelle
   531   environment:
   531   environment:
   532   @{verbatim [display] \<open>isabelle build -D '$AFP'\<close>}
   532   @{verbatim [display] \<open>  isabelle build -D '$AFP'\<close>}
   533 
   533 
   534   \<^smallskip>
   534   \<^smallskip>
   535   Inform about the status of all sessions required for AFP, without building
   535   Inform about the status of all sessions required for AFP, without building
   536   anything yet:
   536   anything yet:
   537   @{verbatim [display] \<open>isabelle build -D '$AFP' -R -v -n\<close>}
   537   @{verbatim [display] \<open>  isabelle build -D '$AFP' -R -v -n\<close>}
   538 \<close>
   538 \<close>
   539 
   539 
   540 
   540 
   541 section \<open>Print messages from build database \label{sec:tool-log}\<close>
   541 section \<open>Print messages from build database \label{sec:tool-log}\<close>
   542 
   542 
   584 subsubsection \<open>Examples\<close>
   584 subsubsection \<open>Examples\<close>
   585 
   585 
   586 text \<open>
   586 text \<open>
   587   Print messages from theory \<^verbatim>\<open>HOL.Nat\<close> of session \<^verbatim>\<open>HOL\<close>, using Unicode
   587   Print messages from theory \<^verbatim>\<open>HOL.Nat\<close> of session \<^verbatim>\<open>HOL\<close>, using Unicode
   588   rendering of Isabelle symbols and a margin of 100 characters:
   588   rendering of Isabelle symbols and a margin of 100 characters:
   589   @{verbatim [display] \<open>isabelle log -T HOL.Nat -U -m 100 HOL\<close>}
   589   @{verbatim [display] \<open>  isabelle log -T HOL.Nat -U -m 100 HOL\<close>}
   590 \<close>
   590 \<close>
   591 
   591 
   592 
   592 
   593 section \<open>Retrieve theory exports \label{sec:tool-export}\<close>
   593 section \<open>Retrieve theory exports \label{sec:tool-export}\<close>
   594 
   594 
   693 
   693 
   694 subsubsection \<open>Examples\<close>
   694 subsubsection \<open>Examples\<close>
   695 
   695 
   696 text \<open>
   696 text \<open>
   697   Dump all Isabelle/ZF sessions (which are rather small):
   697   Dump all Isabelle/ZF sessions (which are rather small):
   698   @{verbatim [display] \<open>isabelle dump -v -B ZF\<close>}
   698   @{verbatim [display] \<open>  isabelle dump -v -B ZF\<close>}
   699 
   699 
   700   \<^smallskip>
   700   \<^smallskip>
   701   Dump the quite substantial \<^verbatim>\<open>HOL-Analysis\<close> session, with full bootstrap
   701   Dump the quite substantial \<^verbatim>\<open>HOL-Analysis\<close> session, with full bootstrap
   702   from Isabelle/Pure:
   702   from Isabelle/Pure:
   703   @{verbatim [display] \<open>isabelle dump -v HOL-Analysis\<close>}
   703   @{verbatim [display] \<open>  isabelle dump -v HOL-Analysis\<close>}
   704 
   704 
   705   \<^smallskip>
   705   \<^smallskip>
   706   Dump all sessions connected to HOL-Analysis, using main Isabelle/HOL as
   706   Dump all sessions connected to HOL-Analysis, using main Isabelle/HOL as
   707   basis:
   707   basis:
   708   @{verbatim [display] \<open>isabelle dump -v -b HOL -B HOL-Analysis\<close>}
   708   @{verbatim [display] \<open>  isabelle dump -v -b HOL -B HOL-Analysis\<close>}
   709 
   709 
   710   This results in uniform PIDE markup for everything, except for the
   710   This results in uniform PIDE markup for everything, except for the
   711   Isabelle/Pure bootstrap process itself. Producing that on the spot requires
   711   Isabelle/Pure bootstrap process itself. Producing that on the spot requires
   712   several GB of heap space, both for the Isabelle/Scala and Isabelle/ML
   712   several GB of heap space, both for the Isabelle/Scala and Isabelle/ML
   713   process (in 64bit mode). Here are some relevant settings (\secref{sec:boot})
   713   process (in 64bit mode). Here are some relevant settings (\secref{sec:boot})
   714   for such ambitious applications:
   714   for such ambitious applications:
   715   @{verbatim [display]
   715   @{verbatim [display]
   716 \<open>ISABELLE_TOOL_JAVA_OPTIONS="-Xms4g -Xmx32g -Xss16m"
   716 \<open>  ISABELLE_TOOL_JAVA_OPTIONS="-Xms4g -Xmx32g -Xss16m"
   717 ML_OPTIONS="--minheap 4G --maxheap 32G"
   717   ML_OPTIONS="--minheap 4G --maxheap 32G"
   718 \<close>}
   718 \<close>}
   719 \<close>
   719 \<close>
   720 
   720 
   721 
   721 
   722 section \<open>Update theory sources based on PIDE markup \label{sec:tool-update}\<close>
   722 section \<open>Update theory sources based on PIDE markup \label{sec:tool-update}\<close>
   795 
   795 
   796 text \<open>
   796 text \<open>
   797   Update some cartouche notation in all theory sources required for session
   797   Update some cartouche notation in all theory sources required for session
   798   \<^verbatim>\<open>HOL-Analysis\<close> (and ancestors):
   798   \<^verbatim>\<open>HOL-Analysis\<close> (and ancestors):
   799 
   799 
   800   @{verbatim [display] \<open>isabelle update -u mixfix_cartouches HOL-Analysis\<close>}
   800   @{verbatim [display] \<open>  isabelle update -u mixfix_cartouches HOL-Analysis\<close>}
   801 
   801 
   802   \<^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> ---
   803   using its image as starting point (for reduced resource requirements):
   803   using its image as starting point (for reduced resource requirements):
   804 
   804 
   805   @{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>}
   806 
   806 
   807   \<^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
   808   separately with special options as follows:
   808   separately with special options as follows:
   809 
   809 
   810   @{verbatim [display] \<open>isabelle update -u mixfix_cartouches -l HOL-Proofs -B HOL-Proofs
   810   @{verbatim [display] \<open>  isabelle update -u mixfix_cartouches -l HOL-Proofs -B HOL-Proofs
   811   -o record_proofs=2\<close>}
   811   -o record_proofs=2\<close>}
   812 
   812 
   813   \<^smallskip> See also the end of \secref{sec:tool-dump} for hints on increasing
   813   \<^smallskip> See also the end of \secref{sec:tool-dump} for hints on increasing
   814   Isabelle/ML heap sizes for very big PIDE processes that include many
   814   Isabelle/ML heap sizes for very big PIDE processes that include many
   815   sessions, notably from the Archive of Formal Proofs.
   815   sessions, notably from the Archive of Formal Proofs.
   844 
   844 
   845 subsubsection \<open>Examples\<close>
   845 subsubsection \<open>Examples\<close>
   846 
   846 
   847 text \<open>
   847 text \<open>
   848   All sessions of the Isabelle distribution:
   848   All sessions of the Isabelle distribution:
   849   @{verbatim [display] \<open>isabelle sessions -a\<close>}
   849   @{verbatim [display] \<open>  isabelle sessions -a\<close>}
   850 
   850 
   851   \<^medskip>
   851   \<^medskip>
   852   Sessions that are based on \<^verbatim>\<open>ZF\<close> (and required by it):
   852   Sessions that are based on \<^verbatim>\<open>ZF\<close> (and required by it):
   853   @{verbatim [display] \<open>isabelle sessions -B ZF\<close>}
   853   @{verbatim [display] \<open>  isabelle sessions -B ZF\<close>}
   854 
   854 
   855   \<^medskip>
   855   \<^medskip>
   856   All sessions of Isabelle/AFP (based in directory \<^path>\<open>AFP\<close>):
   856   All sessions of Isabelle/AFP (based in directory \<^path>\<open>AFP\<close>):
   857   @{verbatim [display] \<open>isabelle sessions -D AFP/thys\<close>}
   857   @{verbatim [display] \<open>  isabelle sessions -D AFP/thys\<close>}
   858 
   858 
   859   \<^medskip>
   859   \<^medskip>
   860   Sessions required by Isabelle/AFP (based in directory \<^path>\<open>AFP\<close>):
   860   Sessions required by Isabelle/AFP (based in directory \<^path>\<open>AFP\<close>):
   861   @{verbatim [display] \<open>isabelle sessions -R -D AFP/thys\<close>}
   861   @{verbatim [display] \<open>  isabelle sessions -R -D AFP/thys\<close>}
   862 \<close>
   862 \<close>
   863 
   863 
   864 
   864 
   865 section \<open>Synchronize source repositories and session images for Isabelle and AFP\<close>
   865 section \<open>Synchronize source repositories and session images for Isabelle and AFP\<close>
   866 
   866 
   953 
   953 
   954   \<^medskip> Here is a variation for extra-clean testing of Isabelle + AFP: no option
   954   \<^medskip> Here is a variation for extra-clean testing of Isabelle + AFP: no option
   955   \<^verbatim>\<open>-J\<close>, but option \<^verbatim>\<open>-T\<close> to disable the default ``quick check'' of \<^verbatim>\<open>rsync\<close>
   955   \<^verbatim>\<open>-J\<close>, but option \<^verbatim>\<open>-T\<close> to disable the default ``quick check'' of \<^verbatim>\<open>rsync\<close>
   956   (which only inspects file sizes and date stamps); existing heaps are
   956   (which only inspects file sizes and date stamps); existing heaps are
   957   deleted:
   957   deleted:
   958   @{verbatim [display] \<open> isabelle sync -A: -T -H testmachine:test/isabelle_afp\<close>}
   958   @{verbatim [display] \<open>  isabelle sync -A: -T -H testmachine:test/isabelle_afp\<close>}
   959 \<close>
   959 \<close>
   960 
   960 
   961 end
   961 end