ua.gradsoft.termware.strategies
Class NFirstTopsStrategy
java.lang.Object
ua.gradsoft.termware.AbstractBuildinTransformer
ua.gradsoft.termware.strategies.AbstractTermRewritingStrategy
ua.gradsoft.termware.strategies.NFirstTopsStrategy
- All Implemented Interfaces:
- ITermRewritingStrategy, ITermTransformer
public class NFirstTopsStrategy
- extends AbstractTermRewritingStrategy
Strategy, which try at first do reduction of first level.
- Author:
- rssh
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NFirstTopsStrategy
public NFirstTopsStrategy()
NFirstTopsStrategy
public NFirstTopsStrategy(int n)
transform
public Term transform(Term t,
TermSystem system,
TransformationContext ctx)
throws TermWareException
- Description copied from class:
AbstractTermRewritingStrategy
- main work of strategy is here: transform term
t in system
by applying transformers in 'Star' via subclass-specific algorithm.
- Specified by:
transform in interface ITermRewritingStrategy- Specified by:
transform in interface ITermTransformer- Specified by:
transform in class AbstractTermRewritingStrategy
- Parameters:
t - - term to transformsystem - - system which we usectx - - context of transformation
- Returns:
- - transformed term.
- Throws:
TermWareException
transform
public Term transform(Term t,
TermSystem system,
TransformationContext ctx,
int n,
int level)
throws TermWareException
- Throws:
TermWareException
getDescription
public String getDescription()
- get description of strategy
- Specified by:
getDescription in interface ITermTransformer- Overrides:
getDescription in class AbstractBuildinTransformer
- See Also:
TransformerDescription
getName
public String getName()
- Description copied from class:
AbstractBuildinTransformer
- get name of transformer.
Default behaviour -- return the value of annotation @TransformerName binded to this.getClass().
- Specified by:
getName in interface ITermTransformer- Overrides:
getName in class AbstractBuildinTransformer
- Returns:
- name of transformer.
- See Also:
TransformerName