package frama-c
Install
dune-project
Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
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
-
RRemi Lazarini
-
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
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=d2fbb3b8d0ff83945872e9e6fa258e934a706360e698dae3b4d5f971addf7493
doc/qed/Qed/Export_why3/Make/argument-1-T/index.html
Parameter Make.T
module ADT : Logic.Datamodule Field : Logic.Fieldmodule Fun : Logic.Functionmodule Var : Logic.Variablemodule Term : Logic.Symbol with type t = termNon-structural, machine dependent, but fast comparison and efficient merges
Non-structural, machine dependent, but fast comparison and efficient merges
Structuraly ordered, but less efficient access and non-linear merges
Structuraly ordered, but less efficient access and non-linear merges
Variables
type var = Var.ttype tau = (Field.t, ADT.t) Logic.datatypemodule Tau : Logic.Data with type t = tauval sort_of_var : var -> Logic.sortval base_of_var : var -> stringTerms
type repr = term expressionval decide : term -> boolReturn true if and only the term is e_true. Constant time.
val is_true : term -> Logic.maybeConstant time.
val is_false : term -> Logic.maybeConstant time.
val is_prop : term -> boolBoolean or Property
val is_int : term -> boolInteger sort
val is_real : term -> boolReal sort
val is_arith : term -> boolInteger or Real sort
val are_equal : term -> term -> Logic.maybeComputes equality
val sort : term -> Logic.sortConstant time
Path-positioning access
This part of the API is DEPRECATED
Basic constructors
val e_true : termval e_false : termval e_bool : bool -> termval e_int : int -> termval e_float : float -> termQuantifiers and Binding
val e_bind : Logic.binder -> var -> term -> termBind the given variable if it appears free in the term, or return the term unchanged.
Opens the top-most bound variable with a (fresh) variable. Can be only applied on top-most lc-term from `Bind(_,_,_)`, thanks to typing.
val e_open :
pool:pool ->
?forall:bool ->
?exists:bool ->
?lambda:bool ->
term ->
(Logic.binder * var) list * termOpen all the specified binders (flags default to `true`, so all consecutive top most binders are opened by default). The pool must contain all free variables of the term.
val e_close : (Logic.binder * var) list -> term -> termCloses all specified binders
Generalized Substitutions
module Subst : sig ... endThe environment sigma must be prepared with the desired substitution. Its pool of fresh variables must covers the entire domain and co-domain of the substitution, and the transformed values.
Locally Nameless Representation
These functions can be unsafe because they might expose terms that contains non-bound b-vars. Never use such terms to build substitutions (sigma).
val lc_closed : term -> boolAll bound variables are under their binder
Similar to f_iter but exposes non-closed sub-terms of `Bind` as regular term values instead of lc_term ones.
Iteration Scheme
val f_map :
?pool:pool ->
?forall:bool ->
?exists:bool ->
?lambda:bool ->
(term -> term) ->
term ->
termPass and open binders, maps its direct sub-terms and then close then opened binders Raises Invalid_argument in case of a bind-term without pool. The optional pool must contain all free variables of the term.
val f_iter :
?pool:pool ->
?forall:bool ->
?exists:bool ->
?lambda:bool ->
(term -> unit) ->
term ->
unitIterates over its direct sub-terms (pass and open binders) Raises Invalid_argument in case of a bind-term without pool. The optional pool must contain all free variables of the term.
Partial Typing
val typeof :
?field:(Field.t -> tau) ->
?record:(Field.t -> tau) ->
?call:(Fun.t -> tau option list -> tau) ->
term ->
tauTry to extract a type of term. Parameterized by optional extractors for field and functions. Extractors may raise Not_found ; however, they are only used when the provided kinds for fields and functions are not precise enough.
Support for Builtins
Register a simplifier for function f. The computation code may raise Not_found, in which case the symbol is not interpreted.
If f is an operator with algebraic rules (see type operator), the children are normalized before builtin call.
Highest priority is 0. Recursive calls must be performed on strictly smaller terms.
The force parameters defaults to false, when it is true, if there exist another builtin, it is replaced with the new one. Use with care.
Register a builtin for rewriting f a1..an into f b1..bm.
This is short cut for set_builtin, where the head application of f avoids to run into an infinite loop.
The force parameters defaults to false, when it is true, if there exist another builtin, it is replaced with the new one. Use with care.
set_builtin_get f rewrite register a builtin for rewriting (f a1..an)[k1]..[km] into rewrite (a1..an) (k1..km).
The force parameters defaults to false, when it is true, if there exist another builtin, it is replaced with the new one. Use with care.
Register a builtin for simplifying (f e…).fd expressions. Must only use recursive comparison for strictly smaller terms.
The force parameters defaults to false, when it is true, if there exist another builtin, it is replaced with the new one. Use with care.
Register a builtin equality for comparing any term with head-symbol. Must only use recursive comparison for strictly smaller terms. The recognized term with head function symbol is passed first.
Highest priority is 0. Recursive calls must be performed on strictly smaller terms.
The force parameters defaults to false, when it is true, if there exist another builtin, it is replaced with the new one. Use with care.
Register a builtin for comparing any term with head-symbol. Must only use recursive comparison for strictly smaller terms. The recognized term with head function symbol can be on both sides. Strict comparison is automatically derived from the non-strict one.
Highest priority is 0. Recursive calls must be performed on strictly smaller terms.
The force parameters defaults to false, when it is true, if there exist another builtin, it is replaced with the new one. Use with care.
Specific Patterns
val affine : term -> term Logic.affineSymbol
type t = termval id : t -> intunique identifier (stored in t)
val hash : t -> intconstant access (stored in t)
val pretty : Format.formatter -> t -> unitval weigth : t -> intInformal size
Utilities
val is_closed : t -> boolNo bound variables
val is_simple : t -> boolConstants, variables, functions of arity 0
val is_atomic : t -> boolConstants and variables
val is_primitive : t -> boolConstants only
val size : t -> intval basename : t -> stringval debug : Format.formatter -> t -> unitval pp_id : Format.formatter -> t -> unitinternal id
val pp_rid : Format.formatter -> t -> unithead symbol with children id's
val pp_repr : Format.formatter -> repr -> unithead symbol with children id's
Shared sub-terms
Occurrence check. is_subterm a b returns true iff a is a subterm of b. Optimized wrt shared subterms, term size, and term variables.
Computes the sub-terms that appear several times. shared marked linked e returns the shared subterms of e.
The list of shared subterms is consistent with order of definition: each trailing terms only depend on heading ones.
The traversal is controlled by two optional arguments:
sharedthose terms are not traversed (considered as atomic, default to none)shareablethose terms (is_simpleexcepted) that can be shared (default to all)subtermsthose sub-terms a term to be considered during traversal (lc_iterby default)
Low-level shared primitives: shared is actually a combination of building marks, marking terms, and extracting definitions:
let share ?... e =
let m = marks ?... () in
List.iter (mark m) es ;
defs m Create a marking accumulator. Same defaults than shared.
Mark a term to be explicitly shared