|
||||||||||
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.InitExpression
public class InitExpression
Initialization of Lustre flows.
Field Summary |
---|
Fields inherited from class de.cau.cs.kieler.krep.compiler.lustre.Expression |
---|
STAGE_CURRENT, STAGE_INIT, STAGE_NEW, STAGE_WHEN |
Constructor Summary | |
---|---|
InitExpression(String name,
Expression e1,
Expression e2)
generate new initial operation. |
Method Summary | |
---|---|
Equation |
declock(String basename,
int stage,
String c,
LinkedList<Equation> aux,
Program prog)
remove all clock operators inside. |
Expression |
extractPre(HashMap<String,Expression> eqs)
|
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. |
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InitExpression(String name, Expression e1, Expression e2)
name
- of the expressione1
- initial expressione2
- runtime expressionMethod Detail |
---|
public String toString()
toString
in class Object
public boolean isAtom()
isAtom
in class Expression
protected void inferType() throws TypeException
Expression
inferType
in class Expression
TypeException
- thrown if any type problem occurspublic Expression propagatePre(HashMap<String,Expression> eqs)
Expression
propagatePre
in class Expression
eqs
- additionally added equations
public 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 Expression extractPre(HashMap<String,Expression> eqs)
extractPre
in class Expression
eqs
- add auxiliary equations
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |