Packages

  • package root
    Definition Classes
    root
  • package io

    This is the documentation for the ThreadCSO Library.

    This is the documentation for the ThreadCSO Library. Notable packages include:

    Definition Classes
    root
  • package threadcso

    The standard threadCSO API.

    The standard threadCSO API. Most modules using CSO will need only the declaration:

    import io.threadcso._

    The present version of the ThreadCSO library API is 1.2Rr (for some number r)

    The revision number (Rr) will change if bugs are corrected but the code remains consistent with the previous API. Its minor version number will change if there is a correction to the code that breaks consistency with the previous API. Its major version will change if there is a substantial change in the semantics of an important CSO construct.

    August 2017: changes 1.1 => 1.2

    • renaming of very many internal classes and packages
    • basic channel implementations are more efficient, in some case much more so
    • alternation reliability improved
    • debugger registration of alternations is no longer needed
    • home-grown semaphores can specify which component they are part of: this makes interpreting a stack backtrace very much easier
    • there is a flexible logging system that is compatible with the debugger

    April 2016: changes 1.0 => 1.1

    • Extended rendezvous read operator is now ?? (was ?)
    • Extended rendezvous read event notation is now =??=> (was =?=>>)
    • The notation inport ? f is now equivalent to f(inport?()) This makes for a tidier layout when the function f is an explicit functional expression.

    Feb 1 2017: changes 1.1R1 => 1.1R2

    • Removed dependencies on deprecated Java->Scala functions: replaced with .asJava
    @author Bernard Sufrin, Oxford
    $Revision: 286 $
    $Date: 2017-11-18 17:41:30 +0000 (Sat, 18 Nov 2017) $
    Definition Classes
    io
  • package alternation
    Definition Classes
    threadcso
  • package channel

    This package defines channels that can participate in the CSO alternation constructs.

    This package defines channels that can participate in the CSO alternation constructs.

    I have separated syntax and semantics as far as was practical, given my reluctance to get embroiled with the Scala macro system (it was unstable when the CSO work started)

    An io.threadcso.alternation.Run embodies the state of execution of an alternation.

    The guarded event notation: (guard && port) =...=> { .... } is parsed to a Guarded...Port =...=> ... then to an appropriate class of event. The former is achieved by defining the implicit class io.threadcso.Guarded in the top-level CSO API. This provides the appropriate extension to Boolean.

    @author Bernard Sufrin, Oxford
    $Revision: 240 $
    $Date: 2017-10-13 18:12:11 +0100 (Fri, 13 Oct 2017) $
    Definition Classes
    alternation
  • AltCapableChannel
  • Chan
  • GuardedChan
  • GuardedInPort
  • GuardedOutPort
  • InPort
  • N2N
  • N2NBuf
  • OneOne
  • OneOneBuf
  • OutPort
  • SharedAltCapableChannel
  • package event

    This package implements the syntax of the CSO alternation notations, and provides hooks for the semantics of that notation.

    This package implements the syntax of the CSO alternation notations, and provides hooks for the semantics of that notation.

    The body of an alternation specification consists of a sequence (possibly empty) of executable event specifications separated by | and possibly followed by:

    | after(timeout) ==> { ... }

    or

    | orelse ==> { ... }

    or

    | after(timeout) ==> { ... } |  orelse ==> { ... }

    An executable event specification takes one of the following forms:

    outport              =!=>  OutEvent
    (guard && outport)   =!=>  OutEvent
    inport               =?=>  InEvent
    (guard && inport)    =?=>  InEvent
    inport               =??=> InEvent     // extended rendezvous form
    (guard && inport)    =??=> InEvent     // extended rendezvous form

    Concessions to readability: a Chan expression may appear in place of a port expression.

    Events and their effects

    OutEvent form:                        Effect when triggered
    {expr}                                outport!expr
    {expr} ==> { command: Unit }          {outport!expr; command}
    InEvent form:                         Effect when triggered
    { bv => body: Unit }                  {val bv=inport?(); body }

    For an extended rendezvous InEvent the correspondence is

    { bv => body: Unit }                  { inport??({ bv => body}) }
    Definition Classes
    alternation

package channel

This package defines channels that can participate in the CSO alternation constructs.

I have separated syntax and semantics as far as was practical, given my reluctance to get embroiled with the Scala macro system (it was unstable when the CSO work started)

An io.threadcso.alternation.Run embodies the state of execution of an alternation.

The guarded event notation: (guard && port) =...=> { .... } is parsed to a Guarded...Port =...=> ... then to an appropriate class of event. The former is achieved by defining the implicit class io.threadcso.Guarded in the top-level CSO API. This provides the appropriate extension to Boolean.

@author Bernard Sufrin, Oxford
$Revision: 240 $
$Date: 2017-10-13 18:12:11 +0100 (Fri, 13 Oct 2017) $
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. channel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AltCapableChannel [T] extends Chan[T]

    Mixin for channels that are capable of participating in alternations.

    Mixin for channels that are capable of participating in alternations. Deals with registration/unregistration of a channel with a running alternation, and with detailed logging (when not elided) of port-state changes. Typical examples of its use can be found in the definitions of channel constructors such as io.threadcso.alternation.channel.OneOne and io.threadcso.alternation.channel.N2NBuf.

  2. trait Chan [T] extends channel.Chan[T] with InPort[T] with OutPort[T]

    A Chan embodies an InPort and an OutPort.

    A Chan embodies an InPort and an OutPort. If chan: Chan then the alternation notations chan ... =?=> ..., chan ... =??=> ... and chan ... =!=>... are available for direct use in an alt.

  3. class GuardedChan [T] extends AnyRef

    Guarded channel syntax

  4. class GuardedInPort [+T] extends AnyRef

    Guarded input port syntax

  5. class GuardedOutPort [T] extends AnyRef

    Guarded output port syntax

  6. trait InPort [+T] extends channel.InPort[T]

    Alt-capable input port

  7. class N2N [T] extends channel.N2N[T] with SharedAltCapableChannel[T]

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    See also

    io.threadcso.channel.N2N

  8. class N2NBuf [T] extends channel.N2NBuf[T] with SharedAltCapableChannel[T]

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    See also

    io.threadcso.channel.N2NBuf

  9. class OneOne [T] extends channel.OneOne[T] with AltCapableChannel[T]

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    See also

    io.threadcso.channel.OneOne

  10. class OneOneBuf [T] extends channel.N2NBuf[T] with AltCapableChannel[T]

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    A version of its namesake from io.threadcso.channel with the capacity to participate in alt and serve commands

    See also

    io.threadcso.channel.N2NBuf

  11. trait OutPort [-T] extends channel.OutPort[T]

    Alt-capable output port

  12. trait SharedAltCapableChannel [T] extends AltCapableChannel[T] with SharedOutPort[T] with SharedInPort[T]

Value Members

  1. object N2N extends NameGenerator

    Static generator for N2N

    Static generator for N2N

    See also

    io.threadcso.alternation.channel.N2N

  2. object N2NBuf extends NameGenerator

    Static generator for N2NBuf

    Static generator for N2NBuf

    See also

    io.threadcso.alternation.channel.N2NBuf

  3. object OneOne extends NameGenerator

    Static generator for OneOne

    Static generator for OneOne

    See also

    io.threadcso.alternation.channel.OneOne

  4. object OneOneBuf extends NameGenerator

    Static generator for OneOneBuf

    Static generator for OneOneBuf

    See also

    io.threadcso.alternation.channel.OneOneBuf

Inherited from AnyRef

Inherited from Any

Ungrouped