Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] allowed types in imperative programs

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] allowed types in imperative programs


chronological Thread 
  • From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre AT lri.fr>
  • To: ""Savi Maharaj"" <savi AT cs.stir.ac.uk>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] allowed types in imperative programs
  • Date: Sat, 24 Aug 2002 14:58:58 +0200 (MEST)
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

"Savi Maharaj" writes:
 > 
 > I am playing around with the "Correctness" tactic and would like some
 > more information about the types that I am allowed to use in annotated
 > programs. My impression is that, according to the manual (Section
 > 16.2.2) any cic_term may be used as a type. 

Yes, indeed.

 > However, the syntax of
 > expressions (Fig 16.1) is much more limited. So, for example, I can
 > introduce a variable l of type "list nat", but I cannot then write
 > expressions such as "head l", so what I can actually do with l is
 > very limited.

Any  call to  a pure  function  is allowed  in an  expression, and  it
includes  any Coq function  such as  head. Therefore  "(head l")  is a
valid  expression.  But note  that  parentheses  are mandatory  around
function calls; this may explain the syntax error...

I take  this opportunity  to mention the  availability of a  new tool,
called Why,  to certify imperative  programs with Coq,  which strictly
subsumes the Correctness tactic. You'll find it at

       http://why.lri.fr

together with many examples (a  little more than those developped with
Correctness). In particular,  this tool includes weakest preconditions
computations when  intermediate annotations  are missing (this  is not
done by Correctness).

Best regards,
-- 
Jean-Christophe Filliâtre (http://www.lri.fr/~filliatr)





Archive powered by MhonArc 2.6.16.

Top of Page