mentor/derived/WheelerIE.m3


 Copyright (C) 1995, Digital Equipment Corporation.       
 All rights reserved.                                     
 See the file COPYRIGHT for a full description.           
                                                          
 Last modified on Thu Feb  9 08:50:48 PST 1995 by kalsow  
      modified on Sun Jun  5 21:59:57 PDT 1994 by mhb     
      modified on Wed Feb 17 16:46:47 PST 1993 by johnh   

********************************************************************

      *  NOTE: This file is generated automatically from the event
      *        definition file Wheeler.evt.
      ********************************************************************


<* PRAGMA LL *>

MODULE WheelerIE;

<*NOWARN*> IMPORT TextConv, ZeusClass, Zeus, WheelerViewClass;
<*NOWARN*> IMPORT Algorithm, WheelerAlgClass, View, Thread;
<*NOWARN*> IMPORT MiscFmt, AlgorithmClass;

<* FATAL Zeus.Error, Zeus.Locked *>
If you get either of these errors, contact a Zeus implementor.

TYPE
  StartPermuteArgs = BRANDED REF RECORD
    string: TEXT;
    alphabet: TEXT;
  END;

  NextRotationArgs = BRANDED REF RECORD
    i: INTEGER;
    string: TEXT;
  END;

  RotationsSortedArgs = BRANDED REF RECORD
    rotations: MiscFmt.RefTextArray;
    rowIndex: INTEGER;
  END;

  PermuteDoneArgs = BRANDED REF RECORD
    lastchars: TEXT;
    rowIndex: INTEGER;
  END;

  StartEncodeArgs = BRANDED REF RECORD
    alphabet: TEXT;
  END;

  EncodeNextCharArgs = BRANDED REF RECORD
    i: INTEGER;
    c: CHAR;
  END;

  EncodeDistinctCountArgs = BRANDED REF RECORD
    i: INTEGER;
    k: INTEGER;
    n: INTEGER;
    c: CHAR;
  END;

  EncodeFoundCodeArgs = BRANDED REF RECORD
    i: INTEGER;
    k: INTEGER;
    code: INTEGER;
    c: CHAR;
  END;

  EncodeDoneArgs = BRANDED REF RECORD
    alphabet: TEXT;
    codes: MiscFmt.RefIntArray;
    rowIndex: INTEGER;
  END;

  InitDecodeArgs = BRANDED REF RECORD
    alphabet: TEXT;
    codes: MiscFmt.RefIntArray;
    rowIndex: INTEGER;
  END;

  StartDecodeArgs = BRANDED REF RECORD
  END;

  DecodeNextCodeArgs = BRANDED REF RECORD
    i: INTEGER;
  END;

  DecodeDistinctCountArgs = BRANDED REF RECORD
    i: INTEGER;
    k: INTEGER;
    n: INTEGER;
  END;

  DecodeFoundCharArgs = BRANDED REF RECORD
    i: INTEGER;
    k: INTEGER;
    c: CHAR;
  END;

  DecodeDoneArgs = BRANDED REF RECORD
    lastchars: TEXT;
    rowIndex: INTEGER;
  END;

  StartReconstructArgs = BRANDED REF RECORD
    lastchars: TEXT;
    rowIndex: INTEGER;
  END;

  FirstCharsArgs = BRANDED REF RECORD
    t: TEXT;
  END;

  ConsiderCharArgs = BRANDED REF RECORD
    i: INTEGER;
  END;

  EqualCharsArgs = BRANDED REF RECORD
    i: INTEGER;
    j: INTEGER;
  END;

  FinishCharRunArgs = BRANDED REF RECORD
  END;

  StartResultArgs = BRANDED REF RECORD
  END;

  ResultNextCharArgs = BRANDED REF RECORD
    pos: INTEGER;
    k: INTEGER;
  END;

  EndResultArgs = BRANDED REF RECORD
  END;

  RevealArgs = BRANDED REF RECORD
    i: INTEGER;
  END;
Zeus calls the following to invoke vbt v's event handler:

<*NOWARN*> PROCEDURE OEDispatcher(v: ZeusClass.T; evt: REFANY) RAISES {Thread.Alerted} =
  <* LL <= VBT.mu *>
  (* LL = {} if event style is output, LL = VBT.mu if event style is update. *)
  BEGIN
    TYPECASE v OF
    | WheelerViewClass.T (view) => <*NOWARN*>
      TYPECASE evt OF
      | StartPermuteArgs(varStartPermuteArgs) => <*NOWARN*>
          view.oeStartPermute (
              varStartPermuteArgs.string
                ,
              varStartPermuteArgs.alphabet
              )
      | NextRotationArgs(varNextRotationArgs) => <*NOWARN*>
          view.oeNextRotation (
              varNextRotationArgs.i
                ,
              varNextRotationArgs.string
              )
      | RotationsSortedArgs(varRotationsSortedArgs) => <*NOWARN*>
          view.oeRotationsSorted (
              varRotationsSortedArgs.rotations
                ,
              varRotationsSortedArgs.rowIndex
              )
      | PermuteDoneArgs(varPermuteDoneArgs) => <*NOWARN*>
          view.oePermuteDone (
              varPermuteDoneArgs.lastchars
                ,
              varPermuteDoneArgs.rowIndex
              )
      | StartEncodeArgs(varStartEncodeArgs) => <*NOWARN*>
          view.oeStartEncode (
              varStartEncodeArgs.alphabet
              )
      | EncodeNextCharArgs(varEncodeNextCharArgs) => <*NOWARN*>
          view.oeEncodeNextChar (
              varEncodeNextCharArgs.i
                ,
              varEncodeNextCharArgs.c
              )
      | EncodeDistinctCountArgs(varEncodeDistinctCountArgs) => <*NOWARN*>
          view.oeEncodeDistinctCount (
              varEncodeDistinctCountArgs.i
                ,
              varEncodeDistinctCountArgs.k
                ,
              varEncodeDistinctCountArgs.n
                ,
              varEncodeDistinctCountArgs.c
              )
      | EncodeFoundCodeArgs(varEncodeFoundCodeArgs) => <*NOWARN*>
          view.oeEncodeFoundCode (
              varEncodeFoundCodeArgs.i
                ,
              varEncodeFoundCodeArgs.k
                ,
              varEncodeFoundCodeArgs.code
                ,
              varEncodeFoundCodeArgs.c
              )
      | EncodeDoneArgs(varEncodeDoneArgs) => <*NOWARN*>
          view.oeEncodeDone (
              varEncodeDoneArgs.alphabet
                ,
              varEncodeDoneArgs.codes
                ,
              varEncodeDoneArgs.rowIndex
              )
      | InitDecodeArgs(varInitDecodeArgs) => <*NOWARN*>
          view.oeInitDecode (
              varInitDecodeArgs.alphabet
                ,
              varInitDecodeArgs.codes
                ,
              varInitDecodeArgs.rowIndex
              )
      | StartDecodeArgs(varStartDecodeArgs) => <*NOWARN*>
          view.oeStartDecode (
              )
      | DecodeNextCodeArgs(varDecodeNextCodeArgs) => <*NOWARN*>
          view.oeDecodeNextCode (
              varDecodeNextCodeArgs.i
              )
      | DecodeDistinctCountArgs(varDecodeDistinctCountArgs) => <*NOWARN*>
          view.oeDecodeDistinctCount (
              varDecodeDistinctCountArgs.i
                ,
              varDecodeDistinctCountArgs.k
                ,
              varDecodeDistinctCountArgs.n
              )
      | DecodeFoundCharArgs(varDecodeFoundCharArgs) => <*NOWARN*>
          view.oeDecodeFoundChar (
              varDecodeFoundCharArgs.i
                ,
              varDecodeFoundCharArgs.k
                ,
              varDecodeFoundCharArgs.c
              )
      | DecodeDoneArgs(varDecodeDoneArgs) => <*NOWARN*>
          view.oeDecodeDone (
              varDecodeDoneArgs.lastchars
                ,
              varDecodeDoneArgs.rowIndex
              )
      | StartReconstructArgs(varStartReconstructArgs) => <*NOWARN*>
          view.oeStartReconstruct (
              varStartReconstructArgs.lastchars
                ,
              varStartReconstructArgs.rowIndex
              )
      | FirstCharsArgs(varFirstCharsArgs) => <*NOWARN*>
          view.oeFirstChars (
              varFirstCharsArgs.t
              )
      | ConsiderCharArgs(varConsiderCharArgs) => <*NOWARN*>
          view.oeConsiderChar (
              varConsiderCharArgs.i
              )
      | EqualCharsArgs(varEqualCharsArgs) => <*NOWARN*>
          view.oeEqualChars (
              varEqualCharsArgs.i
                ,
              varEqualCharsArgs.j
              )
      | FinishCharRunArgs(varFinishCharRunArgs) => <*NOWARN*>
          view.oeFinishCharRun (
              )
      | StartResultArgs(varStartResultArgs) => <*NOWARN*>
          view.oeStartResult (
              )
      | ResultNextCharArgs(varResultNextCharArgs) => <*NOWARN*>
          view.oeResultNextChar (
              varResultNextCharArgs.pos
                ,
              varResultNextCharArgs.k
              )
      | EndResultArgs(varEndResultArgs) => <*NOWARN*>
          view.oeEndResult (
              )
      | RevealArgs(varRevealArgs) => <*NOWARN*>
          view.oeReveal (
              varRevealArgs.i
              )
      ELSE <* ASSERT FALSE *>
      END;
    ELSE (* this view isn't a WheelerViewClass, so just ignore *)
    END
  END OEDispatcher;

<*NOWARN*> PROCEDURE FEDispatcher(v: ZeusClass.T; evt: REFANY) =
  <* LL = VBT.mu *>
  BEGIN
    TYPECASE v OF
    | WheelerAlgClass.T (alg) => <*NOWARN*>
      TYPECASE evt OF
      ELSE <* ASSERT FALSE *>
      END;
    ELSE (* this alg isn't a WheelerAlgClass, so just ignore *)
    END
  END FEDispatcher;

PROCEDURE StartPermute (
      initiator: Algorithm.T;
       string, alphabet: TEXT
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(StartPermuteArgs
               , string := string
               , alphabet := alphabet
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfStartPermute);
      alg.stopAtEvent := alg.eventDataRec.stopAtStartPermute;
      alg.waitAtEvent := alg.eventDataRec.waitAtStartPermute;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "StartPermute", OEDispatcher, zumeArgRec);
    END;
  END StartPermute;

PROCEDURE NextRotation (
      initiator: Algorithm.T;
       i: INTEGER; string: TEXT
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NextRotationArgs
               , i := i
               , string := string
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNextRotation);
      alg.stopAtEvent := alg.eventDataRec.stopAtNextRotation;
      alg.waitAtEvent := alg.eventDataRec.waitAtNextRotation;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "NextRotation", OEDispatcher, zumeArgRec);
    END;
  END NextRotation;

PROCEDURE RotationsSorted (
      initiator: Algorithm.T;
       rotations: MiscFmt.RefTextArray; rowIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(RotationsSortedArgs
               , rotations := rotations
               , rowIndex := rowIndex
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfRotationsSorted);
      alg.stopAtEvent := alg.eventDataRec.stopAtRotationsSorted;
      alg.waitAtEvent := alg.eventDataRec.waitAtRotationsSorted;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "RotationsSorted", OEDispatcher, zumeArgRec);
    END;
  END RotationsSorted;

PROCEDURE PermuteDone (
      initiator: Algorithm.T;
       lastchars: TEXT; rowIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(PermuteDoneArgs
               , lastchars := lastchars
               , rowIndex := rowIndex
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfPermuteDone);
      alg.stopAtEvent := alg.eventDataRec.stopAtPermuteDone;
      alg.waitAtEvent := alg.eventDataRec.waitAtPermuteDone;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "PermuteDone", OEDispatcher, zumeArgRec);
    END;
  END PermuteDone;

PROCEDURE StartEncode (
      initiator: Algorithm.T;
       alphabet: TEXT
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(StartEncodeArgs
               , alphabet := alphabet
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfStartEncode);
      alg.stopAtEvent := alg.eventDataRec.stopAtStartEncode;
      alg.waitAtEvent := alg.eventDataRec.waitAtStartEncode;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "StartEncode", OEDispatcher, zumeArgRec);
    END;
  END StartEncode;

PROCEDURE EncodeNextChar (
      initiator: Algorithm.T;
       i: INTEGER; c: CHAR
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EncodeNextCharArgs
               , i := i
               , c := c
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEncodeNextChar);
      alg.stopAtEvent := alg.eventDataRec.stopAtEncodeNextChar;
      alg.waitAtEvent := alg.eventDataRec.waitAtEncodeNextChar;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "EncodeNextChar", OEDispatcher, zumeArgRec);
    END;
  END EncodeNextChar;

PROCEDURE EncodeDistinctCount (
      initiator: Algorithm.T;
       i, k, n: INTEGER; c: CHAR
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EncodeDistinctCountArgs
               , i := i
               , k := k
               , n := n
               , c := c
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEncodeDistinctCount);
      alg.stopAtEvent := alg.eventDataRec.stopAtEncodeDistinctCount;
      alg.waitAtEvent := alg.eventDataRec.waitAtEncodeDistinctCount;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "EncodeDistinctCount", OEDispatcher, zumeArgRec);
    END;
  END EncodeDistinctCount;

PROCEDURE EncodeFoundCode (
      initiator: Algorithm.T;
       i, k, code: INTEGER; c: CHAR
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EncodeFoundCodeArgs
               , i := i
               , k := k
               , code := code
               , c := c
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEncodeFoundCode);
      alg.stopAtEvent := alg.eventDataRec.stopAtEncodeFoundCode;
      alg.waitAtEvent := alg.eventDataRec.waitAtEncodeFoundCode;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "EncodeFoundCode", OEDispatcher, zumeArgRec);
    END;
  END EncodeFoundCode;

PROCEDURE EncodeDone (
      initiator: Algorithm.T;
       alphabet: TEXT; codes: MiscFmt.RefIntArray; rowIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EncodeDoneArgs
               , alphabet := alphabet
               , codes := codes
               , rowIndex := rowIndex
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEncodeDone);
      alg.stopAtEvent := alg.eventDataRec.stopAtEncodeDone;
      alg.waitAtEvent := alg.eventDataRec.waitAtEncodeDone;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "EncodeDone", OEDispatcher, zumeArgRec);
    END;
  END EncodeDone;

PROCEDURE InitDecode (
      initiator: Algorithm.T;
       alphabet: TEXT; codes: MiscFmt.RefIntArray; rowIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(InitDecodeArgs
               , alphabet := alphabet
               , codes := codes
               , rowIndex := rowIndex
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfInitDecode);
      alg.stopAtEvent := alg.eventDataRec.stopAtInitDecode;
      alg.waitAtEvent := alg.eventDataRec.waitAtInitDecode;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "InitDecode", OEDispatcher, zumeArgRec);
    END;
  END InitDecode;

PROCEDURE StartDecode (
      initiator: Algorithm.T;

    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(StartDecodeArgs
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfStartDecode);
      alg.stopAtEvent := alg.eventDataRec.stopAtStartDecode;
      alg.waitAtEvent := alg.eventDataRec.waitAtStartDecode;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "StartDecode", OEDispatcher, zumeArgRec);
    END;
  END StartDecode;

PROCEDURE DecodeNextCode (
      initiator: Algorithm.T;
       i: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(DecodeNextCodeArgs
               , i := i
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfDecodeNextCode);
      alg.stopAtEvent := alg.eventDataRec.stopAtDecodeNextCode;
      alg.waitAtEvent := alg.eventDataRec.waitAtDecodeNextCode;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "DecodeNextCode", OEDispatcher, zumeArgRec);
    END;
  END DecodeNextCode;

PROCEDURE DecodeDistinctCount (
      initiator: Algorithm.T;
       i, k, n: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(DecodeDistinctCountArgs
               , i := i
               , k := k
               , n := n
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfDecodeDistinctCount);
      alg.stopAtEvent := alg.eventDataRec.stopAtDecodeDistinctCount;
      alg.waitAtEvent := alg.eventDataRec.waitAtDecodeDistinctCount;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "DecodeDistinctCount", OEDispatcher, zumeArgRec);
    END;
  END DecodeDistinctCount;

PROCEDURE DecodeFoundChar (
      initiator: Algorithm.T;
       i, k: INTEGER; c: CHAR
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(DecodeFoundCharArgs
               , i := i
               , k := k
               , c := c
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfDecodeFoundChar);
      alg.stopAtEvent := alg.eventDataRec.stopAtDecodeFoundChar;
      alg.waitAtEvent := alg.eventDataRec.waitAtDecodeFoundChar;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "DecodeFoundChar", OEDispatcher, zumeArgRec);
    END;
  END DecodeFoundChar;

PROCEDURE DecodeDone (
      initiator: Algorithm.T;
       lastchars: TEXT; rowIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(DecodeDoneArgs
               , lastchars := lastchars
               , rowIndex := rowIndex
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfDecodeDone);
      alg.stopAtEvent := alg.eventDataRec.stopAtDecodeDone;
      alg.waitAtEvent := alg.eventDataRec.waitAtDecodeDone;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "DecodeDone", OEDispatcher, zumeArgRec);
    END;
  END DecodeDone;

PROCEDURE StartReconstruct (
      initiator: Algorithm.T;
       lastchars: TEXT; rowIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(StartReconstructArgs
               , lastchars := lastchars
               , rowIndex := rowIndex
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfStartReconstruct);
      alg.stopAtEvent := alg.eventDataRec.stopAtStartReconstruct;
      alg.waitAtEvent := alg.eventDataRec.waitAtStartReconstruct;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "StartReconstruct", OEDispatcher, zumeArgRec);
    END;
  END StartReconstruct;

PROCEDURE FirstChars (
      initiator: Algorithm.T;
       t: TEXT
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(FirstCharsArgs
               , t := t
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfFirstChars);
      alg.stopAtEvent := alg.eventDataRec.stopAtFirstChars;
      alg.waitAtEvent := alg.eventDataRec.waitAtFirstChars;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "FirstChars", OEDispatcher, zumeArgRec);
    END;
  END FirstChars;

PROCEDURE ConsiderChar (
      initiator: Algorithm.T;
       i: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(ConsiderCharArgs
               , i := i
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfConsiderChar);
      alg.stopAtEvent := alg.eventDataRec.stopAtConsiderChar;
      alg.waitAtEvent := alg.eventDataRec.waitAtConsiderChar;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "ConsiderChar", OEDispatcher, zumeArgRec);
    END;
  END ConsiderChar;

PROCEDURE EqualChars (
      initiator: Algorithm.T;
       i, j: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EqualCharsArgs
               , i := i
               , j := j
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEqualChars);
      alg.stopAtEvent := alg.eventDataRec.stopAtEqualChars;
      alg.waitAtEvent := alg.eventDataRec.waitAtEqualChars;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "EqualChars", OEDispatcher, zumeArgRec);
    END;
  END EqualChars;

PROCEDURE FinishCharRun (
      initiator: Algorithm.T;

    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(FinishCharRunArgs
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfFinishCharRun);
      alg.stopAtEvent := alg.eventDataRec.stopAtFinishCharRun;
      alg.waitAtEvent := alg.eventDataRec.waitAtFinishCharRun;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "FinishCharRun", OEDispatcher, zumeArgRec);
    END;
  END FinishCharRun;

PROCEDURE StartResult (
      initiator: Algorithm.T;

    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(StartResultArgs
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfStartResult);
      alg.stopAtEvent := alg.eventDataRec.stopAtStartResult;
      alg.waitAtEvent := alg.eventDataRec.waitAtStartResult;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "StartResult", OEDispatcher, zumeArgRec);
    END;
  END StartResult;

PROCEDURE ResultNextChar (
      initiator: Algorithm.T;
       pos, k: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(ResultNextCharArgs
               , pos := pos
               , k := k
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfResultNextChar);
      alg.stopAtEvent := alg.eventDataRec.stopAtResultNextChar;
      alg.waitAtEvent := alg.eventDataRec.waitAtResultNextChar;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "ResultNextChar", OEDispatcher, zumeArgRec);
    END;
  END ResultNextChar;

PROCEDURE EndResult (
      initiator: Algorithm.T;

    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EndResultArgs
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEndResult);
      alg.stopAtEvent := alg.eventDataRec.stopAtEndResult;
      alg.waitAtEvent := alg.eventDataRec.waitAtEndResult;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "EndResult", OEDispatcher, zumeArgRec);
    END;
  END EndResult;

PROCEDURE Reveal (
      initiator: Algorithm.T;
       i: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(RevealArgs
               , i := i
      );
      alg := NARROW(initiator, WheelerAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfReveal);
      alg.stopAtEvent := alg.eventDataRec.stopAtReveal;
      alg.waitAtEvent := alg.eventDataRec.waitAtReveal;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "Reveal", OEDispatcher, zumeArgRec);
    END;
  END Reveal;

BEGIN
END WheelerIE.

interface View is in: