<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<org.eventb.core.machineFile org.eventb.core.comment="introduce request and response mechanism bw atm and bank for balance transfer" org.eventb.core.configuration="org.eventb.core.fwd" org.eventb.texttools.text_lastmodified="1293644724661" org.eventb.texttools.text_representation="machine BalTransfer_2 // introduce request and response mechanism bw atm and bank for balance transfer&#10; refines BalTransfer_1  sees BalTransfer_CO1&#10;&#10;variables account bal  atm reqTransfer&#10;&#9;&#9;   transferOk transferFail cardInAtm respTransferOk respTransferFail srcAccBalAtm destAccBalAtm trAmount transOkAtm srcAcc destAcc atmCard&#10;&#10;invariants&#10;  @inv2 cardInAtm ∈ atm → CARD&#10;  @inv3 reqTransfer ∈ ℙ(atm)&#10;  @inv6 respTransferOk ∈ ℙ(atm)&#10;  @inv7 respTransferFail ∈ ℙ(atm)&#10;  @inv8 trAmount ∈ atm ⇸ ℕ1&#10;  @inv9 srcAccBalAtm ∈ account ⇸ ℕ&#10;  @inv10 destAccBalAtm ∈ account ⇸ ℕ&#10;  @inv11 transOkAtm ∈ atm ⇸ BOOL&#10;  @inv12 srcAcc ∈ atm → account&#10;  @inv13 destAcc ∈ atm → account&#10;  @inv14 atmCard ∈ atm →  CARD&#10;  @inv15 transferOk ⊆transferOkA&#10;  @inv16 transferFail ⊆transferFailA&#10;events&#10;  event INITIALISATION&#10;    then&#10;      @act1 account ≔ ∅&#10;      @act4 bal ≔ ∅&#10;      @act8 atm ≔ ∅&#10;      @act9 cardInAtm ≔ ∅&#10;      @act13 reqTransfer ≔ ∅&#10;      @act14 transferOk ≔ ∅&#10;      @act15 transferFail ≔ ∅&#10;      @act16 respTransferOk ≔ ∅&#10;      @act17 respTransferFail ≔ ∅&#10;      @act18 trAmount ≔ ∅&#10;      @act19 srcAccBalAtm ≔ ∅&#10;      @act20 destAccBalAtm ≔ ∅&#10;      @act21 transOkAtm ≔ ∅&#10;      @act22 srcAcc ≔ ∅&#10;      @act23 destAcc ≔ ∅&#10;      @act24 atmCard ≔ ∅&#10;&#10;  end&#10;&#10;  event ReqTransfer //event for ATM&#10;    any c src_ac dest_ac am a&#10;    where&#10;      @grd1 src_ac ∈ account&#10;      @grd2 dest_ac ∈ account&#10;      @grd3 am ∈ ℕ1&#10;      @grd5 src_ac ≠ dest_ac&#10;      @grd7 a ↦ c ∈ cardInAtm&#10;      @grd8 a ∈ atm&#10;      @grd9 a ∉ reqTransfer&#10;    then&#10;      @act1 reqTransfer ≔  reqTransfer ∪ {a}&#10;      @act2 trAmount(a) ≔ am&#10;      @act3 srcAcc(a) ≔ src_ac&#10;      @act4 destAcc(a) ≔ dest_ac&#10;      @act5 atmCard(a) ≔ c&#10;&#10;  end&#10;&#10;  event TransferOK //event for Bank&#10;  &#9;refines transferOK&#10;    any c src_ac dest_ac am a&#10;    where&#10;      @grd10 a ∈ atm&#10;      @grd9 a ∈ dom(trAmount)&#10;      @grd1 src_ac = srcAcc(a)&#10;      @grd2 dest_ac = destAcc(a)&#10;      @grd3 am = trAmount(a)&#10;      @grd4 am &lt; bal(src_ac)&#10;      @grd5 src_ac ≠ dest_ac&#10;      @grd7 c = atmCard(a)&#10;      @grd8 a ∈ reqTransfer&#10;      @grd11 a ∉ transferFail&#10;      @grd12 a ∉ transferOk&#10;    then&#10;      @act1 bal ≔  bal  {dest_ac ↦ (bal(dest_ac) + am), src_ac ↦(bal(src_ac) − am)}&#10;      @act5 transferOk ≔ transferOk ∪ {a}&#10;  end&#10;&#10;  event RespTransferOk&#10;    any a&#10;    where&#10;      @grd2 a ∈ transferOk&#10;    then&#10;      @act1 respTransferOk ≔  respTransferOk ∪ {a}&#10;      @act2 transferOk ≔  transferOk ∖ {a}&#10;      @act4 reqTransfer ≔ reqTransfer ∖ {a}&#10;  end&#10;&#10;  event TransferFails refines transferFails&#10;    any c src_ac dest_ac am a&#10;    where&#10;      @grd7 a ∈ atm&#10;      @grd9 a ∈ dom(trAmount)&#10;      @grd1 src_ac = srcAcc(a)&#10;      @grd2 dest_ac = destAcc(a)&#10;      @grd3 am = trAmount(a)&#10;      @grd4 am &gt; bal(src_ac)&#10;      @grd5 src_ac ≠ dest_ac&#10;      @grd6 c = atmCard(a)&#10;      @grd8 a ∈ reqTransfer&#10;      @grd11 a ∉ transferFail&#10;      @grd12 a ∉ transferOk&#10;    then&#10;      @act2 transferFail ≔  transferFail ∪ {a}&#10;  end&#10;&#10;  event RespTransferFail&#10;    any a&#10;    where&#10;      @grd2 a ∈ transferFail&#10;    then&#10;      @act1 respTransferFail ≔  respTransferFail ∪ {a}&#10;      @act2 transferFail ≔  transferFail ∖ {a}&#10;      @act4 reqTransfer ≔ reqTransfer ∖ {a}&#10;  end&#10;&#10;  event TransferOKAtm&#10;    any a c&#10;    where&#10;      @grd7 a ↦ c ∈ cardInAtm&#10;      @grd8 a ∈ respTransferOk&#10;    then&#10;      @act1 transOkAtm(a) ≔  TRUE&#10;      @act5 respTransferOk ≔ respTransferOk ∖ {a}&#10;  end&#10;&#10;  event TransferFailsAtm&#10;    any a c&#10;    where&#10;      @grd7 a ↦ c ∈ cardInAtm&#10;      @grd8 a ∈ respTransferFail&#10;    then&#10;      @act1 transOkAtm(a) ≔  FALSE&#10;      @act5 respTransferFail ≔ respTransferFail ∖ {a}&#10;  end&#10;end&#10;" version="5">
<org.eventb.core.refinesMachine name="_CQcy0BNrEeCky5OpqeHuBQ" org.eventb.core.target="BalTransfer_1"/>
<org.eventb.core.seesContext name="_CQcy0RNrEeCky5OpqeHuBQ" org.eventb.core.target="BalTransfer_CO1"/>
<org.eventb.core.variable ch.ethz.eventb.decomposition.nature="1" name="'" org.eventb.core.comment="Shared variable, DO NOT REFINE" org.eventb.core.identifier="bal"/>
<org.eventb.core.variable ch.ethz.eventb.decomposition.nature="1" name="(" org.eventb.core.comment="Shared variable, DO NOT REFINE" org.eventb.core.identifier="validCard"/>
<org.eventb.core.variable ch.ethz.eventb.decomposition.nature="1" name=")" org.eventb.core.comment="Shared variable, DO NOT REFINE" org.eventb.core.identifier="cardAcct"/>
<org.eventb.core.variable name="_4qqxEfifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="reqTransfer"/>
<org.eventb.core.variable name="_js68ARHeEeCTtdCvWk2qEg" org.eventb.core.identifier="transferOk"/>
<org.eventb.core.variable name="_js68ABHeEeCTtdCvWk2qEg" org.eventb.core.identifier="transferFail"/>
<org.eventb.core.variable name="_s5x-k-wKEd-V6twkc9HfSw" org.eventb.core.identifier="cardInAtm"/>
<org.eventb.core.variable name="_4qrYIfifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="respTransferOk"/>
<org.eventb.core.variable name="_4qr_MPifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="respTransferFail"/>
<org.eventb.core.variable name="_4qr_MfifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="srcAccBalAtm"/>
<org.eventb.core.variable name="_4qr_MvifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="destAccBalAtm"/>
<org.eventb.core.variable name="_4qsmQPifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="trAmount"/>
<org.eventb.core.variable name="_gQ_hEAZAEeC9GJs-VyssYw" org.eventb.core.identifier="transOkAtm"/>
<org.eventb.core.variable name="_-x2qcIUfEd-Yw_1iUmuWTQ" org.eventb.core.identifier="srcAcc"/>
<org.eventb.core.variable name="_CQdZ4BNrEeCky5OpqeHuBQ" org.eventb.core.identifier="destAcc"/>
<org.eventb.core.event name="'" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="INITIALISATION">
<org.eventb.core.action name="'" org.eventb.core.assignment="bal ≔ ∅" org.eventb.core.label="act1"/>
<org.eventb.core.action name="(" org.eventb.core.assignment="cardAcct ≔ ∅" org.eventb.core.label="act2"/>
<org.eventb.core.action name=")" org.eventb.core.assignment="validCard ≔ ∅" org.eventb.core.label="act4"/>
<org.eventb.core.action name="_ZZUNYRFeEeCibs8Q1rasEB" org.eventb.core.assignment="cardInAtm ≔ ∅" org.eventb.core.label="act7"/>
<org.eventb.core.action name="_4q1JIfifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="reqTransfer ≔ ∅" org.eventb.core.label="act13"/>
<org.eventb.core.action name="_4q1wMPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="transferOk ≔ ∅" org.eventb.core.label="act14"/>
<org.eventb.core.action name="_4q2XQPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="transferFail ≔ ∅" org.eventb.core.label="act15"/>
<org.eventb.core.action name="_4q2XQfifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="respTransferOk ≔ ∅" org.eventb.core.label="act16"/>
<org.eventb.core.action name="_4q2-UPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="respTransferFail ≔ ∅" org.eventb.core.label="act17"/>
<org.eventb.core.action name="_4q2-UfifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="trAmount ≔ ∅" org.eventb.core.label="act18"/>
<org.eventb.core.action name="_4q3lYPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="srcAccBalAtm ≔ ∅" org.eventb.core.label="act19"/>
<org.eventb.core.action name="_4q4McPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="destAccBalAtm ≔ ∅" org.eventb.core.label="act20"/>
<org.eventb.core.action name="_gRMVYAZAEeC9GJs-VyssYw" org.eventb.core.assignment="transOkAtm ≔ ∅" org.eventb.core.label="act21"/>
<org.eventb.core.action name="_-x4foIUfEd-Yw_1iUmuWTQ" org.eventb.core.assignment="srcAcc ≔ ∅" org.eventb.core.label="act22"/>
<org.eventb.core.action name="_CQgdMBNrEeCky5OpqeHuBQ" org.eventb.core.assignment="destAcc ≔ ∅" org.eventb.core.label="act23"/>
<org.eventb.core.action name="_gRMVYAZAEeC9GJs-VyssYx" org.eventb.core.assignment="trans ≔ ∅" org.eventb.core.label="act24"/>
</org.eventb.core.event>
<org.eventb.core.event name="_4q4McfifEd-KyJ1Ywzx_fQ" org.eventb.core.comment="event for ATM" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="ReqTransfer">
<org.eventb.core.parameter name="_4q4zgPifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="c"/>
<org.eventb.core.parameter name="_4q4zgfifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="src_ac"/>
<org.eventb.core.parameter name="_4q5akPifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="dest_ac"/>
<org.eventb.core.parameter name="_4q5akfifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="am"/>
<org.eventb.core.parameter name="_4q5akvifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="a"/>
<org.eventb.core.action name="_4q9sAPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="reqTransfer ≔  reqTransfer ∪ {a}" org.eventb.core.label="act1"/>
<org.eventb.core.action name="_CQhrUBNrEeCky5OpqeHuBQ" org.eventb.core.assignment="trAmount(a) ≔ am" org.eventb.core.label="act2"/>
<org.eventb.core.action name="_4q-TEPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="srcAcc(a) ≔ src_ac" org.eventb.core.label="act3"/>
<org.eventb.core.action name="_CQhrURNrEeCky5OpqeHuBQ" org.eventb.core.assignment="destAcc(a) ≔ dest_ac" org.eventb.core.comment="" org.eventb.core.label="act4"/>
<org.eventb.core.guard name="_4q6BofifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd1" org.eventb.core.predicate="src_ac ∈ ACCOUNT"/>
<org.eventb.core.guard name="_4q6osPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd2" org.eventb.core.predicate="dest_ac ∈ ACCOUNT"/>
<org.eventb.core.guard name="_CQhrURNrEeCky5OpqeHuBR" org.eventb.core.label="grd3" org.eventb.core.predicate="c ∈ validCard"/>
<org.eventb.core.guard name="_4q7PwPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd5" org.eventb.core.predicate="am ∈ ℕ1"/>
<org.eventb.core.guard name="_4q7PwfifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd6" org.eventb.core.predicate="src_ac ≠ dest_ac"/>
<org.eventb.core.guard name="_CQhrURNrEeCky5OpqeHuBT" org.eventb.core.label="grd8" org.eventb.core.predicate="a ∈ dom(cardInAtm)"/>
<org.eventb.core.guard name="_4q8d4PifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd9" org.eventb.core.predicate="c = cardInAtm(a)"/>
<org.eventb.core.guard name="_4q9E8PifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd10" org.eventb.core.predicate="a ∉ trans"/>
<org.eventb.core.action name="_CQhrURNrEeCky5OpqeHuBU" org.eventb.core.assignment="trans ≔ trans ∪ {a}" org.eventb.core.label="act5"/>
</org.eventb.core.event>
<org.eventb.core.event name="_-x4foYUfEd-Yw_1iUmuWTQ" org.eventb.core.comment="event for Bank" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="TransferOK">
<org.eventb.core.refinesEvent name="_CQhrUxNrEeCky5OpqeHuBQ" org.eventb.core.target="transferOK"/>
<org.eventb.core.parameter name="'" org.eventb.core.identifier="src_ac"/>
<org.eventb.core.parameter name="(" org.eventb.core.identifier="dest_ac"/>
<org.eventb.core.parameter name=")" org.eventb.core.identifier="am"/>
<org.eventb.core.parameter name="*" org.eventb.core.identifier="c"/>
<org.eventb.core.guard name="+" org.eventb.core.label="grd1" org.eventb.core.predicate="src_ac ∈ ACCOUNT"/>
<org.eventb.core.guard name="," org.eventb.core.label="grd2" org.eventb.core.predicate="dest_ac ∈ ACCOUNT"/>
<org.eventb.core.guard name="." org.eventb.core.label="grd4" org.eventb.core.predicate="c ↦ src_ac ∈ cardAcct"/>
<org.eventb.core.guard name="/" org.eventb.core.label="grd5" org.eventb.core.predicate="am ∈ ℕ1"/>
<org.eventb.core.guard name="0" org.eventb.core.label="grd6" org.eventb.core.predicate="src_ac ∈ dom(bal)"/>
<org.eventb.core.guard name="1" org.eventb.core.label="grd7" org.eventb.core.predicate="dest_ac ∈ dom(bal)"/>
<org.eventb.core.guard name="2" org.eventb.core.label="grd8" org.eventb.core.predicate="src_ac ≠ dest_ac"/>
<org.eventb.core.guard name="3" org.eventb.core.label="grd9" org.eventb.core.predicate="am ≤ bal(src_ac)"/>
<org.eventb.core.action name="4" org.eventb.core.assignment="bal ≔  bal  {dest_ac ↦ (bal(dest_ac) + am), src_ac ↦(bal(src_ac) − am)}" org.eventb.core.label="act1"/>
<org.eventb.core.parameter name="_s57vlOwKEd-V6twkc9HfSw" org.eventb.core.identifier="a"/>
<org.eventb.core.guard name="_s6E5gOwKEd-V6twkc9HfSx" org.eventb.core.label="grd11" org.eventb.core.predicate="a ∈ dom(cardInAtm)"/>
<org.eventb.core.guard name="_s6E5gOwKEd-V6twkc9HfSy" org.eventb.core.label="grd12" org.eventb.core.predicate="c = cardInAtm(a)"/>
<org.eventb.core.action name="_4rGO4PifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="transferOk ≔ transferOk ∪ {a}" org.eventb.core.label="act5"/>
<org.eventb.core.guard name="_B_jx8PiiEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd13" org.eventb.core.predicate="a ∈ dom(trAmount)"/>
<org.eventb.core.guard name="_s6E5gOwKEd-V6twkc9HfSz" org.eventb.core.label="grd20" org.eventb.core.predicate="a ∈ dom(srcAcc)"/>
<org.eventb.core.guard name="_s6E5gOwKEd-V6twkc9HfS{" org.eventb.core.label="grd21" org.eventb.core.predicate="a ∈ dom(destAcc)"/>
<org.eventb.core.guard name="_-x5twIUfEd-Yw_1iUmuWTQ" org.eventb.core.label="grd14" org.eventb.core.predicate="src_ac = srcAcc(a)"/>
<org.eventb.core.guard name="_-x6U0IUfEd-Yw_1iUmuWTQ" org.eventb.core.label="grd15" org.eventb.core.predicate="dest_ac = destAcc(a)"/>
<org.eventb.core.guard name="_UgauENxTEd-xDIzZgjow2w" org.eventb.core.label="grd16" org.eventb.core.predicate="am = trAmount(a)"/>
<org.eventb.core.guard name="_4rDyoPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd17" org.eventb.core.predicate="a ∈ reqTransfer"/>
<org.eventb.core.guard name="_fWsvIAZYEeC9GJs-VyssYw" org.eventb.core.comment="a ∉ transferFail" org.eventb.core.label="grd18" org.eventb.core.predicate="⊤ "/>
<org.eventb.core.guard name="_cFAi4A0REeCDh_sKUTn4vw" org.eventb.core.comment="a ∉ transferOk" org.eventb.core.label="grd19" org.eventb.core.predicate="⊤ "/>
<org.eventb.core.action name="_s6E5gOwKEd-V6twkc9HfS|" org.eventb.core.assignment="reqTransfer ≔ reqTransfer ∖ {a}" org.eventb.core.label="act6"/>
</org.eventb.core.event>
<org.eventb.core.event name="_4rG18PifEd-KyJ1Ywzx_fQ" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="RespTransferOk">
<org.eventb.core.parameter name="_4rG18fifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="a"/>
<org.eventb.core.guard name="_4rHdAfifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd2" org.eventb.core.predicate="a ∈ transferOk"/>
<org.eventb.core.action name="_4rIEEPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="respTransferOk ≔  respTransferOk ∪ {a}" org.eventb.core.label="act1"/>
<org.eventb.core.action name="_4rIrIPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="transferOk ≔  transferOk ∖ {a}" org.eventb.core.label="act2"/>
<org.eventb.core.guard name="_fWvycAZYEeC9GJs-VyssYx" org.eventb.core.label="grd3" org.eventb.core.predicate="a ∉ transferFail"/>
</org.eventb.core.event>
<org.eventb.core.event name="_eHjV0uwJEd-V6twkc9HfSw" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="TransferFails">
<org.eventb.core.refinesEvent name="_CQkHkBNrEeCky5OpqeHuBQ" org.eventb.core.target="transferFails"/>
<org.eventb.core.parameter name="_eHjV1OwJEd-V6twkc9HfSw" org.eventb.core.identifier="src_ac"/>
<org.eventb.core.parameter name="_eHjV1ewJEd-V6twkc9HfSw" org.eventb.core.identifier="dest_ac"/>
<org.eventb.core.parameter name="_eHjV1uwJEd-V6twkc9HfSw" org.eventb.core.identifier="am"/>
<org.eventb.core.guard name="internal1" org.eventb.core.label="grd1" org.eventb.core.predicate="src_ac ∈ ACCOUNT"/>
<org.eventb.core.guard name="internal2" org.eventb.core.label="grd2" org.eventb.core.predicate="dest_ac ∈ ACCOUNT"/>
<org.eventb.core.guard name="_eHjV2uwJEd-V6twkc9HfSw" org.eventb.core.label="grd5" org.eventb.core.predicate="am ∈ ℕ1"/>
<org.eventb.core.guard name="_s6E5guwKEd-V6twkc9HfS{" org.eventb.core.label="grd6" org.eventb.core.predicate="src_ac ∈ dom(bal)"/>
<org.eventb.core.guard name="_s6E5guwKEd-V6twkc9HfS|" org.eventb.core.label="grd7" org.eventb.core.predicate="dest_ac ∈ dom(bal)"/>
<org.eventb.core.guard name="_eHjV3OwJEd-V6twkc9HfSw" org.eventb.core.label="grd8" org.eventb.core.predicate="src_ac ≠ dest_ac"/>
<org.eventb.core.guard name="_eHjV2-wJEd-V6twkc9HfSw" org.eventb.core.label="grd9" org.eventb.core.predicate="am &gt; bal(src_ac) ∨ c ↦ src_ac ∉ cardAcct"/>
<org.eventb.core.parameter name="_s6E5guwKEd-V6twkc9HfSx" org.eventb.core.identifier="c"/>
<org.eventb.core.parameter name="_s6E5gewKEd-V6twkc9HfSw" org.eventb.core.identifier="a"/>
<org.eventb.core.action name="_jtGiMBHeEeCTtdCvWk2qEg" org.eventb.core.assignment="transferFail ≔  transferFail ∪ {a}" org.eventb.core.label="act2"/>
<org.eventb.core.guard name="_s6E5guwKEd-V6twkc9HfS}" org.eventb.core.label="grd11" org.eventb.core.predicate="a ∈ dom(cardInAtm)"/>
<org.eventb.core.guard name="_s6E5guwKEd-V6twkc9HfS~" org.eventb.core.label="grd12" org.eventb.core.predicate="c = cardInAtm(a)"/>
<org.eventb.core.guard name="_fW15EAZYEeC9GJs-VyssYw" org.eventb.core.label="grd13" org.eventb.core.predicate="a ∈ dom(trAmount)"/>
<org.eventb.core.guard name="_s6E5guwKEd-V6twkc9HfT(" org.eventb.core.label="grd21" org.eventb.core.predicate="a ∈ dom(destAcc)"/>
<org.eventb.core.guard name="_s6E5guwKEd-V6twkc9HfT'" org.eventb.core.label="grd20" org.eventb.core.predicate="a ∈ dom(srcAcc)"/>
<org.eventb.core.guard name="_eHjV2OwJEd-V6twkc9HfSw" org.eventb.core.label="grd14" org.eventb.core.predicate="src_ac = srcAcc(a)"/>
<org.eventb.core.guard name="_eHjV2ewJEd-V6twkc9HfSw" org.eventb.core.label="grd15" org.eventb.core.predicate="dest_ac = destAcc(a)"/>
<org.eventb.core.guard name="_fWzc0AZYEeC9GJs-VyssYw" org.eventb.core.label="grd16" org.eventb.core.predicate="am = trAmount(a)"/>
<org.eventb.core.guard name="_3G4fkAJiEeC3zaFk15pOHQ" org.eventb.core.label="grd17" org.eventb.core.predicate="a ∈ reqTransfer"/>
<org.eventb.core.guard name="_fW2gIAZYEeC9GJs-VyssYw" org.eventb.core.label="grd18" org.eventb.core.predicate="a ∉ transferFail"/>
<org.eventb.core.guard name="_CQkuoRNrEeCky5OpqeHuBQ" org.eventb.core.label="grd19" org.eventb.core.predicate="a ∉ transferOk"/>
<org.eventb.core.action name="_s6E5guwKEd-V6twkc9HfT)" org.eventb.core.assignment="reqTransfer ≔ reqTransfer ∖ {a}" org.eventb.core.label="act3"/>
</org.eventb.core.event>
<org.eventb.core.event name="_4rPY0PifEd-KyJ1Ywzx_fQ" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="RespTransferFail">
<org.eventb.core.parameter name="_4rP_4PifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="a"/>
<org.eventb.core.guard name="_4rQm8PifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd2" org.eventb.core.predicate="a ∈ transferFail"/>
<org.eventb.core.action name="_4rc0MPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="respTransferFail ≔  respTransferFail ∪ {a}" org.eventb.core.label="act1"/>
<org.eventb.core.action name="_4rdbQPifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="transferFail ≔  transferFail ∖ {a}" org.eventb.core.label="act2"/>
<org.eventb.core.guard name="_fW5jcAZYEeC9GJs-VyssYx" org.eventb.core.label="grd3" org.eventb.core.predicate="a ∉ transferOk"/>
</org.eventb.core.event>
<org.eventb.core.event name="_4rdbQfifEd-KyJ1Ywzx_fQ" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="TransferOKAtm">
<org.eventb.core.parameter name="_4repYfifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="a"/>
<org.eventb.core.guard name="_4rhssPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd8" org.eventb.core.predicate="a ∈ respTransferOk"/>
<org.eventb.core.action name="_gRnMIAZAEeC9GJs-VyssYw" org.eventb.core.assignment="transOkAtm(a) ≔  TRUE" org.eventb.core.label="act1"/>
<org.eventb.core.action name="_4ri60PifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="respTransferOk ≔ respTransferOk ∖ {a}" org.eventb.core.label="act5"/>
<org.eventb.core.guard name="_gRnMIAZAEeC9GJs-VyssYx" org.eventb.core.label="grd9" org.eventb.core.predicate="a ∉ respTransferFail"/>
<org.eventb.core.action name="_gRnMIAZAEeC9GJs-VyssYy" org.eventb.core.assignment="trans ≔ trans ∖ {a}" org.eventb.core.label="act6"/>
</org.eventb.core.event>
<org.eventb.core.event name="_4ri60fifEd-KyJ1Ywzx_fQ" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="TransferFailsAtm">
<org.eventb.core.parameter name="_4rkI8vifEd-KyJ1Ywzx_fQ" org.eventb.core.identifier="a"/>
<org.eventb.core.guard name="_4rnMQPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="grd8" org.eventb.core.predicate="a ∈ respTransferFail"/>
<org.eventb.core.action name="_eHtG0ewJEd-V6twkc9HfSw" org.eventb.core.assignment="transOkAtm(a) ≔  FALSE" org.eventb.core.label="act1"/>
<org.eventb.core.action name="_4roaYfifEd-KyJ1Ywzx_fQ" org.eventb.core.assignment="respTransferFail ≔ respTransferFail ∖ {a}" org.eventb.core.label="act5"/>
<org.eventb.core.guard name="_eHtG0ewJEd-V6twkc9HfSx" org.eventb.core.label="grd9" org.eventb.core.predicate="a ∉ respTransferOk"/>
<org.eventb.core.action name="_eHtG0ewJEd-V6twkc9HfSy" org.eventb.core.assignment="trans ≔ trans ∖ {a}" org.eventb.core.label="act6"/>
</org.eventb.core.event>
<org.eventb.core.event ch.ethz.eventb.decomposition.external="true" name="2" org.eventb.core.comment="External event, DO NOT REFINE" org.eventb.core.convergence="0" org.eventb.core.extended="false" org.eventb.core.label="Deposit">
<org.eventb.core.refinesEvent name="0" org.eventb.core.target="Deposit"/>
<org.eventb.core.parameter name="1" org.eventb.core.identifier="acc"/>
<org.eventb.core.parameter name="2" org.eventb.core.identifier="am"/>
<org.eventb.core.parameter name="3" org.eventb.core.identifier="c"/>
<org.eventb.core.guard name="4" org.eventb.core.label="grd1" org.eventb.core.predicate="acc ∈ ACCOUNT"/>
<org.eventb.core.guard name="5" org.eventb.core.label="grd2" org.eventb.core.predicate="acc ∈ dom(bal)"/>
<org.eventb.core.guard name="6" org.eventb.core.label="grd3" org.eventb.core.predicate="am ∈ ℕ1"/>
<org.eventb.core.guard name="7" org.eventb.core.label="grd4" org.eventb.core.predicate="c ∈ validCard"/>
<org.eventb.core.guard name="8" org.eventb.core.label="grd5" org.eventb.core.predicate="c ↦ acc ∈ cardAcct"/>
<org.eventb.core.action name="9" org.eventb.core.assignment="bal(acc) ≔ bal(acc) + am" org.eventb.core.label="act1"/>
</org.eventb.core.event>
<org.eventb.core.variable name="_s5x-k-wKEd-V6twkc9HfSy" org.eventb.core.identifier="trans"/>
<org.eventb.core.invariant name="_s5x-k-wKEd-V6twkc9HfSz" org.eventb.core.label="inv1" org.eventb.core.predicate="trans ∈ ℙ(ATM)"/>
<org.eventb.core.invariant name="_4qt0YPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="inv3" org.eventb.core.predicate="reqTransfer ∈ ℙ(trans)"/>
<org.eventb.core.invariant name="_4qvCgPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="inv6" org.eventb.core.predicate="respTransferOk ∈ ℙ(trans)"/>
<org.eventb.core.invariant name="_4qvpkPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="inv7" org.eventb.core.predicate="respTransferFail ∈ ℙ(trans)"/>
<org.eventb.core.invariant name="_4qwQoPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="inv8" org.eventb.core.predicate="trAmount ∈ ATM ⇸ ℕ1"/>
<org.eventb.core.invariant name="_4qwQofifEd-KyJ1Ywzx_fQ" org.eventb.core.label="inv9" org.eventb.core.predicate="srcAccBalAtm ∈ ACCOUNT ⇸ ℕ"/>
<org.eventb.core.invariant name="_4qw3sPifEd-KyJ1Ywzx_fQ" org.eventb.core.label="inv10" org.eventb.core.predicate="destAccBalAtm ∈ ACCOUNT ⇸ ℕ"/>
<org.eventb.core.invariant name="_gRDygAZAEeC9GJs-VyssYw" org.eventb.core.label="inv11" org.eventb.core.predicate="transOkAtm ∈ ATM ⇸ BOOL"/>
<org.eventb.core.invariant name="_CQeoABNrEeCky5OpqeHuBQ" org.eventb.core.label="inv12" org.eventb.core.predicate="srcAcc ∈ ATM ⇸ ACCOUNT"/>
<org.eventb.core.invariant name="_CQeoARNrEeCky5OpqeHuBQ" org.eventb.core.label="inv13" org.eventb.core.predicate="destAcc ∈ ATM ⇸ ACCOUNT"/>
<org.eventb.core.invariant name="_CQfPEBNrEeCky5OpqeHuBQ" org.eventb.core.label="inv15" org.eventb.core.predicate="transferOk ⊆transferOkA"/>
<org.eventb.core.invariant name="_CQfPERNrEeCky5OpqeHuBQ" org.eventb.core.label="inv16" org.eventb.core.predicate="transferFail ⊆transferFailA"/>
<org.eventb.core.invariant name="_s5x-k-wKEd-V6twkc9HfSx" org.eventb.core.comment="" org.eventb.core.label="inv17" org.eventb.core.predicate="∀ c · c ∈ ran(cardInAtm) ⇒ c ∈ validCard"/>
<org.eventb.core.invariant name="_s5x-k-wKEd-V6twkc9HfS{" org.eventb.core.label="inv18" org.eventb.core.predicate="partition(trans, reqTransfer, transferOk, transferFail, respTransferOk, respTransferFail)"/>
</org.eventb.core.machineFile>
