--- layout: fc_discuss_archives title: Message 7 from Frama-C-discuss on November 2011 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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