package frama-c
Install
dune-project
Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
TTristan Le Gall
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=9c1b14a689ac8ccda9e827c2eede13bb8d781fb8e4e33c1b5360408e312127d2
doc/frama-c-wp.core/Wp/Conditions/index.html
Module Wp.ConditionsSource
Proof Task and Simplifiers
Predicate Introduction
Introduce universally quantified formulae: head forall quantifiers are instanciated to fresh variables in current pool and left-implies are extracted, recursively.
Introduce existential quantified formulae: head exist quantifiers are instanciated to fresh variables, recursively.
Sequent
type step = private {mutable id : int;(*See
*)indexsize : int;vars : Lang.F.Vars.t;stmt : Frama_c_kernel.Cil_types.stmt option;descr : string option;deps : Frama_c_kernel.Property.t list;warn : Warning.Set.t;condition : condition;
}and condition = | Type of Lang.F.pred(*Type section, not constraining for filtering
*)| Have of Lang.F.pred(*Normal assumptions section
*)| When of Lang.F.pred(*Assumptions introduced after simplifications
*)| Core of Lang.F.pred(*Common hypotheses gather from parallel branches
*)| Init of Lang.F.pred(*Initializers assumptions
*)| Branch of Lang.F.pred * sequence * sequence(*If-Then-Else
*)| Either of sequence list(*Disjunction
*)| State of Mstate.state(*Memory Model snapshot
*)
List of steps
val step :
?descr:string ->
?stmt:Frama_c_kernel.Cil_types.stmt ->
?deps:Frama_c_kernel.Property.t list ->
?warn:Warning.Set.t ->
condition ->
stepCreates a single step
val update_cond :
?descr:string ->
?deps:Frama_c_kernel.Property.t list ->
?warn:Warning.Set.t ->
step ->
condition ->
stepUpdates the condition of a step and merges descr, deps and warn
Pre-computed and available in constant time.
At the cost of the union of hypotheses and goal.
val seq_branch :
?stmt:Frama_c_kernel.Cil_types.stmt ->
Lang.F.pred ->
sequence ->
sequence ->
sequenceCreates an If-Then-Else branch located at the provided stmt, if any.
Iterate only over the head steps of the sequence. Does not go deeper inside branches and disjunctions.
Compute the total number of steps in the sequence, including nested sequences from branches and disjunctions. Pre-computed and available in constant time.
Attributes unique indices to every step.id in the sequence, starting from zero. Recursively Returns the number of steps in the sequence.
Compute steps' id of sequent left hand-side. Same as ignore (steps (fst s)).
Retrieve a step by id in the sequence. The index function must have been called on the sequence before retrieving the index properly.
Transformations
Rewrite all root predicates in condition
Rewrite all root predicates in step
Rewrite all root predicates in sequence
Rewrite all root predicates in hypotheses and goal
Insert a step in the sequent immediately at the specified position. Parameter at can be size to insert at the end of the sequent (default).
replace a step in the sequent, the one at the specified position.
replace a step in the sequent, the one at the specified position.
Apply the atomic substitution recursively using Lang.F.p_subst f. Function f should only transform the head of the predicate, and can assume its sub-terms have been already substituted. The atomic substitution is also applied to predicates. f should raise Not_found on terms that must not be replaced
Performs existential, universal and hypotheses introductions
Same as introduction but returns the same sequent is None
Performs existential, universal and hypotheses introductions
Predicate for Have and such, Condition for Branch, True for Either
Predicate for Have and such, True for any other
With free variables kept.
With free variables quantified.
register a transformation applied just before close
Bundles
Bundles are mergeable pre-sequences. This the key structure for merging hypotheses with linear complexity during backward weakest pre-condition calculus.
Bundle are constructed in backward order with respect to program control-flow, as driven by the wp calculus.
type 'a attributed =
?descr:string ->
?stmt:Frama_c_kernel.Cil_types.stmt ->
?deps:Frama_c_kernel.Property.t list ->
?warn:Warning.Set.t ->
'aVariables of predicate and the bundle intersects
Performs a diff-based disjunction, introducing If-Then-Else or Either branches when possible. Linear complexity is achieved by assuming bundle ordering is consistent over the list.
Assumes a list of predicates in a Type section on top of the bundle.
Assumes a list of predicates in a Have section on top of the bundle.
val state :
?descr:string ->
?stmt:Frama_c_kernel.Cil_types.stmt ->
Mstate.state ->
bundle ->
bundleStack a memory model state on top of the bundle.
Assumes a predicate in the specified section, with the specified decorations. On ~init:true, the predicate is placed in an Init section. On ~domain:true, the predicate is placed in a Type section. Otherwized, it is placed in a standard Have section.
Construct a branch bundle, with merging of all common parts.
Construct a disjunction bundle, with merging of all common parts.
Computes a formulae equivalent to the bundle. For debugging purpose only.