public final class SimpleProgramImpl extends java.lang.Object implements ProtelisProgram
ProtelisProgram.| Constructor and Description |
|---|
SimpleProgramImpl(org.protelis.parser.protelis.ProtelisModule source,
ProtelisAST<?> program) |
SimpleProgramImpl(java.lang.String pName,
ProtelisAST<?> program) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
compute(ExecutionContext context)
Execute one round of computation of this Protelis program.
|
java.lang.String |
getName()
The name of the program.
|
java.lang.String |
toString() |
public SimpleProgramImpl(org.protelis.parser.protelis.ProtelisModule source,
ProtelisAST<?> program)
source - Original ProtelisProgram parsed by Xtext. Used to get the
module name.program - evaluation treepublic SimpleProgramImpl(java.lang.String pName,
ProtelisAST<?> program)
pName - Program nameprogram - evaluation treepublic java.lang.Object compute(ExecutionContext context)
ProtelisProgramcompute in interface ProtelisProgramcontext - The virtual machine environment in which computation will take
place.public java.lang.String getName()
ProtelisProgramgetName in interface ProtelisProgrampublic java.lang.String toString()
toString in class java.lang.Object