ua.gradsoft.termware
Interface ITermTransformer

All Known Subinterfaces:
ITermRewritingStrategy
All Known Implementing Classes:
AbstractBuildinTransformer, AbstractRuleTransformer, AbstractTermRewritingStrategy, ApplyTransformer, ArityTransformer, AssignTransformer, BTStrategy, CloneTransformer, ConditionalRuleTransformer, DefaultFacts.MethodTransformer, DivideTransformer, DomainTransformer, EqTransformer, FirstTopStrategy, GetCurrentTimeInMillisTransformer, GetPropertyTransformer, GetRulesetTransformer, GreaterEqTransformer, GreaterTransformer, IfTransformer, IntersectionTransformer, IsAtomTransformer, IsBigDecimalTransformer, IsBigIntegerTransformer, IsBooleanTransformer, IsByteTransformer, IsCharTransformer, IsDoubleTransformer, IsFloatTransformer, IsIntTransformer, IsJavaObjectTransformer, IsListTransformer, IsLongTransformer, IsNilTransformer, IsNumberTransformer, IsShortTransformer, IsStringTransformer, IsXTransformer, JavaFactsTransformer, JavaStrategyTransformer, JSR223ProgramTransformer, LessEqTransformer, LessTransformer, LetTransformer, ListAppendTransformer, ListCarTransformer, ListCdrTransformer, ListInsertTransformer, ListLengthTransformer, LoadFileTransformer, LogicalAndTransformer, LogicalNotTransformer, LogicalOrTransformer, MinusTransformer, ModTransformer, MultiplyTransformer, NeqTransformer, NFirstTopsStrategy, PlusTransformer, PrintStringTransformer, PrintTermTransformer, ReduceTransformer, ReverseTransformer, RuleTransformer, SetFactTransformer, SetPropertyTransformer, StringConcatTransformer, StringConvertTransformer, StringLengthTransformer, StringMatchesTransformer, StringParseTransformer, StringSplitTransformer, StringSubstTransformer, SublistTransformer, SystemTransformer, TermNameTransformer, ToBigDecimalTransformer, ToBigIntegerTransformer, ToBooleanTransformer, ToDoubleTransformer, ToIntTransformer, ToLongTransformer, TopDownStrategy, ToStringTransformer, UnifyTransformer, WhereTransformer

public interface ITermTransformer

interface for build-in operations or rules. Build-in operation is represented as class, which implement ITermTransformer. Rules are instances of RuleTransformer


Method Summary
 String getDescription()
          return human-readable description of transformer
 String getName()
          return name of transformer.
 String getSource()
          return source-code of this term, if one is aviable.
 Term transform(Term t, TermSystem system, TransformationContext ctx)
          attempt to transform term t .
 

Method Detail

transform

Term transform(Term t,
               TermSystem system,
               TransformationContext ctx)
               throws TermWareException
attempt to transform term t .

Parameters:
t - - term to transform
system - - system which give us access to ebvironment.
ctx - - context of transformation.
Returns:
- transformed term.
Throws:
TermWareException

getName

String getName()
return name of transformer. (usually is a name of top-level reduced term). this name is not used internally by termware engine, but can be printed in system description for human.

Returns:
name of transformer.

getDescription

String getDescription()
return human-readable description of transformer


getSource

String getSource()
return source-code of this term, if one is aviable.