|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Introspector | |
Path | Represent a path between two locations in a term. |
Strategy | |
Visitable |
Class Summary | |
---|---|
AbstractStrategy |
Partial implementation of the strategy interface that implements
most of the visit methods. |
AbstractStrategyBasic | Partial implementation of the strategy interface that can be used to implement new basic transformations (like a rewrite rule system). |
AbstractStrategyCombinator |
Partial implementation of the strategy interface that can be used to
implement new strategy combinators (like the All strategy). |
All |
Strategy combinator with one strategy argument s , that
applies this strategy s to all children. |
AllSeq | AllSeq(v).visit(T(t1,... |
BuiltinBottomUp |
Strategy combinator with one strategy argument s , that
applies this strategy s in a bottom-up way to all children. |
BuiltinRepeat |
Strategy combinator with one strategy argument s , that
repeats the application of s until it fails |
BuiltinRepeatId |
Strategy combinator with one strategy argument s , that
repeats the application of s until it does nothing (Identity) |
BuiltinTopDown |
Strategy combinator with one strategy argument s , that
applies this strategy s in a top-down way to all children. |
Choice | Choice(v1,v2) = v1 if v1 succeeds
Choice(v1,v2) = v2 if v1 fails
Visitor combinator with two arguments, that tries to
apply the first argument 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
Strategy combinator with two arguments, that applies
these arguments one after the other (sequential composition), if the first
one is not the identity. |
ChoiceUndet | ChoiceUndet(v1,.. |
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
Strategy combinator without arguments that does nothing. |
IfThenElse | |
Mu | Basic strategy combinator used to build a recursive strategy Visiting such a combinator fire the mu-expansion which instantiate the MuVar variables and removed the Mu combinator |
MuVar |
Basic strategy combinator with one argument name
which denotes the name of the mu-variable
This basic argument combinator used to build recursive arguments
After the mu-expansion, the private variable instance
is a pointer to the strategy to execute
|
Not | Not(v) succeeds if and only if v fails. |
Omega | Omega(i,v)
Strategy 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)
Strategy 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 arguments,
that select a argument 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
Strategy combinator with two arguments, that applies
these arguments one after the other (sequential composition). |
SequenceId | x.fire(SequenceId (v1,v2)) = x.fire(v1) ; x.fire(v2) if x.fire(v1)! |
Up | |
VisitableBuiltin<T> | |
VisitableIntrospector |
Exception Summary | |
---|---|
VisitFailure |
Provides the Tom strategy library.
The strategy library involves two main entities:
Objects adhering to the Visitable
interface, that
represent terms to be traversed, and strategies, adhering to the Strategy
interface.
The Introspector
interface can be used to allow
traversal of arbitrary composite object structures.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |