Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] How to specify the options when calling wp_compute?


  • Subject: [Frama-c-discuss] How to specify the options when calling wp_compute?
  • From: boris at yakobowski.org (Boris Yakobowski)
  • Date: Thu, 3 Nov 2011 15:48:05 +0100

Hi,

On 03/11/2011 15:24, ??? wrote:
> let module OLS = Datatype.Option(Datatype.List(Datatype.String)) in
>         let module OKF = Datatype.Option(Kernel_function) in
>         let module OP = Datatype.Option(Property) in
>         let wp_compute = Dynamic.get ~plugin:"Wp" "wp_compute" (Datatype.func3 OKF.ty OLS.ty OP.ty Datatype.unit) in
>
>         wp_compute (Some(kf)) bhv (Some(ip));
>
> and the type of bhv is: string list option
> When the value of bhv as None(another case is not tested), it will raise an exception ,described as follow:
> Unexpected error (Type.Make_tbl(Key)(Info).Incompatible_type("Wp.wp_compute has type Cil_datatype.Kf.t option -> string list -> identified property option -> unit
> but is used with type Cil_datatype.Kf.t option -> string list option -> identified property option -> unit.")).
> I wonder how it is.

Given the error message, it seems that you query the wp_compute
function inside the dynamic api with a wrong type: string list vs.
string list option. First, declare OLS as
let module OLS = Datatype.List(Datatype.String) in
Then  your behaviors should not be an option, but directly the list of
behaviors you want to prove (or the empty list if you want to prove
all of them).

Hope this helps,

-- 
Boris Yakobowski
Ing?nieur-chercheur CEA/LIST
Laboratoire pour la Suret? des Logiciels
T?l. : 01 69 08 82 98