|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.Compiler.Expression
SFE.Compiler.OperationExpression
SFE.Compiler.UnaryOpExpression
public class UnaryOpExpression
A class for representing unary operator expressions that can be defined in the program.
Field Summary | |
---|---|
static java.util.Vector |
inputFormat
|
Constructor Summary | |
---|---|
UnaryOpExpression(Operator op,
Expression middle)
Constructs a new UnaryOpExpression from a given oparator and input. |
Method Summary | |
---|---|
void |
changeReference(UniqueVariables unique)
|
OperationExpression |
combineConstInput()
Combines an input expression that is constant and return the result expression. |
OperationExpression |
combineEqualInputs()
Returns this expression since there is nothig to do. |
void |
combineUnaryInput()
Combined an input expression the is the output of an unary operator into this Operation expression. |
Expression |
duplicate()
returns a replica of this expression |
java.util.Vector |
getLvalExpressionInputs()
Returns an array of the input LvalExpressions of this gate. |
Expression |
getMiddle()
return the input of the expression |
boolean |
hasConstantInput()
Checks if the input is constant and the unary operator is not |
boolean |
hasEqualInputs()
Returns false as there is only one input to UnaryOpExpression. |
boolean |
hasUnaryInput()
Returns true iff one of the operand of this operator expression is a result of an unary operator. |
boolean |
isComplexIDOrNeg()
cannot happen |
BlockStatement |
multi2SingleBit(java.lang.Object obj)
Transforms this multibit expression into singlebit statements and adds them to the appropriate function. |
OperationExpression |
negate()
returns the negate gate (OperatorExpression) of this OperatorExpression. |
java.util.Vector |
returnInputs()
Returns an array of the input LvalExpressions of this gate. |
OperationExpression |
simplify()
never called |
OperationExpression |
sortInputs()
Sorts the input gates according to their names and returns the result OperationExpression. |
void |
toCircuit(java.io.PrintWriter circuit)
Returns a string representing this object as it appear at the output circuit. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class SFE.Compiler.OperationExpression |
---|
combineSharedInput, evaluateExpression, getConstantOutput, getOperator, hasSharedInput, isConstant, size |
Methods inherited from class SFE.Compiler.Expression |
---|
bitAt, hasSharedInput |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Vector inputFormat
Constructor Detail |
---|
public UnaryOpExpression(Operator op, Expression middle)
op
- the unary operator.middle
- the input.Method Detail |
---|
public java.util.Vector returnInputs()
public java.lang.String toString()
toString
in class java.lang.Object
public BlockStatement multi2SingleBit(java.lang.Object obj)
obj
- the AssignmentStatement that holds this UnaryOpExpression.
public Expression getMiddle()
public void toCircuit(java.io.PrintWriter circuit)
public boolean hasUnaryInput()
hasUnaryInput
in class OperationExpression
public void combineUnaryInput()
combineUnaryInput
in class OperationExpression
public boolean hasConstantInput()
hasConstantInput
in class OperationExpression
public OperationExpression combineConstInput()
combineConstInput
in class OperationExpression
public boolean hasEqualInputs()
hasEqualInputs
in class OperationExpression
public OperationExpression combineEqualInputs()
combineEqualInputs
in class OperationExpression
public OperationExpression sortInputs()
sortInputs
in class OperationExpression
public OperationExpression negate()
negate
in class OperationExpression
public java.util.Vector getLvalExpressionInputs()
getLvalExpressionInputs
in class OperationExpression
public void changeReference(UniqueVariables unique)
changeReference
in class OperationExpression
public boolean isComplexIDOrNeg()
isComplexIDOrNeg
in class OperationExpression
public OperationExpression simplify()
simplify
in class OperationExpression
public Expression duplicate()
duplicate
in class OperationExpression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |