|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cgp.runtime.Type | +--cgp.runtime.LambdaType | +--cgp.runtime.ActorType
Field Summary | |
private static java.lang.String |
ANON_NAME
|
private java.util.LinkedList |
runList
|
private ScopeStack |
scopes
|
private static java.lang.String |
SELF_NAME
|
Fields inherited from class cgp.runtime.LambdaType |
body,
defGraph,
formals,
name |
Fields inherited from class cgp.runtime.Type |
kbStack,
scopeStack,
type |
Constructor Summary | |
ActorType(GraphType body)
Invoke this constructor when defining an anonymous actor, typically for direct activation of a graph (e.g. |
|
ActorType(java.lang.String name,
FormalParameter[] formals,
GraphType body)
Invoke this constructor when defining a named actor via an "actor" type definition. |
|
ActorType(java.lang.String name,
FormalParameter[] formals,
GraphType defGraph,
notio.Graph body)
Invoke this constructor when copy()ing. |
Method Summary | |
void |
bindParametersToSourceConcepts(Type[] actuals)
Mutate source concept designators with actuals, by argument order. |
private notio.Actor[] |
collectSubActors()
Collect sub-actors in this actor. |
LambdaType |
copy()
Copy this actor such that a clone of the defining graph exists for the purpose of actor execution. |
SubActorInfo |
getNextSubActor()
Return the sub-actor (actor or function) which is next ready to to be executed by virtue of having all input concept designators bound to pCG literals. |
ListType |
getSinkconcepts()
Getter and setter methods for attributes. |
static ConceptType[] |
getSinks(GraphType body)
The sink arguments of an actor graph are those which take output from one (unless conflicting, then > 1) sub-actor and provide input to no sub-actor. |
ListType |
getSourceconcepts()
|
static ConceptType[] |
getSources(GraphType body)
The source arguments of an actor graph are those which provide input into one or more sub-actors but are outputs of no sub-actor. |
private static java.util.Hashtable |
getSubActorIOCounts(GraphType body)
Return a hash containing the per sub-actor count of input and output concepts in the supplied graph. |
void |
initActorExecution()
Store each sub-actor in a run list. |
boolean |
isAnonymous()
Is this an anonymous actor? This will be the case when the constructor whose signature is ActorType(GraphType) is used. |
boolean |
isExecutable()
Is this actor instance still executable? |
void |
studyGraph()
1. |
Methods inherited from class cgp.runtime.LambdaType |
bindParameters,
getBody,
getDefgraph,
getFormals,
getId,
getName,
toString |
Methods inherited from class cgp.runtime.Type |
addOp,
andOp,
divideOp,
eqOp,
geOp,
getAttr,
getKBStack,
getNthOp,
getScopeStack,
getType,
gtOp,
invokeMemberFunc,
isOp,
leOp,
ltOp,
modulusOp,
multiplyOp,
negateOp,
neOp,
notOp,
operationError,
orOp,
setAttr,
setKBStack,
setNthOp,
setScopeStack,
setType,
subtractOp |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static java.lang.String SELF_NAME
private static java.lang.String ANON_NAME
private ScopeStack scopes
private java.util.LinkedList runList
Constructor Detail |
public ActorType(java.lang.String name, FormalParameter[] formals, GraphType body)
public ActorType(GraphType body)
public ActorType(java.lang.String name, FormalParameter[] formals, GraphType defGraph, notio.Graph body)
Method Detail |
public boolean isAnonymous()
public void bindParametersToSourceConcepts(Type[] actuals)
public void studyGraph()
2. Check that each formal parameter corresponds to >= 1 designators of that name.
3. Determine whether sub-actors exist in this graph, each of which must correspond to a user-defined function or actor.
Note: only does 3. currently.
public LambdaType copy()
public void initActorExecution()
public boolean isExecutable()
public SubActorInfo getNextSubActor()
private static java.util.Hashtable getSubActorIOCounts(GraphType body)
public static ConceptType[] getSinks(GraphType body)
public static ConceptType[] getSources(GraphType body)
private notio.Actor[] collectSubActors()
public ListType getSinkconcepts()
public ListType getSourceconcepts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |