orc.trace
Class DerivedTracer.DerivedTokenTracer

java.lang.Object
  extended by orc.trace.TokenTracer
      extended by orc.trace.DerivedTracer.DerivedTokenTracer
All Implemented Interfaces:
Locatable, Located
Enclosing class:
DerivedTracer

protected abstract class DerivedTracer.DerivedTokenTracer
extends TokenTracer


Nested Class Summary
 
Nested classes/interfaces inherited from class orc.trace.TokenTracer
TokenTracer.PullTrace, TokenTracer.StoreTrace
 
Field Summary
protected  TokenTracer tracer
           
 
Constructor Summary
DerivedTracer.DerivedTokenTracer(TokenTracer tracer)
           
 
Method Summary
 void block(TokenTracer.PullTrace pull)
          Block a thread waiting for a future.
 void choke(TokenTracer.StoreTrace store)
          Killed through the setting of a future.
 void die()
          Terminate a thread.
 void enter(Closure closure)
          Enter a closure.
 void error(TokenException error)
          Report an error.
 TokenTracer fork()
          Create a new thread.
 SourceLocation getSourceLocation()
           
 void leave(int depth)
          Leave "depth" closures EXPERIMENTAL
 void print(java.lang.String value, boolean newline)
          Print to stdout.
 void publish(java.lang.Object value)
          Publish a value from the program.
 TokenTracer.PullTrace pull()
          Create a new future for a pull.
 void receive(java.lang.Object value)
          Return from a site call.
 void send(java.lang.Object site, java.lang.Object[] arguments)
          Call a site.
 void setSourceLocation(SourceLocation location)
           
 TokenTracer.StoreTrace store(TokenTracer.PullTrace event, java.lang.Object value)
          Store a value for a future.
 void unblock(TokenTracer.StoreTrace store)
          Receive a future we were waiting for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tracer

protected TokenTracer tracer
Constructor Detail

DerivedTracer.DerivedTokenTracer

public DerivedTracer.DerivedTokenTracer(TokenTracer tracer)
Method Detail

block

public void block(TokenTracer.PullTrace pull)
Description copied from class: TokenTracer
Block a thread waiting for a future.

Specified by:
block in class TokenTracer

choke

public void choke(TokenTracer.StoreTrace store)
Description copied from class: TokenTracer
Killed through the setting of a future. Should be followed by TokenTracer.die().

Specified by:
choke in class TokenTracer

die

public void die()
Description copied from class: TokenTracer
Terminate a thread.

Specified by:
die in class TokenTracer

enter

public void enter(Closure closure)
Description copied from class: TokenTracer
Enter a closure. EXPERIMENTAL

Specified by:
enter in class TokenTracer

leave

public void leave(int depth)
Description copied from class: TokenTracer
Leave "depth" closures EXPERIMENTAL

Specified by:
leave in class TokenTracer

error

public void error(TokenException error)
Description copied from class: TokenTracer
Report an error. Should be followed by TokenTracer.die().

Specified by:
error in class TokenTracer

fork

public TokenTracer fork()
Description copied from class: TokenTracer
Create a new thread. By convention the new thread should evaluate the right side of the combinator.

Specified by:
fork in class TokenTracer

getSourceLocation

public SourceLocation getSourceLocation()

print

public void print(java.lang.String value,
                  boolean newline)
Description copied from class: TokenTracer
Print to stdout.

Specified by:
print in class TokenTracer

publish

public void publish(java.lang.Object value)
Description copied from class: TokenTracer
Publish a value from the program. Should be followed by TokenTracer.die().

Specified by:
publish in class TokenTracer

pull

public TokenTracer.PullTrace pull()
Description copied from class: TokenTracer
Create a new future for a pull. Should be followed by TokenTracer.fork().

Specified by:
pull in class TokenTracer

receive

public void receive(java.lang.Object value)
Description copied from class: TokenTracer
Return from a site call. Should be called after TokenTracer.send(Object, Object[]).

Specified by:
receive in class TokenTracer

send

public void send(java.lang.Object site,
                 java.lang.Object[] arguments)
Description copied from class: TokenTracer
Call a site.

Specified by:
send in class TokenTracer

setSourceLocation

public void setSourceLocation(SourceLocation location)

store

public TokenTracer.StoreTrace store(TokenTracer.PullTrace event,
                                    java.lang.Object value)
Description copied from class: TokenTracer
Store a value for a future. The return value should be used when tracing the results of this store. If this returns null, clients are free to not call TokenTracer.choke(StoreTrace).

The engine guarantees that all TokenTracer.choke(orc.trace.TokenTracer.StoreTrace) and TokenTracer.unblock(orc.trace.TokenTracer.StoreTrace) events will occur before the TokenTracer.die() event for this tracer.

Specified by:
store in class TokenTracer
See Also:
TokenTracer.choke(orc.trace.TokenTracer.StoreTrace), TokenTracer.unblock(orc.trace.TokenTracer.StoreTrace)

unblock

public void unblock(TokenTracer.StoreTrace store)
Description copied from class: TokenTracer
Receive a future we were waiting for.

Specified by:
unblock in class TokenTracer