Search code examples
jeditisabelle

How to use persistent heap images to make loading of theories faster in Isabelle/jEdit?


Let's assume I have a directory isabelle_afp where a lot of theories are stored. This directory is a library and I do not plan to change the files in it. I want to speed up the start-up time of Isabelle/jEdit (by default, all theories in isabelle_afp my current theory depends on are processed anew).

How can I skip this step? The system manual tells me to build a persistent heap image. What is the easiest way to do so?

And how can I tell Isabelle/jEdit to load this heap image?


Solution

  • Isabelle/jEdit in Isabelle2013 already takes care of building your heap images, by a relatively basic mechanism that uses the isabelle build_dialog tool internally (which has a separate entry in the cited documentation).

    You have two main possibilities doing it without using isabelle build_dialog or the isabelle build power-tool manually:

    • The jEdit dialog "Utilities / Options / Plugin Options / Isabelle / General" provides a choice for "Logic", with a tiny tool tip saying that you have to restart the application after changing it. Doing that, the heap image will be produced on restart.

    • The command line option -l, e.g. isabelle jedit -l HOL-Word

    For AFP sessions you need to tell the system separately about session directories. This can be done on the command line via isabelle jedit -d DIR1 -d DIR2 or in your $ISABELLE_HOME_USER/ROOTS file (list each directory on a separate line).

    A pure command-line solution would look like this:

    isabelle jedit -d isabelle_afp -l Simpl
    

    Note that in this example, isabelle_afp is a (relative or absolute) directory name, while Simpl is the logical session name.