de.cau.cs.kieler.krep.compiler.lustre
Class Variable
java.lang.Object
de.cau.cs.kieler.krep.compiler.lustre.Variable
public class Variable
- extends Object
A Lustre variable. This is used both for declaration and access of a variable.
- Rating

- (2010-02-05) review by cmot, msp, tam
Variable
public Variable(String n,
Type t)
- Parameters:
n
- name of the variablet
- type of the variable This assumes that the variable runs on the base clock.
Variable
public Variable(String n,
Type t,
String clk)
- Parameters:
n
- name of the variablet
- type of the variableclk
- clock on which this variable runs
setClock
public void setClock(String clk)
- Parameters:
clk
- on which the variable shall run
toString
public String toString()
- Overrides:
toString
in class Object
getName
public String getName()
- Returns:
- name of the variable
getType
public Type getType()
- Returns:
- infered type of the variable
getClock
public ClockList getClock()
- Returns:
- clocks on which the variable runs.
getTemp
public static Variable getTemp(String prefix,
Type type,
String clock)
- Parameters:
prefix
- prefix of the temporary variabletype
- type of the variableclock
- clock on whoch the vriable runs
- Returns:
- a new variable with a unique name
get
public static Variable get(String name)
- Parameters:
name
- name of the variable
- Returns:
- unique variable with that name
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object