Module type Generic.LANGUAGE
The LANGUAGE
module type represents the definition of an arbitrary language for use with an EGraph.
val pp_shape : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a shape -> unit
pp_shape f fmt s
pretty prints expressions of the language.
val compare_shape : ('a -> 'a -> int) -> 'a shape -> 'a shape -> int
compare cmp a b
compares expressionsa
andb
usingcmp
to compare subexpressions.
val op : 'a shape -> op
op expr
retrieves the tag that discriminates the shape of the expressionexpr
.
val children : 'a shape -> 'a list
children exp
returns the subexpressions of expressionexp
.