uk.ac.man.cs.rainbow.rapa
Class Call
java.lang.Object
|
+--uk.ac.man.cs.rainbow.rapa.ProcessTerm
|
+--uk.ac.man.cs.rainbow.rapa.Call
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Call.Named
- public class Call
- extends ProcessTerm
RAPA call to a defined process. Effectively a substitution of
values/types/channels and a macro-expand.
- See Also:
NamingContext
,
GreenDefinitions
, Serialized Form
Inner Class Summary |
static class |
Call.Named
Named call of a process definition. |
static class |
Call.SignatureMismatch
Exception used to indicate an attempt to call a function with
the wrong number of arguments. |
Call
public Call(String name,
NamingContext context,
Argument[] arguments,
Channel[] inputs,
Channel[] outputs)
- Parameters:
name
- The name of the definition to call.context
- Where to look up the RAPA definition.arguments
- Non-channel arguments to the device or procedure.inputs
- Input channels to the device or procedure.outputs
- Output channels from the device or procedure.
Call
public Call(NamingContext.Mapping definition,
Argument[] arguments,
Channel[] inputs,
Channel[] outputs)
- Parameters:
definition
- The definition to call.arguments
- Non-channel arguments to the device or procedure.inputs
- Input channels to the device or procedure.outputs
- Output channels from the device or procedure.
getName
public String getName()
getDefinition
public NamingContext.Mapping getDefinition()
getArguments
public Argument[] getArguments()
getArguments
public Argument getArguments(int i)
getInputs
public Channel[] getInputs()
getInputs
public Channel getInputs(int i)
getOutputs
public Channel[] getOutputs()
getOutputs
public Channel getOutputs(int i)
toString
public String toString()
- Overrides:
toString
in class ProcessTerm
equals
public boolean equals(Object o)
- Overrides:
equals
in class ProcessTerm
subst
public ProcessTerm subst(Substitution s)
- Description copied from class:
ProcessTerm
- Apply a substitution to all expressions in the process term.
- Overrides:
subst
in class ProcessTerm
subst
public ProcessTerm subst(GeneralSubstitution s)
- Description copied from class:
ProcessTerm
- Apply a substitution to all arguments in the process term.
- Overrides:
subst
in class ProcessTerm
- Following copied from class:
uk.ac.man.cs.rainbow.rapa.ProcessTerm
- See Also:
Argument
getSequenceHead
protected ProcessTerm getSequenceHead()
- Description copied from class:
ProcessTerm
- Get the process term at the head of the sequence. Note that it
is necessary to recurse inside only some process terms
to get this information. It all depends on exactly what sort
of GCL rules are produced by the term itself...
- Overrides:
getSequenceHead
in class ProcessTerm
getGCL
protected GINRet getGCL(ProgramCounterFactory factory,
int i,
int n,
int t,
Value[] c)
- Description copied from class:
ProcessTerm
- Get a (g,i,n) triple representing the GCL rules for this
process term.
- Overrides:
getGCL
in class ProcessTerm
- Following copied from class:
uk.ac.man.cs.rainbow.rapa.ProcessTerm
- Parameters:
factory
- Generator for new program counters.i
- Current thread number.n
- Current PC value.t
- Terminating PC value (-1 for sequence and loop stitching, 0
for thread-end.)c
- Superthread context vector.