Referring to AFP Entries

 

Once you have downloaded the AFP, you can include its articles and theories in your own developments. If you would like to make your work available to others without having to include the AFP articles you depend on, here is how to do it.

If you are using Isabelle 2016-1, and have downloaded your AFP directory to /home/myself/afp, you should run the following commands [1] [2]:

    mkdir -p ~/.isabelle/Isabelle2016-1/etc/
    echo "/home/myself/afp" >> ~/.isabelle/Isabelle2016-1/etc/components

You can now refer to article ABC from the AFP in some theory of yours via

    imports "$AFP/ABC/Some_ABC_Theory"

This allows you to distribute your material separately from any AFP theories. Users of your distribution also need to install the AFP in the above manner.

Note that referring to another AFP entry from inside an AFP entry is different and much easier:

    imports "../ABC/Some_ABC_Theory"
For working inside the AFP, this is the mandated option. It interacts correctly with multiple AFP installations side by side.

You can also use this method in your own work outside the AFP, you only need to place the AFP entries you refer to next to your development in the correct location in the directory hierarchy.

If you build on one other AFP entry, your ROOT file should make this explicit:

session my_session = base_session +
This avoids rerunning the base_session theories by building on the base_session image instead. Thus running times of AFP regression tests are reduced!

 

[1]: Tested for Linux and Mac installations ‐ it should be the same under cygwin on Windows.

[2]: This is one method for installing the AFP as a component. Any other method for adding Isabelle components will work as well.