Libabsolute.Constraint
This module defines the constraint language, and some basic operations over it
type t = comparison boolean
type for constraints
same as inside but with string and rationals instead of expressions'
same as outside but with string and rationals instead of expressions'
val of_instance : Instance.t -> t
conversion of a point p
to a conjunctive constraint whose only solution is the point p.
val convex_hull : Instance.t list -> t
Builds the conjuntive constraint defined by the linear system corresponding to the convex hull of the given set of points. The list of instance must not be empty and all the instances should be defined over the same set of keys, otherwise the behaviour in undefined.
returns the rational function corresponding to the cmp operator
val nullify_rhs : comparison -> comparison
nullify c
computes a comparison equivalent to c
, with its right-hand-side being 0
rewrites a constraint into an equivalent constraint without the logical operator 'Not'
val collect_vars : t -> int Tools.VarMap.t
Returns all the variables appearing in a constraint as a map where to each variable is associated the (integer) number of occurences
val support : t -> string list
Returns all the variables appearing in a constraint as a list
replace constr var expr
builds a new constraint identical to constr
where all the occurences of the variable var
are replaced by the expression expr
fix_var constr var cst
builds a new constraint identical to constr
where all the occurences of the variable var
are replaced by the constant cst
val eval_comparison : comparison -> Instance.t -> bool
Evaluates the constraint a the given point.
val eval : t -> Instance.t -> bool
Evaluates the constraint a the given point.
val pp_cmpop : Stdlib.Format.formatter -> cmpop -> unit
comparison operator printer
val pp_comparison : Stdlib.Format.formatter -> comparison -> unit
comparison printer
val print : Stdlib.Format.formatter -> t -> unit
printer
val to_string : t -> string
Conversion to a string
module Operators : sig ... end
Classic infix boolean operators are redefined on t
.