library colibrilib.fp_conv — module Exportmodule Export6290use list.List6291use colibrilib.ring.Atom6292use colibrilib.fbin.Fp6293use Env6294use Rules6295use GTerm6296use Conv6297use Linearize6298use list.Mem as LM6299use option.Option6300use colibrilib.polynome.Lin as Lin6301use real.RealInfix6302use colibrilib.fp.Ereal6303use colibrilib.stda.StdA as A63046305let convert (d: env) (g: ground) : bool6306= Conv.convert d g6307
r was registered on the branch of d or above (trusted: the daemons of colibri2 are backtracked with the propagators)
Valid (50ms) (colibri2)let run [@requires:trusted "fp_conv_w.ml runs a propagator only while it is registered: on the branch of its registration or below, same model, live only if that one is"] (d: env) (r: reg) : bool6311requires { model_of d = r.rm /\ (live d -> r.rl) }6312= Rules.run_reg d r6313Valid (42ms) (colibri2)6314let may_change [@requires:trusted "fp_conv_w.ml runs a propagator only while it is registered: on the branch of its registration or below, same model, live only if that one is"] (d: envp ro) (r: reg) : bool6315requires { model_of d = r.rm /\ (live d -> r.rl) }6316= Rules.may_change_reg d r63176318type rounding = Linearize.rounding6319
The rounding of the ground term g (fp.add, fp.mul, fp.div), for the linearization of fp_to_real.ml
Valid (42ms) (colibri2)let rounding_of (d: env) (g: ground) : option rounding6323ensures { match result with6324| Some r -> r.gm = d.model /\ r.gl = live d6325| None -> true end }6326= Linearize.rounding_of d g6327
The bounds of a rounding for the simplex: p >= 0 (true) or p <= 0 (false)
Valid (50ms) (colibri2)let equations [@requires:trusted "fp_to_real.ml uses a rounding only while it is registered: on the branch of its registration or below, same model, live only if that one is"] (d: env) (g: rounding) : list (Lin.t, bool)6331requires { d.model = g.gm /\ (live d -> g.gl) }6332ensures { live d -> forall pk. LM.mem pk result -> bound_holds d.mr pk }6333= Linearize.equations d g6334
The rounding of a real (Env.round_a)
Valid (45ms) (colibri2)let round_a (fm: format) (m: mode) (a: A.t) : t6337ensures { result = round_f fm m (A.real a <. 0.0) (Fin (A.real a)) }6338= Env.round_a fm m a6339end6340