Index
All Classes and Interfaces|All Packages
A
- add(L) - Method in class io.github.vecbricks.jegg.EGraph
-
Adds
nodeand returns its class: the class already holding an equal canonical node, or a new class of this node alone, recorded as a parent of each child's class (paper Figure 4, lines 1-11). - addTree(T, TreeBridge) - Method in class io.github.vecbricks.jegg.EGraph
-
Adds a client's tree bottom-up through
bridgeand returns the root's class. - always() - Static method in interface io.github.vecbricks.jegg.Condition
-
The condition that always holds.
- analysis() - Method in class io.github.vecbricks.jegg.EGraph
-
The analysis this graph keeps facts with.
- Analysis<L,
D> - Interface in io.github.vecbricks.jegg -
An e-class analysis: a fact of type
Dfor every e-class, kept true as the graph changes (egg'sAnalysistrait, the paper's section 4). - and(Condition) - Method in interface io.github.vecbricks.jegg.Condition
-
Both conditions.
- applied() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
appliedrecord component. - Applied - Record Class in io.github.vecbricks.jegg
-
What applying one match did, in the two senses a run needs.
- Applied(int, int) - Constructor for record class io.github.vecbricks.jegg.Applied
-
Creates an instance of a
Appliedrecord class. - Applier<L,
D> - Interface in io.github.vecbricks.jegg -
A rewrite's right-hand side: given a match, adds whatever it adds to the graph and returns the classes to make equal to the matched class.
- apply(EGraph, int, Subst) - Method in interface io.github.vecbricks.jegg.Applier
-
The classes to union with
eclass; empty if nothing was added. - apply(EGraph, Matcher.Match) - Method in record class io.github.vecbricks.jegg.Rewrite
-
Applies one match if its condition holds: the right-hand side's
Applier.applyTo(EGraph, Matcher.Match)adds its classes and unions them with the matched class, or, for a multi-pattern, does its own unions. - applyNanos() - Method in record class io.github.vecbricks.jegg.Runner.Phases
-
Returns the value of the
applyNanosrecord component. - applyTo(EGraph, Matcher.Match) - Method in interface io.github.vecbricks.jegg.Applier
-
Applies this right-hand side to one match: adds what
Applier.apply(EGraph, int, Subst)builds and unions each class it returns with the matched class. - astDepth() - Static method in interface io.github.vecbricks.jegg.CostFunction
-
egg's
AstDepth: the cheapest term is the shallowest. - astSize() - Static method in interface io.github.vecbricks.jegg.CostFunction
-
egg's
AstSize: every node costs one, so the cheapest term is the smallest.
B
- BackoffScheduler<L,
D> - Class in io.github.vecbricks.jegg -
egg's
BackoffScheduler, the runner's default: a rule whose matches in one iteration exceed its match limit is banned for a number of iterations, and each time it is banned again its limit and its ban double, so a rule that would grow the graph without bound - associativity, commutativity, distributivity - gets its turn less and less often while the other rules finish their work. - BackoffScheduler() - Constructor for class io.github.vecbricks.jegg.BackoffScheduler
-
egg's defaults: a limit of a thousand matches, a ban of five iterations.
- BackoffScheduler(int, int) - Constructor for class io.github.vecbricks.jegg.BackoffScheduler
-
A scheduler with its own thresholds.
- banned() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
bannedrecord component. - beforeIteration(EGraph) - Method in interface io.github.vecbricks.jegg.Runner.Hook
-
Called before an iteration, on the rebuilt graph.
- best(int) - Method in class io.github.vecbricks.jegg.Extractor
-
The best node of a class and its tree cost; every class reachable from leaves has one.
- Best(L, double) - Constructor for record class io.github.vecbricks.jegg.Extractor.Best
-
Creates an instance of a
Bestrecord class. - bind(String, int) - Method in class io.github.vecbricks.jegg.Subst
-
This substitution with
variablebound toid; a variable bound already is rebound in place, keeping its position. - binding(Class, String, Function, BiFunction) - Static method in interface io.github.vecbricks.jegg.Pattern
-
A head that matches any node of
typeand binds its payload, read bypayloadOf, to the payload variablevariable- or requires it to equal the variable's binding if there is one - and builds throughbuildfrom the bound payload and the children. - bindPayload(String, Object) - Method in class io.github.vecbricks.jegg.Subst
-
This substitution with the payload variable
variablebound tovalue; a variable bound already is rebound in place, keeping its position. - build(Subst, IntList) - Method in interface io.github.vecbricks.jegg.Pattern.Head
-
The e-node with this head over these children, payload variables read from the subst.
- build(L, List) - Method in interface io.github.vecbricks.jegg.TreeBridge
-
The tree for this e-node over these subtrees, already built, in argument order.
C
- canonicalize(L) - Method in class io.github.vecbricks.jegg.EGraph
-
nodewith every child replaced by its class's root. - canStop(int) - Method in class io.github.vecbricks.jegg.BackoffScheduler
- canStop(int) - Method in interface io.github.vecbricks.jegg.Scheduler
-
Called after every iteration in which nothing was counted as applied (
Applied): no rule merged two classes, and no rule whose right-hand side is a multi-pattern matched, whether or not nodes were added - a condition or an applier may add without merging - as egg calls itscan_stop. - changes() - Method in class io.github.vecbricks.jegg.EGraph
-
How many times the graph has changed: a class made by
EGraph.add(L), two roots joined byEGraph.merge(int, int), including the merges aEGraph.rebuild()makes, or nodes dropped byEGraph.retainNodes(int, Predicate). - checkAnalysisInvariant() - Method in class io.github.vecbricks.jegg.EGraph
-
Checks the analysis invariant (paper section 4.1): every class's fact equals the join of
makeover its nodes. - checkInvariants() - Method in class io.github.vecbricks.jegg.EGraph
-
Checks the hashcons invariant (paper Definition 2.7) and the congruence invariant (its Theorem 3.1): every node of every live class is canonical and maps in the hashcons to that class, every hashcons entry's node is in the class it maps to, and no two classes hold an equal canonical node.
- children() - Method in record class io.github.vecbricks.jegg.Extracted
-
Returns the value of the
childrenrecord component. - children() - Method in interface io.github.vecbricks.jegg.Language
-
The children, as e-class ids, in the operator's argument order.
- children() - Method in record class io.github.vecbricks.jegg.Pattern.Node
-
Returns the value of the
childrenrecord component. - childrenOf(T) - Method in interface io.github.vecbricks.jegg.TreeBridge
-
The subtrees of
tree, in the operator's argument order; empty for a leaf. - classes() - Method in class io.github.vecbricks.jegg.EGraph
-
The live classes, in id order, read-only.
- classes() - Method in record class io.github.vecbricks.jegg.RunLimits
-
Returns the value of the
classesrecord component. - classes() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
classesrecord component. - classes() - Method in record class io.github.vecbricks.jegg.StopReason.ClassLimit
-
Returns the value of the
classesrecord component. - ClassLimit(int) - Constructor for record class io.github.vecbricks.jegg.StopReason.ClassLimit
-
Creates an instance of a
ClassLimitrecord class. - classOf(int) - Method in class io.github.vecbricks.jegg.EGraph
-
The class with this root id.
- clause(String, Pattern) - Static method in record class io.github.vecbricks.jegg.MultiPattern
-
A clause.
- Clause(String, Pattern) - Constructor for record class io.github.vecbricks.jegg.MultiPattern.Clause
-
Checks that neither component is null.
- clauses() - Method in record class io.github.vecbricks.jegg.MultiPattern
-
Returns the value of the
clausesrecord component. - condition() - Method in record class io.github.vecbricks.jegg.Rewrite
-
Returns the value of the
conditionrecord component. - Condition<L,
D> - Interface in io.github.vecbricks.jegg -
A rewrite's side condition: whether a match may be applied, read from the graph - the facts of the bound classes, their nodes - and the substitution.
- cost() - Method in record class io.github.vecbricks.jegg.Extractor.Best
-
Returns the value of the
costrecord component. - cost() - Method in class io.github.vecbricks.jegg.Selection
-
The sum of the chosen nodes' own costs, each class once.
- cost(L, IntToDoubleFunction) - Method in interface io.github.vecbricks.jegg.CostFunction
-
The cost of a term rooted at
nodewhose children costchildCosteach. - CostFunction<L> - Interface in io.github.vecbricks.jegg
-
What a term costs, for extraction.
- counted() - Method in record class io.github.vecbricks.jegg.Applied
-
Returns the value of the
countedrecord component. - counted() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
countedrecord component.
D
- data() - Method in class io.github.vecbricks.jegg.EClass
-
The analysis fact,
nullunderAnalysis.none(). - data(int) - Method in class io.github.vecbricks.jegg.EGraph
-
The analysis fact of
id's class. - DEFAULT - Static variable in record class io.github.vecbricks.jegg.RunLimits
-
egg's defaults, less its five seconds: thirty iterations, ten thousand nodes.
- dynamic(String, Searcher, Applier) - Static method in record class io.github.vecbricks.jegg.Rewrite
-
A rewrite from a pattern or multi-pattern to a computed right-hand side, unconditional.
E
- eclass() - Method in record class io.github.vecbricks.jegg.Extracted
-
Returns the value of the
eclassrecord component. - eclass() - Method in record class io.github.vecbricks.jegg.Matcher.Match
-
Returns the value of the
eclassrecord component. - EClass<L,
D> - Class in io.github.vecbricks.jegg -
An equivalence class of e-nodes: its id, its nodes, its parents and its analysis fact.
- EGraph<L,
D> - Class in io.github.vecbricks.jegg -
An e-graph: a union-find over e-class ids, a hashcons from canonical e-nodes to the class each is in, and the classes themselves - egg's
EGraph, the paper's Figure 4, with the data structures in plain Java. - EGraph(Analysis) - Constructor for class io.github.vecbricks.jegg.EGraph
-
An empty graph whose class facts are kept by
analysis. - EMPTY - Static variable in class io.github.vecbricks.jegg.IntList
-
The empty list, shared: a leaf's children.
- EMPTY - Static variable in class io.github.vecbricks.jegg.Subst
-
The substitution that binds nothing.
- equal(Pattern, Pattern) - Static method in interface io.github.vecbricks.jegg.Condition
-
egg's
ConditionEqual: both patterns instantiated under the match's substitution land in one class. - equals(Object) - Method in record class io.github.vecbricks.jegg.Applied
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.Extracted
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.Extractor.Best
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class io.github.vecbricks.jegg.IntList
- equals(Object) - Method in record class io.github.vecbricks.jegg.Matcher.Match
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.MultiPattern.Clause
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.MultiPattern
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.Pattern.Node
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.Pattern.Var
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.Rewrite
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.RunLimits
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.Runner.Phases
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.RunReport
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.StopReason.ClassLimit
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.StopReason.IterationLimit
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.StopReason.NodeLimit
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.StopReason.Other
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.vecbricks.jegg.StopReason.Saturated
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class io.github.vecbricks.jegg.Subst
- extract(int) - Method in class io.github.vecbricks.jegg.Extractor
-
The cheapest term in the class, as a tree.
- extractAll(IntList) - Method in class io.github.vecbricks.jegg.Extractor
-
Extractor.extractAll(IntList, ToDoubleFunction)minimising the selection's summed cost. - extractAll(IntList, ToDoubleFunction) - Method in class io.github.vecbricks.jegg.Extractor
-
One node per class for every class the roots reach, chosen so that
scoreof the whole selection is small - by default the sum of the chosen nodes' own costs, each class once, so a subterm two roots share is chosen once and paid once. - Extracted<L> - Record Class in io.github.vecbricks.jegg
-
An extracted term: the node chosen for a class over the terms chosen for its children.
- Extracted(int, L, List) - Constructor for record class io.github.vecbricks.jegg.Extracted
-
Keeps an immutable copy of the children.
- Extractor<L,
D> - Class in io.github.vecbricks.jegg -
Extraction: the cheapest term in a class under a
CostFunction, as a bottom-up fixed point over the classes (the paper's section 4.3, egg'sExtractor); andExtractor.extractAll(IntList)over several roots at once, which chooses one node per class so that a subterm the roots share is chosen once and paid once - what egg's per-root extraction cannot do, and the case a compiler with many outputs over shared prefixes is in (PLAN.md 3.2). - Extractor(EGraph, CostFunction) - Constructor for class io.github.vecbricks.jegg.Extractor
-
Prices every class of the graph, which must be rebuilt.
- Extractor.Best<L> - Record Class in io.github.vecbricks.jegg
-
A class's best node and the cost of the tree rooted there.
F
G
- get(int) - Method in class io.github.vecbricks.jegg.IntList
-
The element at a position.
- graph() - Method in class io.github.vecbricks.jegg.Runner
-
The graph this runner saturates.
H
- hashCode() - Method in record class io.github.vecbricks.jegg.Applied
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.Extracted
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.Extractor.Best
-
Returns a hash code value for this object.
- hashCode() - Method in class io.github.vecbricks.jegg.IntList
- hashCode() - Method in record class io.github.vecbricks.jegg.Matcher.Match
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.MultiPattern.Clause
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.MultiPattern
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.Pattern.Node
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.Pattern.Var
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.Rewrite
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.RunLimits
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.Runner.Phases
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.RunReport
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.StopReason.ClassLimit
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.StopReason.IterationLimit
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.StopReason.NodeLimit
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.StopReason.Other
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.vecbricks.jegg.StopReason.Saturated
-
Returns a hash code value for this object.
- hashCode() - Method in class io.github.vecbricks.jegg.Subst
- hasPayload(String) - Method in class io.github.vecbricks.jegg.Subst
-
Whether the payload variable is bound.
- head() - Method in interface io.github.vecbricks.jegg.Language
-
The operator and payload without the children: what two nodes must share to match up to their arguments.
- head() - Method in record class io.github.vecbricks.jegg.Pattern.Node
-
Returns the value of the
headrecord component. - head(L) - Static method in interface io.github.vecbricks.jegg.Pattern
-
A head that matches exactly
prototype's operator and payload - itsLanguage.head()- and builds withLanguage.withChildren(IntList). - holds(EGraph, int, Subst) - Method in interface io.github.vecbricks.jegg.Condition
-
Whether the match may be applied.
I
- id() - Method in class io.github.vecbricks.jegg.EClass
-
The class's id, which is a root of the union-find while the class is live.
- id(String) - Method in class io.github.vecbricks.jegg.Subst
-
The class a subterm variable is bound to, if it is.
- idOf(String) - Method in class io.github.vecbricks.jegg.Subst
-
The class a subterm variable is bound to; it must be.
- ids() - Method in class io.github.vecbricks.jegg.Subst
-
The subterm bindings, in binding order, read-only; built on request.
- instantiate(EGraph, Pattern, Subst) - Static method in class io.github.vecbricks.jegg.Matcher
-
The class of
patterninstantiated undersubst: a variable is its binding, a node is added over its instantiated children. - IntList - Class in io.github.vecbricks.jegg
-
An immutable list of
ints: the children of an e-node, held as e-class ids. - io.github.vecbricks.jegg - module io.github.vecbricks.jegg
-
The jegg e-graph library.
- io.github.vecbricks.jegg - package io.github.vecbricks.jegg
-
An e-graph library: see
EGraph. - isBanned(int, int) - Method in class io.github.vecbricks.jegg.BackoffScheduler
-
Whether the rule is banned at this iteration; a rule never searched is not.
- isBanned(int, int) - Method in interface io.github.vecbricks.jegg.Scheduler
-
Whether the rule is held back this iteration, for the report; false unless held.
- isDirty() - Method in class io.github.vecbricks.jegg.EGraph
-
Whether a merge since the last
EGraph.rebuild()has left work to do. - isEmpty() - Method in class io.github.vecbricks.jegg.IntList
-
Whether the list has no elements.
- Iteration(int, int, int, Map, Set, Set, int, int, int, int) - Constructor for record class io.github.vecbricks.jegg.RunReport.Iteration
-
Copies the collections, so an iteration cannot change after it is made.
- IterationLimit(int) - Constructor for record class io.github.vecbricks.jegg.StopReason.IterationLimit
-
Creates an instance of a
IterationLimitrecord class. - iterations() - Method in record class io.github.vecbricks.jegg.RunLimits
-
Returns the value of the
iterationsrecord component. - iterations() - Method in record class io.github.vecbricks.jegg.RunReport
-
Returns the value of the
iterationsrecord component. - iterations() - Method in record class io.github.vecbricks.jegg.StopReason.IterationLimit
-
Returns the value of the
iterationsrecord component.
J
- join(D, D) - Method in interface io.github.vecbricks.jegg.Analysis
-
The fact for a class made of two classes with these facts.
K
- key() - Method in interface io.github.vecbricks.jegg.Pattern.Head
-
The one head this head matches, when it matches by head alone: present only if
Pattern.Head.match(L, Subst)returns its substitution unchanged for every node whoseLanguage.head()equals the key, and null for every other node.
L
- Language<L> - Interface in io.github.vecbricks.jegg
-
An e-node of a client's language: an operator, a payload and children held as e-class ids.
- lhs() - Method in record class io.github.vecbricks.jegg.Rewrite
-
Returns the value of the
lhsrecord component. - lookup(L) - Method in class io.github.vecbricks.jegg.EGraph
-
The class
nodeis in, if it is in the graph;nodeneed not be canonical. - lookupTree(T, TreeBridge) - Method in class io.github.vecbricks.jegg.EGraph
-
The class a client's tree is in, if the graph holds it, through
bridge, adding nothing: a subtree missing anywhere means the whole is missing.
M
- make(EGraph, L) - Method in interface io.github.vecbricks.jegg.Analysis
-
The fact for
node, whose children's facts are readable throughgraph. - map(IntUnaryOperator) - Method in class io.github.vecbricks.jegg.IntList
-
A list with
fapplied to every element; this one if nothing changed. - match(L, Subst) - Method in interface io.github.vecbricks.jegg.Pattern.Head
-
The substitution extended by whatever this head binds if
node's operator and payload match undersubst, ornullif they do not. - Match(int, Subst) - Constructor for record class io.github.vecbricks.jegg.Matcher.Match
-
Creates an instance of a
Matchrecord class. - Matcher - Class in io.github.vecbricks.jegg
-
E-matching by backtracking: a pattern is matched against a class by trying each of the class's nodes whose head matches, then each child pattern against the child's class, threading the substitution through and backtracking by discarding it. egg's compiled machine is the replacement if a measurement asks for it.
- Matcher.Match - Record Class in io.github.vecbricks.jegg
-
One match: the class the pattern's root matched in, and what its variables stand for.
- matches() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
matchesrecord component. - matchIn(EGraph, Pattern, int, Subst) - Static method in class io.github.vecbricks.jegg.Matcher
-
The substitutions under which
patternmatches classid, extendingsubst. - merge(int, int) - Method in class io.github.vecbricks.jegg.EGraph
-
Makes
aandbone class and returns its root (paper Figure 4, lines 12-22). - modify(EGraph, int) - Method in interface io.github.vecbricks.jegg.Analysis
-
A hook after a class's fact changes: add nodes to it or merge, or do nothing.
- multi(MultiPattern) - Static method in interface io.github.vecbricks.jegg.Applier
-
The applier of a multi-pattern right-hand side: each clause, in order, instantiates its pattern and either binds its variable (new) or unions the instance with the class the variable names, so its unions are with the classes its clause variables name, which are the matched class only where a clause names the first left-hand clause's variable.
- multi(String, MultiPattern, MultiPattern) - Static method in record class io.github.vecbricks.jegg.Rewrite
-
A rewrite from a multi-pattern to a multi-pattern, unconditional: egg's
multi_rewrite!. - MultiPattern<L> - Record Class in io.github.vecbricks.jegg
-
Several patterns joined, egg's
MultiPattern: a list of clauses?var = pattern. - MultiPattern(List) - Constructor for record class io.github.vecbricks.jegg.MultiPattern
-
Copies the clauses so the pattern is immutable.
- MultiPattern.Clause<L> - Record Class in io.github.vecbricks.jegg
-
One clause: a pattern that must match in the class a variable names.
N
- name() - Method in record class io.github.vecbricks.jegg.Pattern.Var
-
Returns the value of the
namerecord component. - name() - Method in record class io.github.vecbricks.jegg.Rewrite
-
Returns the value of the
namerecord component. - node() - Method in record class io.github.vecbricks.jegg.Extracted
-
Returns the value of the
noderecord component. - node() - Method in record class io.github.vecbricks.jegg.Extractor.Best
-
Returns the value of the
noderecord component. - node(int) - Method in class io.github.vecbricks.jegg.Selection
-
The node chosen for this class; the class must be one the roots reach.
- node(Pattern.Head, Pattern...) - Static method in interface io.github.vecbricks.jegg.Pattern
-
A node pattern with this head over these children.
- node(T, IntList) - Method in interface io.github.vecbricks.jegg.TreeBridge
-
The e-node for
tree's operator and payload over these children's class ids. - Node(Pattern.Head, List) - Constructor for record class io.github.vecbricks.jegg.Pattern.Node
-
Copies
childrenso the pattern is immutable. - nodeCost(L) - Method in interface io.github.vecbricks.jegg.CostFunction
-
The cost of this one node, its children not counted.
- NodeLimit(int) - Constructor for record class io.github.vecbricks.jegg.StopReason.NodeLimit
-
Creates an instance of a
NodeLimitrecord class. - nodes() - Method in class io.github.vecbricks.jegg.EClass
-
The nodes, in insertion order, as a read-only view of the live list:
add,mergeandrebuildchange it, so a caller that will change the graph while iterating - an applier, a condition - copies it first. - nodes() - Method in record class io.github.vecbricks.jegg.RunLimits
-
Returns the value of the
nodesrecord component. - nodes() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
nodesrecord component. - nodes() - Method in class io.github.vecbricks.jegg.Selection
-
The classes the selection covers, in id order, with their nodes, read-only.
- nodes() - Method in record class io.github.vecbricks.jegg.StopReason.NodeLimit
-
Returns the value of the
nodesrecord component. - none() - Static method in interface io.github.vecbricks.jegg.Analysis
-
The analysis that knows nothing: every fact is
nulland nothing is modified. - number() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
numberrecord component. - numClasses() - Method in class io.github.vecbricks.jegg.EGraph
-
How many classes are live.
- numNodes() - Method in class io.github.vecbricks.jegg.EGraph
-
How many distinct canonical e-nodes the graph holds, once rebuilt.
O
- of(int...) - Static method in class io.github.vecbricks.jegg.IntList
-
A list of these elements; the array is copied, so the caller may keep mutating it.
- of(EGraph, List) - Static method in class io.github.vecbricks.jegg.Runner
-
A runner with the default limits and the backoff scheduler, as egg's.
- of(MultiPattern.Clause...) - Static method in record class io.github.vecbricks.jegg.MultiPattern
-
A multi-pattern of these clauses.
- of(String, Pattern, Pattern) - Static method in record class io.github.vecbricks.jegg.Rewrite
-
A rewrite from one pattern to another, unconditional.
- of(L, Pattern...) - Static method in interface io.github.vecbricks.jegg.Pattern
-
A node pattern with
prototype's operator and payload over these children. - Other(String) - Constructor for record class io.github.vecbricks.jegg.StopReason.Other
-
Creates an instance of a
Otherrecord class.
P
- pattern() - Method in record class io.github.vecbricks.jegg.MultiPattern.Clause
-
Returns the value of the
patternrecord component. - pattern(Pattern) - Static method in interface io.github.vecbricks.jegg.Applier
-
The applier that instantiates
rhsunder the match's substitution. - Pattern<L> - Interface in io.github.vecbricks.jegg
-
A pattern over a language: a variable, which matches any e-class and binds it, or a node, whose
Pattern.Headmatches an e-node's operator and payload and whose children are patterns. - Pattern.Head<L> - Interface in io.github.vecbricks.jegg
-
What a pattern node says about an e-node's operator and payload, and how it builds one.
- Pattern.Node<L> - Record Class in io.github.vecbricks.jegg
-
An operator with its payload constraint, over child patterns in argument order.
- Pattern.Var<L> - Record Class in io.github.vecbricks.jegg
-
A variable: matches any class, binding it; or must agree with its binding.
- payload(String) - Method in class io.github.vecbricks.jegg.Subst
-
The value a payload variable is bound to; it must be.
- payloads() - Method in class io.github.vecbricks.jegg.Subst
-
The payload bindings, in binding order, read-only; built on request.
- payloadVariables() - Method in record class io.github.vecbricks.jegg.MultiPattern
- payloadVariables() - Method in interface io.github.vecbricks.jegg.Pattern
-
The payload variables of this pattern's heads, in first-occurrence order, or empty if a head does not declare its variables (
Pattern.Head.variables()). - payloadVariables() - Method in interface io.github.vecbricks.jegg.Searcher
-
The payload variables a match binds, or empty if a head does not declare its variables (
Pattern.Head.variables()). - phases() - Method in class io.github.vecbricks.jegg.Runner
-
The time each iteration of the last
Runner.run()spent in its three phases, in the order of the report's iterations; empty before the first run. - Phases(long, long, long) - Constructor for record class io.github.vecbricks.jegg.Runner.Phases
-
Creates an instance of a
Phasesrecord class.
R
- reason() - Method in record class io.github.vecbricks.jegg.StopReason.Other
-
Returns the value of the
reasonrecord component. - rebuild() - Method in class io.github.vecbricks.jegg.EGraph
-
Restores the hashcons and congruence invariants after any number of merges (paper Figure 4, lines 27-53, as egg does them): takes the worklist of parent entries the merges queued and repairs each, re-keying it in the hashcons and merging its class with the class of a node it became equal to, which queues that merge's parents in turn, until the list is empty.
- rebuildNanos() - Method in record class io.github.vecbricks.jegg.Runner.Phases
-
Returns the value of the
rebuildNanosrecord component. - repaired() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
repairedrecord component. - reset() - Method in class io.github.vecbricks.jegg.BackoffScheduler
- reset() - Method in interface io.github.vecbricks.jegg.Scheduler
-
Forgets what earlier runs taught the scheduler.
- retainNodes(int, Predicate) - Method in class io.github.vecbricks.jegg.EGraph
-
Keeps the nodes of
eclass's class thatkeepaccepts and drops the others: egg's pruning, which itsmathsuite's constant folding does inmodifyto leave a folded class with its constant alone, so no rule matches the folded forms again. - Rewrite<L,
D> - Record Class in io.github.vecbricks.jegg -
A named rewrite: a left-hand
Searcher(a pattern, or several joined in aMultiPattern), a right-handApplierand aCondition. - Rewrite(String, Searcher, Applier, Condition) - Constructor for record class io.github.vecbricks.jegg.Rewrite
-
Checks that no component is null and that a pattern right-hand side uses only variables the left-hand side binds.
- rhs() - Method in record class io.github.vecbricks.jegg.Rewrite
-
Returns the value of the
rhsrecord component. - roots() - Method in class io.github.vecbricks.jegg.Selection
-
The roots the selection was made for, as root ids.
- run() - Method in class io.github.vecbricks.jegg.Runner
-
Runs to saturation or a limit and returns the report.
- RunLimits - Record Class in io.github.vecbricks.jegg
-
Where a run stops if it has not saturated: after this many iterations, or once the graph holds more than this many nodes or classes.
- RunLimits(int, int, int) - Constructor for record class io.github.vecbricks.jegg.RunLimits
-
Checks the limits; each must be at least one.
- Runner<L,
D> - Class in io.github.vecbricks.jegg -
Equality saturation (the paper's Figure 5b): each iteration searches every rule over the graph as it stands, then applies every match found, then rebuilds once; it stops when an iteration changes nothing and counts nothing as applied (a multi-pattern right-hand side counts every match, as egg's does; see
Applied), aRunLimitslimit is hit or aRunner.Hookasks, and reports what it did. - Runner(EGraph, List, RunLimits, Scheduler) - Constructor for class io.github.vecbricks.jegg.Runner
-
A runner over a graph with its own limits and scheduler.
- Runner.Hook<L,
D> - Interface in io.github.vecbricks.jegg -
Run before each iteration, on the rebuilt graph (egg's
with_hook): a reason to stop ends the run withStopReason.Other, an empty one (nevernull) lets the iteration go ahead. - Runner.Phases - Record Class in io.github.vecbricks.jegg
-
The wall time of one iteration's three phases, in nanoseconds (egg's
Iterationcarries the same three): searching every rule, applying every match, and the rebuild. - RunReport - Record Class in io.github.vecbricks.jegg
-
What a run did, iteration by iteration, and why it stopped: the record a client's plan quotes.
- RunReport(List, StopReason) - Constructor for record class io.github.vecbricks.jegg.RunReport
-
Copies the list of iterations, so a report cannot change after it is made.
- RunReport.Iteration - Record Class in io.github.vecbricks.jegg
-
One iteration: the graph's size after its rebuild, the matches each rule was given to apply, the rules the scheduler held back (whose matches read zero for that reason), the rules whose matches were not applied because a limit was passed before their turn, how many matches were applied (their condition held at apply time), how many unions merged two classes that were different, how many applications egg would count as applied (the input of the stop rule,
Applied), and how many parent entries the rebuild repaired.
S
- Saturated() - Constructor for record class io.github.vecbricks.jegg.StopReason.Saturated
-
Creates an instance of a
Saturatedrecord class. - Scheduler<L,
D> - Interface in io.github.vecbricks.jegg -
What decides, each iteration, which of a rule's matches are applied (egg's
RewriteScheduler). - search(int, int, Rewrite, EGraph) - Method in class io.github.vecbricks.jegg.BackoffScheduler
- search(int, int, Rewrite, EGraph) - Method in interface io.github.vecbricks.jegg.Scheduler
-
The matches of
ruleto apply this iteration: usuallyrule.search(graph), possibly empty when the rule is held back, possibly a prefix of the matches. - search(EGraph) - Method in record class io.github.vecbricks.jegg.Rewrite
-
The matches of the left-hand side, in the matcher's order.
- search(EGraph, int) - Method in record class io.github.vecbricks.jegg.MultiPattern
- search(EGraph, int) - Method in interface io.github.vecbricks.jegg.Pattern
- search(EGraph, int) - Method in record class io.github.vecbricks.jegg.Rewrite
-
The first
limitmatches, a prefix of all of them (Searcher.search(EGraph, int)); a pattern's search stops within the node that reached the limit, a multi-pattern's within the class of its first clause. - search(EGraph, int) - Method in interface io.github.vecbricks.jegg.Searcher
-
The first
limitmatches in the graph, in the matcher's order: a prefix of all of them, which lets a scheduler find out that a rule has more matches than it will apply without paying for all of them. - search(EGraph, MultiPattern, int) - Static method in class io.github.vecbricks.jegg.Matcher
-
The first
limitmatches of a multi-pattern, in class order of its first clause: a depth-first join, egg's machine without the compilation. - search(EGraph, Pattern) - Static method in class io.github.vecbricks.jegg.Matcher
-
Every match of
patternanywhere ingraph, in class order. - search(EGraph, Pattern, int) - Static method in class io.github.vecbricks.jegg.Matcher
-
The first
limitmatches ofpattern, in class order - a prefix of whatMatcher.search(EGraph, Pattern)returns - and the search stops within the node at which the limit is reached: egg'ssearch_with_limit, which lets a scheduler find out that a rule has more matches than it will apply without paying for all of them. - Searcher<L> - Interface in io.github.vecbricks.jegg
-
What a
Rewritesearches with: aPattern, or aMultiPatternthat joins several. egg'sSearchertrait, reduced to what the runner and the schedulers use: the matches, to a limit, and the variables they bind. - searchNanos() - Method in record class io.github.vecbricks.jegg.Runner.Phases
-
Returns the value of the
searchNanosrecord component. - Selection<L> - Class in io.github.vecbricks.jegg
-
One node chosen per class, for the classes some roots reach: the result of extraction over several roots at once, where a subterm two roots share is one choice paid once.
- simple() - Static method in interface io.github.vecbricks.jegg.Scheduler
-
The scheduler that applies every match of every rule.
- size() - Method in class io.github.vecbricks.jegg.IntList
-
The number of elements.
- size() - Method in record class io.github.vecbricks.jegg.RunReport
-
How many iterations ran.
- size() - Method in class io.github.vecbricks.jegg.Selection
-
How many classes the selection covers.
- skipped() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
skippedrecord component. - stop() - Method in record class io.github.vecbricks.jegg.RunReport
-
Returns the value of the
stoprecord component. - StopReason - Interface in io.github.vecbricks.jegg
-
Why a run ended.
- StopReason.ClassLimit - Record Class in io.github.vecbricks.jegg
-
The graph grew past the class limit.
- StopReason.IterationLimit - Record Class in io.github.vecbricks.jegg
-
The iteration limit was reached.
- StopReason.NodeLimit - Record Class in io.github.vecbricks.jegg
-
The graph grew past the node limit.
- StopReason.Other - Record Class in io.github.vecbricks.jegg
-
A
Runner.Hookstopped the run, for the reason it gave (egg'sOther). - StopReason.Saturated - Record Class in io.github.vecbricks.jegg
-
No rule changed the graph in the last iteration, and the scheduler had nothing held back.
- stream() - Method in class io.github.vecbricks.jegg.IntList
-
The elements as a stream.
- subst() - Method in record class io.github.vecbricks.jegg.Matcher.Match
-
Returns the value of the
substrecord component. - Subst - Class in io.github.vecbricks.jegg
-
A substitution: what a pattern's variables stand for in one match.
- subtermVariables() - Method in record class io.github.vecbricks.jegg.MultiPattern
-
Every variable a match binds: each clause's variable, then its pattern's, in first-occurrence order.
- subtermVariables() - Method in interface io.github.vecbricks.jegg.Pattern
-
The subterm variables of this pattern, in first-occurrence order.
- subtermVariables() - Method in interface io.github.vecbricks.jegg.Searcher
-
The subterm variables a match binds, in first-occurrence order.
T
- terms() - Method in class io.github.vecbricks.jegg.Selection
-
The selection's terms, one per root, sharing subterm objects where the roots share classes.
- timesBanned(int) - Method in class io.github.vecbricks.jegg.BackoffScheduler
-
How many times the rule has been banned so far; a rule never searched, none.
- toArray() - Method in class io.github.vecbricks.jegg.IntList
-
A copy of the elements, for a caller that wants an array.
- toJson() - Method in record class io.github.vecbricks.jegg.RunReport
-
This report as JSON:
iterationsan array of objects with this record's field names,matchesan object keyed by rule name,bannedandskippedarrays;stopan object with atypenaming theStopReasonand that reason's own fields, if it has any (iterations,nodes,classesorreason). - toString() - Method in record class io.github.vecbricks.jegg.Applied
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.Extracted
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.Extractor.Best
-
Returns a string representation of this record class.
- toString() - Method in class io.github.vecbricks.jegg.IntList
- toString() - Method in record class io.github.vecbricks.jegg.Matcher.Match
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.MultiPattern.Clause
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.MultiPattern
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.Pattern.Node
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.Pattern.Var
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.Rewrite
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.RunLimits
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.Runner.Phases
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.RunReport
-
Returns a string representation of this record class.
- toString() - Method in class io.github.vecbricks.jegg.Selection
- toString() - Method in record class io.github.vecbricks.jegg.StopReason.ClassLimit
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.StopReason.IterationLimit
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.StopReason.NodeLimit
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.StopReason.Other
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.vecbricks.jegg.StopReason.Saturated
-
Returns a string representation of this record class.
- toString() - Method in class io.github.vecbricks.jegg.Subst
- toTree(TreeBridge) - Method in record class io.github.vecbricks.jegg.Extracted
-
The term as a client's tree, through
bridge, bottom-up; a subterm object reached twice is built once, and the client's tree shares it. - TreeBridge<T,
L> - Interface in io.github.vecbricks.jegg -
How a client's own tree type becomes e-nodes and comes back: the three functions
EGraph.addTree(T, TreeBridge)and an extractor need, so that a client whose terms are an existing tree of records - children held as nodes, not ids - does not mirror its language by hand. - treeSize() - Method in record class io.github.vecbricks.jegg.Extracted
-
How many nodes the term has as a tree, shared subterms counted each time.
- type() - Method in interface io.github.vecbricks.jegg.Pattern.Head
-
The class of e-node this head can match, when it is one class (a record per operator, as jegg's languages are written): a search then starts at the classes holding such a node rather than at every class.
U
- unions() - Method in record class io.github.vecbricks.jegg.Applied
-
Returns the value of the
unionsrecord component. - unions() - Method in record class io.github.vecbricks.jegg.RunReport.Iteration
-
Returns the value of the
unionsrecord component.
V
- var() - Method in record class io.github.vecbricks.jegg.MultiPattern.Clause
-
Returns the value of the
varrecord component. - var(String) - Static method in interface io.github.vecbricks.jegg.Pattern
-
A variable pattern.
- Var(String) - Constructor for record class io.github.vecbricks.jegg.Pattern.Var
-
Interns the name, so that a substitution finds it by reference.
- variables() - Method in interface io.github.vecbricks.jegg.Pattern.Head
-
The payload variables this head binds in
Pattern.Head.match(L, Subst), declared, or empty if the head does not say.
W
- when(Condition) - Method in record class io.github.vecbricks.jegg.Rewrite
-
This rewrite under a further condition.
- withChildren(IntList) - Method in interface io.github.vecbricks.jegg.Language
-
The same operator and payload over these children: a node of the same class as this one, which the e-graph's index from node class to classes relies on.
- withClasses(int) - Method in record class io.github.vecbricks.jegg.RunLimits
-
A copy with another class limit.
- withHook(Runner.Hook) - Method in class io.github.vecbricks.jegg.Runner
-
Adds a hook, run before each iteration in the order added; returns this runner.
- withIterations(int) - Method in record class io.github.vecbricks.jegg.RunLimits
-
A copy with another iteration limit.
- withNodes(int) - Method in record class io.github.vecbricks.jegg.RunLimits
-
A copy with another node limit.
- withoutAnalysis() - Static method in class io.github.vecbricks.jegg.EGraph
-
A graph with no analysis.
All Classes and Interfaces|All Packages