2:-include(library('ec_planner/ec_test_incl')).    3% 
    4%;
    5%; Copyright (c) 2005 IBM Corporation and others.
    6%; All rights reserved. This program and the accompanying materials
    7%; are made available under the terms of the Common Public License v1.0
    8%; which accompanies this distribution, and is available at
    9%; http://www.eclipse.org/legal/cpl-v10.html
   10%;
   11%; Contributors:
   12%; IBM - Initial implementation
   13%;
   14%; scuba diving
   15%;
   16% ecnet/Diving.e:13
   17% 
   18% sort object
   19 /*
   20.
   21*/
   22.
   23
   24% sort agent: object
   25 /*
   26.
   27*/
   28.
   29.
   30.
   31
   32% sort diver: agent
   33 /*
   34.
   35*/
   36.
   37.
   38.
   39
   40% sort depth: integer
   41 /*
   42.
   43*/
   44.
   45.
   46.
   47
   48% sort boat: object
   49 /*
   50.
   51*/
   52.
   53.
   54.
   55
   56% ecnet/Diving.e:19
   57% 
   58%; reference line, anchor line, shotline, SMB line, ...
   59% sort line: object
   60 /*
   61.
   62*/
   63.
   64.
   65.
   66
   67% 
   68% sort equipment: object
   69 /*
   70.
   71*/
   72.
   73.
   74.
   75
   76% sort weight: equipment
   77 /*
   78.
   79*/
   80.
   81.
   82.
   83
   84% ecnet/Diving.e:25
   85% sort fin: equipment
   86 /*
   87.
   88*/
   89.
   90.
   91.
   92
   93% sort airtank: equipment
   94 /*
   95.
   96*/
   97.
   98.
   99.
  100
  101% 
  102%; buoyancy compensator (BC)
  103%; buoyancy control device (BCD)
  104% sort computer: equipment
  105 /*
  106.
  107*/
  108.
  109.
  110.
  111
  112% ecnet/Diving.e:31
  113% sort bc: equipment
  114 /*
  115.
  116*/
  117.
  118.
  119.
  120
  121% 
  122% fluent AtDepth(object,depth)
  123 /*
  124.
  125*/
  126.
  127
  128% 
  129% ecnet/Diving.e:35
  130% [object,depth1,depth2,time]% 
  131% HoldsAt(AtDepth(object,depth1),time) &
  132% HoldsAt(AtDepth(object,depth2),time) ->
  133% depth1 = depth2.
  134 /*
  135holds_at(atDepth(Object, Depth1), Time), holds_at(atDepth(Object, Depth2), Time) ->
  136    Depth1=Depth2.
  137*/
  138.
  139
  140% 
  141% 
  142% event Ascend(diver,depth)
  143 /*
  144.
  145*/
  146.
  147
  148% ecnet/Diving.e:41
  149% 
  150% event Descend(diver,depth)
  151 /*
  152.
  153*/
  154.
  155
  156% 
  157% ecnet/Diving.e:44
  158% [diver,depth1,depth2,time]% 
  159% HoldsAt(AtDepth(diver,depth1),time) &
  160% Happens(Descend(diver,depth2),time) ->
  161% depth2>depth1.
  162 /*
  163holds_at(atDepth(Diver, Depth1), Time), happens(descend(Diver, Depth2), Time) ->
  164    Depth2>Depth1.
  165*/
  166.
  167
  168% 
  169% 
  170% ecnet/Diving.e:49
  171% [diver,depth1,depth2,time]% 
  172% HoldsAt(AtDepth(diver,depth1),time) &
  173% Happens(Ascend(diver,depth2),time) ->
  174% depth2<depth1.
  175 /*
  176holds_at(atDepth(Diver, Depth1), Time), happens(ascend(Diver, Depth2), Time) ->
  177    Depth2<Depth1.
  178*/
  179.
  180
  181% 
  182% 
  183% ecnet/Diving.e:54
  184% [diver,depth,time]% 
  185% Initiates(Descend(diver,depth),AtDepth(diver,depth),time).
  186 /*
  187.
  188*/
  189.
  190
  191% 
  192% 
  193% ecnet/Diving.e:57
  194% [diver,depth1,depth2,time]% 
  195% HoldsAt(AtDepth(diver,depth1),time) ->
  196% Terminates(Descend(diver,depth2),AtDepth(diver,depth1),time).
  197 /*
  198holds_at(atDepth(Diver, Depth1), Time) ->
  199    terminates(descend(Diver, Depth2),
  200               atDepth(Diver, Depth1),
  201               Time).
  202*/
  203.
  204
  205% 
  206% 
  207% ecnet/Diving.e:61
  208% [diver,depth,time]% 
  209% Initiates(Ascend(diver,depth),AtDepth(diver,depth),time).
  210 /*
  211.
  212*/
  213.
  214
  215% 
  216% 
  217% ecnet/Diving.e:64
  218% [diver,depth1,depth2,time]% 
  219% HoldsAt(AtDepth(diver,depth1),time) ->
  220% Terminates(Ascend(diver,depth2),AtDepth(diver,depth1),time).
  221 /*
  222holds_at(atDepth(Diver, Depth1), Time) ->
  223    terminates(ascend(Diver, Depth2),
  224               atDepth(Diver, Depth1),
  225               Time).
  226*/
  227.
  228
  229% 
  230% 
  231% fluent Wearing(diver,equipment)
  232 /*
  233.
  234*/
  235.
  236
  237% 
  238% ecnet/Diving.e:70
  239% event PutOn(diver,equipment)
  240 /*
  241.
  242*/
  243.
  244
  245% 
  246% event TakeOff(diver,equipment)
  247 /*
  248.
  249*/
  250.
  251
  252% 
  253% event Lose(diver,equipment)
  254 /*
  255.
  256*/
  257.
  258
  259% 
  260% ecnet/Diving.e:76
  261% [diver,equipment,depth,time]% 
  262% Releases(PutOn(diver,equipment),AtDepth(equipment,depth),time).
  263 /*
  264.
  265*/
  266.
  267
  268% 
  269% 
  270% ecnet/Diving.e:79
  271% [diver,equipment,time]% 
  272% Releases(PutOn(diver,equipment),UnderWater(equipment),time).
  273 /*
  274.
  275*/
  276.
  277
  278% 
  279% 
  280% ecnet/Diving.e:82
  281% [diver,equipment,time]% 
  282% Happens(PutOn(diver,equipment),time) ->
  283% !{diver1} HoldsAt(Wearing(diver1,equipment),time).
  284 /*
  285happens(putOn(Diver, Equipment), Time) ->
  286    not(exists([Diver1],
  287               holds_at(wearing(Diver1, Equipment), Time))).
  288*/
  289.
  290
  291% 
  292% 
  293% ecnet/Diving.e:86
  294% [diver,depth,equipment,time]% 
  295% HoldsAt(Wearing(diver,equipment),time) ->
  296% (HoldsAt(AtDepth(diver,depth),time) <->
  297%  HoldsAt(AtDepth(equipment,depth),time)).
  298 /*
  299holds_at(wearing(Diver, Equipment), Time) ->
  300    ( holds_at(atDepth(Diver, Depth), Time)<->holds_at(atDepth(Equipment, Depth), Time)
  301    ).
  302*/
  303.
  304.
  305
  306% 
  307% 
  308% ecnet/Diving.e:91
  309% [diver,depth,object,time]% 
  310% HoldsAt(Holding(diver,object),time) ->
  311% (HoldsAt(AtDepth(diver,depth),time) <->
  312%  HoldsAt(AtDepth(object,depth),time)).
  313 /*
  314holds_at(holding(Diver, Object), Time) ->
  315    ( holds_at(atDepth(Diver, Depth), Time)<->holds_at(atDepth(Object, Depth), Time)
  316    ).
  317*/
  318.
  319.
  320
  321% 
  322% 
  323% ecnet/Diving.e:96
  324% [diver,equipment,time]% 
  325% HoldsAt(Wearing(diver,equipment),time) ->
  326% (HoldsAt(UnderWater(diver),time) <->
  327%  HoldsAt(UnderWater(equipment),time)).
  328 /*
  329holds_at(wearing(Diver, Equipment), Time) ->
  330    ( holds_at(underWater(Diver), Time)<->holds_at(underWater(Equipment), Time)
  331    ).
  332*/
  333.
  334.
  335
  336% 
  337% 
  338% ecnet/Diving.e:101
  339% [diver,object,time]% 
  340% HoldsAt(Holding(diver,object),time) ->
  341% (HoldsAt(UnderWater(diver),time) <->
  342%  HoldsAt(UnderWater(object),time)).
  343 /*
  344holds_at(holding(Diver, Object), Time) ->
  345    ( holds_at(underWater(Diver), Time)<->holds_at(underWater(Object), Time)
  346    ).
  347*/
  348.
  349.
  350
  351% 
  352% 
  353% ecnet/Diving.e:106
  354% [diver,depth,equipment,time]% 
  355% HoldsAt(AtDepth(diver,depth),time) &
  356% HoldsAt(Wearing(diver,equipment),time) ->
  357% Initiates(TakeOff(diver,equipment),AtDepth(equipment,depth),time).
  358 /*
  359holds_at(atDepth(Diver, Depth), Time), holds_at(wearing(Diver, Equipment), Time) ->
  360    initiates(takeOff(Diver, Equipment),
  361              atDepth(Equipment, Depth),
  362              Time).
  363*/
  364.
  365
  366% 
  367% 
  368% ecnet/Diving.e:111
  369% [diver,depth,equipment,time]% 
  370% !HoldsAt(AtDepth(diver,depth),time) &
  371% HoldsAt(Wearing(diver,equipment),time) ->
  372% Terminates(TakeOff(diver,equipment),AtDepth(equipment,depth),time).
  373 /*
  374not(holds_at(atDepth(Diver, Depth), Time)), holds_at(wearing(Diver, Equipment), Time) ->
  375    terminates(takeOff(Diver, Equipment),
  376               atDepth(Equipment, Depth),
  377               Time).
  378*/
  379.
  380
  381% 
  382% 
  383% ecnet/Diving.e:116
  384% [diver,equipment,time]% 
  385% HoldsAt(UnderWater(diver),time) ->
  386% Initiates(TakeOff(diver,equipment),UnderWater(equipment),time).
  387 /*
  388holds_at(underWater(Diver), Time) ->
  389    initiates(takeOff(Diver, Equipment),
  390              underWater(Equipment),
  391              Time).
  392*/
  393.
  394
  395% 
  396% 
  397% ecnet/Diving.e:120
  398% [diver,equipment,time]% 
  399% !HoldsAt(UnderWater(diver),time) ->
  400% Terminates(TakeOff(diver,equipment),UnderWater(equipment),time).
  401 /*
  402not(holds_at(underWater(Diver), Time)) ->
  403    terminates(takeOff(Diver, Equipment),
  404               underWater(Equipment),
  405               Time).
  406*/
  407.
  408
  409% 
  410% 
  411% ecnet/Diving.e:124
  412% [diver,equipment,depth,time]% 
  413% HoldsAt(AtDepth(diver,depth),time) &
  414% HoldsAt(Wearing(diver,equipment),time) ->
  415% Initiates(Lose(diver,equipment),AtDepth(equipment,depth),time).
  416 /*
  417holds_at(atDepth(Diver, Depth), Time), holds_at(wearing(Diver, Equipment), Time) ->
  418    initiates(lose(Diver, Equipment),
  419              atDepth(Equipment, Depth),
  420              Time).
  421*/
  422.
  423
  424% 
  425% 
  426% ecnet/Diving.e:129
  427% [diver,equipment,depth,time]% 
  428% !HoldsAt(AtDepth(diver,depth),time) &
  429% HoldsAt(Wearing(diver,equipment),time) ->
  430% Terminates(Lose(diver,equipment),AtDepth(equipment,depth),time).
  431 /*
  432not(holds_at(atDepth(Diver, Depth), Time)), holds_at(wearing(Diver, Equipment), Time) ->
  433    terminates(lose(Diver, Equipment),
  434               atDepth(Equipment, Depth),
  435               Time).
  436*/
  437.
  438
  439% 
  440% 
  441% ecnet/Diving.e:134
  442% [diver,equipment,time]% 
  443% HoldsAt(UnderWater(diver),time) ->
  444% Initiates(Lose(diver,equipment),UnderWater(equipment),time).
  445 /*
  446holds_at(underWater(Diver), Time) ->
  447    initiates(lose(Diver, Equipment),
  448              underWater(Equipment),
  449              Time).
  450*/
  451.
  452
  453% 
  454% 
  455% ecnet/Diving.e:138
  456% [diver,equipment,time]% 
  457% !HoldsAt(UnderWater(diver),time) ->
  458% Terminates(Lose(diver,equipment),UnderWater(equipment),time).
  459 /*
  460not(holds_at(underWater(Diver), Time)) ->
  461    terminates(lose(Diver, Equipment),
  462               underWater(Equipment),
  463               Time).
  464*/
  465.
  466
  467% 
  468% 
  469% fluent Holding(diver,object)
  470 /*
  471.
  472*/
  473.
  474
  475% 
  476% ecnet/Diving.e:144
  477% [diver1,diver2,time]% 
  478% HoldsAt(Holding(diver1,diver2),time) ->
  479% !HoldsAt(Holding(diver2,diver1),time).
  480 /*
  481holds_at(holding(Diver1, Diver2), Time) ->
  482    not(holds_at(holding(Diver2, Diver1), Time)).
  483*/
  484.
  485
  486% 
  487% 
  488% event Grab(diver,object)
  489 /*
  490.
  491*/
  492.
  493
  494% 
  495% ecnet/Diving.e:150
  496% event LetGoOf(diver,object)
  497 /*
  498.
  499*/
  500.
  501
  502% 
  503% ecnet/Diving.e:152
  504% [diver,object,time]% 
  505% Initiates(Grab(diver,object),Holding(diver,object),time).
  506 /*
  507.
  508*/
  509.
  510
  511% 
  512% 
  513% ecnet/Diving.e:155
  514% [diver,object,time]% 
  515% Terminates(LetGoOf(diver,object),Holding(diver,object),time).
  516 /*
  517.
  518*/
  519.
  520
  521% 
  522% 
  523% ecnet/Diving.e:158
  524% [diver,object,depth,time]% 
  525% Releases(Grab(diver,object),AtDepth(object,depth),time).
  526 /*
  527.
  528*/
  529.
  530
  531% 
  532% 
  533% ecnet/Diving.e:161
  534% [diver,object,time]% 
  535% Releases(Grab(diver,object),UnderWater(object),time).
  536 /*
  537.
  538*/
  539.
  540
  541% 
  542% 
  543% ecnet/Diving.e:164
  544% [diver,object,depth,time]% 
  545% HoldsAt(AtDepth(diver,depth),time) &
  546% HoldsAt(Holding(diver,object),time) ->
  547% Initiates(LetGoOf(diver,object),AtDepth(object,depth),time).
  548 /*
  549holds_at(atDepth(Diver, Depth), Time), holds_at(holding(Diver, Object), Time) ->
  550    initiates(letGoOf(Diver, Object),
  551              atDepth(Object, Depth),
  552              Time).
  553*/
  554.
  555
  556% 
  557% 
  558% ecnet/Diving.e:169
  559% [diver,object,depth,time]% 
  560% !HoldsAt(AtDepth(diver,depth),time) &
  561% HoldsAt(Holding(diver,object),time) ->
  562% Terminates(LetGoOf(diver,object),AtDepth(object,depth),time).
  563 /*
  564not(holds_at(atDepth(Diver, Depth), Time)), holds_at(holding(Diver, Object), Time) ->
  565    terminates(letGoOf(Diver, Object),
  566               atDepth(Object, Depth),
  567               Time).
  568*/
  569.
  570
  571% 
  572% 
  573% ecnet/Diving.e:174
  574% [diver,object,time]% 
  575% HoldsAt(UnderWater(diver),time) ->
  576% Initiates(LetGoOf(diver,object),UnderWater(object),time).
  577 /*
  578holds_at(underWater(Diver), Time) ->
  579    initiates(letGoOf(Diver, Object),
  580              underWater(Object),
  581              Time).
  582*/
  583.
  584
  585% 
  586% 
  587% ecnet/Diving.e:178
  588% [diver,object,time]% 
  589% !HoldsAt(UnderWater(diver),time) ->
  590% Terminates(LetGoOf(diver,object),UnderWater(object),time).
  591 /*
  592not(holds_at(underWater(Diver), Time)) ->
  593    terminates(letGoOf(Diver, Object),
  594               underWater(Object),
  595               Time).
  596*/
  597.
  598
  599% 
  600% 
  601% ecnet/Diving.e:182
  602% [diver,equipment,time]% 
  603% Initiates(PutOn(diver,equipment),Wearing(diver,equipment),time).
  604 /*
  605.
  606*/
  607.
  608
  609% 
  610% 
  611% ecnet/Diving.e:185
  612% [diver,equipment,time]% 
  613% Happens(PutOn(diver,equipment),time) ->
  614% !HoldsAt(UnderWater(diver),time).
  615 /*
  616happens(putOn(Diver, Equipment), Time) ->
  617    not(holds_at(underWater(Diver), Time)).
  618*/
  619.
  620
  621% 
  622% 
  623% ecnet/Diving.e:189
  624% [diver,equipment,time]% 
  625% Terminates(TakeOff(diver,equipment),Wearing(diver,equipment),time).
  626 /*
  627.
  628*/
  629.
  630
  631% 
  632% 
  633% ecnet/Diving.e:192
  634% [diver,equipment,time]% 
  635% Terminates(Lose(diver,equipment),Wearing(diver,equipment),time).
  636 /*
  637.
  638*/
  639.
  640
  641% 
  642% 
  643% fluent Vertical(diver)
  644 /*
  645.
  646*/
  647.
  648
  649% 
  650% fluent HorizontalDown(diver)
  651 /*
  652.
  653*/
  654.
  655
  656% ecnet/Diving.e:198
  657% 
  658% fluent Inverted(diver)
  659 /*
  660.
  661*/
  662.
  663
  664% 
  665% fluent HorizontalUp(diver)
  666 /*
  667.
  668*/
  669.
  670
  671% 
  672% xor Vertical, HorizontalDown, Inverted, HorizontalUp
  673 /*
  674.
  675*/
  676.
  677
  678% ecnet/Diving.e:204
  679% 
  680% event RotatePitch(diver)
  681 /*
  682.
  683*/
  684.
  685
  686% 
  687% ecnet/Diving.e:207
  688% [diver,time]% 
  689% HoldsAt(Vertical(diver),time) ->
  690% Initiates(RotatePitch(diver),HorizontalDown(diver),time).
  691 /*
  692holds_at(vertical(Diver), Time) ->
  693    initiates(rotatePitch(Diver), horizontalDown(Diver), Time).
  694*/
  695.
  696
  697% 
  698% 
  699% ecnet/Diving.e:211
  700% [diver,time]% 
  701% HoldsAt(HorizontalDown(diver),time) ->
  702% Initiates(RotatePitch(diver),Inverted(diver),time).
  703 /*
  704holds_at(horizontalDown(Diver), Time) ->
  705    initiates(rotatePitch(Diver), inverted(Diver), Time).
  706*/
  707.
  708
  709% 
  710% 
  711% ecnet/Diving.e:215
  712% [diver,time]% 
  713% HoldsAt(HorizontalDown(diver),time) ->
  714% Terminates(RotatePitch(diver),HorizontalDown(diver),time).
  715 /*
  716holds_at(horizontalDown(Diver), Time) ->
  717    terminates(rotatePitch(Diver),
  718               horizontalDown(Diver),
  719               Time).
  720*/
  721.
  722
  723% 
  724% 
  725% ecnet/Diving.e:219
  726% [diver,time]% 
  727% HoldsAt(Inverted(diver),time) ->
  728% Initiates(RotatePitch(diver),HorizontalUp(diver),time).
  729 /*
  730holds_at(inverted(Diver), Time) ->
  731    initiates(rotatePitch(Diver), horizontalUp(Diver), Time).
  732*/
  733.
  734
  735% 
  736% 
  737% ecnet/Diving.e:223
  738% [diver,time]% 
  739% HoldsAt(Inverted(diver),time) ->
  740% Terminates(RotatePitch(diver),Inverted(diver),time).
  741 /*
  742holds_at(inverted(Diver), Time) ->
  743    terminates(rotatePitch(Diver), inverted(Diver), Time).
  744*/
  745.
  746
  747% 
  748% 
  749% ecnet/Diving.e:227
  750% [diver,time]% 
  751% HoldsAt(HorizontalUp(diver),time) ->
  752% Initiates(RotatePitch(diver),Vertical(diver),time).
  753 /*
  754holds_at(horizontalUp(Diver), Time) ->
  755    initiates(rotatePitch(Diver), vertical(Diver), Time).
  756*/
  757.
  758
  759% 
  760% 
  761% ecnet/Diving.e:231
  762% [diver,time]% 
  763% HoldsAt(HorizontalUp(diver),time) ->
  764% Terminates(RotatePitch(diver),HorizontalUp(diver),time).
  765 /*
  766holds_at(horizontalUp(Diver), Time) ->
  767    terminates(rotatePitch(Diver), horizontalUp(Diver), Time).
  768*/
  769.
  770
  771% 
  772% 
  773% event RotateYaw(diver)
  774 /*
  775.
  776*/
  777.
  778
  779% 
  780%; try taking out Holding condition here
  781% ecnet/Diving.e:238
  782% [diver,time]% 
  783% Happens(Ascend1(diver),time) &
  784% !Happens(RapidAscendToSurface(diver),time) &
  785% !({diver1} HoldsAt(Holding(diver,diver1),time)) ->
  786% Happens(RotateYaw(diver),time).
  787 /*
  788happens(ascend1(Diver), Time), not(happens(rapidAscendToSurface(Diver), Time)), not(exists([Diver1], holds_at(holding(Diver, Diver1), Time))) ->
  789    happens(rotateYaw(Diver), Time).
  790*/
  791.
  792
  793% 
  794% 
  795% ecnet/Diving.e:244
  796% fluent UnderWater(object)
  797 /*
  798.
  799*/
  800.
  801
  802% 
  803% ecnet/Diving.e:246
  804% [object,depth,time]% 
  805% depth>% 0 &
  806% HoldsAt(AtDepth(object,depth),time) ->
  807% HoldsAt(UnderWater(object),time).
  808 /*
  809Depth>0, holds_at(atDepth(Object, Depth), Time) ->
  810    holds_at(underWater(Object), Time).
  811*/
  812.
  813
  814% 
  815% 
  816% event EnterWater(object)
  817 /*
  818.
  819*/
  820.
  821
  822% ecnet/Diving.e:252
  823% 
  824% event Surface(object)
  825 /*
  826.
  827*/
  828.
  829
  830% 
  831% ecnet/Diving.e:255
  832% [object,time]% 
  833% Initiates(EnterWater(object),UnderWater(object),time).
  834 /*
  835.
  836*/
  837.
  838
  839% 
  840% 
  841% ecnet/Diving.e:258
  842% [diver,time]% 
  843% Happens(EnterWater(diver),time) ->
  844% !{diver1} HoldsAt(Holding(diver1,diver),time).
  845 /*
  846happens(enterWater(Diver), Time) ->
  847    not(exists([Diver1],
  848               holds_at(holding(Diver1, Diver), Time))).
  849*/
  850.
  851
  852% 
  853% 
  854% ecnet/Diving.e:262
  855% [object,depth,time]% 
  856% depth=% 0 ->
  857% Initiates(EnterWater(object),AtDepth(object,depth),time).
  858 /*
  859Depth=0 ->
  860    initiates(enterWater(Object),
  861              atDepth(Object, Depth),
  862              Time).
  863*/
  864.
  865
  866% 
  867% 
  868% ecnet/Diving.e:266
  869% [object,time]% 
  870% Terminates(Surface(object),UnderWater(object),time).
  871 /*
  872.
  873*/
  874.
  875
  876% 
  877% 
  878% ecnet/Diving.e:269
  879% [diver,time]% 
  880% Terminates(Surface(diver),PositivelyBuoyant(diver),time).
  881 /*
  882.
  883*/
  884.
  885
  886% 
  887% 
  888% ecnet/Diving.e:272
  889% [diver,time]% 
  890% Terminates(Surface(diver),NegativelyBuoyant(diver),time).
  891 /*
  892.
  893*/
  894.
  895
  896% 
  897% 
  898% ecnet/Diving.e:275
  899% [diver,time]% 
  900% Terminates(Surface(diver),NeutrallyBuoyant(diver),time).
  901 /*
  902.
  903*/
  904.
  905
  906% 
  907% 
  908% ecnet/Diving.e:278
  909% [object,depth,time]% 
  910% Terminates(Surface(object),AtDepth(object,depth),time).
  911 /*
  912.
  913*/
  914.
  915
  916% 
  917% 
  918% ecnet/Diving.e:281
  919% [diver,time] % Happens(EnterWater(diver),time) ->
  920% HoldsAt(Vertical(diver),time).
  921 /*
  922happens(enterWater(Diver), Time) ->
  923    holds_at(vertical(Diver), Time).
  924*/
  925.
  926
  927% 
  928% 
  929% fluent StandingOn(diver,boat)
  930 /*
  931.
  932*/
  933.
  934
  935% 
  936% event StandOn(diver,boat)
  937 /*
  938.
  939*/
  940.
  941
  942% ecnet/Diving.e:287
  943% 
  944% ecnet/Diving.e:288
  945% [diver,boat,time]% 
  946% Terminates(EnterWater(diver),StandingOn(diver,boat),time).
  947 /*
  948.
  949*/
  950.
  951
  952% 
  953% 
  954% ecnet/Diving.e:291
  955% [diver,boat,time]% 
  956% Initiates(StandOn(diver,boat),StandingOn(diver,boat),time).
  957 /*
  958.
  959*/
  960.
  961
  962% 
  963% 
  964% fluent PositivelyBuoyant(diver)
  965 /*
  966.
  967*/
  968.
  969
  970% 
  971% fluent NeutrallyBuoyant(diver)
  972 /*
  973.
  974*/
  975.
  976
  977% ecnet/Diving.e:297
  978% 
  979% fluent NegativelyBuoyant(diver)
  980 /*
  981.
  982*/
  983.
  984
  985% 
  986% mutex PositivelyBuoyant, NeutrallyBuoyant, NegativelyBuoyant
  987 /*
  988.
  989*/
  990.
  991
  992 /*
  993.
  994*/
  995.
  996
  997 /*
  998.
  999*/
 1000.
 1001
 1002% 
 1003% ecnet/Diving.e:302
 1004% [diver,time]% 
 1005% HoldsAt(PositivelyBuoyant(diver),time) ->
 1006% HoldsAt(UnderWater(diver),time).
 1007 /*
 1008holds_at(positivelyBuoyant(Diver), Time) ->
 1009    holds_at(underWater(Diver), Time).
 1010*/
 1011.
 1012
 1013% 
 1014% 
 1015% ecnet/Diving.e:306
 1016% [diver,time]% 
 1017% HoldsAt(NeutrallyBuoyant(diver),time) ->
 1018% HoldsAt(UnderWater(diver),time).
 1019 /*
 1020holds_at(neutrallyBuoyant(Diver), Time) ->
 1021    holds_at(underWater(Diver), Time).
 1022*/
 1023.
 1024
 1025% 
 1026% 
 1027% ecnet/Diving.e:310
 1028% [diver,time]% 
 1029% HoldsAt(NegativelyBuoyant(diver),time) ->
 1030% HoldsAt(UnderWater(diver),time).
 1031 /*
 1032holds_at(negativelyBuoyant(Diver), Time) ->
 1033    holds_at(underWater(Diver), Time).
 1034*/
 1035.
 1036
 1037% 
 1038% 
 1039% event PressDeflateButton(diver,bc)
 1040 /*
 1041.
 1042*/
 1043.
 1044
 1045% 
 1046% ecnet/Diving.e:316
 1047% event PressDumpButton(diver,bc)
 1048 /*
 1049.
 1050*/
 1051.
 1052
 1053% 
 1054% event PressInflateButton(diver,bc)
 1055 /*
 1056.
 1057*/
 1058.
 1059
 1060% 
 1061% ecnet/Diving.e:320
 1062% [diver,bc,time]% 
 1063% Happens(PressDeflateButton(diver,bc),time) ->
 1064% HoldsAt(Vertical(diver),time) &
 1065% HoldsAt(UnderWater(bc),time).
 1066 /*
 1067happens(pressDeflateButton(Diver, Bc), Time) ->
 1068    holds_at(vertical(Diver), Time),
 1069    holds_at(underWater(Bc), Time).
 1070*/
 1071.
 1072
 1073% 
 1074% 
 1075% ecnet/Diving.e:325
 1076% [diver,bc,time]% 
 1077% Happens(PressDumpButton(diver,bc),time) ->
 1078% HoldsAt(Vertical(diver),time) &
 1079% HoldsAt(UnderWater(bc),time).
 1080 /*
 1081happens(pressDumpButton(Diver, Bc), Time) ->
 1082    holds_at(vertical(Diver), Time),
 1083    holds_at(underWater(Bc), Time).
 1084*/
 1085.
 1086
 1087% 
 1088% 
 1089% ecnet/Diving.e:330
 1090% [diver,bc,time] % Happens(PressDumpButton(diver,bc),time) ->
 1091% HoldsAt(UncontrolledBuoyancy(diver),time).
 1092 /*
 1093happens(pressDumpButton(Diver, Bc), Time) ->
 1094    holds_at(uncontrolledBuoyancy(Diver), Time).
 1095*/
 1096.
 1097
 1098% 
 1099% 
 1100% ecnet/Diving.e:333
 1101% [diver,bc,time]% 
 1102% HoldsAt(Wearing(diver,bc),time) ->
 1103% Initiates(PressDeflateButton(diver,bc),NegativelyBuoyant(diver),time).
 1104 /*
 1105holds_at(wearing(Diver, Bc), Time) ->
 1106    initiates(pressDeflateButton(Diver, Bc),
 1107              negativelyBuoyant(Diver),
 1108              Time).
 1109*/
 1110.
 1111
 1112% 
 1113% 
 1114% ecnet/Diving.e:337
 1115% [diver,bc,time]% 
 1116% HoldsAt(Wearing(diver,bc),time) ->
 1117% Terminates(PressDeflateButton(diver,bc),NeutrallyBuoyant(diver),time).
 1118 /*
 1119holds_at(wearing(Diver, Bc), Time) ->
 1120    terminates(pressDeflateButton(Diver, Bc),
 1121               neutrallyBuoyant(Diver),
 1122               Time).
 1123*/
 1124.
 1125
 1126% 
 1127% 
 1128% ecnet/Diving.e:341
 1129% [diver,bc,time]% 
 1130% HoldsAt(Wearing(diver,bc),time) ->
 1131% Terminates(PressDeflateButton(diver,bc),PositivelyBuoyant(diver),time).
 1132 /*
 1133holds_at(wearing(Diver, Bc), Time) ->
 1134    terminates(pressDeflateButton(Diver, Bc),
 1135               positivelyBuoyant(Diver),
 1136               Time).
 1137*/
 1138.
 1139
 1140% 
 1141% 
 1142% ecnet/Diving.e:345
 1143% [diver,bc,time]% 
 1144% HoldsAt(Wearing(diver,bc),time) ->
 1145% Initiates(PressDumpButton(diver,bc),NegativelyBuoyant(diver),time).
 1146 /*
 1147holds_at(wearing(Diver, Bc), Time) ->
 1148    initiates(pressDumpButton(Diver, Bc),
 1149              negativelyBuoyant(Diver),
 1150              Time).
 1151*/
 1152.
 1153
 1154% 
 1155% 
 1156% ecnet/Diving.e:349
 1157% [diver,bc,time]% 
 1158% HoldsAt(Wearing(diver,bc),time) ->
 1159% Terminates(PressDumpButton(diver,bc),NeutrallyBuoyant(diver),time).
 1160 /*
 1161holds_at(wearing(Diver, Bc), Time) ->
 1162    terminates(pressDumpButton(Diver, Bc),
 1163               neutrallyBuoyant(Diver),
 1164               Time).
 1165*/
 1166.
 1167
 1168% 
 1169% 
 1170% ecnet/Diving.e:353
 1171% [diver,bc,time]% 
 1172% HoldsAt(Wearing(diver,bc),time) ->
 1173% Terminates(PressDumpButton(diver,bc),PositivelyBuoyant(diver),time).
 1174 /*
 1175holds_at(wearing(Diver, Bc), Time) ->
 1176    terminates(pressDumpButton(Diver, Bc),
 1177               positivelyBuoyant(Diver),
 1178               Time).
 1179*/
 1180.
 1181
 1182% 
 1183% 
 1184% ecnet/Diving.e:357
 1185% [diver,bc,time]% 
 1186% HoldsAt(Wearing(diver,bc),time) ->
 1187% Initiates(PressInflateButton(diver,bc),NeutrallyBuoyant(diver),time).
 1188 /*
 1189holds_at(wearing(Diver, Bc), Time) ->
 1190    initiates(pressInflateButton(Diver, Bc),
 1191              neutrallyBuoyant(Diver),
 1192              Time).
 1193*/
 1194.
 1195
 1196% 
 1197% 
 1198% ecnet/Diving.e:361
 1199% [diver,bc,time]% 
 1200% HoldsAt(Wearing(diver,bc),time) ->
 1201% Terminates(PressInflateButton(diver,bc),PositivelyBuoyant(diver),time).
 1202 /*
 1203holds_at(wearing(Diver, Bc), Time) ->
 1204    terminates(pressInflateButton(Diver, Bc),
 1205               positivelyBuoyant(Diver),
 1206               Time).
 1207*/
 1208.
 1209
 1210% 
 1211% 
 1212% ecnet/Diving.e:365
 1213% [diver,bc,time]% 
 1214% HoldsAt(Wearing(diver,bc),time) ->
 1215% Terminates(PressInflateButton(diver,bc),NegativelyBuoyant(diver),time).
 1216 /*
 1217holds_at(wearing(Diver, Bc), Time) ->
 1218    terminates(pressInflateButton(Diver, Bc),
 1219               negativelyBuoyant(Diver),
 1220               Time).
 1221*/
 1222.
 1223
 1224% 
 1225% 
 1226% ecnet/Diving.e:369
 1227% [diver,weight,time]% 
 1228% HoldsAt(Wearing(diver,weight),time) ->
 1229% Initiates(TakeOff(diver,weight),PositivelyBuoyant(diver),time).
 1230 /*
 1231holds_at(wearing(Diver, Weight), Time) ->
 1232    initiates(takeOff(Diver, Weight),
 1233              positivelyBuoyant(Diver),
 1234              Time).
 1235*/
 1236.
 1237
 1238% 
 1239% 
 1240% ecnet/Diving.e:373
 1241% [diver,weight,time]% 
 1242% HoldsAt(Wearing(diver,weight),time) ->
 1243% Terminates(TakeOff(diver,weight),NegativelyBuoyant(diver),time).
 1244 /*
 1245holds_at(wearing(Diver, Weight), Time) ->
 1246    terminates(takeOff(Diver, Weight),
 1247               negativelyBuoyant(Diver),
 1248               Time).
 1249*/
 1250.
 1251
 1252% 
 1253% 
 1254% ecnet/Diving.e:377
 1255% [diver,weight,time]% 
 1256% HoldsAt(Wearing(diver,weight),time) ->
 1257% Terminates(TakeOff(diver,weight),NeutrallyBuoyant(diver),time).
 1258 /*
 1259holds_at(wearing(Diver, Weight), Time) ->
 1260    terminates(takeOff(Diver, Weight),
 1261               neutrallyBuoyant(Diver),
 1262               Time).
 1263*/
 1264.
 1265
 1266% 
 1267% 
 1268% fluent UncontrolledBuoyancy(diver)
 1269 /*
 1270.
 1271*/
 1272.
 1273
 1274% 
 1275% ecnet/Diving.e:383
 1276% event LoseBuoyancyControl(diver)
 1277 /*
 1278.
 1279*/
 1280.
 1281
 1282% 
 1283% predicate IsInexperiencedDiver(diver)
 1284 /*
 1285.
 1286*/
 1287.
 1288
 1289% 
 1290% ecnet/Diving.e:387
 1291% [diver,time]% 
 1292% Happens(LoseBuoyancyControl(diver),time) ->
 1293% IsInexperiencedDiver(diver).
 1294 /*
 1295happens(loseBuoyancyControl(Diver), Time) ->
 1296    isInexperiencedDiver(Diver).
 1297*/
 1298.
 1299
 1300% 
 1301% 
 1302% ecnet/Diving.e:391
 1303% [diver,time]% 
 1304% Initiates(LoseBuoyancyControl(diver),UncontrolledBuoyancy(diver),time).
 1305 /*
 1306.
 1307*/
 1308.
 1309
 1310% 
 1311% 
 1312% ecnet/Diving.e:394
 1313% [diver,time]% 
 1314% Initiates(LoseBuoyancyControl(diver),PositivelyBuoyant(diver),time).
 1315 /*
 1316.
 1317*/
 1318.
 1319
 1320% 
 1321% 
 1322% ecnet/Diving.e:397
 1323% [diver,time]% 
 1324% Terminates(LoseBuoyancyControl(diver),NegativelyBuoyant(diver),time).
 1325 /*
 1326.
 1327*/
 1328.
 1329
 1330% 
 1331% 
 1332% ecnet/Diving.e:400
 1333% [diver,time]% 
 1334% Terminates(LoseBuoyancyControl(diver),NeutrallyBuoyant(diver),time).
 1335 /*
 1336.
 1337*/
 1338.
 1339
 1340% 
 1341% 
 1342%; determining fluent
 1343% fluent AscendDescendAmount(diver,depth)
 1344 /*
 1345.
 1346*/
 1347.
 1348
 1349% noninertial AscendDescendAmount
 1350 /*
 1351.
 1352*/
 1353.
 1354
 1355% ecnet/Diving.e:406
 1356% 
 1357% ecnet/Diving.e:407
 1358% [diver,depth1,depth2,time]% 
 1359% HoldsAt(AscendDescendAmount(diver,depth1),time) &
 1360% HoldsAt(AscendDescendAmount(diver,depth2),time) ->
 1361% depth1=depth2.
 1362 /*
 1363holds_at(ascendDescendAmount(Diver, Depth1), Time), holds_at(ascendDescendAmount(Diver, Depth2), Time) ->
 1364    Depth1=Depth2.
 1365*/
 1366.
 1367
 1368% 
 1369% 
 1370% ecnet/Diving.e:412
 1371% [diver,depth,time]% 
 1372% Happens(Descend(diver,depth),time) ->
 1373% HoldsAt(NegativelyBuoyant(diver),time) &
 1374% ({depth1}
 1375%  HoldsAt(AscendDescendAmount(diver,depth1),time) &
 1376%  HoldsAt(AtDepth(diver,depth-depth1),time)).
 1377 /*
 1378happens(descend(Diver, Depth), Time) ->
 1379    holds_at(negativelyBuoyant(Diver), Time),
 1380    exists([Depth1],
 1381            (holds_at(ascendDescendAmount(Diver, Depth1), Time), holds_at(atDepth(Diver, Depth-Depth1), Time))).
 1382*/
 1383.
 1384
 1385% 
 1386% ecnet/Diving.e:418
 1387% 
 1388% event KickUp(diver)
 1389 /*
 1390.
 1391*/
 1392.
 1393
 1394% 
 1395% ecnet/Diving.e:421
 1396% [diver,depth,time]% 
 1397% Happens(Ascend(diver,depth),time) ->
 1398% (HoldsAt(PositivelyBuoyant(diver),time) |
 1399%  (HoldsAt(NeutrallyBuoyant(diver),time) & Happens(KickUp(diver),time))) &
 1400% ({depth1}
 1401%  HoldsAt(AscendDescendAmount(diver,depth1),time) &
 1402%  HoldsAt(AtDepth(diver,depth+depth1),time)).
 1403 /*
 1404happens(ascend(Diver, Depth), Time) ->
 1405    (   holds_at(positivelyBuoyant(Diver), Time)
 1406    ;   holds_at(neutrallyBuoyant(Diver), Time),
 1407        happens(kickUp(Diver), Time)
 1408    ),
 1409    exists([Depth1],
 1410            (holds_at(ascendDescendAmount(Diver, Depth1), Time), holds_at(atDepth(Diver, Depth+Depth1), Time))).
 1411*/
 1412.
 1413
 1414% ecnet/Diving.e:427
 1415% 
 1416% 
 1417% ecnet/Diving.e:429
 1418% [diver,time]% 
 1419% Happens(KickUp(diver),time) ->
 1420% HoldsAt(Vertical(diver),time).
 1421 /*
 1422happens(kickUp(Diver), Time) ->
 1423    holds_at(vertical(Diver), Time).
 1424*/
 1425.
 1426
 1427% 
 1428% 
 1429% event SwimAround(diver)
 1430 /*
 1431.
 1432*/
 1433.
 1434
 1435% 
 1436% ecnet/Diving.e:435
 1437% [diver,time]% 
 1438% Happens(SwimAround(diver),time) ->
 1439% HoldsAt(HorizontalDown(diver),time).
 1440 /*
 1441happens(swimAround(Diver), Time) ->
 1442    holds_at(horizontalDown(Diver), Time).
 1443*/
 1444.
 1445
 1446% 
 1447% 
 1448%; signaling
 1449% 
 1450% ecnet/Diving.e:441
 1451% event SignalDescend(diver,diver)
 1452 /*
 1453.
 1454*/
 1455.
 1456
 1457% 
 1458% event SignalOutOfTime(diver,diver)
 1459 /*
 1460.
 1461*/
 1462.
 1463
 1464% 
 1465% event SignalAscend(diver,diver)
 1466 /*
 1467.
 1468*/
 1469.
 1470
 1471% 
 1472%;[diver1,diver2,time]
 1473%;Happens(SignalAscend(diver1,diver2),time) ->
 1474%;Happens(SignalOutOfTime(diver1,diver2),time-1).
 1475% ecnet/Diving.e:450
 1476% 
 1477%;[diver1,diver2,time]
 1478%;Happens(SignalDescend(diver1,diver2),time) ->
 1479%;HoldsAt(See(diver1,diver2),time) &
 1480%;HoldsAt(See(diver2,diver1),time).
 1481% 
 1482%;[diver1,diver2,time]
 1483%;Happens(SignalOutOfTime(diver1,diver2),time) ->
 1484%;HoldsAt(See(diver1,diver2),time) &
 1485%;HoldsAt(See(diver2,diver1),time).
 1486% ecnet/Diving.e:460
 1487% 
 1488%;[diver1,diver2,time]
 1489%;Happens(SignalAscend(diver1,diver2),time) ->
 1490%;HoldsAt(See(diver1,diver2),time) &
 1491%;HoldsAt(See(diver2,diver1),time).
 1492% 
 1493%;event LookAt(agent,object)
 1494% ecnet/Diving.e:467
 1495% 
 1496%;fluent See(agent,object)
 1497% 
 1498%;[agent,object,time]
 1499%;Initiates(LookAt(agent,object),See(agent,object),time).
 1500% 
 1501%;[agent,object1,object2,time]
 1502%;object1!=object2 ->
 1503%;Terminates(LookAt(agent,object1),
 1504%;           See(agent,object2),
 1505%;           time).
 1506% ecnet/Diving.e:478
 1507% 
 1508% event Descend1(diver)
 1509 /*
 1510.
 1511*/
 1512.
 1513
 1514% 
 1515% event Ascend1(diver)
 1516 /*
 1517.
 1518*/
 1519.
 1520
 1521% 
 1522%;[diver,object,time]
 1523%;Terminates(Descend1(diver),See(diver,object),time).
 1524% ecnet/Diving.e:485
 1525% 
 1526%;[diver,object,time]
 1527%;Terminates(Ascend1(diver),See(diver,object),time).
 1528% 
 1529%;[diver,object,time]
 1530%;Terminates(RotateYaw(diver),See(diver,object),time).
 1531% ecnet/Diving.e:491
 1532% 
 1533% event RapidAscendToSurface(diver)
 1534 /*
 1535.
 1536*/
 1537.
 1538
 1539% 
 1540% ecnet/Diving.e:494
 1541% [diver,time]% 
 1542% Happens(Descend1(diver),time) <->
 1543% ({depth} Happens(Descend(diver,depth),time)).
 1544 /*
 1545happens(descend1(Diver), Time) <->
 1546    exists([Depth], happens(descend(Diver, Depth), Time)).
 1547*/
 1548.
 1549.
 1550
 1551% 
 1552% 
 1553% ecnet/Diving.e:498
 1554% [diver,time]% 
 1555% Happens(Ascend1(diver),time) <->
 1556% ({depth} Happens(Ascend(diver,depth),time)).
 1557 /*
 1558happens(ascend1(Diver), Time) <->
 1559    exists([Depth], happens(ascend(Diver, Depth), Time)).
 1560*/
 1561.
 1562.
 1563
 1564% 
 1565% 
 1566% ecnet/Diving.e:502
 1567% [diver,time]% 
 1568% Happens(RapidAscendToSurface(diver),time) ->
 1569% Happens(Ascend(diver,0),time).
 1570 /*
 1571happens(rapidAscendToSurface(Diver), Time) ->
 1572    happens(ascend(Diver, 0), Time).
 1573*/
 1574.
 1575
 1576% 
 1577% 
 1578% event AscendLine(diver,line)
 1579 /*
 1580.
 1581*/
 1582.
 1583
 1584% 
 1585% ecnet/Diving.e:508
 1586% [diver,line,time]% 
 1587% Happens(AscendLine(diver,line),time) ->
 1588% Happens(Ascend1(diver),time).
 1589 /*
 1590happens(ascendLine(Diver, Line), Time) ->
 1591    happens(ascend1(Diver), Time).
 1592*/
 1593.
 1594
 1595% 
 1596% 
 1597% fluent Disoriented(diver)
 1598 /*
 1599.
 1600*/
 1601.
 1602
 1603% 
 1604% ecnet/Diving.e:514
 1605% event BecomeDisoriented(diver)
 1606 /*
 1607.
 1608*/
 1609.
 1610
 1611% 
 1612% event BecomeReoriented(diver)
 1613 /*
 1614.
 1615*/
 1616.
 1617
 1618% 
 1619% ecnet/Diving.e:518
 1620% [diver,time]% 
 1621% Initiates(BecomeDisoriented(diver),Disoriented(diver),time).
 1622 /*
 1623.
 1624*/
 1625.
 1626
 1627% 
 1628% 
 1629% ecnet/Diving.e:521
 1630% [diver,time]% 
 1631% Terminates(BecomeReoriented(diver),Disoriented(diver),time).
 1632 /*
 1633.
 1634*/
 1635.
 1636
 1637% 
 1638% 
 1639% fluent DisturbedSilt()
 1640 /*
 1641.
 1642*/
 1643.
 1644
 1645% 
 1646% event DisturbSilt(diver)
 1647 /*
 1648.
 1649*/
 1650.
 1651
 1652% ecnet/Diving.e:527
 1653% 
 1654% ecnet/Diving.e:528
 1655% [diver,time]% 
 1656% Initiates(DisturbSilt(diver),DisturbedSilt(),time).
 1657 /*
 1658.
 1659*/
 1660.
 1661
 1662% 
 1663% 
 1664% ecnet/Diving.e:531
 1665% [diver,time]% 
 1666% Happens(BecomeDisoriented(diver),time) ->
 1667% (!HoldsAt(DisturbedSilt(),time-1) &
 1668%  HoldsAt(DisturbedSilt(),time)).
 1669 /*
 1670happens(becomeDisoriented(Diver), Time) ->
 1671    not(holds_at(disturbedSilt(), Time-1)),
 1672    holds_at(disturbedSilt(), Time).
 1673*/
 1674.
 1675
 1676% 
 1677% 
 1678% event Panic(diver)
 1679 /*
 1680.
 1681*/
 1682.
 1683
 1684% ecnet/Diving.e:537
 1685% 
 1686% ecnet/Diving.e:538
 1687% [diver,time] % Happens(Panic(diver),time) ->
 1688% HoldsAt(Disoriented(diver),time) |
 1689% HoldsAt(UncontrolledBuoyancy(diver),time) |
 1690% ({equipment} Happens(Lose(diver,equipment),time-1)) |
 1691% Happens(Vomit(diver),time-1).
 1692 /*
 1693(   ( happens(panic(Diver), Time)->holds_at(disoriented(Diver), Time)
 1694    )
 1695;   holds_at(uncontrolledBuoyancy(Diver), Time)
 1696;   exists([Equipment],
 1697           happens(lose(Diver, Equipment), Time-1))
 1698;   happens(vomit(Diver), Time-1)
 1699).
 1700*/
 1701.
 1702
 1703% 
 1704% 
 1705% ecnet/Diving.e:544
 1706% event Vomit(diver)
 1707 /*
 1708.
 1709*/
 1710.
 1711
 1712% 
 1713%; conditions
 1714% 
 1715% fluent Unconscious(diver)
 1716 /*
 1717.
 1718*/
 1719.
 1720
 1721% 
 1722% ecnet/Diving.e:550
 1723% event GoUnconscious(diver)
 1724 /*
 1725.
 1726*/
 1727.
 1728
 1729% 
 1730% event RegainConsciousness(diver)
 1731 /*
 1732.
 1733*/
 1734.
 1735
 1736% 
 1737% ecnet/Diving.e:554
 1738% [diver,time]% 
 1739% Initiates(GoUnconscious(diver),Unconscious(diver),time).
 1740 /*
 1741.
 1742*/
 1743.
 1744
 1745% 
 1746% 
 1747% ecnet/Diving.e:557
 1748% [diver,time]% 
 1749% Terminates(RegainConsciousness(diver),Unconscious(diver),time).
 1750 /*
 1751.
 1752*/
 1753.
 1754
 1755% 
 1756% 
 1757% ecnet/Diving.e:560
 1758% [diver,time]% 
 1759% Happens(GoUnconscious(diver),time) ->
 1760% Happens(RapidAscendToSurface(diver),time).
 1761 /*
 1762happens(goUnconscious(Diver), Time) ->
 1763    happens(rapidAscendToSurface(Diver), Time).
 1764*/
 1765.
 1766
 1767% 
 1768% 
 1769% fluent HasEarPain(diver)
 1770 /*
 1771.
 1772*/
 1773.
 1774
 1775% 
 1776% ecnet/Diving.e:566
 1777% event StartEarPain(diver)
 1778 /*
 1779.
 1780*/
 1781.
 1782
 1783% 
 1784% ecnet/Diving.e:568
 1785% [diver,time] % Initiates(StartEarPain(diver),HasEarPain(diver),time).
 1786 /*
 1787.
 1788*/
 1789.
 1790
 1791% 
 1792% 
 1793% fluent HasRupturedEardrum(diver)
 1794 /*
 1795.
 1796*/
 1797.
 1798
 1799% 
 1800% event RuptureEardrum(diver)
 1801 /*
 1802.
 1803*/
 1804.
 1805
 1806% 
 1807% ecnet/Diving.e:574
 1808% [diver,time]% 
 1809% Initiates(RuptureEardrum(diver),HasRupturedEardrum(diver),time).
 1810 /*
 1811.
 1812*/
 1813.
 1814
 1815% 
 1816% fluent ConditionOK(diver)
 1817 /*
 1818.
 1819*/
 1820.
 1821
 1822% 
 1823% fluent HasDecompressionIllness(diver)
 1824 /*
 1825.
 1826*/
 1827.
 1828
 1829% 
 1830% ecnet/Diving.e:580
 1831% event StartDecompressionIllness(diver)
 1832 /*
 1833.
 1834*/
 1835.
 1836
 1837% 
 1838% ecnet/Diving.e:582
 1839% [diver,time]% 
 1840% Initiates(StartDecompressionIllness(diver),
 1841%           HasDecompressionIllness(diver),
 1842%           time).
 1843 /*
 1844.
 1845*/
 1846.
 1847
 1848% 
 1849% 
 1850% fluent SignalingDecompress(computer,diver)
 1851 /*
 1852.
 1853*/
 1854.
 1855
 1856% ecnet/Diving.e:588
 1857% 
 1858% fluent SignalingLowOnAir(computer,airtank,diver)
 1859 /*
 1860.
 1861*/
 1862.
 1863
 1864% 
 1865% ecnet/Diving.e:591
 1866% [computer,airtank,diver,time]% 
 1867% HoldsAt(SignalingLowOnAir(computer,airtank,diver),time) ->
 1868% HoldsAt(LowOnAir(airtank),time).
 1869 /*
 1870holds_at(signalingLowOnAir(Computer, Airtank, Diver), Time) ->
 1871    holds_at(lowOnAir(Airtank), Time).
 1872*/
 1873.
 1874
 1875% 
 1876% 
 1877% ecnet/Diving.e:595
 1878% [computer,diver,time]% 
 1879% HoldsAt(SignalingDecompress(computer,diver),time) ->
 1880% !{time1} time1<time & Happens(Decompress(diver),time1).
 1881 /*
 1882holds_at(signalingDecompress(Computer, Diver), Time) ->
 1883    not(exists([Time1],
 1884                (Time1<Time, happens(decompress(Diver), Time1)))).
 1885*/
 1886.
 1887
 1888% 
 1889% 
 1890% event Decompress(diver)
 1891 /*
 1892.
 1893*/
 1894.
 1895
 1896% 
 1897% ecnet/Diving.e:601
 1898% event EqualizeEars(diver)
 1899 /*
 1900.
 1901*/
 1902.
 1903
 1904% 
 1905% ecnet/Diving.e:603
 1906% [diver,time]% 
 1907% (Happens(Descend1(diver),time) | Happens(Ascend1(diver),time)) &
 1908% !Happens(EqualizeEars(diver),time) ->
 1909% Happens(StartEarPain(diver),time) &
 1910% Happens(RuptureEardrum(diver),time).
 1911 /*
 1912(happens(descend1(Diver), Time);happens(ascend1(Diver), Time)), not(happens(equalizeEars(Diver), Time)) ->
 1913    happens(startEarPain(Diver), Time),
 1914    happens(ruptureEardrum(Diver), Time).
 1915*/
 1916.
 1917
 1918% 
 1919% 
 1920% ecnet/Diving.e:609
 1921% [diver,time]% 
 1922% Happens(Ascend1(diver),time) &
 1923% !Happens(Decompress(diver),time) ->
 1924% Happens(StartDecompressionIllness(diver),time).
 1925 /*
 1926happens(ascend1(Diver), Time), not(happens(decompress(Diver), Time)) ->
 1927    happens(startDecompressionIllness(Diver), Time).
 1928*/
 1929.
 1930
 1931% 
 1932% 
 1933% ecnet/Diving.e:614
 1934% [diver1,diver2,time]% 
 1935% HoldsAt(Holding(diver1,diver2),time) &
 1936% Happens(Ascend1(diver1),time) &
 1937% !Happens(Decompress(diver2),time) ->
 1938% Happens(StartDecompressionIllness(diver2),time).
 1939 /*
 1940holds_at(holding(Diver1, Diver2), Time), happens(ascend1(Diver1), Time), not(happens(decompress(Diver2), Time)) ->
 1941    happens(startDecompressionIllness(Diver2), Time).
 1942*/
 1943.
 1944
 1945% 
 1946% 
 1947% ecnet/Diving.e:620
 1948% [diver,time]% 
 1949% Happens(Decompress(diver),time) ->
 1950% ({depth} depth>0 & HoldsAt(AtDepth(diver,depth),time)) &
 1951% !HoldsAt(UncontrolledBuoyancy(diver),time).
 1952 /*
 1953happens(decompress(Diver), Time) ->
 1954    exists([Depth],
 1955            (Depth>0, holds_at(atDepth(Diver, Depth), Time))),
 1956    not(holds_at(uncontrolledBuoyancy(Diver), Time)).
 1957*/
 1958.
 1959
 1960% 
 1961% 
 1962% fluent HasHeadache(diver)
 1963 /*
 1964.
 1965*/
 1966.
 1967
 1968% ecnet/Diving.e:626
 1969% 
 1970% ecnet/Diving.e:627
 1971% [diver,time]% 
 1972% HoldsAt(ConditionOK(diver),time) ->
 1973% !HoldsAt(Unconscious(diver),time) &
 1974% !HoldsAt(HasEarPain(diver),time) &
 1975% !HoldsAt(HasRupturedEardrum(diver),time) &
 1976% !HoldsAt(HasDecompressionIllness(diver),time) &
 1977% !HoldsAt(HasHeadache(diver),time).
 1978 /*
 1979holds_at(conditionOK(Diver), Time) ->
 1980    not(holds_at(unconscious(Diver), Time)),
 1981    not(holds_at(hasEarPain(Diver), Time)),
 1982    not(holds_at(hasRupturedEardrum(Diver), Time)),
 1983    not(holds_at(hasDecompressionIllness(Diver), Time)),
 1984    not(holds_at(hasHeadache(Diver), Time)).
 1985*/
 1986.
 1987
 1988% ecnet/Diving.e:633
 1989% 
 1990% 
 1991% event BeAirlifted(diver)
 1992 /*
 1993.
 1994*/
 1995.
 1996
 1997% 
 1998% event TakeInWater(diver)
 1999 /*
 2000.
 2001*/
 2002.
 2003
 2004% 
 2005% ecnet/Diving.e:639
 2006% fluent LowOnAir(airtank)
 2007 /*
 2008.
 2009*/
 2010.
 2011
 2012% 
 2013% event BecomeLowOnAir(airtank)
 2014 /*
 2015.
 2016*/
 2017.
 2018
 2019% 
 2020% ecnet/Diving.e:643
 2021% [airtank,time]% 
 2022% Initiates(BecomeLowOnAir(airtank),LowOnAir(airtank),time).
 2023 /*
 2024.
 2025*/
 2026.
 2027
 2028% 
 2029% 
 2030%; initial state
 2031% ecnet/Diving.e:647
 2032% [diver] % HoldsAt(ConditionOK(diver),0).
 2033 /*
 2034.
 2035*/
 2036.
 2037
 2038% 
 2039% ecnet/Diving.e:648
 2040% [diver] % HoldsAt(Vertical(diver),0).
 2041 /*
 2042.
 2043*/
 2044.
 2045
 2046% 
 2047% !HoldsAt(DisturbedSilt(),0).
 2048 /*
 2049.
 2050*/
 2051.
 2052
 2053% 
 2054% ecnet/Diving.e:650
 2055% [diver] % !HoldsAt(UncontrolledBuoyancy(diver),0).
 2056 /*
 2057.
 2058*/
 2059.
 2060
 2061% 
 2062% ecnet/Diving.e:651
 2063% [diver] % !HoldsAt(Disoriented(diver),0).
 2064 /*
 2065.
 2066*/
 2067.
 2068
 2069% 
 2070% ecnet/Diving.e:652
 2071% [diver] % !HoldsAt(PositivelyBuoyant(diver),0) &
 2072%         !HoldsAt(NeutrallyBuoyant(diver),0) &
 2073%         !HoldsAt(NegativelyBuoyant(diver),0).
 2074 /*
 2075.
 2076*/
 2077.
 2078
 2079% 
 2080% ecnet/Diving.e:655
 2081% [diver,object] % !HoldsAt(Wearing(diver,object),0).
 2082 /*
 2083.
 2084*/
 2085.
 2086
 2087% 
 2088% ecnet/Diving.e:656
 2089% [diver,object] % !HoldsAt(Holding(diver,object),0).
 2090 /*
 2091.
 2092*/
 2093.
 2094
 2095% 
 2096% ecnet/Diving.e:657
 2097% [diver1,diver2] % !HoldsAt(Separated(diver1,diver2),0).
 2098 /*
 2099.
 2100*/
 2101.
 2102
 2103% 
 2104%;[agent,object] !HoldsAt(See(agent,object),0).
 2105% 
 2106% fluent Separated(diver,diver)
 2107 /*
 2108.
 2109*/
 2110.
 2111
 2112% 
 2113% ecnet/Diving.e:662
 2114% [diver1,diver2,time]% 
 2115% HoldsAt(Separated(diver1,diver2),time) ->
 2116% HoldsAt(Separated(diver2,diver1),time).
 2117 /*
 2118holds_at(separated(Diver1, Diver2), Time) ->
 2119    holds_at(separated(Diver2, Diver1), Time).
 2120*/
 2121.
 2122
 2123% 
 2124% 
 2125% event BecomeSeparated(diver,diver)
 2126 /*
 2127.
 2128*/
 2129.
 2130
 2131% 
 2132% ecnet/Diving.e:668
 2133% event BeReunitedWith(diver,diver)
 2134 /*
 2135.
 2136*/
 2137.
 2138
 2139% 
 2140% ecnet/Diving.e:670
 2141% [diver1,diver2,time]% 
 2142% Initiates(BecomeSeparated(diver1,diver2),Separated(diver1,diver2),time).
 2143 /*
 2144.
 2145*/
 2146.
 2147
 2148% 
 2149% 
 2150% ecnet/Diving.e:673
 2151% [diver1,diver2,time]% 
 2152% Initiates(BecomeSeparated(diver1,diver2),Separated(diver2,diver1),time).
 2153 /*
 2154.
 2155*/
 2156.
 2157
 2158% 
 2159% 
 2160% ecnet/Diving.e:676
 2161% [diver1,diver2,time]% 
 2162% Terminates(BeReunitedWith(diver1,diver2),Separated(diver1,diver2),time).
 2163 /*
 2164.
 2165*/
 2166.
 2167
 2168% 
 2169% 
 2170% ecnet/Diving.e:679
 2171% [diver1,diver2,time]% 
 2172% Terminates(BeReunitedWith(diver1,diver2),Separated(diver2,diver1),time).
 2173 /*
 2174.
 2175*/
 2176.
 2177
 2178% 
 2179% 
 2180%; End of file.