|
||||||||||
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
de.cau.cs.kieler.krep.compiler.lustre.VarAccessExpression
public class VarAccessExpression
Implement the possible immediate access to a Lustre variable.
Field Summary |
---|
Fields inherited from class de.cau.cs.kieler.krep.compiler.lustre.Expression |
---|
STAGE_CURRENT, STAGE_INIT, STAGE_NEW, STAGE_WHEN |
Constructor Summary | |
---|---|
VarAccessExpression(String name)
|
|
VarAccessExpression(Variable v)
|
Method Summary | |
---|---|
Equation |
declock(String basename,
int stage,
String c,
LinkedList<Equation> aux,
Program prog)
remove all clock operators inside. |
boolean |
equals(Object o)
|
Expression |
extractPre(HashMap<String,Expression> eqs)
|
int |
hashCode()
|
ClockList |
inferClock(HashMap<String,Variable> env)
Compute clock on which this expression runs. |
protected void |
inferType()
compute types and set type member recursively in all sub-expressions. |
boolean |
isAtom()
|
Expression |
liftClock()
|
void |
propagateClock(ClockList l)
Propagate to each expression, on which clock it runs. |
Expression |
propagatePre(HashMap<String,Expression> eqs)
make sure only simple variables are inside of pre operators. |
void |
setClock(String clock)
|
String |
toString()
|
Methods inherited from class de.cau.cs.kieler.krep.compiler.lustre.Expression |
---|
addClock, getClock, getInit, getName, getType, setClock, setInit, setName, setType |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VarAccessExpression(String name)
name
- name of the read variablepublic VarAccessExpression(Variable v)
v
- variable to readMethod Detail |
---|
public void setClock(String clock)
clock
- on which the variable shall runpublic String toString()
toString
in class Object
public Expression propagatePre(HashMap<String,Expression> eqs)
Expression
propagatePre
in class Expression
eqs
- additionally added equations
public boolean isAtom()
isAtom
in class Expression
protected void inferType() throws TypeException
Expression
inferType
in class Expression
TypeException
- thrown if any type problem occurspublic ClockList inferClock(HashMap<String,Variable> env) throws ClockException
Expression
inferClock
in class Expression
env
- list of all defined variables
ClockException
- thrown if any clock error occurspublic void propagateClock(ClockList l)
Expression
propagateClock
in class Expression
l
- clock-vector for the expressionpublic Equation declock(String basename, int stage, String c, LinkedList<Equation> aux, Program prog)
Expression
declock
in class Expression
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 Expression liftClock()
liftClock
in class Expression
public boolean equals(Object o)
equals
in class Object
public Expression extractPre(HashMap<String,Expression> eqs)
extractPre
in class Expression
eqs
- add auxiliary equations
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |