de.cau.cs.kieler.krep.compiler.ceq
Class ScadeProgram

java.lang.Object
  extended by de.cau.cs.kieler.krep.compiler.ceq.Program
      extended by de.cau.cs.kieler.krep.compiler.ceq.ScadeProgram
All Implemented Interfaces:
Scope

public class ScadeProgram
extends Program
implements Scope

Representation of a Scade program, this extends a ceq program by a parser for Scade files.

Rating yellow
(2010-02-05) review by cmot, msp, tam

Constructor Summary
ScadeProgram(InputStream in)
          parse input stream which is expected to be a Scade textual file.
ScadeProgram(String name)
           
 
Method Summary
 void add(Automaton a)
          
 void add(Equation eq)
          
 void add(LinkedList<Variable> vars)
          
 void addEq(LinkedList<Equation> eq)
          
 void addEq(String s, Expression e)
           
 void addInput(String s, Type t)
           
 void addVar(Variable v)
           
 Program getCEQ()
          Transform Lustre program into simplified ceq.
 void setIO()
          infer io from equations.
 
Methods inherited from class de.cau.cs.kieler.krep.compiler.ceq.Program
addEq, addInput, addLocal, addOutput, addVar, destroyTemp, flatten, getDepGraph, getEqs, getInputs, getLabel, getLocals, getMax, getName, getOutputs, getSsms, getTemp, getVar, getVar, getVars, init, propagateConst, removeEquiv, replace, setDepGraph, setEqs, setInputs, setLocals, setName, setOutputs, setSsms, setVars, simplify, staticEval, toLustre, toString, wcrt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScadeProgram

public ScadeProgram(String name)
Parameters:
name - name of the scade program.

ScadeProgram

public ScadeProgram(InputStream in)
             throws IOException,
                    ClockException,
                    TypeException
parse input stream which is expected to be a Scade textual file.

Parameters:
in - input stream with scade program.
Throws:
IOException - thrown when the input stream cannot be read
ClockException - thrown at errors in clock inference
TypeException - thrown at errors in type inference
Method Detail

setIO

public void setIO()
infer io from equations.


getCEQ

public Program getCEQ()
Transform Lustre program into simplified ceq.

Returns:
the simplified program

addEq

public void addEq(String s,
                  Expression e)
Parameters:
s - name of the additional equation
e - expression to compute the value

addVar

public void addVar(Variable v)
Overrides:
addVar in class Program
Parameters:
v - additional variable

addInput

public void addInput(String s,
                     Type t)
Parameters:
s - name of input signal
t - type of new input signal

add

public void add(Automaton a)

Specified by:
add in interface Scope
Parameters:
a - additional automaton

add

public void add(LinkedList<Variable> vars)

Specified by:
add in interface Scope
Parameters:
vars - local variables

add

public void add(Equation eq)

Specified by:
add in interface Scope
Parameters:
eq - additional equation.

addEq

public void addEq(LinkedList<Equation> eq)

Specified by:
addEq in interface Scope
Parameters:
eq - additional equations.