Re: [Why3-club] Why3-club Digest, Vol 95, Issue 2

2018-11-12 Thread Alan Schmitt
On 2018-11-12 22:05, Guillaume Melquiond writes: This is interesting. What was the motivation to remove polymorphic equality? There are several reasons. One of them is that logical equality (the polymorphic one) does not coincide with program equality (a la OCaml) in presence of ghost fie

Re: [Why3-club] Why3-club Digest, Vol 95, Issue 2

2018-11-12 Thread Guillaume Melquiond
Le 12/11/2018 à 13:10, Alan Schmitt a écrit : Hello, On 2018-11-12 09:05, Claude Marché writes: Since Why3 1.0, there is no polymorphic equality in programs. Hence there is no symbol (=) for type cell in your code, but only the equality for type int. This is interesting. What was the motiva

Re: [Why3-club] structure-typed constant

2018-11-12 Thread Julia Lawall
On Mon, 12 Nov 2018, Andrei Paskevich wrote: > Types with invariants cannot be constructed in logic, because Why3 does not > generate verification conditions for logic declarations. When you write a > record constructor in program code, as in f_init, the invariant becomes part > of the VC. > > N

Re: [Why3-club] structure-typed constant

2018-11-12 Thread Andrei Paskevich
Types with invariants cannot be constructed in logic, because Why3 does not generate verification conditions for logic declarations. When you write a record constructor in program code, as in f_init, the invariant becomes part of the VC. Normally, you should be able to write simply: let constan

[Why3-club] structure-typed constant

2018-11-12 Thread Julia Lawall
I have the following code: type state = { contents : list thread } invariant { Distinct.distinct contents /\ valid_state contents } by { contents = Nil } let function f_init () = { contents = Nil } constant empty_state : state = f_init () (* { contents = Nil } *) Why is the function f_in

Re: [Why3-club] Why3-club Digest, Vol 95, Issue 2

2018-11-12 Thread Alan Schmitt
Hello, On 2018-11-12 09:05, Claude Marché writes: Since Why3 1.0, there is no polymorphic equality in programs. Hence there is no symbol (=) for type cell in your code, but only the equality for type int. This is interesting. What was the motivation to remove polymorphic equality? Best

Re: [Why3-club] Why3-club Digest, Vol 95, Issue 2

2018-11-12 Thread Claude Marché
Since Why3 1.0, there is no polymorphic equality in programs. Hence there is no symbol (=) for type cell in your code, but only the equality for type int. The standard workaround is to declare such an equality function as val (=) (x y:cell) : bool ensures { result <-> x=y } of course one