Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Make.RuleSourceThis module Rule defines the rewrite interface for the EGraph, allowing users to express relatively complex transformations of expressions of the Language L.
Represents rewrite rules over the language of the EGraph.
make_constant ~from ~into creates a rewrite rule from a pattern from into a schema into that applies a purely syntactic transformation.
val make_conditional :
from:L.op Query.t ->
into:L.op Query.t ->
cond:
((Id.t L.shape, A.t, A.data, rw) egraph ->
Id.t ->
Id.t StringMap.t ->
bool) ->
tmake_conditional ~from ~into ~cond creates a syntactic rewrite rule from from to into that is conditionally applied based on some property cond of the EGraph, the root eclass of the sub-expression being transformed and the eclasses of all bound variables.
val make_dynamic :
from:L.op Query.t ->
generator:
((Id.t L.shape, A.t, A.data, rw) egraph ->
Id.t ->
Id.t StringMap.t ->
L.op Query.t option) ->
tmake_dynamic ~from ~generator creates a dynamic rewrite rule from a pattern from into a schema that is conditionally generated based on properties of the EGraph, the root eclass of the sub-expression being transformed and the eclasses of all bound variables