src/Tools/Metis/README
author blanchet
Wed, 15 Sep 2010 19:55:26 +0200
changeset 39430 afb4d5c672bd
child 39433 3e41c9d29769
permissions -rw-r--r--
document Metis updating procedure
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39430
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     1
It's a good idea to update the Metis source code regularly, to benefit
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     2
from the latest developments, to avoid a permanent fork, and to detect
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     3
Metis problems early. This file explains how to update the source code
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     4
for Metis with the latest Metis package. The procedure is
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     5
unfortunately somewhat involved and frustrating, and hopefully
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     6
temporary.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     7
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     8
 1. The directories "src/" and "script/" were initially copied from
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
     9
    Joe Hurd's Metis package. (His "script/" directory has many files
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    10
    in it, but we only need "mlpp".) The package that was used when
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    11
    these notes where written was an unnumbered version of Metis, more
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    12
    recent than 2.2 and dated 19 July 2010.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    13
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    14
 2. The license in each source file will probably not be something we
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    15
    can use in Isabelle. Lawrence C. Paulson's command
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    16
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    17
        perl -p -i~ -w -e 's/MIT license/BSD License/g' *sig *sml
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    18
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    19
    run in the "src/" directory should do the trick. In a 13 Sept.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    20
    2010 email to Gerwin Klein, Joe Hurd, the sole copyright holder of
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    21
    Metis, wrote:
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    22
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    23
        I hereby give permission to the Isabelle team to release Metis as part
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    24
        of Isabelle, with the Metis code covered under the Isabelle BSD license.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    25
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    26
 3. Some modifications have to be done manually to the source files.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    27
    Some of these are necessary so that the sources compile at all
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    28
    with Isabelle, some are necessary to avoid race conditions in a
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    29
    multithreaded environment, and some affect the defaults of Metis's
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    30
    heuristics and are needed for backward compatibility with older
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    31
    Isabelle proofs and for performance reasons. These changes should
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    32
    be identified by a comment
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    33
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    34
        (* MODIFIED by ?Joe ?Blow *)
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    35
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    36
    but the ultimate way to track them down is to use Mercurial. The
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    37
    command
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    38
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    39
        hg diff -r2d0a4361c3ef: src
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    40
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    41
    should do the trick. (You might need to specify a different
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    42
    revision number if somebody updated the Metis sources without
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    43
    updating these instructions.)
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    44
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    45
 4. Isabelle itself only cares about "metis.ML", which is generated
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    46
    from the files in "src/" by the script "make_metis". The script
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    47
    relies on "src/", "scripts/", and a hand-crafted "FILES" file
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    48
    listing all the files needed to be included in "metis.ML". The
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    49
    "FILES" file should be updated to reflect the contents of "src/",
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    50
    although a few files in "src/" are not necessary. Also, the order
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    51
    of the file names in "FILES" matters; X must appear before Y if Y
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    52
    depends on X.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    53
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    54
 5. The output of "make_metis" should then work as is with Isabelle,
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    55
    but there are of course no guarantees. The script "make_metis" has
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    56
    a few evil regex hacks that could go wrong.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    57
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    58
 6. Once you have successfully regenerated "metis.ML", build all of
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    59
    Isabelle and keep an eye on the time taken by Metis.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    60
    "HOL-Metis_Examples" is a good test case. Running the Judgement
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    61
    Day suite at this point is also a good idea.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    62
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    63
 7. Once everything is fine and you are ready to push your changes to
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    64
    the main Isabelle repository, take the time to update these
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    65
    instructions, especially points 1 and 3 above.
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    66
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    67
Good luck!
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    68
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    69
    Jasmin Blanchette
afb4d5c672bd document Metis updating procedure
blanchet
parents:
diff changeset
    70
    15 Sept. 2010