29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

280 Chapter 21<br />

Algorithm of LOC Checker:<br />

i = 0;<br />

memory_used = 0;<br />

Main {<br />

while(trace not end){<br />

if(memory_used < MEM_LIMIT){<br />

read one line of trace;<br />

store useful annotations;<br />

check_<strong>for</strong>mula();<br />

}<br />

else{<br />

while(annotations <strong>for</strong> current<br />

<strong>for</strong>mula instance is not<br />

available && trace not end)<br />

scan the trace <strong>for</strong> annotation;<br />

check_<strong>for</strong>mula();<br />

}<br />

}<br />

}<br />

check_<strong>for</strong>mula {<br />

while (can evaluate <strong>for</strong>mula instance i) {<br />

evaluate <strong>for</strong>mula instance i;<br />

i++;<br />

memory recycling;<br />

}<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!