Package org.jcsp.lang

Class Stop

  • All Implemented Interfaces:
    CSProcess

    public class Stop
    extends Guard
    implements CSProcess
    This is a process that starts, engages in no events, performs no computation but refuses to terminate.

    Description

    Stop is a process that starts, engages in no events, performs no computation but refuses to terminate.

    It can also be used as a Guard in an Alternative that is never ready. Of course, this is equivalent to it (and its defended process) not being there at all!

    Note: this process is included for completeness – it is one of the fundamental primitives of CSP, where it represents a broken process and is a unit of external choice. In JCSP, it is a unit of Alternative.

    See Also:
    Skip
    • Constructor Summary

      Constructors 
      Constructor Description
      Stop()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean disable()
      Disables this guard.
      (package private) boolean enable​(Alternative alt)
      Enables this guard.
      void run()
      This process starts, engages in no events, performs no computation and refuses to terminate.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Stop

        public Stop()
    • Method Detail

      • enable

        boolean enable​(Alternative alt)
        Enables this guard.
        Specified by:
        enable in class Guard
        Parameters:
        alt - the Alternative doing the enabling.
        Returns:
        true if and only if the event is ready
      • disable

        boolean disable()
        Disables this guard.
        Specified by:
        disable in class Guard
        Returns:
        true if and only if the event was ready
      • run

        public void run()
        This process starts, engages in no events, performs no computation and refuses to terminate.

        Specified by:
        run in interface CSProcess