uk.ac.man.cs.rainbow.rapa
Class Hide

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.rapa.ProcessTerm
        |
        +--uk.ac.man.cs.rainbow.rapa.Hide
All Implemented Interfaces:
Serializable

public class Hide
extends ProcessTerm

RAPA channel hiding operation. Note that it is far more efficient to apply the expansion to one channel at a time, and not all of them at once. I don't think the actual order matters though, so we'll use the "natural" one. However you can enable the behaviour I believe to be inefficient by defining the system property rapa.test.expand-all-at-once to be "true" get the other behaviour.

See Also:
Rules.expand(Channel[]), Serialized Form

Field Summary
static boolean expandAllAtOnce
           
 
Constructor Summary
Hide(ProcessTerm proc, Channel[] hide)
           
 
Method Summary
 boolean equals(Object o)
           
protected  GINRet getGCL(ProgramCounterFactory factory, int i, int n, int t, Value[] c)
          Get a (g,i,n) triple representing the GCL rules for this process term.
 Channel[] getHide()
           
 Channel getHide(int i)
           
 ProcessTerm getProc()
           
protected  ProcessTerm getSequenceHead()
          Get the process term at the head of the sequence.
 ProcessTerm subst(GeneralSubstitution s)
          Apply a substitution to all arguments in the process term.
 ProcessTerm subst(Substitution s)
          Apply a substitution to all expressions in the process term.
 String toString()
           
 
Methods inherited from class uk.ac.man.cs.rainbow.rapa.ProcessTerm
getGCL, getGCL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expandAllAtOnce

public static final boolean expandAllAtOnce
Constructor Detail

Hide

public Hide(ProcessTerm proc,
            Channel[] hide)
Method Detail

getProc

public ProcessTerm getProc()

getHide

public Channel[] getHide()

getHide

public Channel getHide(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.