org.xmloperator.lambda.translate
Class Reducer
java.lang.Object
|
+--org.xmloperator.lambda.translate.Reducer
- public abstract class Reducer
- extends java.lang.Object
Reduces a term using a translation to a lambda-net.
Method Summary |
static void |
main(java.lang.String[] args)
|
static Term |
reduceDeeply(Term rootTerm,
OperatorFactory operatorFactory,
org.xmloperator.lambda.net.util.InteractionListener interactionListener,
org.xmloperator.lambda.net.reduction.ReductionListener redexListener)
Reduces a term until the normal form, if possible. |
static boolean |
test(java.io.PrintStream out,
boolean isVerbose)
Reduce some redexes and display the results. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Reducer
public Reducer()
reduceDeeply
public static final Term reduceDeeply(Term rootTerm,
OperatorFactory operatorFactory,
org.xmloperator.lambda.net.util.InteractionListener interactionListener,
org.xmloperator.lambda.net.reduction.ReductionListener redexListener)
- Reduces a term until the normal form, if possible.
- Parameters:
rootTerm
- a Term to reduce. It is not consumed by this method.operatorFactory
- an OperatorFactory.interactionListener
- an InteractionListener. May be null.redexListener
- a RedexListener. May be null.
- Returns:
- the reduced Term.
- Throws:
org.xmloperator.lambda.net.reduction.NotInNormalFormException
- if execution has been interrupted.
main
public static void main(java.lang.String[] args)
test
public static boolean test(java.io.PrintStream out,
boolean isVerbose)
- Reduce some redexes and display the results.
- Parameters:
out
- the PrintStream to print results. May be null.isVerbose
- if true then all tests have to be displayed.
- Returns:
- true if all is Ok.