public abstract class KernelMain
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
KernelMain._IgnoreAllApplicationClasses |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_momlClassName
The name of the MoML class, either as a top level model or
as an xml file that we are generating code for.
|
protected CompositeEntity |
_toplevel
The CompositeEntity we are generating code for.
|
Constructor and Description |
---|
KernelMain() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
_parseArgs(GeneratorAttribute attribute)
Parse any code generator specific arguments.
|
static void |
addStandardOptimizations(soot.Pack pack,
int time)
Add transforms corresponding to the standard soot optimizations
to the given pack.
|
static void |
addTransform(soot.Pack pack,
java.lang.String name,
soot.Transformer transformer)
Add a new transform to the given pack, dealing properly with
options specified in the transformer.
|
static void |
addTransform(soot.Pack pack,
java.lang.String name,
soot.Transformer transformer,
java.lang.String defaultOptions)
Add a new transform to the given pack, dealing properly with
options specified in the transformer.
|
abstract void |
addTransforms()
Add transforms to the Scene.
|
void |
compile(java.lang.String modelName,
CompositeEntity toplevel,
GeneratorAttribute attribute)
Compile the given model with the given name.
|
void |
generateCode(java.lang.String[] args)
Call soot.Main.main(), which does command line argument
processing and then starts the transformation.
|
void |
initialize(CompositeEntity toplevel)
Read in a MoML class, sanitize the top level name,
initialize the model.
|
CompositeEntity |
toplevel()
Return the model that we are generating code for.
|
protected java.lang.String _momlClassName
protected CompositeEntity _toplevel
public static void addTransform(soot.Pack pack, java.lang.String name, soot.Transformer transformer, java.lang.String defaultOptions)
public static void addTransform(soot.Pack pack, java.lang.String name, soot.Transformer transformer)
public abstract void addTransforms()
public void compile(java.lang.String modelName, CompositeEntity toplevel, GeneratorAttribute attribute) throws java.lang.Exception
java.lang.Exception
public void generateCode(java.lang.String[] args)
args
- Soot command line arguments to be passed
to soot.Main.main().public void initialize(CompositeEntity toplevel) throws IllegalActionException, NameDuplicationException
If the director is an SDF director, then the number of iterations is handled specially. If the director is an SDF director and a parameter called "copernicus_iterations" is present, then the value of that parameter is used as the number of iterations. If the director is an SDF director, and there is no "copernicus_iterations" parameter but the "ptolemy.ptII.copernicusIterations" Java property is set, then the value of that property is used as the number of iterations.
toplevel
- The model we are generating code for.IllegalActionException
NameDuplicationException
public CompositeEntity toplevel()
public static void addStandardOptimizations(soot.Pack pack, int time)
protected java.lang.String[] _parseArgs(GeneratorAttribute attribute) throws java.lang.Exception
java.lang.Exception