<?xml version="1.0"?>
<!DOCTYPE nta PUBLIC "-//Uppaal Team//DTD Flat System 1.0//EN" "http://www.docs.uu.se/docs/rtmv/uppaal/xml/flat-1_0.dtd">
<nta>
  <declaration>//Insert declarations of global clocks, variables, constants and channels.
int[0,2000] logSize1, logSize2, logSize3, userNum, detectedNo, y1, y2, y3, totalSize;
urgent chan filter, add;

const AVE_ACC_NUM 70, PRIOD_LOG_CHECK 7;
</declaration>
  <template>
    <name x="5" y="5">LogSize</name>
    <parameter x="5" y="20">int[0,2000] logSize, detectedNo, y, totalSize; urgent chan filter, add</parameter>
    <declaration>//Insert local declarations of clocks, variables and constants.
</declaration>
  <location id="id0" x="240" y="240"><name x="256" y="224">Logon</name></location><location id="id1" x="240" y="336"><name x="224" y="304">Event</name></location><location id="id2" x="240" y="432"><name x="248" y="400">Filtered</name></location><location id="id4" x="432" y="336"><name x="384" y="352">Collected</name></location><location id="id8" x="336" y="336"><name x="320" y="304">Recorded</name><committed/></location><init ref="id0"/><transition><source ref="id0"/><target ref="id1"/></transition><transition><source ref="id8"/><target ref="id2"/><label kind="synchronisation" x="248" y="376">filter?</label></transition><transition><source ref="id8"/><target ref="id4"/><label kind="guard" x="320" y="288">y==PRIOD_LOG_CHECK</label><label kind="synchronisation" x="368" y="320">add!</label><label kind="assignment" x="304" y="368">totalSize:=totalSize+logSize,
userNum++</label><nail x="344" y="336"/></transition><transition><source ref="id2"/><target ref="id8"/><label kind="assignment" x="248" y="432">logSize:=logSize + AVE_ACC_NUM</label><nail x="336" y="432"/></transition><transition><source ref="id1"/><target ref="id8"/><label kind="assignment" x="256" y="336">logSize:=logSize + AVE_ACC_NUM,
y++</label></transition><transition><source ref="id8"/><target ref="id1"/><label kind="guard" x="248" y="264">y&lt;PRIOD_LOG_CHECK</label><nail x="288" y="312"/></transition></template>
  <template><name x="5" y="5">NoPolicy2</name><parameter x="5" y="20">int[0,2000] detectedNo; urgent chan filter</parameter><declaration/><location id="id6" x="304" y="240"><name x="294" y="210">idle</name></location><location id="id7" x="400" y="240"><committed/></location><init ref="id6"/><transition><source ref="id6"/><target ref="id7"/><label kind="synchronisation" x="336" y="216">filter!</label><label kind="guard" x="312" y="248">detectedNo &lt; 0</label></transition></template><template><name x="5" y="5">SecMng</name><parameter x="5" y="20">int[0,2000] totalSize; urgent chan add</parameter><declaration/><location id="id9" x="304" y="208"><name x="294" y="178">Totaled</name><committed/></location><location id="id10" x="400" y="144"><name x="328" y="128">Complete</name></location><location id="id11" x="400" y="208"><name x="352" y="184">Tired</name></location><location id="id12" x="400" y="272"><name x="336" y="264">GiveUp</name></location><location id="id13" x="208" y="208"/><init ref="id13"/><transition><source ref="id9"/><target ref="id10"/><label kind="guard" x="304" y="152">totalSize &lt; 500,
userNum==3</label></transition><transition><source ref="id9"/><target ref="id11"/><label kind="guard" x="304" y="208">totalSize &lt; 1000,
totalSize &gt;= 500,
userNum==3</label></transition><transition><source ref="id9"/><target ref="id12"/><label kind="guard" x="232" y="248">totalSize &gt; 1000,
userNum==3</label></transition><transition><source ref="id13"/><target ref="id9"/><label kind="synchronisation" x="240" y="192">add?</label></transition><transition><source ref="id9"/><target ref="id13"/><label kind="guard" x="200" y="224">userNum&lt;3</label><nail x="256" y="256"/></transition></template><instantiation>//Insert process assignments.
LogSizeU1 := LogSize(logSize1, detectedNo, y1, totalSize, filter, add);
LogSizeU2 := LogSize(logSize2, detectedNo, y2, totalSize, filter, add);
LogSizeU3 := LogSize(logSize3, detectedNo, y3, totalSize, filter, add);
NoPolicy2 := NoPolicy2(detectedNo, filter);
SecMng:= SecMng(totalSize, add);</instantiation>
  <system>//Edit system definition.
system LogSizeU1, LogSizeU2, LogSizeU3, SecMng, NoPolicy2;</system>
</nta>