Class Summary |
AbstractStrategy |
A visitor that it iself visitable with a VisitorVisitor needs
to implement the MuStrategy interface. |
All |
Basic strategy combinator with one strategy argument s , that
applies this strategy s to all children. |
AllSeq |
AllSeq(v).visit(T(t1,... |
Choice |
Choice(v1,v2) = v1 if v1 succeeds
Choice(v1,v2) = v2 if v1 fails
Visitor combinator with two visitor arguments, that tries to
apply the first visitor and if it fails tries the other
(left-biased choice). |
ChoiceId |
ChoiceId(v1,v2) = v1 if v1 is not Identity
ChoiceId(v1,v2) = v2 otherwise
Basic visitor combinator with two visitor arguments, that applies
these visitors one after the other (sequential composition), if the first
one is not the identity. |
DeRef |
|
Environment |
Object that represents an environment of a strategy
the position where the strategy is applied
a pointer to subterm
the root is stored in the first cell |
Fail |
x.accept(Fail) always raises a VisitFailure exception. |
Identity |
x.accept(Identity) = x
Basic visitor combinator without arguments that does nothing. |
IfThenElse |
|
Mu |
|
MuVar |
MuVar(v) always raises a VisitFailure exception. |
Not |
Not(v) succeeds if and only if v fails. |
Omega |
Omega(i,v)
Basic visitor combinator which applies v the i-th subterm
0-th subterm is the term itself
1-th subterm corresponds to the first subterm
... |
OmegaU |
OmegaU(v)
Basic visitor combinator which applies Omega(i,v) with
i in [1..arity] with a uniform probability
i.e. with probability 1/getChildCount
|
One |
Basic strategy combinator with one strategy argument s , that
applies this strategy s to exactly one child. |
OneId |
T(t1,... |
Position |
Object that represents a position in a term |
Pselect |
Pselect(p,q,v1,v2) = v1 with probability p/q
Pselect(p,q,v1,v2) = v2 with probability 1-(p/q)
Visitor combinator with a probability and two visitor arguments,
that select a visitor according to the probability p/q
The strategy fails if the selected strategy fails
Note that any side-effects of v1 are not undone when it fails. |
Sequence |
Sequence(v1,v2)[t] = v2[v1[t]] if v1 succeeds
fails otherwise
Basic visitor combinator with two visitor arguments, that applies
these visitors one after the other (sequential composition). |
SequenceId |
x.fire(SequenceId (v1,v2)) = x.fire(v1) ; x.fire(v2) if x.fire(v1)! |