From: "Harrison, John R" <john.r.harrison@intel.com>
To: <david.baelde@ens-lyon.org>
Cc: <caml-list@inria.fr>
Subject: RE: [Caml-list] Implementation of a prover
Date: Wed, 11 Apr 2007 16:55:19 -0700 [thread overview]
Message-ID: <509223F0BF55E74FA1247D17207E7A0C014E571E@orsmsx419.amr.corp.intel.com> (raw)
In-Reply-To: <53c655920703121441k5004991et194b046ebb601a8a@mail.gmail.com>
David Baelde writes:
| There are well-known implementation techniques for
| depth-first theorem proving, using continuation-passing
| style (success/failure continuations). But these techniques
| do not easily allow the building of a proof witness. This is
| nice when you have a working proof-search procedure but not
| when you're still playing with a logic, trying to find the
| right procedure or more generally when you just want an
| interactive prover.
I don't know exactly what theorem-proving algorithm you have
in mind, but I guess you mean some "top down" method like free
variable tableaux, Prolog or model elimination.
An approach that I've found effective is to pass along a
closure that will create the proof when applied to a suitable
argument (e.g. the final instantiation of the free variables).
In an algorithm where you explore a large search space but
eventually get a small proof, you postpone any real proof
construction until it's useful, not just an intermediate
result in a failed branch. This is particularly valuable if
your inference process is relatively expensive, as in a
traditional LCF-style prover.
Of course, an alternative is just to pass along some simple
concrete data structure like a tree. Again this fits easily
into the continuation-passing style. But closures can be a
bit more flexible, and OCaml seems to handle closures very
efficiently, so one needn't be afraid to use them.
You can find an example in the code on my Web page, with
a proof-less tableau prover "tableau" here:
http://www.cl.cam.ac.uk/~jrh13/atp/OCaml/tableaux.ml
and a proof-producing "tableau" function here:
http://www.cl.cam.ac.uk/~jrh13/atp/OCaml/checking.ml
You can see that they are structurally very close.
John.
prev parent reply other threads:[~2007-04-11 23:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-12 21:41 David Baelde
2007-04-11 23:55 ` Harrison, John R [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=509223F0BF55E74FA1247D17207E7A0C014E571E@orsmsx419.amr.corp.intel.com \
--to=john.r.harrison@intel.com \
--cc=caml-list@inria.fr \
--cc=david.baelde@ens-lyon.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox