Module Wp.VCSource

WP Proof Obligation Generator and Management

Proof Obligations

Sourcetype t

elementary proof obligation

Sourceval get_id : t -> string
Sourceval get_model : t -> WpContext.model
Sourceval get_scope : t -> WpContext.scope
Sourceval get_context : t -> WpContext.context
Sourceval get_description : t -> string
Sourceval get_property : t -> Frama_c_kernel.Property.t
Sourceval get_result : t -> Prover.t -> VCS.result
Sourceval get_results : t -> (Prover.t * VCS.result) list
Sourceval get_sequent : t -> Conditions.sequent
Sourceval get_formula : t -> Lang.F.pred
Sourceval is_trivial : t -> bool
Sourceval is_valid : t -> bool

One prover at least returns a valid verdict.

Sourceval has_unknown : t -> bool

At least one non-valid verdict.

Sourceval is_passed : t -> bool

Same as is_valid for non-smoke tests. For smoke-tests, same as is_unknown.

Database

Notice that a property or a function have no proof obligation until you explicitly generate them via the generate_xxx functions below.

Sourceval clear : unit -> unit

List of proof obligations computed for a given property. Might be empty if you don't have used one of the generators below.

Sourceval remove : Frama_c_kernel.Property.t -> unit
Sourceval iter_ip : (t -> unit) -> Frama_c_kernel.Property.t -> unit
Sourceval iter_kf : (t -> unit) -> ?bhv:string list -> Frama_c_kernel.Kernel_function.t -> unit

Generators

The generated VCs are also added to the database, so they can be accessed later. The default value for model is what has been given on the command line (-wp-model option)

Sourceval generate_ip : ?model:string -> Frama_c_kernel.Property.t -> t Frama_c_kernel.Bag.t
Sourceval generate_kf : ?model:string -> ?bhv:string list -> ?prop:string list -> Frama_c_kernel.Kernel_function.t -> t Frama_c_kernel.Bag.t
Sourceval generate_call : ?model:string -> Frama_c_kernel.Cil_types.stmt -> t Frama_c_kernel.Bag.t
Sourceval generate_all : ?model:string -> ?bhv:string list -> ?prop:string list -> unit -> t Frama_c_kernel.Bag.t
  • since 33.0-Arsenic

Prover Interface

Sourceval prove : t -> ?config:VCS.config -> ?mode:Prover.InteractiveMode.t -> ?start:(t -> unit) -> ?progress:(t -> string -> unit) -> ?result:(t -> Prover.t -> VCS.result -> unit) -> Prover.t -> bool Frama_c_kernel.Task.task

Returns a ready-to-schedule task.

Sourceval spawn : t -> ?config:VCS.config -> ?start:(t -> unit) -> ?progress:(t -> string -> unit) -> ?result:(t -> Prover.t -> VCS.result -> unit) -> ?success:(t -> Prover.t option -> unit) -> (Prover.InteractiveMode.t * Prover.t) list -> unit

Same as prove but schedule the tasks into the global server returned by server function below.

The first succeeding prover cancels the other ones.

Sourceval server : ?procs:int -> unit -> Frama_c_kernel.Task.server

Default number of parallel tasks is given by -wp-par command-line option. The returned server is global to Frama-C, but the number of parallel task allowed will be updated to fit the ~procs or command-line options.

Sourceval command : ?provers:Why3.Whyconf.prover list -> ?interactive_mode:Prover.InteractiveMode.t -> ?scripts:bool -> ?strategies:bool -> t Frama_c_kernel.Bag.t -> unit

Run proofs on the provided bag of WPOs. The defaults for the different optional variables are obtained from the current configuration status. That is, the command line when in CLI mode, or what has been configured so far by the user in the GUI mode.

  • before 33.0-Arsenic

    only provers and tip were configurable and the default were computed from the CLI.