trait ProcessInitializer extends Function[ProcessConfig, Unit]
Basic trait for implementing the process initialization.
A process needs an initializer class to instantiate its protocols, register them, and connect them together. Such a class must be a subclass of ProcessInitializer and contain the code for initialization as shown in the example below.
class LamportMutexInitializer extends ProcessInitializer { forProcess { p => // create protocols val app = new MutexApplication(p) val clock = new protocol.LamportClock(p) val mutex = new LamportMutex(p, clock) val fifo = new protocol.FIFOChannel(p) // connect protocols app --> mutex mutex --> clock clock --> fifo } }
Below is an alternative to create an initializer that is more adapted when used as argument for the neko.Main class.
ProcessInitializer { p =>
  // create protocols
  val app   = new MutexApplication(p)
  val clock = new protocol.LamportClock(p)
  val mutex = new LamportMutex(p, clock)
  val fifo  = new protocol.FIFOChannel(p)
  // connect protocols
  app   --> mutex
  mutex --> clock
  clock --> fifo
}Without a block, the initializer does nothing by default, thus resulting in an "empty" process.
- Alphabetic
- By Inheritance
- ProcessInitializer
- Function1
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        !=(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ##(): Int
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        +(other: String): String
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to any2stringadd[ProcessInitializer] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        ->[B](y: B): (ProcessInitializer, B)
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to ArrowAssoc[ProcessInitializer] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ==(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        andThen[A](g: (Unit) ⇒ A): (ProcessConfig) ⇒ A
      
      
      - Definition Classes
- Function1
- Annotations
- @unspecialized()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        apply(p: ProcessConfig): Unit
      
      
      - Definition Classes
- ProcessInitializer → Function1
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        asInstanceOf[T0]: T0
      
      
      - Definition Classes
- Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      - Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        compose[A](g: (A) ⇒ ProcessConfig): (A) ⇒ Unit
      
      
      - Definition Classes
- Function1
- Annotations
- @unspecialized()
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        ensuring(cond: (ProcessInitializer) ⇒ Boolean, msg: ⇒ Any): ProcessInitializer
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to Ensuring[ProcessInitializer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        ensuring(cond: (ProcessInitializer) ⇒ Boolean): ProcessInitializer
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to Ensuring[ProcessInitializer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        ensuring(cond: Boolean, msg: ⇒ Any): ProcessInitializer
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to Ensuring[ProcessInitializer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        ensuring(cond: Boolean): ProcessInitializer
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to Ensuring[ProcessInitializer] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        forProcess(initializer: (ProcessConfig) ⇒ Unit): Unit
      
      
      Initialization code for a process. Initialization code for a process. The argument is an initializer function which, given a process configuration as argument, creates the protocols for that process, registers them, and connects them. For instance, class LamportMutexInitializer extends ProcessInitializer { forProcess { p => // create protocols val app = new MutexApplication(p) val clock = new protocol.LamportClock(p) val mutex = new LamportMutex(p, clock) val fifo = new protocol.FIFOChannel(p) // connect protocols app --> mutex mutex --> clock clock --> fifo } } - initializer
- the block which, given a process configuration as argument, creates and connects the protocols. 
 - Attributes
- protected[this]
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        formatted(fmtstr: String): String
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to StringFormat[ProcessInitializer] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        getClass(): Class[_]
      
      
      - Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        hashCode(): Int
      
      
      - Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        init(initializer: Function[ProcessConfig, Unit]): Unit
      
      
      Initialization code for a process. Initialization code for a process. (same as ProcessInitializer.forProcess) - initializer
- the block which, given a process configuration as argument, creates and connects the protocols 
 - Attributes
- protected[this]
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        isInstanceOf[T0]: Boolean
      
      
      - Definition Classes
- Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ne(arg0: AnyRef): Boolean
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        notify(): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        notifyAll(): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      - Definition Classes
- Function1 → AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long, arg1: Int): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @throws( ... )
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(): Unit
      
      
      - Definition Classes
- AnyRef
- Annotations
- @throws( ... )
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        →[B](y: B): (ProcessInitializer, B)
      
      
      - Implicit
- This member is added by an implicit conversion from ProcessInitializer to ArrowAssoc[ProcessInitializer] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc