The idea of ikiwiki + monotone is intriguing. The distributed
nature of monotone (and other revision control systems like git and
mercurial) would add robustness, and promote the development of
alternative interfaces, as you suggest. Also, the cryptographic
hashes of monotone brings to mind an infrastructure with
independent trusted Isabelle verification nodes, which
asynchronously inspect the database and certify results. This would
seem to provide a convenient way of decoupling the verification
engine from the database, and likewise the database from the wiki
and other human interfaces. Even if they're all running on the same
server at first, this will help us scale over time.
I'm not sure whether ikiwiki and/or monotone specifically are ideal
choices (now or eventually), but we should definitely look more into
this. In any case, there are broader architectural issues, whatever
wiki and database we choose in the short- & long-term.
1. Several people have been thinking about how Isabelle might
asynchronously process proof documents:
http://homepages.inf.ed.ac.uk/rpollack/mathWiki/slides/Wenzel.pdf
http://www.ags.uni-sb.de/~omega/workshops/UITP08/gast.pdf
2. There are several possible ways of dealing with dependencies and
changes in definitions and theorem statements. Slawekk has proposed
some relatively simple rules:
http://groups.google.com/group/vdash/browse_thread/thread/6e514585a7a5110f/2b39f4554217f466?lnk=gst&q=slawekk#2b39f4554217f466
and I think we'd do well with something like that initially, though
people have thought through more elaborate options (e.g., slides 14-39 of
http://homepages.inf.ed.ac.uk/rpollack/mathWiki/slides/Corbineau.pdf ).
As Mike K pointed out, we should make our initial design decisions
so as to facilitate data entry and verification, even if that means
knowing that we'll have to add more sophisticated layers later.
Thoughts about these two design decisions, or other architectural issues?
Best,
- Cameron
Shortly after posting here, I encountered a few lines on the
monotone mailing list. They were talking about the history of
monotone, and the reason it is called monotone. It almost seems
prescient looking at these words from vdash perspecitve.
: Feb 09 16:32:22 graydon I initially wrote monotone in order to support
: the use-case of a "monotonically improving branch", where there's a
: view
: of a branch which never gets worse, constructed by selecting only the
: branch certs signed by an automatic tester.
: Feb 09 16:32:41 graydon this way a customer or user who wanted "new,
: but
: never worse" software could view the branch that way
: Feb 09 16:33:22 graydon or alternatively, a developer could configure
: their update rules to exclude stuff other people wrote which isn't
: working yet
The "branch certs" are certificates that a given revision is on a
particular development branch; in this case the development branch that
consists of code that is actually recommended to users.
The "automatic tester" they had in mind is something like a
regression suite, a common tool in software development.
But we would be using a correctness tester, not just a regression
tester!
Along the lines of software development, we could have the following
model. Each mathematician has access to the repository. He uses it to
check out theorems proofs, and theories, and writes new ones, using
locally available software of his choice. Such software could of
course also be part of the repository. When done to his satisfaction,
possibly checked locally with his own version of the erifier,
he checks in his new proofs.
Sometime later, an official repository verifier (which could be
operating on a different copy) certifies the changes or not.
These certificates are then spread far and wide as to the replicates of
the repository.
Where does the wiki fit into this model? Wherever anyone likes. It
could be, initially, as simple as a graphical tool to examine the
repository. It could be a web site that displays it. And it could
actually allow changes to be checked in and propagated.
The minimum required to start this is:
(a) the repository system
(b) a verifier
(c) a tool for applying the verifier to a copy of the repository and
generating certificates.
Displaying everything nicely (as a web site or a wiki) can come later,
but for public-relations purposes, it should come soon. It makes it
possible to have people use the system without having their own
repository.
-- hendrik
> 1. Several people have been thinking about how Isabelle might
> asynchronously process proof documents:
> http://homepages.inf.ed.ac.uk/rpollack/mathWiki/slides/Wenzel.pdf
> http://www.ags.uni-sb.de/~omega/workshops/UITP08/gast.pdf
>
> 2. There are several possible ways of dealing with dependencies and
> changes in definitions and theorem statements. Slawekk has proposed
> some relatively simple rules:
> http://groups.google.com/group/vdash/browse_thread/thread/6e514585a7a5110f/2b39f4554217f466?lnk=gst&q=slawekk#2b39f4554217f466
> and I think we'd do well with something like that initially, though
> people have thought through more elaborate options (e.g., slides 14-39 of
> http://homepages.inf.ed.ac.uk/rpollack/mathWiki/slides/Corbineau.pdf ).
>
> As Mike K pointed out, we should make our initial design decisions
> so as to facilitate data entry and verification, even if that means
> knowing that we'll have to add more sophisticated layers later.
like the distributed repository and a verifier? The web site/wiki could
be one of the first later layers.
>
> Thoughts about these two design decisions, or other architectural issues?
There's one theoretical problem with the use of monotone, or any
distributed revision control system. They use hash codes to identify
entities. The hash codes are cryptographically secure, and it is
unlikely that two theorems or documents or programs will ever have
the same hash codes by accident, but the possibility is there.
I suggested to the monotone developers that they provide a more
explicitly managed naming system for all the entities thay are
managing. They refused, on grounds of reliability. It turns out that
systems systematically organised to provide unique names fail in
practice because of human or other mismanagement.
For example, there have been duplicate IP numbers and duplicate domain
names on the internet, and there have been ethernet devices with
duplicate MAC addresses.
All of these have happened with far greater frequency than duplicate
64-but cryptographic hash codes.
There should be no practical problem using hash codes that
are long enough that collision would be unlikely from now until the sun
goes nova.
-- hendrik
And far lower frequency than my typing errors :-( I meant, of course,
64-bit cryptographic hash codes.
-- hendrik
Mike.
This makes a lot of sense. In principle the wiki (or other UI),
database (including a possible revision control system), and
theorem prover (Isabelle) could all be on different machines, but
it's the latter component that will require the most computing power.
Does it make sense to do this over PGIP (like the Isabelle server
to which you linked), or something more elaborate like Gast's
Asynchronous Proof Processing (APP) proposal?:
http://www.ags.uni-sb.de/~omega/workshops/UITP08/gast.pdf
It might be best to do something much simpler, since revision
control could keep track of the versions, and in any case we need
much less fine-grained interactivity than the typical uses for
either PGIP or APP. At first, we can probably give each revision a
unique ID, and just have Isabelle process each document once,
shortly after it first enters the database. (As Hendrik suggests
with his comments on Monotone, maybe this is the right way to do
things indefinitely also.)
What fields in the database should the Isabelle server update?
We don't need any real interactivity, but we should try to harvest
as much data from the Isabelle run-through as we can. In addition
to updating certain flags, it could tell Monotone to add a given
entry to the current version of "all verified truths", but
(especially for documents that don't parse correctly) it would be
useful for the wiki (and future more elaborate UIs) to have access
to a log of detailed error messages and other Isabelle output as well.
- Cameron
Gary Boswell
If you use monotone, you don;t change the verified document if Isabelle
approves it; you add a certificate to the data base. The certificate
will refer to the revision it certifies. It should probably
also identify the exact copy and version of Isabelle used for the
verification, just in case.
If Isabelle disapproves, it's not clear what you want to put in the data
base. Are the failure reports from Isabelle detailed and bulky?
Are they worth distributing to all replications of the repository
forever? I suspect they will only be only of transient interest.
Oerhaps they are best placed on a suitable mailing list, and/or sent to
the mathematicion that contributed the alleged piece of proof.
I was originally imagining that the originating mathematician would be
able to use his own version of Isabelle, in which case less of this
would be necessary.
-- hendrik
Right, in the case of success, there's not much to add other than
the certificate. Maybe a list of dependencies (gathered by the
Isabelle server from the database, before parsing with Isabelle
proper) would be useful.
In the case of failure, I was thinking that the error from Isabelle
(suitably parsed) could be usefully displayed in the wiki. Some
people will want to write polished documents on their own local copy
and then upload; but for those adding sketchier proof outlines
directly to the wiki (something I think we should encourage), a
brief indication of where Isabelle failed could help those working
on future revisions.
- Cameron
It would probably save effort if those submitting anything were
required to make it explicit if they thought it was ready for
formal checking.
>
> - Cameron
>
> >
Definitely not anything more elaborate. PGIP is the right way. I would not do it though, because it is still too much work. It was designed to do much more than we need. I would do something much simpler and ad-hoc, to get things going.
I think the right moment to do verification would be be when the user hits the "Preview" button. What he sees after that should give him an opportunity for corrections. I will contribute stuff to wiki that will be verified, but we can not make that a requirement. We should not require to install anything. We don't need an elaborate GUI, but some level of interaction is necessary to call the thing a wiki.
Slawekk