4

Following how-to-use-persistent-heap-images-to-make-loading-of-theories-faster-in-isabelle and another advice I created an image for Nominal Isabelle:

isabelle build -v -b -d . Nominal2

The heap image was created under ~/.isabelle:

.isabelle/Isabelle2013-2/heaps/polyml-5.5.1_x86-linux/Nominal2

Then I started

isabelle jedit -d /path/to/Nominal-distribution -l Nominal2

I expected the system to quickly load a theory that imports a part of Nominal but it took almost a minute. Is that usual?

Community
  • 1
  • 1
Gergely
  • 6,879
  • 6
  • 25
  • 35

1 Answers1

7

Your process of building a heap image looks correct. In fact, you don't actually need to the isabelle build step, because isabelle jedit will automatically trigger a build if the heap doesn't exist or isn't up to date.

You can determine if isabelle jedit is using the heap based on two facts:

  • If it needs to build a heap, you will see a dialog box pop up showing the build progress when you first start jEdit. This will typically take 10 seconds to several hours, depending on the size of the heap that needs to be built. The screenshot below shows an example of the build dialog; in this case, I am building the Main heap:

    Example build dialog

  • If it isn't using the heap at all (for instance, if you forgot to specify -l Nominal2), all the theories that Nominal2 includes will need to be opened up in jEdit, and you will see them in the jEdit "Theories" panel.

    In the image below, for example, Scratch imports a file AutoCorres, which in turn imports MapExtra, Padding, BitOperations, and so on. If I was using the correct AutoCorres heap, none of these files would need to be loaded, because they would already be pre-compiled into the heap:

    Example Theories Panel

Even if Isabelle is using a heap, it still has to load it into memory when it starts up. This usually takes a few seconds, which, when compounded by the not-particularly-amazing startup times of jEdit itself, might be what you are experiencing.

davidg
  • 5,868
  • 2
  • 33
  • 51
  • I see. My default theory is not Main but Nominal2 so it must be the case of your last paragraph. My measured 50 seconds was after Jedit started though: I started measuring time from the opening of my theory file that imports a Nominal theory. – Gergely Mar 26 '14 at 09:03
  • Repeating the experiment I have seen in the Theories panel that processing Lambda.thy from Nominal was taking that long. Then I realised that Lambda.thy is not part of the Nominal image, from the ROOT file. Sorry for taking your time -- I learned a lot from your answer. Now, creating a new Nominal image that includes Lambda.thy and ensuring continuous checking I get output for my theory file in seconds. – Gergely Mar 26 '14 at 09:41
  • @Gergely: Glad you worked out your problem! Sorry for the confusion about the first image; I just built `Main` to get a screenshot of the build dialog, not because you yourself should be building main. I'll update the answer to make it clearer. – davidg Mar 26 '14 at 11:17
  • that did not confuse me at all, that was a familiar window for anybody who has ever started Isabelle/JEdit for the first time. – Gergely Mar 26 '14 at 11:23