SFE.Compiler
Class InputStatement

java.lang.Object
  extended by SFE.Compiler.Statement
      extended by SFE.Compiler.InputStatement
All Implemented Interfaces:
Multi2SingleBit

public class InputStatement
extends Statement

A class for representing input statement for the final output circuit.


Field Summary
static java.util.Vector inputFormat
           
 
Method Summary
 void buildUsedStatementsHash()
          adds this input statement to the statements being used to calculate the output circuit.
 Statement duplicate()
          dammy - returns this.
 java.lang.String getName()
          Returns a string representation of this InputStatement's name.
 int getOutputLine()
          Returns the output line in the output circuit of this assignmnet statement.
 BlockStatement multi2SingleBit(java.lang.Object obj)
          Transforms this multibit InputStatement into singlebit statements and returns the result.
 void optimizePhaseI()
          Optimizes the InputStatement - phase I
 void optimizePhaseII(java.util.Vector newBody)
          Optimizes the InputStatement - phase II
 void setOutputLine(int line)
          Sets the output line of this assignment statement.
 void toCircuit(java.io.PrintWriter circuit)
          Prints this AssignmentStatement into the circuit.
 java.lang.String toString()
          Returns a string representation of the object.
 Statement uniqueVars()
          Unique vars transformations.
 
Methods inherited from class SFE.Compiler.Statement
hasUnaryOperator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inputFormat

public static final java.util.Vector inputFormat
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getName

public java.lang.String getName()
Returns a string representation of this InputStatement's name.

Returns:
a string representation of this InputStatement's name.

getOutputLine

public int getOutputLine()
Returns the output line in the output circuit of this assignmnet statement.

Returns:
an int that represents the output line in the output circuit of this assignmnet statement.

setOutputLine

public void setOutputLine(int line)
Sets the output line of this assignment statement.

Parameters:
line - the line number in the output.

toCircuit

public void toCircuit(java.io.PrintWriter circuit)
Prints this AssignmentStatement into the circuit.

Parameters:
circuit - the circuit output file.

optimizePhaseI

public void optimizePhaseI()
Optimizes the InputStatement - phase I


optimizePhaseII

public void optimizePhaseII(java.util.Vector newBody)
Optimizes the InputStatement - phase II


buildUsedStatementsHash

public void buildUsedStatementsHash()
adds this input statement to the statements being used to calculate the output circuit.


multi2SingleBit

public BlockStatement multi2SingleBit(java.lang.Object obj)
Transforms this multibit InputStatement into singlebit statements and returns the result.

Specified by:
multi2SingleBit in interface Multi2SingleBit
Parameters:
obj - not needed (null).
Returns:
a BlockStatement containing the result statements.

uniqueVars

public Statement uniqueVars()
Unique vars transformations.

Specified by:
uniqueVars in class Statement

duplicate

public Statement duplicate()
dammy - returns this.

Specified by:
duplicate in class Statement
Returns:
a replica of this statement.