package zelus
Install
Dune Dependency
Authors
Maintainers
Sources
md5=437ae922f1fda392efca3e37e8b8bb4c
sha512=d591cdbeedb8f3a7f568d6d4994de572093822cb354b112886326219174311715a71a35de57a4c2070eae349f65f0c8f3d6c2f6a5a79a8187bbffc687cd108a6
doc/zelus.zlcompilerlibs/Zmatching/PATTERN_CHECKER/index.html
Module Zmatching.PATTERN_CHECKER
Parameters
Signature
module SSet : sig ... end
val is_complete : SSet.elt list -> bool
val head_constrs : 'a pattern -> ('a * 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