<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.event-b.org/index.php?action=history&amp;feed=atom&amp;title=Statemachine_Animation_Tutorial</id>
	<title>Statemachine Animation Tutorial - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.event-b.org/index.php?action=history&amp;feed=atom&amp;title=Statemachine_Animation_Tutorial"/>
	<link rel="alternate" type="text/html" href="https://wiki.event-b.org/index.php?title=Statemachine_Animation_Tutorial&amp;action=history"/>
	<updated>2026-05-15T04:21:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.event-b.org/index.php?title=Statemachine_Animation_Tutorial&amp;diff=9510&amp;oldid=prev</id>
		<title>imported&gt;Vitaly at 18:16, 13 January 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.event-b.org/index.php?title=Statemachine_Animation_Tutorial&amp;diff=9510&amp;oldid=prev"/>
		<updated>2010-01-13T18:16:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:16, 13 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot;&gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Statemachine animation==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Statemachine animation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First let&#039;s open the abstract UML-B class diagram &amp;lt;tt&amp;gt;ATM.ATM_A.classDiag&amp;lt;/tt&amp;gt; which consists of a single class C that represents &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a card used by &lt;/del&gt;ATM and contains &amp;lt;tt&amp;gt;atm_sm&amp;lt;/tt&amp;gt; statemachine. You can see from here that statemachine is class-lifted - it belongs to a class. This will affect the UML-B to Event-B translation and final Event-B model in a sense that there will be a type C generated for instances of that class.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First let&#039;s open the abstract UML-B class diagram &amp;lt;tt&amp;gt;ATM.ATM_A.classDiag&amp;lt;/tt&amp;gt; which consists of a single class C that represents &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;an &lt;/ins&gt;ATM and contains &amp;lt;tt&amp;gt;atm_sm&amp;lt;/tt&amp;gt; statemachine. You can see from here that statemachine is class-lifted - it belongs to a class. This will affect the UML-B to Event-B translation and final Event-B model in a sense that there will be a type C generated for instances of that class.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm a.class.png|ATM_A class]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm a.class.png|ATM_A class]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l68&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.init.enabled.png|init transition enabled]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.init.enabled.png|init transition enabled]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now let&#039;s create an instance of class C, i.e. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a card to use in our &lt;/del&gt;ATM. This can be done using the Operations view of ProB as in the previous step, but a better option is to start using the statemachine animation capabilities to do the same thing. Thus to create an instance&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now let&#039;s create an instance of class C, i.e. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;an instance of &lt;/ins&gt;ATM. This can be done using the Operations view of ProB as in the previous step, but a better option is to start using the statemachine animation capabilities to do the same thing. Thus to create an instance&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Move the mouse over &amp;quot;init&amp;quot; transition or its label and left-click on it. You will see the pop-up menu containing the list of available parameters.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Move the mouse over &amp;quot;init&amp;quot; transition or its label and left-click on it. You will see the pop-up menu containing the list of available parameters.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. From the menu select &amp;quot;C_SET1&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. From the menu select &amp;quot;C_SET1&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l79&quot;&gt;Line 79:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 79:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.instance.png|Instance of C created]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.instance.png|Instance of C created]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To have some &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;option &lt;/del&gt;let&#039;s create another &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card (&lt;/del&gt;instance &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of C) &lt;/del&gt;in the same way we did it previously&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To have some &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;options &lt;/ins&gt;let&#039;s create another &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM &lt;/ins&gt;instance in the same way we did it previously&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;init&amp;quot; transition. You should see the pop-up menu again, but this time it doesn&amp;#039;t have the C_SET1 anymore.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;init&amp;quot; transition. You should see the pop-up menu again, but this time it doesn&amp;#039;t have the C_SET1 anymore.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. Select C_SET2 to create an instance of this name&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. Select C_SET2 to create an instance of this name&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.second instance.png|Second instance of C created]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.second instance.png|Second instance of C created]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So we should have two &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cards &lt;/del&gt;now: C_SET1 and C_SET2, both in the &quot;idle&quot; state &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of ATM&lt;/del&gt;. To test them let&#039;s &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;use &lt;/del&gt;one of the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cards on ATM&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So we should have two &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATMs &lt;/ins&gt;now: C_SET1 and C_SET2, both in the &quot;idle&quot; state. To test them let&#039;s &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;insert a card into &lt;/ins&gt;one of the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATMs&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;insertCard&amp;quot; transition to insert a card into ATM&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;insertCard&amp;quot; transition to insert a card into ATM&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. From the pop-up menu select &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;C_SET1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. From the pop-up menu select C_SET1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.insert card.png|Insert card C_SET1]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.insert card.png|Insert card &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;into &lt;/ins&gt;C_SET1]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After the card &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;C_SET1 &lt;/del&gt;is inserted you can see that instance token C_SET1 has moved to the &quot;active&quot; state. The &quot;Transaction&quot; and &quot;ejectCard&quot; transitions become enabled for this instance as well. To model a standard &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;use case let&#039;s make a transaction &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;with card &lt;/del&gt;C_SET1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After the card is inserted &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;into C_SET1 &lt;/ins&gt;you can see that instance token C_SET1 has moved to the &quot;active&quot; state. The &quot;Transaction&quot; and &quot;ejectCard&quot; transitions become enabled for this instance as well. To model a standard &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM &lt;/ins&gt;use case let&#039;s make a transaction &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;on &lt;/ins&gt;C_SET1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;Transaction&amp;quot; transition&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;Transaction&amp;quot; transition&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. From the pop-up menu select C_SET1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. From the pop-up menu select C_SET1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;Note: As we have inserted &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;only &lt;/del&gt;one &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card yet&lt;/del&gt;, the transaction is available for this &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;only, which you can see from the pop-up menu - it contains a single option C_SET1. Despite of a single option the pop-up menu still appears and waits for user to select a parameter. This lets you see what parameters does a transition take: you don&#039;t have to select an option after you have clicked on a transition and caused a menu to appear. As it was mentioned above, the only case when menu doesn&#039;t appear and linked ProB operation is called automatically is when it has no parameters at all.&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;Note: As we have inserted &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a card into &lt;/ins&gt;one &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM&lt;/ins&gt;, the transaction is available for this &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM &lt;/ins&gt;only, which you can see from the pop-up menu - it contains a single option C_SET1. Despite of a single option the pop-up menu still appears and waits for user to select a parameter. This lets you see what parameters does a transition take: you don&#039;t have to select an option after you have clicked on a transition and caused a menu to appear. As it was mentioned above, the only case when menu doesn&#039;t appear and linked ProB operation is called automatically is when it has no parameters at all.&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When we have done a transaction on &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;C_SET1 it seems that nothing happens. Don&#039;t forget that this is an abstract model of ATM, so a transaction models all the underlying actions. You can see from the History view of ProB that Transaction event has been called on &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;C_SET1. The model allows to do many transactions in succession on a single card, so after we have done a transaction it is enabled again on &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;C_SET1, thus all the transitions and both instances preserve the same state.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When we have done a transaction on &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM &lt;/ins&gt;C_SET1 it seems that nothing happens. Don&#039;t forget that this is an abstract model of ATM, so a transaction models all the underlying actions. You can see from the History view of ProB that Transaction event has been &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;actually &lt;/ins&gt;called on &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM &lt;/ins&gt;C_SET1. The model allows to do many transactions in succession on a single card, so after we have done a transaction it is enabled again on C_SET1, thus all the transitions and both instances preserve the same state.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.transaction.history.png|Transaction history]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.transaction.history.png|Transaction history]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After the transaction is done let&#039;s eject the card we operated with. This is modelled by the &quot;ejectCard&quot; transition&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After the transaction is done let&#039;s eject the card &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from the ATM &lt;/ins&gt;we operated with. This is modelled by the &quot;ejectCard&quot; transition&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;ejectCard&amp;quot; transition&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a. Left-click on the &amp;quot;ejectCard&amp;quot; transition&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. Select C_SET1 from the pop-up menu&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  b. Select C_SET1 from the pop-up menu&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.eject.png|Eject card C_SET1]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Atm sm.eject.png|Eject card &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from &lt;/ins&gt;C_SET1]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can see now that card &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;C_SET1 &lt;/del&gt;has been ejected and instance token C_SET1 has moved back to the &quot;idle&quot; state. The diagram looks similar to the one when both &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cards &lt;/del&gt;were just created, however if you check the History view of ProB you will see the record of all the operation we have made so far: we have created two instances of class C that modelled &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATM cards&lt;/del&gt;, inserted one of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the cards into an ATM&lt;/del&gt;, made a transaction on it and ejected the card.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can see now that &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;card has been ejected &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from the ATM C_SET1 &lt;/ins&gt;and instance token C_SET1 has moved back to the &quot;idle&quot; state. The diagram looks similar to the one when both &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATMs &lt;/ins&gt;were just created, however if you check the History view of ProB you will see the record of all the operation we have made so far: we have created two instances of class C that modelled &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ATMs&lt;/ins&gt;, inserted &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a cards into &lt;/ins&gt;one of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;them&lt;/ins&gt;, made a transaction on it and ejected the card.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Clr}}&#039;&#039;Tip: ProB not only allows you to see the history of called operations, but also to go back in time: to double-click on an specific operation in history and go to that state. The animation tool supports this feature and updates the diagram accordingly, so if for instance you double-click on the Transaction(C_SET1) in History view, you will go back to a state when we have made a transaction on &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;card &lt;/del&gt;C_SET1.&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Clr}}&#039;&#039;Tip: ProB not only allows you to see the history of called operations, but also to go back in time: to double-click on an specific operation in history and go to that state. The animation tool supports this feature and updates the diagram accordingly, so if for instance you double-click on the Transaction(C_SET1) in History view, you will go back to a state when we have made a transaction on C_SET1.&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Conclusion==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Conclusion==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this tutorial we have followed a short use case scenario of animating a statemachine diagram of a simple UML-B model. In addition to the features showed in the tutorial the animation plug-in supports multiple statemachine diagram animation, for which you need to select several diagram files before calling the animation. Each diagram will be opened in a separate editor, allowing you to layout them at your preference. The animated statemachines are also not restricted to a single refinement of a machine - you can select the diagrams from different refinement levels and call the animation on them.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this tutorial we have followed a short use case scenario of animating a statemachine diagram of a simple UML-B model. In addition to the features showed in the tutorial the animation plug-in supports multiple statemachine diagram animation, for which you need to select several diagram files before calling the animation. Each diagram will be opened in a separate editor, allowing you to layout them at your preference. The animated statemachines are also not restricted to a single refinement of a machine - you can select the diagrams from different refinement levels and call the animation on them.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Vitaly</name></author>
	</entry>
	<entry>
		<id>https://wiki.event-b.org/index.php?title=Statemachine_Animation_Tutorial&amp;diff=9509&amp;oldid=prev</id>
		<title>imported&gt;Vitaly: New page: ==Overview== This tutorial will demonstrate the capabilities and a simple use case scenario of the UML-B Statemachine Animation plug-in that in combination with ProB Animator provides the ...</title>
		<link rel="alternate" type="text/html" href="https://wiki.event-b.org/index.php?title=Statemachine_Animation_Tutorial&amp;diff=9509&amp;oldid=prev"/>
		<updated>2010-01-13T12:14:15Z</updated>

		<summary type="html">&lt;p&gt;New page: ==Overview== This tutorial will demonstrate the capabilities and a simple use case scenario of the UML-B Statemachine Animation plug-in that in combination with ProB Animator provides the ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Overview==&lt;br /&gt;
This tutorial will demonstrate the capabilities and a simple use case scenario of the UML-B Statemachine Animation plug-in that in combination with ProB Animator provides the means of visually verifying a model defined in terms of the UML-B statemachine diagrams.&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will be working with a sample UML-B project that models an ATM. The project consists of several machine refinements and statemachine diagrams, which you will animate using ProB and Statemachine Animation plug-in by following the step-by-step instructions supplemented with the screenshots. After completing the tutorial hopefully you will become familiar with visual statemachine diagram animation and get an idea of its benefits.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
The tutorial assumes you have the following installed:&lt;br /&gt;
*Rodin platform v1.1 or later&lt;br /&gt;
*ProB Feature plug-in&lt;br /&gt;
*UML-B Modelling Environment plug-in&lt;br /&gt;
*UML-B Statemachine Animation plug-in&lt;br /&gt;
all available from http://www.event-b.org and Rodin Update site.&lt;br /&gt;
&lt;br /&gt;
In addition you will need a sample UML-B project, which is available from&lt;br /&gt;
[https://sourceforge.net/projects/rodin-b-sharp/files/Doc_UML-B_Tutorial/0.6/SimpleATM.zip/download here].&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Prior to working with the ATM UML-B project let&amp;#039;s create a new clean environment i.e. a new Rodin workspace&lt;br /&gt;
 a. Select File -&amp;gt; Switch Workspace -&amp;gt; Other&lt;br /&gt;
 b. Enter a unique name and path for a new workspace and press OK&lt;br /&gt;
&lt;br /&gt;
After we have a new workspace we need to import the UML-B project to start working with it&lt;br /&gt;
 a. Select File -&amp;gt; Import... -&amp;gt; &amp;quot;Existing Projects into Workspace&amp;quot; and click Next&lt;br /&gt;
 b. Click on the checkbox &amp;quot;Select archive file&amp;quot; and Browse for the downloaded UML-B project archive file (SimpleATM.zip)&lt;br /&gt;
 c. Make sure that all the projects in the Projects list are checked and click Finish&lt;br /&gt;
[[Image:ImportSimpleATM.png|Import wizard]]&lt;br /&gt;
&lt;br /&gt;
As you can see at this point there are four projects in total, two of which are UML-B projects that are different implementation versions of the ATM model: normal and class-lifted. The other two projects are standard Event-B projects generated from the UML-B. To show the complete functionality of the Statemachine Animation plug-in we will be using a class-lifted version of the ATM UML-B model, named &amp;quot;ATM&amp;quot;. You can open open it and have a look at the contained UML-B diagrams.&lt;br /&gt;
&lt;br /&gt;
==Statemachine animation==&lt;br /&gt;
First let&amp;#039;s open the abstract UML-B class diagram &amp;lt;tt&amp;gt;ATM.ATM_A.classDiag&amp;lt;/tt&amp;gt; which consists of a single class C that represents a card used by ATM and contains &amp;lt;tt&amp;gt;atm_sm&amp;lt;/tt&amp;gt; statemachine. You can see from here that statemachine is class-lifted - it belongs to a class. This will affect the UML-B to Event-B translation and final Event-B model in a sense that there will be a type C generated for instances of that class.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm a.class.png|ATM_A class]]&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s open &amp;lt;tt&amp;gt;atm_sm&amp;lt;/tt&amp;gt; statemachine diagram before animating it. This can be done either by opening &amp;lt;tt&amp;gt;ATM.ATM_A.C.atm_sm.stateDiag&amp;lt;/tt&amp;gt; diagram file or by double-clicking on the statemachine directly. The statemachine contains three states: initial state, idle and active, and four transitions: init, insertCard, ejectCard and Transaction.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm a.state.png|ATM_A statemachine]]&lt;br /&gt;
&lt;br /&gt;
When translated to Event-B the transitions become ATM_A machine&amp;#039;s events of the same names. The states are translated differently depending on the translation type and class-lifting property of the container statemachine. In our case the functional translation is specified, which you can see from the properties view of statemachine, so the states are translated into a single function (information about the states is contained in a function variable, see UML-B [[UML-B|details]]). The translated ATM_A EventB machine is available from corresponding ATM.eventB project.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm a.machine.png|ATM_A eventB machine]]&lt;br /&gt;
&lt;br /&gt;
Now to animate the abstract statemachine atm_sm you need to&lt;br /&gt;
 a. Right-click on the diagram file that corresponds to atm_sm statemachine i.e. ATM.ATM_A.C.atm_sm.stateDiag&lt;br /&gt;
 b. Select Animate&lt;br /&gt;
&amp;#039;&amp;#039;Note: Try multiple-selecting other diagrams, for instance class diagram ATM.ATM_A.classDiag. You will notice that Animate action is not available - it only appears when all the elements in the selection are statemachine diagrams.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.animate.png|Animate atm_sm]]&lt;br /&gt;
&lt;br /&gt;
After you initialise the animation the tool first switches to ProB perspective and shows its views, reads selected UML-B statemachine diagram files and creates a corresponding animation diagram for each of them. The animation diagrams are then opened and ProB starts to run its animator on the container machine.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.anim diag.png|Animation diagram]]&lt;br /&gt;
&lt;br /&gt;
As you can see the opened animation diagram looks similar to the original UML-B statemachine diagram. This is not always the case, as animation diagram only contains states and transitions without any additional information from the UML-B. If our statemachine diagram contained a state with invariants inside, those would not appear on the animation diagram as irrelevant to animation. In addition the UML-B  and animation diagram layout may differ, especially if a UML-B diagram doesn&amp;#039;t have its layout information defined after the diagram has been generated.&lt;br /&gt;
{{Clr}}&amp;#039;&amp;#039;Note: In fact the animation plug-in is implemented on a different model, which is a small subset of the UML-B model. When an animation diagram is opened a specific animation resource is created for it on the workspace in the same project folder as animated statemachines. These resources are only used during the animation process, but remain there until removed either manually or using a &amp;quot;Clean all animation output resources&amp;quot; button.&lt;br /&gt;
{{Clr}}&amp;#039;&amp;#039;Tip: If you are not satisfied with the automatic layout of the animation diagram it is possible to change it manually: the diagram elements can be moved with a mouse, as well as transitions can be bended. Deletion of the elements however is forbidden.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
As it was mentioned before, the animation tool works in combination with ProB animator. It actually starts ProB animator and uses it&amp;#039;s output to update the animation diagrams, but on the other hand it also drives the animator when actions are made on the diagram elements. In other words it works as an interface between the UML-B and ProB, delivering the existing functionality of ProB to UML-B. In this context the statemachine animation is only an aid to ProB animation, which will become more obvious in the next step.&lt;br /&gt;
&lt;br /&gt;
{{Clr}}When the animation has started, from ProB&amp;#039;s Operations view it can be seen that the only available operation is &amp;quot;$initialise_machine&amp;quot; - the ProB is awaiting to initialise all the machine&amp;#039;s variables and constants with initial values. This is one of the cases where statemachine animation flow is strictly limited to using the ProB. To continue the animation&lt;br /&gt;
 a. Right-click on the &amp;quot;$initialise_machine&amp;quot; operation in the Operations view&lt;br /&gt;
 b. From the operation&amp;#039;s parameter context menu select the desired set of initial values to initialise the machine (in our case the ATM_A machine has no constants, so only a single option is available)&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.init.png|ATM_A initialisation]]&lt;br /&gt;
&lt;br /&gt;
Straight after the machine is initialised we should notice some changes on the animation diagram: the init transition has become bold, which means it was enabled. As the init transition has a corresponding EventB event in the ATM_A machine, the Operations view will also show that this event is now enabled. Now at this point the class-lifting property comes into scene as init event creates instances of the class C.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.init.enabled.png|init transition enabled]]&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s create an instance of class C, i.e. a card to use in our ATM. This can be done using the Operations view of ProB as in the previous step, but a better option is to start using the statemachine animation capabilities to do the same thing. Thus to create an instance&lt;br /&gt;
 a. Move the mouse over &amp;quot;init&amp;quot; transition or its label and left-click on it. You will see the pop-up menu containing the list of available parameters.&lt;br /&gt;
 b. From the menu select &amp;quot;C_SET1&amp;quot;&lt;br /&gt;
&amp;#039;&amp;#039;Note: When you click on a transition the tool actually calls a corresponding ProB operation, which is also available from Operations view. If the operation has parameters, a selection pop-up menu appears to let you choose one of them, as you have seen in the previous step, otherwise the operation is called automatically.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.init.set1.png|Create C_SET1]]&lt;br /&gt;
&lt;br /&gt;
After we have created an instance C_SET1 of class C it appears on the diagram as a token inside the &amp;quot;idle&amp;quot; state. The state itself has also changed its appearance and now is highlighted. This means that instance C_SET1 is in the &amp;quot;idle&amp;quot; state now and this state is active i.e. it contains one or more instances. A single instance can only be in one state at a time, however many instances can be in a single state. Another change you should notice is that &amp;quot;insertCard&amp;quot; transition becomes enabled. If you are curious enough to click on it you can see from the parameter selection menu that this transition is enabled for the newly created instance C_SET1. It doesn&amp;#039;t mean however that any outgoing transition from active state is automatically enabled for any instance in that state - it is the EventB model implementation that specifies the behaviour of a corresponding event.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.instance.png|Instance of C created]]&lt;br /&gt;
&lt;br /&gt;
To have some option let&amp;#039;s create another card (instance of C) in the same way we did it previously&lt;br /&gt;
 a. Left-click on the &amp;quot;init&amp;quot; transition. You should see the pop-up menu again, but this time it doesn&amp;#039;t have the C_SET1 anymore.&lt;br /&gt;
 b. Select C_SET2 to create an instance of this name&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.second instance.png|Second instance of C created]]&lt;br /&gt;
&lt;br /&gt;
So we should have two cards now: C_SET1 and C_SET2, both in the &amp;quot;idle&amp;quot; state of ATM. To test them let&amp;#039;s use one of the cards on ATM&lt;br /&gt;
 a. Left-click on the &amp;quot;insertCard&amp;quot; transition to insert a card into ATM&lt;br /&gt;
 b. From the pop-up menu select card C_SET1&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.insert card.png|Insert card C_SET1]]&lt;br /&gt;
&lt;br /&gt;
After the card C_SET1 is inserted you can see that instance token C_SET1 has moved to the &amp;quot;active&amp;quot; state. The &amp;quot;Transaction&amp;quot; and &amp;quot;ejectCard&amp;quot; transitions become enabled for this instance as well. To model a standard card use case let&amp;#039;s make a transaction with card C_SET1&lt;br /&gt;
 a. Left-click on the &amp;quot;Transaction&amp;quot; transition&lt;br /&gt;
 b. From the pop-up menu select C_SET1&lt;br /&gt;
&amp;#039;&amp;#039;Note: As we have inserted only one card yet, the transaction is available for this card only, which you can see from the pop-up menu - it contains a single option C_SET1. Despite of a single option the pop-up menu still appears and waits for user to select a parameter. This lets you see what parameters does a transition take: you don&amp;#039;t have to select an option after you have clicked on a transition and caused a menu to appear. As it was mentioned above, the only case when menu doesn&amp;#039;t appear and linked ProB operation is called automatically is when it has no parameters at all.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
When we have done a transaction on card C_SET1 it seems that nothing happens. Don&amp;#039;t forget that this is an abstract model of ATM, so a transaction models all the underlying actions. You can see from the History view of ProB that Transaction event has been called on card C_SET1. The model allows to do many transactions in succession on a single card, so after we have done a transaction it is enabled again on card C_SET1, thus all the transitions and both instances preserve the same state.&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.transaction.history.png|Transaction history]]&lt;br /&gt;
&lt;br /&gt;
After the transaction is done let&amp;#039;s eject the card we operated with. This is modelled by the &amp;quot;ejectCard&amp;quot; transition&lt;br /&gt;
 a. Left-click on the &amp;quot;ejectCard&amp;quot; transition&lt;br /&gt;
 b. Select C_SET1 from the pop-up menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Atm sm.eject.png|Eject card C_SET1]]&lt;br /&gt;
&lt;br /&gt;
You can see now that card C_SET1 has been ejected and instance token C_SET1 has moved back to the &amp;quot;idle&amp;quot; state. The diagram looks similar to the one when both cards were just created, however if you check the History view of ProB you will see the record of all the operation we have made so far: we have created two instances of class C that modelled ATM cards, inserted one of the cards into an ATM, made a transaction on it and ejected the card.&lt;br /&gt;
{{Clr}}&amp;#039;&amp;#039;Tip: ProB not only allows you to see the history of called operations, but also to go back in time: to double-click on an specific operation in history and go to that state. The animation tool supports this feature and updates the diagram accordingly, so if for instance you double-click on the Transaction(C_SET1) in History view, you will go back to a state when we have made a transaction on card C_SET1.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In this tutorial we have followed a short use case scenario of animating a statemachine diagram of a simple UML-B model. In addition to the features showed in the tutorial the animation plug-in supports multiple statemachine diagram animation, for which you need to select several diagram files before calling the animation. Each diagram will be opened in a separate editor, allowing you to layout them at your preference. The animated statemachines are also not restricted to a single refinement of a machine - you can select the diagrams from different refinement levels and call the animation on them.&lt;/div&gt;</summary>
		<author><name>imported&gt;Vitaly</name></author>
	</entry>
</feed>