|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.krep.compiler.ceq.Equation
public class Equation
A clocked equation, consisting of a name, a initial expression, a runtime expression, and a clock.
Constructor Summary | |
---|---|
Equation(String id,
Expression expr)
generate Equation without initializer which runs on the base clock. |
|
Equation(String id,
Expression i,
Expression e,
String clk)
Construct a new clocked equation. |
Method Summary | |
---|---|
LinkedList<Equation> |
flatten(HashMap<String,Variable> vars)
Replace complex expressions in the init expression and introduce auxiliary equations if necessary. |
String |
getClock()
|
List<Variable> |
getDeps()
compute List of all variables, on which current value the expression depends. |
Expression |
getExpr()
|
Expression |
getInit()
|
String |
getName()
|
List<String> |
getPDeps()
|
int |
getPrio()
|
Type |
getType()
|
boolean |
hasClock()
|
boolean |
isClock()
|
ConstExpression |
propagateConst(HashMap<String,ConstExpression> con)
|
boolean |
replace(Equation eq)
|
void |
replaceVar(HashMap<String,Variable> equiv)
|
void |
setClock(String clk)
|
void |
setExpr(Expression expr)
|
void |
setInit(Expression init)
|
void |
setName(String n)
|
void |
setPrio(int pr)
|
void |
staticEval()
static evaluation. |
LinkedList<AbstractInstruction> |
toKlp(boolean useClocks,
String scope,
HashMap<String,Variable> vars)
generate KLP code to compute this equation. |
String |
toString()
Show the equation in Lustre format: v=init -> current(e when c). |
int |
wcrt()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Equation(String id, Expression i, Expression e, String clk)
id
- name of the value that is computedi
- expression to compute the initial valuee
- expression to compute the value during runtimclk
- the clock on which the equation is evaluatedpublic Equation(String id, Expression expr)
id
- name of the equationexpr
- expres * @kieler.rating 2010-02-05 yellow review by cmot, msp, tamsion to compute
the equation.Method Detail |
---|
public String toString()
toString
in class Object
public boolean isClock()
public List<Variable> getDeps()
public String getName()
public Expression getInit()
public void setName(String n)
n
- name of the variable that is computed by this equationpublic String getClock()
public boolean hasClock()
public LinkedList<Equation> flatten(HashMap<String,Variable> vars)
vars
- list of new introduced variables
public LinkedList<AbstractInstruction> toKlp(boolean useClocks, String scope, HashMap<String,Variable> vars)
useClocks
- true if hardware clocks of the klp are usedscope
- scope of the equationvars
- list of all used variables
public Type getType()
public ConstExpression propagateConst(HashMap<String,ConstExpression> con)
con
- constant values.
public void setExpr(Expression expr)
expr
- expression to compute this equationpublic void setInit(Expression init)
init
- expression to initialize this equationpublic void setClock(String clk)
clk
- new clock on which this equation runspublic Expression getExpr()
public void staticEval()
public void replaceVar(HashMap<String,Variable> equiv)
equiv
- list of equivalent variables.public int wcrt()
public int getPrio()
public void setPrio(int pr)
pr
- prioritypublic List<String> getPDeps()
public boolean replace(Equation eq)
eq
- equation to replace.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |