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=5b13574a16a58971c27909bee94ae7f37b17d897852b40c768a3d4e2e09e39d2
doc/frama-c.kernel/Frama_c_kernel/Property_status/index.html
Module Frama_c_kernel.Property_status
Status of properties.
Local status
A local status (shortly, a status) of a property is a status directly set by an emitter. Thus a property may have several distinct status according to who attempts the verification.
Emitting a status
type emitted_status = | True(*for each execution path
*)epfrom the program entry point tos, the formula(/\_{h in H} h) ==> P(ep)is true| False_if_reachable(*for each execution path
*)epfrom the program entry point tos, the formula(/\_{h in H} h) ==> P(ep)is false| False_and_reachable(*it exists an execution path
*)epfrom the program entry point tossuch that the formula(/\_{h in H} h) ==> P(ep)is false| Dont_know(*any other case
*)
Type of status emitted by analyzers. Each Property is attached to a program point s and implicitly depends on an execution path from the program entry point to s. It also depends on an explicit set of hypotheses H indicating when emitting the property (see function emit).
module Emitted_status : Datatype.S with type t = emitted_statusexception Inconsistent_emitted_status of emitted_status * emitted_statusval emit :
Emitter.t ->
hyps:Property.t list ->
Property.t ->
?distinct:bool ->
emitted_status ->
unitemit e ~hyps p s indicates that the status of p is s, is emitted by e, and is based on the list of hypothesis hyps. If e previously emitted another status s', it must be emitted with the same hypotheses and a consistency check is performed between s and s' and the best (by default the strongest) status is kept. If distinct is true (default is false), then we consider than the given status actually merges several statuses coming from distinct execution paths. The strategy for computing the best status is changed accordingly. One example when ~distinct:true may be required is when emitting a status for a pre-condition of a function f since the status associated to a pre-condition p merges all statuses of p at each callsite of the function f.
val emit_and_get :
Emitter.t ->
hyps:Property.t list ->
Property.t ->
?distinct:bool ->
emitted_status ->
emitted_statusLike emit but also returns the computed status.
val logical_consequence : Emitter.t -> Property.t -> Property.t list -> unitlogical_consequence e ppt list indicates that the emitter e considers that ppt is a logical consequence of the conjunction of properties list. Thus it lets the kernel automatically computes it: e must not call functions emit* itself on this property, but the kernel ensures that the status will be up-to-date when getting it.
val legal_dependency_cycle : Emitter.t -> Property.Set.t -> unitThe given properties may define a legal dependency cycle for the given emitter.
val self : State.tThe state which stores the computed status.
Getting a (local) status
type emitter_with_properties = private {emitter : Emitter.Usable_emitter.t;mutable properties : Property.t list;logical_consequence : bool;(*Is the emitted status automatically inferred?
*)
}type inconsistent = private {valid : emitter_with_properties list;invalid : emitter_with_properties list;
}type status = private | Never_tried(*Nobody tries to verify the property
*)| Best of emitted_status * emitter_with_properties list(*Best(s, l):s: The know more precise statusl: who attempt the verification under which hypotheses
| Inconsistent of inconsistent(*someone locally says the property is valid and someone else says it is invalid: only the consolidated status may conclude.
*)
Type of the local status of a property.
include Datatype.S with type t = status
include Datatype.S_no_copy with type t = status
val packed_descr : Structural_descr.packPacked version of the descriptor.
val reprs : t listList of representants of the descriptor.
val hash : t -> intHash function: same spec than Hashtbl.hash.
val pretty : Format.formatter -> t -> unitPretty print each value in an user-friendly way.
val mem_project : (Project_skeleton.t -> bool) -> t -> boolmem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.
val get : Property.t -> statusIteration on all the individual statuses emitted for the given property.
val iter_on_statuses :
(emitter_with_properties -> emitted_status -> unit) ->
Property.t ->
unitval fold_on_statuses :
(emitter_with_properties -> emitted_status -> 'a -> 'a) ->
Property.t ->
'a ->
'aval register_status_update_hook :
(emitter_with_properties -> Property.t -> emitted_status -> unit) ->
unitRegisters an hook to be called each time a property status is emitted.
Consolidated status
module Consolidation : sig ... endConsolidation of a property status according to the (consolidated) status of the hypotheses of the property.
module Feedback : sig ... endLighter version than Consolidation
module Consolidation_graph : sig ... endSee the consolidated status of a property in a graph, which all its dependencies and their consolidated status.
Iteration over the registered properties
val iter : (Property.t -> unit) -> unitval fold : (Property.t -> 'a -> 'a) -> 'a -> 'aval iter_sorted :
cmp:(Property.t -> Property.t -> int) ->
(Property.t -> unit) ->
unitval fold_sorted :
cmp:(Property.t -> Property.t -> int) ->
(Property.t -> 'a -> 'a) ->
'a ->
'aAPI not for casual users
val register : Property.t -> unitRegister the given property. It must not be already registered.
val register_property_add_hook : (Property.t -> unit) -> unitAdd an hook that will be called for any newly registered property
val remove : Property.t -> unitRemove the property deeply. Must be called only when removing the corresponding annotation.
val register_property_remove_hook : (Property.t -> unit) -> unitAdd an hook that will be called each time a property is removed.
val merge : old:Property.t list -> Property.t list -> unitmerge old new registers properties in new which are not in old and removes properties in old which are not in new.
val automatically_computed : Property.t -> boolIs the status of the given property only automatically handled by the kernel?