Module Smyth.Constraints
val delete_min : 'a Lang.hole_map -> ((Lang.hole_name * 'a) * 'a Lang.hole_map) option
Deletes and returns the minimum element of a hole map (such as a
Lang.unsolved_constraints
).
val empty : Lang.constraints
The empty unevaluation constraint.
val from_hole_filling : Lang.hole_filling -> Lang.constraints
from_hole_filling hf
creates a new unevaluation constraint consisting of the hole fillinghf
and no unfilled holes.
val from_unsolved_constraints : Lang.unsolved_constraints -> Lang.constraints
from_unsolved_constraints us
creates a new unevaluation constraint consisting of the unfilled holesus
and no hole filling.
val solved_singleton : Lang.hole_name -> Lang.exp -> Lang.constraints
solved_singleton h e
creates a new unevaluation constraint consisting of the singleton hole fillingh -> e
and no unfilled holes.
val unsolved_singleton : Lang.hole_name -> Lang.worlds -> Lang.constraints
solved_singleton h x
creates a new unevaluation constraint consisting of the singleton unfilled holeh -> x
and no hole filling.
val merge_solved : Lang.hole_filling list -> Lang.hole_filling option
Syntactically merges a list of hole fillings, failing if a hole is bound to two syntactically unequal expressions.
val merge_unsolved : Lang.unsolved_constraints list -> Lang.unsolved_constraints
Syntactically merges a list of unfilled holes.
val merge : Lang.constraints list -> Lang.constraints option
Syntactically merges a list of unevaluation constraints using
merge_solved
andmerge_unsolved
.
val satisfies : Lang.hole_filling -> Lang.constraints -> bool
Unevaluation constraint satisfaction as defined by Figure 5 of the ICFP 2020 paper.
satisfies hf ks
checks if a hole fillinghf
satisfies a set of uenvaluation constraintsks
usingExample.exp_satisfies
(i.e., the notion of "ground truth" satisfaction).