mentor/derived/SubtypeIE.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 Subtype.evt.
      ********************************************************************


<* PRAGMA LL *>

MODULE SubtypeIE;

<*NOWARN*> IMPORT ZeusClass, Zeus, SubtypeViewClass;
<*NOWARN*> IMPORT SubtypeAlgClass, Algorithm, AlgSubtype, View;
<*NOWARN*> IMPORT Thread, AlgorithmClass;

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

TYPE
  SetupArgs = BRANDED REF RECORD
  END;

  BeginArgs = BRANDED REF RECORD
    lftRoot: INTEGER;
    rhtRoot: INTEGER;
  END;

  NewBotArgs = BRANDED REF RECORD
    index: INTEGER;
  END;

  NewTopArgs = BRANDED REF RECORD
    index: INTEGER;
  END;

  NewFunArgs = BRANDED REF RECORD
    index: INTEGER;
    domEdgeIndex: INTEGER;
    rngEdgeIndex: INTEGER;
  END;

  NewDomRngArgs = BRANDED REF RECORD
    index: INTEGER;
    domIndex: INTEGER;
    rngIndex: INTEGER;
  END;

  NewLoopArgs = BRANDED REF RECORD
    fromIndex: INTEGER;
    toIndex: INTEGER;
  END;

  EnterArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  ExitArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
    result: BOOLEAN;
  END;

  SeenOKArgs = BRANDED REF RECORD
    fromIndex: INTEGER;
    toIndex: INTEGER;
  END;

  NoticeArgs = BRANDED REF RECORD
    fromIndex: INTEGER;
    toIndex: INTEGER;
  END;

  BotLessAnyOKArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  TopLessTopOKArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  TopLessNonTopKOArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  FunLessBotKOArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  FunLessTopOKArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  FunLessFunArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  OKArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: INTEGER;
  END;

  KOArgs = BRANDED REF RECORD
    lftIndex: INTEGER;
    rhtIndex: INTEGER;
    lftLeadingEdgeIndex: INTEGER;
    rhtLeadingEdgeIndex: 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
    | SubtypeViewClass.T (view) => <*NOWARN*>
      TYPECASE evt OF
      | SetupArgs(varSetupArgs) => <*NOWARN*>
          view.oeSetup (
              )
      | BeginArgs(varBeginArgs) => <*NOWARN*>
          view.oeBegin (
              varBeginArgs.lftRoot
                ,
              varBeginArgs.rhtRoot
              )
      | NewBotArgs(varNewBotArgs) => <*NOWARN*>
          view.oeNewBot (
              varNewBotArgs.index
              )
      | NewTopArgs(varNewTopArgs) => <*NOWARN*>
          view.oeNewTop (
              varNewTopArgs.index
              )
      | NewFunArgs(varNewFunArgs) => <*NOWARN*>
          view.oeNewFun (
              varNewFunArgs.index
                ,
              varNewFunArgs.domEdgeIndex
                ,
              varNewFunArgs.rngEdgeIndex
              )
      | NewDomRngArgs(varNewDomRngArgs) => <*NOWARN*>
          view.oeNewDomRng (
              varNewDomRngArgs.index
                ,
              varNewDomRngArgs.domIndex
                ,
              varNewDomRngArgs.rngIndex
              )
      | NewLoopArgs(varNewLoopArgs) => <*NOWARN*>
          view.oeNewLoop (
              varNewLoopArgs.fromIndex
                ,
              varNewLoopArgs.toIndex
              )
      | EnterArgs(varEnterArgs) => <*NOWARN*>
          view.oeEnter (
              varEnterArgs.lftIndex
                ,
              varEnterArgs.rhtIndex
                ,
              varEnterArgs.lftLeadingEdgeIndex
                ,
              varEnterArgs.rhtLeadingEdgeIndex
              )
      | ExitArgs(varExitArgs) => <*NOWARN*>
          view.oeExit (
              varExitArgs.lftIndex
                ,
              varExitArgs.rhtIndex
                ,
              varExitArgs.lftLeadingEdgeIndex
                ,
              varExitArgs.rhtLeadingEdgeIndex
                ,
              varExitArgs.result
              )
      | SeenOKArgs(varSeenOKArgs) => <*NOWARN*>
          view.oeSeenOK (
              varSeenOKArgs.fromIndex
                ,
              varSeenOKArgs.toIndex
              )
      | NoticeArgs(varNoticeArgs) => <*NOWARN*>
          view.oeNotice (
              varNoticeArgs.fromIndex
                ,
              varNoticeArgs.toIndex
              )
      | BotLessAnyOKArgs(varBotLessAnyOKArgs) => <*NOWARN*>
          view.oeBotLessAnyOK (
              varBotLessAnyOKArgs.lftIndex
                ,
              varBotLessAnyOKArgs.rhtIndex
                ,
              varBotLessAnyOKArgs.lftLeadingEdgeIndex
                ,
              varBotLessAnyOKArgs.rhtLeadingEdgeIndex
              )
      | TopLessTopOKArgs(varTopLessTopOKArgs) => <*NOWARN*>
          view.oeTopLessTopOK (
              varTopLessTopOKArgs.lftIndex
                ,
              varTopLessTopOKArgs.rhtIndex
                ,
              varTopLessTopOKArgs.lftLeadingEdgeIndex
                ,
              varTopLessTopOKArgs.rhtLeadingEdgeIndex
              )
      | TopLessNonTopKOArgs(varTopLessNonTopKOArgs) => <*NOWARN*>
          view.oeTopLessNonTopKO (
              varTopLessNonTopKOArgs.lftIndex
                ,
              varTopLessNonTopKOArgs.rhtIndex
                ,
              varTopLessNonTopKOArgs.lftLeadingEdgeIndex
                ,
              varTopLessNonTopKOArgs.rhtLeadingEdgeIndex
              )
      | FunLessBotKOArgs(varFunLessBotKOArgs) => <*NOWARN*>
          view.oeFunLessBotKO (
              varFunLessBotKOArgs.lftIndex
                ,
              varFunLessBotKOArgs.rhtIndex
                ,
              varFunLessBotKOArgs.lftLeadingEdgeIndex
                ,
              varFunLessBotKOArgs.rhtLeadingEdgeIndex
              )
      | FunLessTopOKArgs(varFunLessTopOKArgs) => <*NOWARN*>
          view.oeFunLessTopOK (
              varFunLessTopOKArgs.lftIndex
                ,
              varFunLessTopOKArgs.rhtIndex
                ,
              varFunLessTopOKArgs.lftLeadingEdgeIndex
                ,
              varFunLessTopOKArgs.rhtLeadingEdgeIndex
              )
      | FunLessFunArgs(varFunLessFunArgs) => <*NOWARN*>
          view.oeFunLessFun (
              varFunLessFunArgs.lftIndex
                ,
              varFunLessFunArgs.rhtIndex
                ,
              varFunLessFunArgs.lftLeadingEdgeIndex
                ,
              varFunLessFunArgs.rhtLeadingEdgeIndex
              )
      | OKArgs(varOKArgs) => <*NOWARN*>
          view.oeOK (
              varOKArgs.lftIndex
                ,
              varOKArgs.rhtIndex
                ,
              varOKArgs.lftLeadingEdgeIndex
                ,
              varOKArgs.rhtLeadingEdgeIndex
              )
      | KOArgs(varKOArgs) => <*NOWARN*>
          view.oeKO (
              varKOArgs.lftIndex
                ,
              varKOArgs.rhtIndex
                ,
              varKOArgs.lftLeadingEdgeIndex
                ,
              varKOArgs.rhtLeadingEdgeIndex
              )
      ELSE <* ASSERT FALSE *>
      END;
    ELSE (* this view isn't a SubtypeViewClass, so just ignore *)
    END
  END OEDispatcher;

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

PROCEDURE Setup (
      initiator: Algorithm.T;

    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(SetupArgs
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfSetup);
      alg.stopAtEvent := alg.eventDataRec.stopAtSetup;
      alg.waitAtEvent := alg.eventDataRec.waitAtSetup;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "Setup", OEDispatcher, zumeArgRec);
    END;
  END Setup;

PROCEDURE Begin (
      initiator: Algorithm.T;
       lftRoot, rhtRoot: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(BeginArgs
               , lftRoot := lftRoot
               , rhtRoot := rhtRoot
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfBegin);
      alg.stopAtEvent := alg.eventDataRec.stopAtBegin;
      alg.waitAtEvent := alg.eventDataRec.waitAtBegin;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "Begin", OEDispatcher, zumeArgRec);
    END;
  END Begin;

PROCEDURE NewBot (
      initiator: Algorithm.T;
       index: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NewBotArgs
               , index := index
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNewBot);
      alg.stopAtEvent := alg.eventDataRec.stopAtNewBot;
      alg.waitAtEvent := alg.eventDataRec.waitAtNewBot;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "NewBot", OEDispatcher, zumeArgRec);
    END;
  END NewBot;

PROCEDURE NewTop (
      initiator: Algorithm.T;
       index: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NewTopArgs
               , index := index
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNewTop);
      alg.stopAtEvent := alg.eventDataRec.stopAtNewTop;
      alg.waitAtEvent := alg.eventDataRec.waitAtNewTop;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "NewTop", OEDispatcher, zumeArgRec);
    END;
  END NewTop;

PROCEDURE NewFun (
      initiator: Algorithm.T;
       index, domEdgeIndex, rngEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NewFunArgs
               , index := index
               , domEdgeIndex := domEdgeIndex
               , rngEdgeIndex := rngEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNewFun);
      alg.stopAtEvent := alg.eventDataRec.stopAtNewFun;
      alg.waitAtEvent := alg.eventDataRec.waitAtNewFun;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "NewFun", OEDispatcher, zumeArgRec);
    END;
  END NewFun;

PROCEDURE NewDomRng (
      initiator: Algorithm.T;
       index, domIndex, rngIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NewDomRngArgs
               , index := index
               , domIndex := domIndex
               , rngIndex := rngIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNewDomRng);
      alg.stopAtEvent := alg.eventDataRec.stopAtNewDomRng;
      alg.waitAtEvent := alg.eventDataRec.waitAtNewDomRng;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "NewDomRng", OEDispatcher, zumeArgRec);
    END;
  END NewDomRng;

PROCEDURE NewLoop (
      initiator: Algorithm.T;
       fromIndex, toIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NewLoopArgs
               , fromIndex := fromIndex
               , toIndex := toIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNewLoop);
      alg.stopAtEvent := alg.eventDataRec.stopAtNewLoop;
      alg.waitAtEvent := alg.eventDataRec.waitAtNewLoop;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "NewLoop", OEDispatcher, zumeArgRec);
    END;
  END NewLoop;

PROCEDURE Enter (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(EnterArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfEnter);
      alg.stopAtEvent := alg.eventDataRec.stopAtEnter;
      alg.waitAtEvent := alg.eventDataRec.waitAtEnter;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "Enter", OEDispatcher, zumeArgRec);
    END;
  END Enter;

PROCEDURE Exit (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER; result: BOOLEAN
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(ExitArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
               , result := result
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfExit);
      alg.stopAtEvent := alg.eventDataRec.stopAtExit;
      alg.waitAtEvent := alg.eventDataRec.waitAtExit;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "Exit", OEDispatcher, zumeArgRec);
    END;
  END Exit;

PROCEDURE SeenOK (
      initiator: Algorithm.T;
       fromIndex, toIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(SeenOKArgs
               , fromIndex := fromIndex
               , toIndex := toIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfSeenOK);
      alg.stopAtEvent := alg.eventDataRec.stopAtSeenOK;
      alg.waitAtEvent := alg.eventDataRec.waitAtSeenOK;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "SeenOK", OEDispatcher, zumeArgRec);
    END;
  END SeenOK;

PROCEDURE Notice (
      initiator: Algorithm.T;
       fromIndex, toIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(NoticeArgs
               , fromIndex := fromIndex
               , toIndex := toIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfNotice);
      alg.stopAtEvent := alg.eventDataRec.stopAtNotice;
      alg.waitAtEvent := alg.eventDataRec.waitAtNotice;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "Notice", OEDispatcher, zumeArgRec);
    END;
  END Notice;

PROCEDURE BotLessAnyOK (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(BotLessAnyOKArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfBotLessAnyOK);
      alg.stopAtEvent := alg.eventDataRec.stopAtBotLessAnyOK;
      alg.waitAtEvent := alg.eventDataRec.waitAtBotLessAnyOK;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "BotLessAnyOK", OEDispatcher, zumeArgRec);
    END;
  END BotLessAnyOK;

PROCEDURE TopLessTopOK (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(TopLessTopOKArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfTopLessTopOK);
      alg.stopAtEvent := alg.eventDataRec.stopAtTopLessTopOK;
      alg.waitAtEvent := alg.eventDataRec.waitAtTopLessTopOK;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "TopLessTopOK", OEDispatcher, zumeArgRec);
    END;
  END TopLessTopOK;

PROCEDURE TopLessNonTopKO (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(TopLessNonTopKOArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfTopLessNonTopKO);
      alg.stopAtEvent := alg.eventDataRec.stopAtTopLessNonTopKO;
      alg.waitAtEvent := alg.eventDataRec.waitAtTopLessNonTopKO;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "TopLessNonTopKO", OEDispatcher, zumeArgRec);
    END;
  END TopLessNonTopKO;

PROCEDURE FunLessBotKO (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(FunLessBotKOArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfFunLessBotKO);
      alg.stopAtEvent := alg.eventDataRec.stopAtFunLessBotKO;
      alg.waitAtEvent := alg.eventDataRec.waitAtFunLessBotKO;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "FunLessBotKO", OEDispatcher, zumeArgRec);
    END;
  END FunLessBotKO;

PROCEDURE FunLessTopOK (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(FunLessTopOKArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfFunLessTopOK);
      alg.stopAtEvent := alg.eventDataRec.stopAtFunLessTopOK;
      alg.waitAtEvent := alg.eventDataRec.waitAtFunLessTopOK;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "FunLessTopOK", OEDispatcher, zumeArgRec);
    END;
  END FunLessTopOK;

PROCEDURE FunLessFun (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(FunLessFunArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfFunLessFun);
      alg.stopAtEvent := alg.eventDataRec.stopAtFunLessFun;
      alg.waitAtEvent := alg.eventDataRec.waitAtFunLessFun;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "FunLessFun", OEDispatcher, zumeArgRec);
    END;
  END FunLessFun;

PROCEDURE OK (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(OKArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfOK);
      alg.stopAtEvent := alg.eventDataRec.stopAtOK;
      alg.waitAtEvent := alg.eventDataRec.waitAtOK;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "OK", OEDispatcher, zumeArgRec);
    END;
  END OK;

PROCEDURE KO (
      initiator: Algorithm.T;
       lftIndex, rhtIndex, lftLeadingEdgeIndex, rhtLeadingEdgeIndex: INTEGER
    ) RAISES {Thread.Alerted} =
  <* LL = {} *>
  VAR zumeArgRec := NEW(KOArgs
               , lftIndex := lftIndex
               , rhtIndex := rhtIndex
               , lftLeadingEdgeIndex := lftLeadingEdgeIndex
               , rhtLeadingEdgeIndex := rhtLeadingEdgeIndex
      );
      alg := NARROW(initiator, SubtypeAlgClass.T);
  BEGIN
    LOCK alg.evtMu DO
      INC(alg.eventDataRec.ctOfKO);
      alg.stopAtEvent := alg.eventDataRec.stopAtKO;
      alg.waitAtEvent := alg.eventDataRec.waitAtKO;
      Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1,
                    "KO", OEDispatcher, zumeArgRec);
    END;
  END KO;

BEGIN
END SubtypeIE.

interface View is in: