Pulselib.PulseFormulaLinAritmodule L = IBase.Loggingmodule CItv = PulseCItvmodule SatUnsat = PulseSatUnsatmodule Debug = PulseFormulaDebugmodule Var = PulseFormulaVarinclude Ppx_compare_lib.Comparable.S with type t := tval compare : t Base__Ppx_compare_lib.compareval yojson_of_t : t -> Ppx_yojson_conv_lib.Yojson.Safe.tinclude Ppx_compare_lib.Equal.S with type t := tval equal : t Base__Ppx_compare_lib.equaltype 'term_t subst_target = | QSubst of Q.t| ConstantSubst of 'term_t * Var.t optionthe constant term to substitute and, optionally, a fallback variable to substitute with (eg if a variable is equal to a constant string but also to a new canonical representative, the linear arithmetic domain needs to use the latter
*)| VarSubst of Var.t| LinSubst of t| NonLinearTermSubst of 'term_tval is_zero : t -> boolval solve_eq : t -> t -> (Var.t * t) option SatUnsat.tsolve_eq l1 l2 is Sat (Some (x, l)) if l1=l2 <=> x=l, Sat None if l1 = l2 is always true, and Unsat if it is always false
val of_q : Q.t -> tval get_as_const : t -> Q.t optionget_as_const l is Some c if l=c, else None
get_as_variable_difference l is Some (x,y) if l=(x-y) or l=(y-x), else None
val get_constant_part : t -> Q.tget_as_const (c + l) is c
val fold_subst_variables :
t ->
init:'a ->
f:('a -> Var.t -> 'a * _ subst_target) ->
'a * tval subst_variables : t -> f:(Var.t -> _ subst_target) -> tval subst_variable : Var.t -> _ subst_target -> t -> tsame as above for a single variable to substitute (more optimized)
val is_restricted : t -> booltrue iff all the variables involved in the expression satisfy Var.is_restricted
if l contains at least one unrestricted variable then solve_for_unrestricted u l is Some (x, l') where x is the smallest unrestricted variable in l and u=l <=> x=l'. If there are no unrestricted variables in l then solve_for_unrestricted u l is None. Assumes u∉l.
pivot (v, q) l assumes v appears in l with coefficient q and returns l' such that l' = -(1/q)·(l - q·v)
val classify_minimized_maximized :
t ->
[ `Minimized | `Maximized | `Neither | `Constant ]val is_minimized : t -> boolis_minimized l iff classify_minimized_maximized l is either `Minimized or `Constant