Library
Module
Module type
Parameter
Class
Class type
Parameters
Signature
module SSet : sig ... end
val is_complete : SSet.elt list -> bool
val head_constrs : 'a pattern -> ('b * int) list
Extract constructors from pattern.
Implementation of S(c,p) as described in the paper's first part.
Implementation of D(p) as described in the paper's first part.
U(p,q) from the paper. Most important function, called by higher level ones. Tests the usefulness of q relatively to p.
Type used for efficient testing of usefulness and redundancy of pattern-matching cases.
and 'a trimat = 'a trivec list
Second de finition of S(c,p) for tri-matrices.
S.tag pattern list option is used for results of usefulness testing for Or(r1,r2) patterns. Some means that r1 and r2 are both useful, Some r1
(resp. Some r2
) means that r1 (resp. r2) is useless, and None means that both are.
The following functions implement useful shortcuts.
Efficient usefulness check with special Or pattern management.
Completely construct a non-matched pattern. If none is returned, this matrix is exhaustive.
val check : S.pattern_ast list -> result