SearchAndApply

foresight.eqsat.saturation.SearchAndApply
See theSearchAndApply companion object
trait SearchAndApply[NodeT, RuleT <: Rule[NodeT, MatchT, _], EGraphT <: EGraphLike[NodeT, EGraphT] & EGraph[NodeT], MatchT]

A strategy that searches for matches of a set of rules in an e-graph and applies them.

Type parameters

EGraphT

The type of the e-graph.

MatchT

The type of the matches produced by the rules.

NodeT

The type of the nodes in the e-graph.

RuleT

The type of the rules to search and apply.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def apply(rules: Seq[RuleT], matches: Map[String, Seq[MatchT]], egraph: EGraphT, parallelize: ParallelMap): Option[EGraphT]

Applies the matches found for the given rules to the e-graph.

Applies the matches found for the given rules to the e-graph.

Value parameters

egraph

The e-graph to which the matches are applied.

matches

A map from rule names to sequences of matches found for each rule.

parallelize

A parallelization strategy for applying the matches.

rules

The rules whose matches are to be applied.

Attributes

Returns

An updated e-graph with the matches applied, or None if no matches were applied.

def search(rules: Seq[RuleT], egraph: EGraphT, parallelize: ParallelMap): Map[String, Seq[MatchT]]

Searches for matches of the given rules in the e-graph.

Searches for matches of the given rules in the e-graph.

Value parameters

egraph

The e-graph to search in.

parallelize

A parallelization strategy for searching.

rules

The rules to search for matches.

Attributes

Returns

A map from rule names to sequences of matches found for each rule.