foresight.eqsat.rewriting.patterns

Members list

Type members

Classlikes

final case class CompiledPattern[NodeT, EGraphT <: EGraphLike[NodeT, EGraphT] & EGraph[NodeT]](pattern: MixedTree[NodeT, Pattern[NodeT]], instructions: List[Instruction[NodeT, EGraphT]])

A compiled pattern.

A compiled pattern.

Type parameters

EGraphT

The type of the e-graph that the pattern is compiled for.

NodeT

The type of the nodes in the e-graph.

Value parameters

instructions

The instructions of the compiled pattern.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

A companion object for CompiledPattern.

A companion object for CompiledPattern.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Instruction[NodeT, EGraphT <: EGraphLike[NodeT, EGraphT] & EGraph[NodeT]]

An instruction for the pattern-matching virtual machine.

An instruction for the pattern-matching virtual machine.

Type parameters

EGraphT

The type of the e-graph.

NodeT

The type of the nodes in the e-graph.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BindNode[NodeT, EGraphT]
class BindVar[NodeT, EGraphT]
class Compare[NodeT, EGraphT]
object Instruction

A companion object for the Instruction trait.

A companion object for the Instruction trait.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object Machine

A pattern-matching virtual machine. The machine executes a sequence of instructions on a graph and maintains a machine state that is updated after each instruction.

A pattern-matching virtual machine. The machine executes a sequence of instructions on a graph and maintains a machine state that is updated after each instruction.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Machine.type
sealed trait MachineError[NodeT]

An error that occurs during the execution of a pattern machine.

An error that occurs during the execution of a pattern machine.

Type parameters

NodeT

The type of the nodes in the e-graph.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InconsistentVars[NodeT, EGraphT]
class NoMatchingNode[NodeT, EGraphT]
object MachineError

A companion object for the MachineError trait.

A companion object for the MachineError trait.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait MachineResult[NodeT, EGraphT <: EGraphLike[NodeT, EGraphT] & EGraph[NodeT]]

The result of executing a pattern machine.

The result of executing a pattern machine.

Type parameters

EGraphT

The type of the e-graph.

NodeT

The type of the nodes in the e-graph.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Failure[NodeT, EGraphT]
class Success[NodeT, EGraphT]
object MachineResult

A companion object for the MachineResult trait.

A companion object for the MachineResult trait.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class MachineSearcherPhase[NodeT, EGraphT <: EGraphLike[NodeT, EGraphT] & EGraph[NodeT]](pattern: CompiledPattern[NodeT, EGraphT]) extends ReversibleSearcherPhase[NodeT, Unit, Seq[PatternMatch[NodeT]], PatternMatch[NodeT], EGraphT]

A phase of a searcher that searches for matches of a pattern machine in an e-graph.

A phase of a searcher that searches for matches of a pattern machine in an e-graph.

Type parameters

EGraphT

The type of the e-graph that the searcher searches in.

NodeT

The type of the nodes in the e-graph.

Value parameters

pattern

The pattern to search for.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait ReversibleSearcherPhase[NodeT, Unit, Seq[PatternMatch[NodeT]], PatternMatch[NodeT], EGraphT]
trait SearcherPhase[NodeT, Unit, Seq[PatternMatch[NodeT]], Seq[PatternMatch[NodeT]], EGraphT]
class Object
trait Matchable
class Any
Show all
final case class MachineState[NodeT](registers: Seq[EClassCall], boundVars: Map[Var[NodeT], EClassCall], boundSlots: Map[Slot, Slot], boundNodes: Seq[ENode[NodeT]])

The state of a pattern machine.

The state of a pattern machine.

Type parameters

NodeT

The type of the nodes in the e-graph.

Value parameters

boundNodes

The nodes that are bound in the machine.

boundSlots

The slots that are bound in the machine.

boundVars

The variables that are bound in the machine.

registers

The registers of the machine.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MachineState

A companion object for machine states.

A companion object for machine states.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Pattern[NodeT]

A pattern that can be matched against e-classes in e-graphs.

A pattern that can be matched against e-classes in e-graphs.

Type parameters

NodeT

The type of the nodes in the pattern.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Var[NodeT]
object Pattern

A companion object for patterns.

A companion object for patterns.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Pattern.type
final case class PatternApplier[NodeT, EGraphT <: EGraphLike[NodeT, EGraphT] & EGraph[NodeT]](pattern: MixedTree[NodeT, Pattern[NodeT]]) extends ReversibleApplier[NodeT, PatternMatch[NodeT], EGraphT]

An applier that applies a pattern match to an e-graph.

An applier that applies a pattern match to an e-graph.

Type parameters

EGraphT

The type of the e-graph that the applier applies the match to.

NodeT

The type of the nodes in the e-graph.

Value parameters

pattern

The pattern to apply.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait ReversibleApplier[NodeT, PatternMatch[NodeT], EGraphT]
trait Applier[NodeT, PatternMatch[NodeT], EGraphT]
class Object
trait Matchable
class Any
Show all

A compiler that compiles patterns into a list of instructions for the pattern-matching virtual machine.

A compiler that compiles patterns into a list of instructions for the pattern-matching virtual machine.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class PatternMatch[NodeT](root: EClassCall, varMapping: Map[Var[NodeT], MixedTree[NodeT, EClassCall]], slotMapping: Map[Slot, Slot]) extends PortableMatch[NodeT, PatternMatch[NodeT]]

A match of a pattern.

A match of a pattern.

Type parameters

NodeT

The type of the nodes in the e-graph.

Value parameters

root

The e-class in which the pattern was found.

slotMapping

The mapping from slot variables to slots.

varMapping

The mapping from pattern variables to e-graph nodes.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait PortableMatch[NodeT, PatternMatch[NodeT]]
class Object
trait Matchable
class Any
Show all