<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face='Arial' color=#000000 size=2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Hi,</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>I have made a paradigm where I can represent the behaviour as a state
diagram.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p> </o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Please see attached meta-file that represents the behaviour of a function
where guards are used to represent “if” like statements. </FONT></P></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>My problem is to due the transversal of the model, because the model can
contain two or more paths and this has to be handled in the
transformation, in order not to transform states multiple times.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Therefore do I need to create a new graph inside the transformation (e.g.
Interpreter) that contains information about visited states (atoms) in the
model? Or how should I handle this?</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></P><FONT face="Times New Roman" size=3>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">I expect the source code to look
something like, if I can do optimisation:</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">Foo()</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">{</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>disable_interrupt();</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>hp = find_hp();</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>if(PTV[HP] == 1)</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>{</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 2">
</SPAN>restore();</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>}</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>else</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>{</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN><SPAN
style="mso-tab-count: 1">
</SPAN>startup();</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>}</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN>JUMP_TO_TASK</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">}</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>In relation to the above.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>What is the best approach in order to transform a model (e.g. state
diagram) into source code (e.g. C, not BDD implementations)? </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>GME Interpreter (BON), </FONT><FONT face="Times New Roman" size=3>GReAT
</FONT><FONT face="Times New Roman" size=3>or </FONT><FONT
face="Times New Roman" size=3>another approach.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p> </o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">Thanks,</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">Jesper</P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt"></FONT></P></FONT></DIV></BODY></HTML>