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

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 20:27:36

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.

First, you need to set up a "session" for your isabelle_afp directory. This is done by creating a file ROOT (inside isabelle_afp) which contains an entry of the following shape (see also isabelle doc system Chapter 3: Isabelle sessions and build management)

session session_name = HOL +
  theories
    Theory1
    Theory2
    Theory3

This roughly means that the heap image session_name should be based on the HOL heap image and additionally contain the theories Theory1, Theory2, ...

Now invoke isabelle jedit -d isabelle_afp -l session_name. When done for the first time, this builds the heap image of session session_name. As long as nothing in isabelle_afp changes, any further invocations will directly start Isabelle/jEdit on top of the prebuilt heap image session_name.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!