|
||||||||||
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.Expression
de.cau.cs.kieler.krep.compiler.ceq.NotExpression
public class NotExpression
A boolean not.
Constructor Summary | |
---|---|
NotExpression(String name,
Expression e,
Program p)
|
Method Summary | |
---|---|
Expression |
flatten(String name,
HashMap<String,Variable> vars,
LinkedList<Expression> es)
extract sub-expressions from operations. |
List<Variable> |
getDeps()
compute List of all variables, on which current value the expression depends. |
Type |
getType()
Return the inferred type of the expression. |
List<String> |
getVars()
compute list of all variables that syntactically occur in the expression. |
boolean |
isAtom()
compute whether this is an atomic expression. |
Expression |
padDelay(HashMap<String,Integer> delay,
int n)
add additional pre operators, to use all variables with the right tick. |
ConstExpression |
propagateConst(HashMap<String,ConstExpression> con)
Propagate constant values, ie, replace all occurrences of a variable by a constant. |
Expression |
replace(String var,
Expression e)
Replace each occurrence of a variable by an expression. |
void |
replaceVar(HashMap<String,Variable> equiv)
Replace a variable by another one. |
Expression |
staticEval()
Perform static evaluation, remove operations on constant values by the result of the operation. |
LinkedList<AbstractInstruction> |
toKlp(Variable r)
compute instructions to execute this expression on the KLP. |
String |
toString()
Show the expression in Lustre syntax. |
int |
wcrt()
Compute upper bound for the reaction time. |
Methods inherited from class de.cau.cs.kieler.krep.compiler.ceq.Expression |
---|
getName, getProg, getVar, getVar, setName, setProg |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NotExpression(String name, Expression e, Program p)
name
- name of the expressione
- sub-expression that is negatedp
- program that contains the expressionMethod Detail |
---|
public List<String> getVars()
Expression
getVars
in class Expression
public List<Variable> getDeps()
Expression
getDeps
in class Expression
public String toString()
Expression
toString
in class Expression
public Expression flatten(String name, HashMap<String,Variable> vars, LinkedList<Expression> es)
Expression
flatten
in class Expression
name
- name of the expressionvars
- holds additionally added variableses
- additionally added expression
public boolean isAtom()
Expression
isAtom
in class Expression
public LinkedList<AbstractInstruction> toKlp(Variable r)
Expression
toKlp
in class Expression
r
- Register to store the result
public Type getType()
Expression
getType
in class Expression
public Expression padDelay(HashMap<String,Integer> delay, int n)
Expression
padDelay
in class Expression
delay
- : delay for all variablesn
- : delay of the output
public ConstExpression propagateConst(HashMap<String,ConstExpression> con)
Expression
propagateConst
in class Expression
con
- mapping variable to constant values, if they can be evaluated
public Expression staticEval()
Expression
staticEval
in class Expression
public void replaceVar(HashMap<String,Variable> equiv)
Expression
replaceVar
in class Expression
equiv
- list of equivalent variables.public int wcrt()
Expression
wcrt
in class Expression
public Expression replace(String var, Expression e)
Expression
replace
in class Expression
var
- name of the expression to replacee
- expression by which the variable is replaced.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |