de.cau.cs.kieler.krep.compiler.ceq
Class Variable
java.lang.Object
de.cau.cs.kieler.krep.compiler.ceq.Variable
public class Variable
- extends Object
A Variable declaration in CEQ. A variable has a name, a type and a scope, i.e., input output,
local or temporary. A variable also has a register id.
- Rating

- (2010-02-05) review by cmot, msp, tam
Variable
public Variable(String n,
Variable.Kind kind,
Type t)
- generate new Variable declaration.
- Parameters:
n
- name of the variablekind
- kind of the variablet
- type of the variable
Variable
public Variable(Variable var,
Variable.Kind kind)
- Create Variable with the same information as an existing Lustre Variable.
- Parameters:
var
- Lustre variablekind
- io kind
getKind
public Variable.Kind getKind()
- Returns:
- variable kind, ie, input, output, local or temp
getType
public Type getType()
- Returns:
- type of the variable
toString
public String toString()
- Overrides:
toString
in class Object
getName
public String getName()
- Returns:
- name of the variable
isInput
public boolean isInput()
- Returns:
- true if the variable is an input
isOutput
public boolean isOutput()
- Returns:
- true if the variable is an output
isLocal
public boolean isLocal()
- Returns:
- true if the variable is local
isTemp
public boolean isTemp()
- Returns:
- true if the variable is only temporary defined
toKlp
public String toKlp(String clock)
- Parameters:
clock
- clock on which the variable runs
- Returns:
- KLP assembler to initialize variable
getId
public int getId()
- Returns:
- register id of this variable