Module Analysis
Interface between strategy and low-level analysis
An analysis distinguishes exactly one system as the top system, and looks at its properties and its contract. Subsystems are view either as abstract with their contract or as concrete with their implementations.
The result of an analysis indicates which properties of the top system are invariant, whether the system conforms to its contract and whether it conforms to the preconditions of all its subsystems.
Values of type param are produced by a strategy and parameterize the input-specific transitions system generators, in particular the slicing ot the cone of influence.
Values of type result are produced by running an analysis of a generated transition system. The accumulated results are used by a strategey to decide the next steps.
**NB:** The uid stored in an info must be unique because it is used during transition system generation to avoid name clashes in UFs and svars.
- author
- Christoph Sticksel
val assumptions_empty : assumptionsEmpty assumptions.
Merges two assumptions.
val assumptions_merge : assumptions -> assumptions -> assumptionsMerges two assumptions.
Assumptions of a transition system.
val assumptions_of_sys : TransSys.t -> assumptionsAssumptions of a transition system.
Fold over assumptions.
val assumptions_fold : ('a -> Scope.t -> Invs.t -> 'a) -> 'a -> assumptions -> 'aFold over assumptions.
type info={top : Scope.t;uid : int;abstraction_map : bool Scope.Map.t;assumptions : assumptions;}Information for the creation of a transition system
val shrink_info_to_sys : info -> TransSys.t -> infoShrinks an abstraction map to the subsystems of a system.
type param=|Interpreter of infoAnalysis of the contract of a system.
|ContractCheck of infoFirst analysis of a system.
|First of infoRefinement of a system. Store the result of the previous analysis.
|Refinement of info * resultParameter of an analysis.
and result={param : param;time : float;sys : TransSys.t;contract_valid : bool option;requirements_valid : bool option;}Result of analysing a transistion system
val info_clone : info -> infoval param_clone : param -> paramval info_of_param : param -> infoThe info or a param.
val shrink_param_to_sys : param -> TransSys.t -> paramShrinks a param to a system.
val param_scope_is_abstract : param -> Scope.t -> boolReturn
trueif a scope is flagged as abstract in theabstraction_mapof aparam. Default tofalseif the node is not in the map.
val param_assumptions_of_scope : param -> Scope.t -> Invs.tRetrieve the assumptions of a
scopefrom aparam.
val mk_result : param -> TransSys.t -> float -> resultReturns a result from an analysis.
val result_is_all_proved : result -> boolReturns true if all properties in the system in a
resulthave been proved.
val result_is_some_falsified : result -> boolReturns true if some properties in the system in a
resulthave been falsified.
val mk_results : unit -> resultsCreates a new
results.
val results_find : Scope.t -> results -> result listReturns the list of results for a top scope.
Raises
Not_foundif not found.
val results_length : results -> intReturns the total number of results stored in a
results. Used to generate UIDs forparams.
val results_is_safe : results -> bool optionReturns
Noneif no properties were falsified but some could not be proved,Some trueif all properties were proved, andSome falseif some were falsified.
val results_clean : results -> resultsCleans the results by removing nodes that don't have any property or contract.
val pp_print_param : bool -> Stdlib.Format.formatter -> param -> unitPretty printer for
param.
val pp_print_result_quiet : Stdlib.Format.formatter -> result -> unitPretty printer for
result, quiet version.
val pp_print_result : Stdlib.Format.formatter -> result -> unitPretty printer for
result.