ua.gradsoft.termware.strategies
Class BTStrategy

java.lang.Object
  extended by ua.gradsoft.termware.AbstractBuildinTransformer
      extended by ua.gradsoft.termware.strategies.AbstractTermRewritingStrategy
          extended by ua.gradsoft.termware.strategies.BTStrategy
All Implemented Interfaces:
ITermRewritingStrategy, ITermTransformer

public class BTStrategy
extends AbstractTermRewritingStrategy

Strategy, which at first try to maximum evaluate subexpressions, than - expression.


Constructor Summary
BTStrategy()
           
 
Method Summary
 String getDescription()
          get description of strategy
 String getName()
          get name of transformer.
 Term transform(Term t, TermSystem system, TransformationContext ctx)
          main work of strategy is here: transform term t in system by applying transformers in 'Star' via subclass-specific algorithm.
 Term transform(Term t, TermSystem system, TransformationContext ctx, int recursiveIndex)
           
 
Methods inherited from class ua.gradsoft.termware.strategies.AbstractTermRewritingStrategy
getStar, hasOtherwise, internalsAtFirst
 
Methods inherited from class ua.gradsoft.termware.AbstractBuildinTransformer
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ua.gradsoft.termware.ITermTransformer
getSource
 

Constructor Detail

BTStrategy

public BTStrategy()
Method Detail

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 transform
system - - system which we use
ctx - - context of transformation
Returns:
- transformed term.
Throws:
TermWareException

transform

public Term transform(Term t,
                      TermSystem system,
                      TransformationContext ctx,
                      int recursiveIndex)
               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