coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Perry E. Metzger" <perry AT piermont.com>
- To: Chan Ngo <chan.ngo2203 AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] VST release 1.6
- Date: Mon, 18 Jan 2016 08:41:03 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=perry AT piermont.com; spf=Pass smtp.mailfrom=perry AT piermont.com; spf=None smtp.helo=postmaster AT hacklheber.piermont.com
- Ironport-phdr: 9a23:VIVRrxaYTPbs1is54hppIyL/LSx+4OfEezUN459isYplN5qZpcuybnLW6fgltlLVR4KTs6sC0LqI9fG+EjBfqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh770qsOYP1oArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIZoGJ/3dKUgTLFeEC9ucyVsvJWq5lH/Sl6k5nIaGkMZlVIcCAjM6lf8UZCr6HOhnuV40Siee8bxSOZndy6l6vIhcBLykjZPGnhx1WzLmMN9lugT9AqsvQZu65bVbZuQM/xiOKjaeIVJFiJ6Qs9NWnkZUcuHZIwVAr9EZL4Aog==
On Mon, 18 Jan 2016 11:11:24 +0100 Chan Ngo
<chan.ngo2203 AT gmail.com>
wrote:
> > On Jan 5, 2016, at 11:22 AM, Gabriel Scherer
> > <gabriel.scherer AT gmail.com>
> > wrote:
> >
> > Note that there has already been work on verifying LLVM passes
> > using a variant of your approach M2:
> >
> > Vellmv: Verifying the LLVM
> > Steve Zdancewic, Dmitri Garbuzov, William Mansky, Vivien Durey,
> > Milo M. K. Martin, Jianzhou Zhao, Santosh Nagarakatte
> > 2012-2015
> > http://www.cis.upenn.edu/~stevez/vellvm/
> >
> > This project does not try to generate C++ code, it instead
> > compiles and run the OCaml program extracted from Coq. I think
> > this is a reasonable approach (using either inter-process
> > communication of textual or binary IR representations, or even
> > directly OCaml bindings to the LLVM machinery).
> >
>
> Yes, thanks for the pointers. Somehow I already know these
> projects. However, you see that an interface between OCaml code and
> C++ code supported by LLVM is needed.
LLVM is already constructed so that interfaces between passes are
relatively thin and can be written in different languages -- it is
very straightforward to pass the intermediate representation between
them, and there are bindings to the API in languages other than C++.
> In addition, developers cannot employ the full power of LLVM's API
> provided.
LLVM provides OCaml bindings.
> It is interesting and useful if there exists a toolchain that can at
> least provide a way to make specification of LLVM's pass
> implementation in C++ and prove it is correct.
Perhaps, but I will point out that this is a dramatically more
complicated job than doing the work in the way VELLVM does it.
There are good reasons for being able to prove C code directly correct
-- sometimes there's no choice but to use C code, say if it is very
performance critical and/or very low level and/or part of a larger
codebase that is already written in C.
However, the inside of a compiler which has good separation of module
interfaces doesn't seem like such a case, and regardless, a verified
C++ toolchain does not exist and would a vastly more complicated
undertaking than the already difficult verified C toolchain was.
Producing fully verified software artifacts is already a very
difficult job. I think success in such undertakings partially involves
making sure that one tries not to do more than one needs to in order
to get the job done. If you add too much complexity the work will not
terminate, and even if there were a fully verified C++ toolchain it
would not be simple to work with.
The nice part about writing a code pass in Coq and extracting is that
one is not trying to do more than necessary -- it allows one to focus
on mostly the relevant part (the already difficult task of proving an
optimization or the like correct) and not on the complexities of the
semantics of an implementation language like C++.
Perry
--
Perry E. Metzger
perry AT piermont.com
- Re: [Coq-Club] VST release 1.6, (continued)
- Re: [Coq-Club] VST release 1.6, Chan Ngo, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Adam Chlipala, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Andrew Appel, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Chan Ngo, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Bas Spitters, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Andrew Appel, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Claude Marché, 01/05/2016
- Re: [Coq-Club] VST release 1.6, Chan Ngo, 01/05/2016
- Re: [Coq-Club] VST release 1.6, Gabriel Scherer, 01/05/2016
- Re: [Coq-Club] VST release 1.6, Chan Ngo, 01/18/2016
- Re: [Coq-Club] VST release 1.6, Perry E. Metzger, 01/18/2016
- Re: [Coq-Club] VST release 1.6, Adam Chlipala, 01/04/2016
- Re: [Coq-Club] VST release 1.6, Chan Ngo, 01/04/2016
Archive powered by MHonArc 2.6.18.