|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.krep.compiler.lustre.Expression
public abstract class Expression
Abstract superclass for Lustre(ec) expression. They are closely related to ceq expression, but here the clock operators are usual expressions.
Field Summary | |
---|---|
static int |
STAGE_CURRENT
declock clocked equation when current has been seen. |
static int |
STAGE_INIT
declock clocked equation when init has been seen. |
static int |
STAGE_NEW
declock fresh clocked equation. |
static int |
STAGE_WHEN
declock clocked equation when "when" has been seen. |
Constructor Summary | |
---|---|
protected |
Expression(String n)
|
Method Summary | |
---|---|
void |
addClock(String c)
|
abstract Equation |
declock(String basename,
int stage,
String c,
LinkedList<Equation> aux,
Program prog)
remove all clock operators inside. |
abstract Expression |
extractPre(HashMap<String,Expression> eqs)
|
ClockList |
getClock()
|
Expression |
getInit()
|
String |
getName()
|
Type |
getType()
|
abstract ClockList |
inferClock(HashMap<String,Variable> vars)
Compute clock on which this expression runs. |
protected abstract void |
inferType()
compute types and set type member recursively in all sub-expressions. |
abstract boolean |
isAtom()
|
abstract Expression |
liftClock()
|
abstract void |
propagateClock(ClockList l)
Propagate to each expression, on which clock it runs. |
abstract Expression |
propagatePre(HashMap<String,Expression> eqs)
make sure only simple variables are inside of pre operators. |
protected void |
setClock(ClockList clk)
|
void |
setInit(Expression e)
|
protected void |
setName(String n)
|
protected void |
setType(Type t)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STAGE_NEW
public static final int STAGE_CURRENT
public static final int STAGE_WHEN
public static final int STAGE_INIT
Constructor Detail |
---|
protected Expression(String n)
n
- unique name of the expressionMethod Detail |
---|
protected void setType(Type t)
t
- type of the expressionpublic abstract Expression propagatePre(HashMap<String,Expression> eqs)
eqs
- additionally added equations
public abstract Expression extractPre(HashMap<String,Expression> eqs)
eqs
- add auxiliary equations
public abstract boolean isAtom()
public abstract ClockList inferClock(HashMap<String,Variable> vars) throws ClockException
vars
- list of all defined variables
ClockException
- thrown if any clock error occurspublic abstract void propagateClock(ClockList l)
l
- clock-vector for the expressionpublic abstract Equation declock(String basename, int stage, String c, LinkedList<Equation> aux, Program prog)
basename
- name of the expression, used for auxiliary expressionsstage
- indicate what clock operators have already been in this equation: 0: on top level
1: beyond current 2: beyond when 3: beyond ->c
- clockaux
- additional equationsprog
- program that contains the expression
public ClockList getClock()
protected abstract void inferType() throws TypeException
TypeException
- thrown if any type problem occurspublic Type getType()
public String getName()
public void setInit(Expression e)
e
- expression to initialize this variablepublic Expression getInit()
public abstract Expression liftClock()
public void addClock(String c)
c
- additional clock for this expression.protected void setName(String n)
n
- the name to setprotected void setClock(ClockList clk)
clk
- the clock to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |