Module Constraint


module Constraint: sig .. end
Arithmetic constraints.

Constraints have the form t1 {<=,>,=} t2 where t1,t2 are index expressions.
Author(s): Vincent Aravantinos



type inequality =
| Le (*Lower or Equal*)
| Gt (*Greater Than*)
| Eq (*Equal*)
Kind of inequality.
type t 
Type of constraints.
exception UnsupportedConstraint
exception NonRegularBounds

Constructors

val top : t
The constraint constantly true.
val constraint_atom : Indexes.t -> inequality -> Indexes.t -> t
A constraint containing just the comparison of two indexes.
val bounds_constraint : Indexes.t -> inequality -> Indexes.t -> t
A constraint generated from the comparison of two iteration bounds of regular schemata. Having this knowledge allows to discard early some cases that should not occur.
Raises NonRegularBounds if the parameters cannot come from iteration bounds.
val bounds_conjunction : t -> t -> t
The conjunction of two constraints.

Selector

val is_false : t -> bool
val is_equality : t -> bool

Print stuff

val to_string : ?parenthesized:bool -> t -> string
val print : t -> unit
val equal : t -> t -> bool

Comparison of terms, taking constraints into account

val always_greater : ?hyp:t -> Indexes.t -> Indexes.t -> bool
val always_different : ?hyp:t -> Indexes.t -> Indexes.t -> bool
val normalize_index : t -> idx:Indexes.t -> Indexes.t
Normalization of a term for better detection of closure