{ This TMDL description tests the complex TMDL constructs. } { Daniel Amyot, 20/09/94. } Map Tests Is Interactions &GrAbort, TestChoice, TestPar, TestForks, TestLoops, TestWP on Nothing; Where Group &GrAbort is TestAbort, &GrAborted on Ab1, Ab2; Where Group &GrAborted is TestAborted1, TestAborted2 on Nothing; EndGroup { &GrAborted } EndGroup { &GrAbort } Descriptions { These three interacting processes test the Abort and } { the three levels of specification. } Timethread TestAbort Is NoRec Trigger (T1) Abort (Ab1) Abort (Ab2) Result (R1) EndTT { TestAbort } Timethread TestAborted1 Is EndRec AbortedOn (Ab1) Trigger (T2) Result (R2) EndTT { TestAborted1 } Timethread TestAborted2 Is ParaRec AbortedOn (Ab2) Trigger (T3) Result (R3) EndTT { TestAborted1 } { This timethread tests a Choice within a Choice. } { The Async activity is also used. } { Boolean operators over guards are tested } { Finally, tag passing over internal synchronization is tested. } Timethread TestChoice Is Trigger (T4 ? Cond) Choice Guard (Cond eq Yes) Action (Act1) OR Choice { Do nothing } OR Guard ( (Cond ne Yes) implies (not(Cond eq No)) ) Async (Act3 ! Cond) EndChoice EndChoice Result (R4) EndTT { TestChoice } { This timethread tests a Par within a Par. } { The Async activity is also used. } { Finally, tag passing over internal synchronization is tested. } Timethread TestPar Is Trigger (T5 ? Cond) Par Wait (Act4) AND Par Async (Act5 ! Cond) AND Sync (Act6) EndPar EndPar Result (R5) EndTT { TestPar } { Timethread that tests Orfork and AndFork } { with three branches. The AndFork is in the OrFork. } { Again, tag passing and guards are tested. } Timethread TestForks Is Trigger (T6 ? Cond1 ? Cond2) OrFork Guard (Cond2 ne No) Continue OR Path AndFork Path Action (Act7) Result (Rfork1) EndPath AND Path { Do nothing } Result (Rfork2 ! Cond1) EndPath AND Path Action (Act8) Result (Rfork3) EndPath EndAndFork Result (Rfork4) EndPath OR Path { Do nothing } Result (Rfork5) EndPath EndOrFork Result (R6) EndTT { TestForks } { Tests a loop within a loop, and value passing. } Timethread TestLoops Is ParaRec Trigger (T7 ? Cond) Loop Compulsory Guard (Cond ne No) Action (Act9) Optional Guard (Cond eq No) Loop Comp Action (Act10) Opt Action (Act11) EndLoop EndLoop Result (R7) EndTT { TestLoops } { Tests the different waiting place options. } Timethread TestWP Is Trigger Time (T8) Wait Delayed (Act12) Wait Signal (Act13) Result (R8 ! TimeT8 ! SigAct13) EndTT { TestWP } EndMap { Tests }