|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xmloperator.lambda2.net.impl.LambdaNetImpl
LambdaNet implementation.
Constructor Summary | |
LambdaNetImpl()
Constructor of a LambdaNet that represents a free variable. |
|
LambdaNetImpl(PortImpl bodySupport)
Constructor of a cloned LambdaNet. |
Method Summary | |
boolean |
booleanValue(int[] interactionStat)
Returns the boolean value of the Term (K or F) represented by this LambdaNet. |
void |
buildAbstraction()
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the abstraction "\x.t", where "x" doesn't occur within t. |
void |
buildAbstraction(Port freeVariableSupport)
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the abstraction "\x.t", where "x" is bound to the given variable of "t". |
void |
buildAbstraction(Port[] freeVariableSupports)
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the abstraction "\x.t", where "x" is bound to the given variables of "t". |
void |
buildApplication(LambdaNet argument)
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the application "tu" where "u" is the lambda term represented by the given LambdaNet. |
void |
buildApplication(LambdaNet argument,
int functionExponent)
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the application "(t^n)u" where "u" is the lambda term represented by the given LambdaNet and "n" an exponent. |
int |
cellCount()
Returns the count of cells of this LambdaNet. |
Port |
getBodySupport()
Returns the free Port that supports the interaction-net body. |
int |
getFreeVariableCount()
Returns the count of free variables. |
static void |
main(java.lang.String[] args)
|
long |
numeralValue(int[] interactionStat)
Returns the value modulo 2^63 of the Church numeral Term represented by this LambdaNet. |
void |
printNet(java.io.PrintStream out)
Print a graph representation of this LambdaNet. |
void |
printStat(java.io.PrintStream out)
Print a statistic of symbols of this LambdaNet. |
Term |
readBack(boolean inNormalForm,
int maxStepCount,
int[] interactionStat)
Read back the Term represented by this LambdaNet. |
int |
reduceUntilInterfaceNormalForm(int maxStepCount,
int[] interactionStat)
Reduces this LambdaNet until the interface has a normal form. |
static boolean |
test(java.io.PrintStream out,
boolean isVerbose)
Try some LambdaNets. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LambdaNetImpl()
public LambdaNetImpl(PortImpl bodySupport)
bodySupport
- a source LambdaNet body support.Method Detail |
public void printNet(java.io.PrintStream out)
out
- a PrintStream.public void printStat(java.io.PrintStream out)
out
- a PrintStream.public int cellCount()
public static void main(java.lang.String[] args)
public static boolean test(java.io.PrintStream out, boolean isVerbose)
out
- the PrintStream to print results.isVerbose
- if true then all tests have to be displayed.
public Port getBodySupport()
LambdaNet
getBodySupport
in interface LambdaNet
public int getFreeVariableCount()
LambdaNet
getFreeVariableCount
in interface LambdaNet
public void buildAbstraction()
LambdaNet
buildAbstraction
in interface LambdaNet
public void buildAbstraction(Port freeVariableSupport)
LambdaNet
buildAbstraction
in interface LambdaNet
freeVariableSupport
- a support of free variable.public void buildAbstraction(Port[] freeVariableSupports)
LambdaNet
buildAbstraction
in interface LambdaNet
freeVariableSupports
- a set of 0 or more support of free variable.public void buildApplication(LambdaNet argument)
LambdaNet
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the application "tu" where "u" is the lambda term represented by the given LambdaNet.
The argument LambdaNet is consumed by the operation and is no more usable.
buildApplication
in interface LambdaNet
argument
- an argument LambdaNet.public void buildApplication(LambdaNet argument, int functionExponent)
LambdaNet
Transforms this LambdaNet in such a way that its represented lambda term "t" is replaced by the application "(t^n)u" where "u" is the lambda term represented by the given LambdaNet and "n" an exponent.
The argument LambdaNet is consumed by the operation and is no more usable.
buildApplication
in interface LambdaNet
argument
- an argument LambdaNet.functionExponent
- a function exponentpublic int reduceUntilInterfaceNormalForm(int maxStepCount, int[] interactionStat) throws TooMuchReductionStepException
LambdaNet
Post-condition: the body port is a principal Port or a free Port.
reduceUntilInterfaceNormalForm
in interface LambdaNet
maxStepCount
- a maximun step count. A negative value means no limit.interactionStat
- an array of interaction type count. May be null.
TooMuchReductionStepException
- if the given maximum count of step is not sufficient to
obtain an interface normal form.public Term readBack(boolean inNormalForm, int maxStepCount, int[] interactionStat) throws TooMuchReductionStepException
LambdaNet
Pre-condition: this LambdaNet must have no free variable.
readBack
in interface LambdaNet
inNormalForm
- if true then returns a Term in normal form.maxStepCount
- a maximum step count. A negative value means no limit.interactionStat
- an array of interaction type count. May be null.
TooMuchReductionStepException
- if the given maximum count of step is not sufficient to
obtain a normal form or an interface normal form.public boolean booleanValue(int[] interactionStat)
LambdaNet
booleanValue
in interface LambdaNet
interactionStat
- an array of interaction type count. May be null.
public long numeralValue(int[] interactionStat)
LambdaNet
numeralValue
in interface LambdaNet
interactionStat
- an array of interaction type count. May be null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |