View Source cure_pattern_encoder (cure v0.7.0)
Summary
Functions
Check if patterns are exhaustive Returns {complete} or {incomplete, [MissingPatterns]}
Encode a single pattern as an SMT constraint Returns an SMT-LIB expression that is true when value matches pattern
Encode multiple patterns as a disjunction (OR) Returns constraint that is true if ANY pattern matches
Find a missing pattern using SMT Returns {ok, Pattern} if a missing pattern is found, or exhaustive if complete
Convert Z3 model to Cure pattern
Convert Cure type to SMT sort
Functions
-spec check_exhaustiveness([term()], term()) -> {complete} | {incomplete, [term()]} | {error, term()}.
Check if patterns are exhaustive Returns {complete} or {incomplete, [MissingPatterns]}
Encode a single pattern as an SMT constraint Returns an SMT-LIB expression that is true when value matches pattern
Encode multiple patterns as a disjunction (OR) Returns constraint that is true if ANY pattern matches
Find a missing pattern using SMT Returns {ok, Pattern} if a missing pattern is found, or exhaustive if complete
Convert Z3 model to Cure pattern
Convert Cure type to SMT sort