<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://prob.hhu.de/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dominik+Hansen</id>
	<title>ProB Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://prob.hhu.de/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dominik+Hansen"/>
	<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Special:Contributions/Dominik_Hansen"/>
	<updated>2026-05-27T05:59:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=3687</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=3687"/>
		<updated>2016-08-11T12:05:41Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
== Using TLC in ProB Tcl/Tk ==&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
On Linux the tlc-thread package is required to run TLC from the tcl/tk ui:&lt;br /&gt;
 sudo apt-get install tcl-thread&lt;br /&gt;
&lt;br /&gt;
== Using TLC in probcli ==&lt;br /&gt;
&lt;br /&gt;
You can use the following switch to use TLC rather than ProB&#039;s model checker:&lt;br /&gt;
 -mc_with_tlc&lt;br /&gt;
&lt;br /&gt;
Some of the standard probcli options also work for TLC:&lt;br /&gt;
* -noinv  (no invariant checking)&lt;br /&gt;
* -nodead (no deadlock checking)&lt;br /&gt;
* -noass (no assertion checking)&lt;br /&gt;
* -nogoal (no checking for the optional goal predicate)&lt;br /&gt;
In addition you can provide&lt;br /&gt;
* -noltl (no checking of LTL assertions)&lt;br /&gt;
&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;TLC_WORKERS&amp;lt;/tt&amp;gt; influences the number of workers that will be used by TLC.&lt;br /&gt;
So, a call might look like this:&lt;br /&gt;
 probcli FILE.mch -mc_with_tlc -p TLC_WORKERS 2 -noltl&lt;br /&gt;
&lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : NATURAL&lt;br /&gt;
 INITIALISATION x := k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=3686</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=3686"/>
		<updated>2016-08-11T12:02:57Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
== Using TLC in ProB Tcl/Tk ==&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
On Linux the tlc-thread package is required to run TLC from the tcl/tk ui.&lt;br /&gt;
&lt;br /&gt;
the sudo apt-get install tcl-thread&lt;br /&gt;
== Using TLC in probcli ==&lt;br /&gt;
&lt;br /&gt;
You can use the following switch to use TLC rather than ProB&#039;s model checker:&lt;br /&gt;
 -mc_with_tlc&lt;br /&gt;
&lt;br /&gt;
Some of the standard probcli options also work for TLC:&lt;br /&gt;
* -noinv  (no invariant checking)&lt;br /&gt;
* -nodead (no deadlock checking)&lt;br /&gt;
* -noass (no assertion checking)&lt;br /&gt;
* -nogoal (no checking for the optional goal predicate)&lt;br /&gt;
In addition you can provide&lt;br /&gt;
* -noltl (no checking of LTL assertions)&lt;br /&gt;
&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;TLC_WORKERS&amp;lt;/tt&amp;gt; influences the number of workers that will be used by TLC.&lt;br /&gt;
So, a call might look like this:&lt;br /&gt;
 probcli FILE.mch -mc_with_tlc -p TLC_WORKERS 2 -noltl&lt;br /&gt;
&lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : NATURAL&lt;br /&gt;
 INITIALISATION x := k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3670</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3670"/>
		<updated>2016-07-07T08:28:16Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:ProB-Atom-Package.zip&amp;diff=3669</id>
		<title>File:ProB-Atom-Package.zip</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:ProB-Atom-Package.zip&amp;diff=3669"/>
		<updated>2016-07-06T10:14:38Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Dominik Hansen uploaded a new version of File:ProB-Atom-Package.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3668</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3668"/>
		<updated>2016-07-06T10:13:59Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
A package [[File:ProB-Atom-Package.zip]] for offline installation is available (should be used if you have restrictive proxy).&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3667</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3667"/>
		<updated>2016-07-06T10:12:33Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
[File:ProB-Atom-Package.zip|Packages] for offline installation (should be used if you have restrictive proxy).&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3666</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3666"/>
		<updated>2016-07-06T09:37:13Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
[[File:ProB-Atom-Package.zip|Packages]] for offline installation (should be used if you have restrictive proxy).&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3665</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3665"/>
		<updated>2016-07-06T09:36:30Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
[[File:ProB-Atom-Package.zip Packages]] for offline installation (should be used if you have restrictive proxy).&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:ProB-Atom-Package.zip&amp;diff=3664</id>
		<title>File:ProB-Atom-Package.zip</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:ProB-Atom-Package.zip&amp;diff=3664"/>
		<updated>2016-07-06T09:35:15Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Dominik Hansen uploaded a new version of File:ProB-Atom-Package.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:ProB-Atom-Package.zip&amp;diff=3663</id>
		<title>File:ProB-Atom-Package.zip</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:ProB-Atom-Package.zip&amp;diff=3663"/>
		<updated>2016-07-06T05:37:05Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3662</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3662"/>
		<updated>2016-07-06T05:36:39Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
Offline installation (should be used if you have restrictive proxy): [[File:ProB-Atom-Package.zip]]&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3661</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3661"/>
		<updated>2016-07-06T05:34:23Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
Windows offline installation (should be used if you have restrictive proxy): [[File:Atom-ProB-Windows-Bundle.zip]]&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3660</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3660"/>
		<updated>2016-07-06T05:33:22Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
Windows offline installation: [[File:Atom-ProB-Windows-Bundle.zip]]&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3659</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3659"/>
		<updated>2016-07-06T05:33:11Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
Windows offline Installation: [[File:Atom-ProB-Windows-Bundle.zip]]&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3658</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3658"/>
		<updated>2016-07-06T05:32:11Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
Windows Offline Installation: [[File:Atom-ProB-Windows-Bundle.zip]]&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3657</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3657"/>
		<updated>2016-07-06T05:31:58Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
It integrates with probcli to obtain error markers for syntax and type errors.&lt;br /&gt;
&lt;br /&gt;
Windows Offline Installation [[File:Atom-ProB-Windows-Bundle.zip]]&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_for_TLA&amp;diff=3582</id>
		<title>ProB for TLA</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_for_TLA&amp;diff=3582"/>
		<updated>2016-03-31T09:15:08Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Redirected page to TLA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[TLA]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:ProBWindowsDownload.png&amp;diff=3581</id>
		<title>File:ProBWindowsDownload.png</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:ProBWindowsDownload.png&amp;diff=3581"/>
		<updated>2016-03-30T15:14:00Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Dominik Hansen uploaded a new version of File:ProBWindowsDownload.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:ProBWindowsDownload.png&amp;diff=3580</id>
		<title>File:ProBWindowsDownload.png</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:ProBWindowsDownload.png&amp;diff=3580"/>
		<updated>2016-03-30T15:13:38Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Dominik Hansen uploaded a new version of File:ProBWindowsDownload.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:ProBWindowsDownload.png&amp;diff=3579</id>
		<title>File:ProBWindowsDownload.png</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:ProBWindowsDownload.png&amp;diff=3579"/>
		<updated>2016-03-30T15:10:49Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Dominik Hansen uploaded a new version of File:ProBWindowsDownload.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Windows_Installation_Instructions&amp;diff=3578</id>
		<title>Windows Installation Instructions</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Windows_Installation_Instructions&amp;diff=3578"/>
		<updated>2016-03-30T15:06:34Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Install Java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows Specific Download Instructions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Go to the ProB Downloads site ===&lt;br /&gt;
&lt;br /&gt;
* Go to the page [http://www.stups.uni-duesseldorf.de/ProB/index.php5/Download http://www.stups.uni-duesseldorf.de/ProB/index.php5/Download], this should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:ProBWindowsDownload.png|center||600px]]&lt;br /&gt;
&lt;br /&gt;
=== Install Tcl/Tk 8.5 ===&lt;br /&gt;
&lt;br /&gt;
If Tcl/Tk 8.5 is already installed you can skip this step.&lt;br /&gt;
&lt;br /&gt;
* Click on the &amp;quot;[http://downloads.activestate.com/ActiveTcl/releases/ Tcl/Tk 8.5 for Windows],&amp;quot; link provided in the &amp;quot;Dependencies&amp;quot; column and the &amp;quot;Windows&amp;quot; row above&lt;br /&gt;
* Choose the most recent Tcl/Tk 8.5 distribution available for windows; be sure to choose a version matching ProB, e.g. a 32-bit version (the file highlighted in blue below) if you want to use the 32-bit version of ProB.&lt;br /&gt;
* Download and follow the installation instructions&lt;br /&gt;
&lt;br /&gt;
[[File:TkWindowsDownload.png|center||600px]]&lt;br /&gt;
&lt;br /&gt;
=== Install Java ===&lt;br /&gt;
&lt;br /&gt;
If Java 7 or newer is already installed you can skip this step.&lt;br /&gt;
&lt;br /&gt;
* Click on the &amp;quot;[http://java.com/en/ Java Runtime Environment (7.0 or newer)]&amp;quot; link provided in the &amp;quot;Dependencies&amp;quot; column and the &amp;quot;Windows&amp;quot; row above&lt;br /&gt;
* Follow the installation instructions&lt;br /&gt;
&lt;br /&gt;
=== Download the ProB for Windows Zipfile ===&lt;br /&gt;
&lt;br /&gt;
* Click on the &amp;quot;[http://nightly.cobra.cs.uni-duesseldorf.de/releases/1.4.1/ProB.windows.zip Zipfile (with probcli)]&amp;quot; link in the [[Download|Download]] column and Windows row&lt;br /&gt;
* Decompress and expand the ProB directory if necessary. Do not change the location and structure of the files and directories within ProB (apart from the Machines directory)! The contents of the ProB directory should look something like this:&lt;br /&gt;
&lt;br /&gt;
[[File:ProBWindowsFolder.png|center]]&lt;br /&gt;
&lt;br /&gt;
The subfolder called &amp;quot;Microsoft.VC80.CRT&amp;quot; contains the DLLs for the Microsoft C runtime.&lt;br /&gt;
&lt;br /&gt;
=== Optionally Download GraphViz ===&lt;br /&gt;
&lt;br /&gt;
* Install the &amp;quot;dot&amp;quot; program and &amp;quot;dotty&amp;quot; viewer from AT&amp;amp;T&#039;s Graphviz package (http://www.graphviz.org/ or http://www.research.att.com/sw/tools/graphviz/)&lt;br /&gt;
&lt;br /&gt;
=== Start ProB ===&lt;br /&gt;
&lt;br /&gt;
* Start ProB by double-clicking on the ProBWin icon above&lt;br /&gt;
* Try to open some of the examples provided in the Examples folder shown above&lt;br /&gt;
* Contact us if you have problems&lt;br /&gt;
&lt;br /&gt;
=== Checklist/Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* Java: be sure to have Java 1.7 or newer installed. Otherwise you will not be able to parse your own classical B machines as our parser is written in Java.&lt;br /&gt;
&lt;br /&gt;
* Tcl/Tk: be sure to have a matching version of TclTk 8.5 installed&lt;br /&gt;
&lt;br /&gt;
* In case you cannot start neither ProBWin nor probcli, you should to install the [http://www.microsoft.com/en-us/download/details.aspx?id=3387 Microsoft Visual C++ 2005 Redistributable Package (x86)] for yourself (rather than rely on the ones we provide in the &amp;quot;Microsoft.VC80.CRT&amp;quot; folder mentioned above).&lt;br /&gt;
&lt;br /&gt;
* Try starting ProBWin or probcli from the Windows Command Prompt; the error messages may help you or us uncover the problem&lt;br /&gt;
&lt;br /&gt;
* You can also try and obtain information from the main Windows Event/Error Log, by following these steps:&lt;br /&gt;
** Click Start, and then click Control Panel.&lt;br /&gt;
** Click Performance and Maintenance, then click Administrative Tools, and then double-click Computer Management. Or, open the MMC containing the Event Viewer snap-in.&lt;br /&gt;
** In the console tree, expand Event Viewer, and then click the log that contains the event that you want to view.&lt;br /&gt;
** In the details pane, double-click the event that you want to view. &lt;br /&gt;
** The Event Properties dialog box containing header information and a description of the event is displayed.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3541</id>
		<title>Editors for ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Editors_for_ProB&amp;diff=3541"/>
		<updated>2016-02-26T14:19:33Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== ProB Tcl/Tk Editor ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk contains an editor in which syntax errors are displayed and which can be used to edit B, CSP, Z and TLA+ models.&lt;br /&gt;
The editor of Tcl/Tk, however, has a few limitations:&lt;br /&gt;
* it can become very slow with long or very long lines&lt;br /&gt;
* the syntax highlighting can become slow with very large files. Hence, syntax highlighting is automatically turned off in some circumstances (when more than 50,000 characters are encountered or when a line is longer than 500 characters).&lt;br /&gt;
&lt;br /&gt;
It is possible to open the files in an external editor. You can setup the editor to be used by modifying the preference &amp;quot;Path to External Text Editor&amp;quot; in the &amp;quot;Advanced Preferences&amp;quot; list (available in the &amp;quot;Preferences&amp;quot; menu).&lt;br /&gt;
You can then use the command &amp;quot;Open FILE in external editor&amp;quot; in the &amp;quot;File&amp;quot; menu to open your main specification file with this editor. You can also use the command-key shortcut &amp;quot;Cmd-E&amp;quot; for this.&lt;br /&gt;
&lt;br /&gt;
== Launching the editor in probcli ==&lt;br /&gt;
&lt;br /&gt;
The [[Using_the_Command-Line_Version_of_ProB|probcli]] REPL (read-eval-print-loop) supports the command &amp;lt;tt&amp;gt;:e&amp;lt;/tt&amp;gt; to open the current file in the external editor, as specified in the &amp;quot;EDITOR&amp;quot; preference.&lt;br /&gt;
You can set this preference using&lt;br /&gt;
 probcli -repl -p EDITOR PATH&lt;br /&gt;
In case errors occurred with the last command, this will also try and move the cursor to the corresponding location in the file.&lt;br /&gt;
&lt;br /&gt;
== External Editors ==&lt;br /&gt;
&lt;br /&gt;
=== VIM ===&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/bivab/prob.vim VIM plugin for ProB is available].&lt;br /&gt;
It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. VIM has builtin syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
=== Atom ===&lt;br /&gt;
&lt;br /&gt;
There is a package [https://atom.io/packages/language-b-eventb language-b-eventb] available for the Atom editor.&lt;br /&gt;
It adds syntax highlighting and snippets for the specification languages B and Event-B to Atom.&lt;br /&gt;
&lt;br /&gt;
=== BBEdit ===&lt;br /&gt;
&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog] are available.&lt;br /&gt;
&lt;br /&gt;
=== Emacs ===&lt;br /&gt;
&lt;br /&gt;
A package [[File:b-mode.el.zip]] is available.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3408</id>
		<title>Die Hard Jugs Puzzle</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3408"/>
		<updated>2016-02-03T12:34:42Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* TLA+ Version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the B model of a puzzle from the movie &amp;quot;Die Hard with a Vengeance&amp;quot;.&lt;br /&gt;
This [https://www.youtube.com/watch?v=BVtQNK_ZUJg clip shows Bruce Willis and Samuel Jackson having a go at the puzzle].&lt;br /&gt;
A [http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm more detailed explanation can be found here].&lt;br /&gt;
At start we have one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gallons by filling, emptying or transferring water from the jugs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Jars&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  GOAL == (4 : ran(level));&lt;br /&gt;
SETS Jars = {j3,j5}&lt;br /&gt;
CONSTANTS maxf&lt;br /&gt;
PROPERTIES maxf : Jars --&amp;gt; NATURAL &amp;amp;&lt;br /&gt;
           maxf = {j3 |-&amp;gt; 3, j5 |-&amp;gt; 5} /* in this puzzle we have two jars, with capacities 3 and 5 */&lt;br /&gt;
VARIABLES level&lt;br /&gt;
INVARIANT&lt;br /&gt;
  level: Jars --&amp;gt; NATURAL&lt;br /&gt;
INITIALISATION level := Jars * {0}  /* all jars start out empty */&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  FillJar(j) = /* we can completely fill a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;lt;maxf(j) THEN&lt;br /&gt;
    level(j) := maxf(j)&lt;br /&gt;
   END;&lt;br /&gt;
  EmptyJar(j) = /* we can completely empty a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;gt;0 THEN&lt;br /&gt;
    level(j) := 0&lt;br /&gt;
   END;&lt;br /&gt;
  Transfer(j1,amount,j2) = /* we can transfer from jar j1 to j2 until either j2 is full or j1 is empty */&lt;br /&gt;
   PRE j1:Jars &amp;amp; j2:Jars &amp;amp; j1 /= j2 &amp;amp; amount&amp;gt;0 &amp;amp;&lt;br /&gt;
                               amount = min({level(j1), maxf(j2)-level(j2)}) THEN&lt;br /&gt;
      level := level &amp;lt;+ { j1|-&amp;gt; level(j1)-amount, j2 |-&amp;gt; level(j2)+amount }&lt;br /&gt;
   END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opening the file in ProB, choose the Model Check command in the Verify menu and then check the &amp;quot;Find Define GOAL&amp;quot; check box.&lt;br /&gt;
This instructs ProB to search for states satisfying the GOAL predicate &amp;lt;tt&amp;gt;(4:ran(level))&amp;lt;/tt&amp;gt; defined above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_ModelCheckGoalBox.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now press the model check button and you should now obtain the following message:&lt;br /&gt;
[[File:ProB_Goal_Found.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
The main window of ProB now contains the following information:&lt;br /&gt;
&lt;br /&gt;
[[File:Jars_Panes.png|700px|center]]&lt;br /&gt;
&lt;br /&gt;
You can see that the second jug contains exactly 4 gallons. The steps required to reach this state can be found in the history pane on the right (in reverse order).&lt;br /&gt;
&lt;br /&gt;
== Graphical Animation ==&lt;br /&gt;
&lt;br /&gt;
This machine above is actually included in the ProB distribution (inside the examples/B/GraphicalAnimation/ directory).&lt;br /&gt;
It also contains the following lines in the DEFINITIONS section, which defines a quick-and-dirty [[Graphical_Visualization|graphical visualisation]] of the state.&lt;br /&gt;
The images can be found in the subfolder images along the file Jars.mch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ANIMATION_IMG1 == &amp;quot;images/Filled.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG2 == &amp;quot;images/Empty.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG3 == &amp;quot;images/Void.gif&amp;quot;;&lt;br /&gt;
  gmax == max(ran(maxf));&lt;br /&gt;
  ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars &amp;amp; r:1..gmax &amp;amp; i=3};&lt;br /&gt;
  ri == (gmax+1-r);&lt;br /&gt;
  ANIMATION_FUNCTION == {r,c,i | c:Jars &amp;amp; ri:1..maxf(c) &amp;amp;&lt;br /&gt;
                                 (ri&amp;lt;=level(c) =&amp;gt; i=1 ) &amp;amp; (ri&amp;gt;level(c) =&amp;gt; i=2)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of ProB Tcl/Tk after loading the model and having found the goal:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_DieHard_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Using probcli (command-line version) ==&lt;br /&gt;
&lt;br /&gt;
To find the solution using probcli you just need to type:&lt;br /&gt;
&lt;br /&gt;
  probcli -model_check Jars.mch&lt;br /&gt;
&lt;br /&gt;
The output will be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -model_check Jars.mch&lt;br /&gt;
% found_enumeration_of_constants(30,40)&lt;br /&gt;
% backtrack(found_enumeration_of_constants(30,40))&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,10)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 60 ms (60 ms walltime)&lt;br /&gt;
States analysed: 10&lt;br /&gt;
Transitions fired: 36&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: SETUP_CONSTANTS({(j3|-&amp;gt;3),(j5|-&amp;gt;5)}): &lt;br /&gt;
 2: INITIALISATION({(j3|-&amp;gt;0),(j5|-&amp;gt;0)}): &lt;br /&gt;
 3: FillJar(j5): &lt;br /&gt;
 4: Transfer(j5,3,j3): &lt;br /&gt;
 5: EmptyJar(j3): &lt;br /&gt;
 6: Transfer(j5,2,j3): &lt;br /&gt;
 7: FillJar(j5): &lt;br /&gt;
 8: Transfer(j5,1,j3): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TLA+ Version ==&lt;br /&gt;
A TLA+ version of the puzzle is also included with ProB (inside the examples/TLA+/ directory).&lt;br /&gt;
The specification was developed by Leslie Lamport. It is possible to load TLA+ specifications with ProB as shown on the [[TLA]] wiki page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
------------------------------ MODULE DieHard ------------------------------- &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* In the movie Die Hard 3, the heros must obtain exactly 4 gallons of     *)&lt;br /&gt;
(* water using a 5 gallon jug, a 3 gallon jug, and a water faucet.  Our    *)&lt;br /&gt;
(* goal: to get TLC to solve the problem for us.                           *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* First, we write a spec that describes all allowable behaviors of our    *)&lt;br /&gt;
(* heros.                                                                  *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
EXTENDS Naturals&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  (* This statement imports the definitions of the ordinary operators on   *)&lt;br /&gt;
  (* natural numbers, such as +.                                           *)&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We next declare the specification&#039;s variables.                          *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
VARIABLES big,   \* The number of gallons of water in the 5 gallon jug.&lt;br /&gt;
          small  \* The number of gallons of water in the 3 gallon jug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now define TypeOK to be the type invariant, asserting that the value *)&lt;br /&gt;
(* of each variable is an element of the appropriate set.  A type          *)&lt;br /&gt;
(* invariant like this is not part of the specification, but it&#039;s          *)&lt;br /&gt;
(* generally a good idea to include it because it helps the reader         *)&lt;br /&gt;
(* understand the spec.  Moreover, having TLC check that it is an          *)&lt;br /&gt;
(* invariant of the spec catches errors that, in a typed language, are     *)&lt;br /&gt;
(* caught by type checking.                                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* Note: TLA+ uses the convention that a list of formulas bulleted by /\   *)&lt;br /&gt;
(* or \/ denotes the conjunction or disjunction of those formulas.         *)&lt;br /&gt;
(* Indentation of subitems is significant, allowing one to eliminate lots  *)&lt;br /&gt;
(* of parentheses.  This makes a large formula much easier to read.        *)&lt;br /&gt;
(* However, it does mean that you have to be careful with your indentation.*)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
TypeOK == /\ small \in 0..3 &lt;br /&gt;
          /\ big   \in 0..5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define of the initial predicate, that specifies the initial      *)&lt;br /&gt;
(* values of the variables.  I like to name this predicate Init, but the   *)&lt;br /&gt;
(* name doesn&#039;t matter.                                                    *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Init == /\ big = 0 &lt;br /&gt;
        /\ small = 0&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the actions that our hero can perform.  There are three   *)&lt;br /&gt;
(* things they can do:                                                     *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from the faucet into a jug.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from a jug onto the ground.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from one jug into another                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* We now consider the first two.  Since the jugs are not calibrated,      *)&lt;br /&gt;
(* partially filling or partially emptying a jug accomplishes nothing.     *)&lt;br /&gt;
(* So, the first two possibilities yield the following four possible       *)&lt;br /&gt;
(* actions.                                                                *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
FillSmallJug  == /\ small&#039; = 3 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
FillBigJug    == /\ big&#039; = 5 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
EmptySmallJug == /\ small&#039; = 0 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
EmptyBigJug   == /\ big&#039; = 0 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now consider pouring water from one jug into another.  Again, since  *)&lt;br /&gt;
(* the jugs are not callibrated, when pouring from jug A to jug B, it      *)&lt;br /&gt;
(* makes sense only to either fill B or empty A. And there&#039;s no point in   *)&lt;br /&gt;
(* emptying A if this will cause B to overflow, since that could be        *)&lt;br /&gt;
(* accomplished by the two actions of first filling B and then emptying A. *)&lt;br /&gt;
(* So, pouring water from A to B leaves B with the lesser of (i) the water *)&lt;br /&gt;
(* contained in both jugs and (ii) the volume of B. To express this        *)&lt;br /&gt;
(* mathematically, we first define Min(m,n) to equal the minimum of the    *)&lt;br /&gt;
(* numbers m and n.                                                        *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Min(m,n) == IF m &amp;lt; n THEN m ELSE n&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the last two pouring actions.  From the observation       *)&lt;br /&gt;
(* above, these definitions should be clear.                               *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
SmallToBig == /\ big&#039;   = Min(big + small, 5)&lt;br /&gt;
              /\ small&#039; = small - (big&#039; - big)&lt;br /&gt;
&lt;br /&gt;
BigToSmall == /\ small&#039; = Min(big + small, 3) &lt;br /&gt;
              /\ big&#039;   = big - (small&#039; - small)&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We define the next-state relation, which I like to call Next.  A Next   *)&lt;br /&gt;
(* step is a step of one of the six actions defined above.  Hence, Next is *)&lt;br /&gt;
(* the disjunction of those actions.                                       *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Next ==  \/ FillSmallJug &lt;br /&gt;
         \/ FillBigJug    &lt;br /&gt;
         \/ EmptySmallJug &lt;br /&gt;
         \/ EmptyBigJug    &lt;br /&gt;
         \/ SmallToBig    &lt;br /&gt;
         \/ BigToSmall    &lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Remember that our heros must measure out 4 gallons of water.            *)&lt;br /&gt;
(* Obviously, those 4 gallons must be in the 5 gallon jug.  So, they have  *)&lt;br /&gt;
(* solved their problem when they reach a state with big = 4.  So, we      *)&lt;br /&gt;
(* define NotSolved to be the predicate asserting that big # 4.            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
NotSolved == big # 4&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We find a solution by having TLC check if NotSolved is an invariant,    *)&lt;br /&gt;
(* which will cause it to print out an &amp;quot;error trace&amp;quot; consisting of a       *)&lt;br /&gt;
(* behavior ending in a states where NotSolved is false.  Such a           *)&lt;br /&gt;
(* behavior is the desired solution.  (Because TLC uses a breadth-first    *)&lt;br /&gt;
(* search, it will find the shortest solution.)                            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Version ==&lt;br /&gt;
&lt;br /&gt;
A Z version of the puzzle is also included with ProB (inside the examples/Z/GraphicalAnimation/ directory) and shown on the [[ProZ]] wiki page.&lt;br /&gt;
&lt;br /&gt;
Here is how the animation of the Z specification should look like:&lt;br /&gt;
&lt;br /&gt;
[[File:ProZ_jars.png|600px|center]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3407</id>
		<title>Die Hard Jugs Puzzle</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3407"/>
		<updated>2016-02-03T11:11:40Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the B model of a puzzle from the movie &amp;quot;Die Hard with a Vengeance&amp;quot;.&lt;br /&gt;
This [https://www.youtube.com/watch?v=BVtQNK_ZUJg clip shows Bruce Willis and Samuel Jackson having a go at the puzzle].&lt;br /&gt;
A [http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm more detailed explanation can be found here].&lt;br /&gt;
At start we have one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gallons by filling, emptying or transferring water from the jugs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Jars&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  GOAL == (4 : ran(level));&lt;br /&gt;
SETS Jars = {j3,j5}&lt;br /&gt;
CONSTANTS maxf&lt;br /&gt;
PROPERTIES maxf : Jars --&amp;gt; NATURAL &amp;amp;&lt;br /&gt;
           maxf = {j3 |-&amp;gt; 3, j5 |-&amp;gt; 5} /* in this puzzle we have two jars, with capacities 3 and 5 */&lt;br /&gt;
VARIABLES level&lt;br /&gt;
INVARIANT&lt;br /&gt;
  level: Jars --&amp;gt; NATURAL&lt;br /&gt;
INITIALISATION level := Jars * {0}  /* all jars start out empty */&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  FillJar(j) = /* we can completely fill a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;lt;maxf(j) THEN&lt;br /&gt;
    level(j) := maxf(j)&lt;br /&gt;
   END;&lt;br /&gt;
  EmptyJar(j) = /* we can completely empty a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;gt;0 THEN&lt;br /&gt;
    level(j) := 0&lt;br /&gt;
   END;&lt;br /&gt;
  Transfer(j1,amount,j2) = /* we can transfer from jar j1 to j2 until either j2 is full or j1 is empty */&lt;br /&gt;
   PRE j1:Jars &amp;amp; j2:Jars &amp;amp; j1 /= j2 &amp;amp; amount&amp;gt;0 &amp;amp;&lt;br /&gt;
                               amount = min({level(j1), maxf(j2)-level(j2)}) THEN&lt;br /&gt;
      level := level &amp;lt;+ { j1|-&amp;gt; level(j1)-amount, j2 |-&amp;gt; level(j2)+amount }&lt;br /&gt;
   END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opening the file in ProB, choose the Model Check command in the Verify menu and then check the &amp;quot;Find Define GOAL&amp;quot; check box.&lt;br /&gt;
This instructs ProB to search for states satisfying the GOAL predicate &amp;lt;tt&amp;gt;(4:ran(level))&amp;lt;/tt&amp;gt; defined above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_ModelCheckGoalBox.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now press the model check button and you should now obtain the following message:&lt;br /&gt;
[[File:ProB_Goal_Found.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
The main window of ProB now contains the following information:&lt;br /&gt;
&lt;br /&gt;
[[File:Jars_Panes.png|700px|center]]&lt;br /&gt;
&lt;br /&gt;
You can see that the second jug contains exactly 4 gallons. The steps required to reach this state can be found in the history pane on the right (in reverse order).&lt;br /&gt;
&lt;br /&gt;
== Graphical Animation ==&lt;br /&gt;
&lt;br /&gt;
This machine above is actually included in the ProB distribution (inside the examples/B/GraphicalAnimation/ directory).&lt;br /&gt;
It also contains the following lines in the DEFINITIONS section, which defines a quick-and-dirty [[Graphical_Visualization|graphical visualisation]] of the state.&lt;br /&gt;
The images can be found in the subfolder images along the file Jars.mch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ANIMATION_IMG1 == &amp;quot;images/Filled.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG2 == &amp;quot;images/Empty.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG3 == &amp;quot;images/Void.gif&amp;quot;;&lt;br /&gt;
  gmax == max(ran(maxf));&lt;br /&gt;
  ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars &amp;amp; r:1..gmax &amp;amp; i=3};&lt;br /&gt;
  ri == (gmax+1-r);&lt;br /&gt;
  ANIMATION_FUNCTION == {r,c,i | c:Jars &amp;amp; ri:1..maxf(c) &amp;amp;&lt;br /&gt;
                                 (ri&amp;lt;=level(c) =&amp;gt; i=1 ) &amp;amp; (ri&amp;gt;level(c) =&amp;gt; i=2)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of ProB Tcl/Tk after loading the model and having found the goal:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_DieHard_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Using probcli (command-line version) ==&lt;br /&gt;
&lt;br /&gt;
To find the solution using probcli you just need to type:&lt;br /&gt;
&lt;br /&gt;
  probcli -model_check Jars.mch&lt;br /&gt;
&lt;br /&gt;
The output will be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -model_check Jars.mch&lt;br /&gt;
% found_enumeration_of_constants(30,40)&lt;br /&gt;
% backtrack(found_enumeration_of_constants(30,40))&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,10)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 60 ms (60 ms walltime)&lt;br /&gt;
States analysed: 10&lt;br /&gt;
Transitions fired: 36&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: SETUP_CONSTANTS({(j3|-&amp;gt;3),(j5|-&amp;gt;5)}): &lt;br /&gt;
 2: INITIALISATION({(j3|-&amp;gt;0),(j5|-&amp;gt;0)}): &lt;br /&gt;
 3: FillJar(j5): &lt;br /&gt;
 4: Transfer(j5,3,j3): &lt;br /&gt;
 5: EmptyJar(j3): &lt;br /&gt;
 6: Transfer(j5,2,j3): &lt;br /&gt;
 7: FillJar(j5): &lt;br /&gt;
 8: Transfer(j5,1,j3): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TLA+ Version ==&lt;br /&gt;
A TLA+ version of the puzzle is also included with ProB (inside the examples/TLA+/ directory).&lt;br /&gt;
The specification was developed by Leslie Lamport in order to be validated by the TLC model checker. However, it is possible to load TLA+ specifications with ProB as shown on the [[TLA]] wiki page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
------------------------------ MODULE DieHard ------------------------------- &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* In the movie Die Hard 3, the heros must obtain exactly 4 gallons of     *)&lt;br /&gt;
(* water using a 5 gallon jug, a 3 gallon jug, and a water faucet.  Our    *)&lt;br /&gt;
(* goal: to get TLC to solve the problem for us.                           *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* First, we write a spec that describes all allowable behaviors of our    *)&lt;br /&gt;
(* heros.                                                                  *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
EXTENDS Naturals&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  (* This statement imports the definitions of the ordinary operators on   *)&lt;br /&gt;
  (* natural numbers, such as +.                                           *)&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We next declare the specification&#039;s variables.                          *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
VARIABLES big,   \* The number of gallons of water in the 5 gallon jug.&lt;br /&gt;
          small  \* The number of gallons of water in the 3 gallon jug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now define TypeOK to be the type invariant, asserting that the value *)&lt;br /&gt;
(* of each variable is an element of the appropriate set.  A type          *)&lt;br /&gt;
(* invariant like this is not part of the specification, but it&#039;s          *)&lt;br /&gt;
(* generally a good idea to include it because it helps the reader         *)&lt;br /&gt;
(* understand the spec.  Moreover, having TLC check that it is an          *)&lt;br /&gt;
(* invariant of the spec catches errors that, in a typed language, are     *)&lt;br /&gt;
(* caught by type checking.                                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* Note: TLA+ uses the convention that a list of formulas bulleted by /\   *)&lt;br /&gt;
(* or \/ denotes the conjunction or disjunction of those formulas.         *)&lt;br /&gt;
(* Indentation of subitems is significant, allowing one to eliminate lots  *)&lt;br /&gt;
(* of parentheses.  This makes a large formula much easier to read.        *)&lt;br /&gt;
(* However, it does mean that you have to be careful with your indentation.*)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
TypeOK == /\ small \in 0..3 &lt;br /&gt;
          /\ big   \in 0..5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define of the initial predicate, that specifies the initial      *)&lt;br /&gt;
(* values of the variables.  I like to name this predicate Init, but the   *)&lt;br /&gt;
(* name doesn&#039;t matter.                                                    *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Init == /\ big = 0 &lt;br /&gt;
        /\ small = 0&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the actions that our hero can perform.  There are three   *)&lt;br /&gt;
(* things they can do:                                                     *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from the faucet into a jug.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from a jug onto the ground.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from one jug into another                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* We now consider the first two.  Since the jugs are not calibrated,      *)&lt;br /&gt;
(* partially filling or partially emptying a jug accomplishes nothing.     *)&lt;br /&gt;
(* So, the first two possibilities yield the following four possible       *)&lt;br /&gt;
(* actions.                                                                *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
FillSmallJug  == /\ small&#039; = 3 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
FillBigJug    == /\ big&#039; = 5 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
EmptySmallJug == /\ small&#039; = 0 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
EmptyBigJug   == /\ big&#039; = 0 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now consider pouring water from one jug into another.  Again, since  *)&lt;br /&gt;
(* the jugs are not callibrated, when pouring from jug A to jug B, it      *)&lt;br /&gt;
(* makes sense only to either fill B or empty A. And there&#039;s no point in   *)&lt;br /&gt;
(* emptying A if this will cause B to overflow, since that could be        *)&lt;br /&gt;
(* accomplished by the two actions of first filling B and then emptying A. *)&lt;br /&gt;
(* So, pouring water from A to B leaves B with the lesser of (i) the water *)&lt;br /&gt;
(* contained in both jugs and (ii) the volume of B. To express this        *)&lt;br /&gt;
(* mathematically, we first define Min(m,n) to equal the minimum of the    *)&lt;br /&gt;
(* numbers m and n.                                                        *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Min(m,n) == IF m &amp;lt; n THEN m ELSE n&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the last two pouring actions.  From the observation       *)&lt;br /&gt;
(* above, these definitions should be clear.                               *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
SmallToBig == /\ big&#039;   = Min(big + small, 5)&lt;br /&gt;
              /\ small&#039; = small - (big&#039; - big)&lt;br /&gt;
&lt;br /&gt;
BigToSmall == /\ small&#039; = Min(big + small, 3) &lt;br /&gt;
              /\ big&#039;   = big - (small&#039; - small)&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We define the next-state relation, which I like to call Next.  A Next   *)&lt;br /&gt;
(* step is a step of one of the six actions defined above.  Hence, Next is *)&lt;br /&gt;
(* the disjunction of those actions.                                       *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Next ==  \/ FillSmallJug &lt;br /&gt;
         \/ FillBigJug    &lt;br /&gt;
         \/ EmptySmallJug &lt;br /&gt;
         \/ EmptyBigJug    &lt;br /&gt;
         \/ SmallToBig    &lt;br /&gt;
         \/ BigToSmall    &lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Remember that our heros must measure out 4 gallons of water.            *)&lt;br /&gt;
(* Obviously, those 4 gallons must be in the 5 gallon jug.  So, they have  *)&lt;br /&gt;
(* solved their problem when they reach a state with big = 4.  So, we      *)&lt;br /&gt;
(* define NotSolved to be the predicate asserting that big # 4.            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
NotSolved == big # 4&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We find a solution by having TLC check if NotSolved is an invariant,    *)&lt;br /&gt;
(* which will cause it to print out an &amp;quot;error trace&amp;quot; consisting of a       *)&lt;br /&gt;
(* behavior ending in a states where NotSolved is false.  Such a           *)&lt;br /&gt;
(* behavior is the desired solution.  (Because TLC uses a breadth-first    *)&lt;br /&gt;
(* search, it will find the shortest solution.)                            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Version ==&lt;br /&gt;
&lt;br /&gt;
A Z version of the puzzle is also included with ProB (inside the examples/Z/GraphicalAnimation/ directory) and shown on the [[ProZ]] wiki page.&lt;br /&gt;
&lt;br /&gt;
Here is how the animation of the Z specification should look like:&lt;br /&gt;
&lt;br /&gt;
[[File:ProZ_jars.png|600px|center]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3406</id>
		<title>Die Hard Jugs Puzzle</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3406"/>
		<updated>2016-02-03T11:11:09Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the B model of a puzzle from the movie &amp;quot;Die Hard with a Vengeance&amp;quot;.&lt;br /&gt;
This [https://www.youtube.com/watch?v=BVtQNK_ZUJg clip shows Bruce Willis and Samuel Jackson having a go at the puzzle].&lt;br /&gt;
A [http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm|more detailed explanation can be found here].&lt;br /&gt;
At start we have one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gallons by filling, emptying or transferring water from the jugs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Jars&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  GOAL == (4 : ran(level));&lt;br /&gt;
SETS Jars = {j3,j5}&lt;br /&gt;
CONSTANTS maxf&lt;br /&gt;
PROPERTIES maxf : Jars --&amp;gt; NATURAL &amp;amp;&lt;br /&gt;
           maxf = {j3 |-&amp;gt; 3, j5 |-&amp;gt; 5} /* in this puzzle we have two jars, with capacities 3 and 5 */&lt;br /&gt;
VARIABLES level&lt;br /&gt;
INVARIANT&lt;br /&gt;
  level: Jars --&amp;gt; NATURAL&lt;br /&gt;
INITIALISATION level := Jars * {0}  /* all jars start out empty */&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  FillJar(j) = /* we can completely fill a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;lt;maxf(j) THEN&lt;br /&gt;
    level(j) := maxf(j)&lt;br /&gt;
   END;&lt;br /&gt;
  EmptyJar(j) = /* we can completely empty a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;gt;0 THEN&lt;br /&gt;
    level(j) := 0&lt;br /&gt;
   END;&lt;br /&gt;
  Transfer(j1,amount,j2) = /* we can transfer from jar j1 to j2 until either j2 is full or j1 is empty */&lt;br /&gt;
   PRE j1:Jars &amp;amp; j2:Jars &amp;amp; j1 /= j2 &amp;amp; amount&amp;gt;0 &amp;amp;&lt;br /&gt;
                               amount = min({level(j1), maxf(j2)-level(j2)}) THEN&lt;br /&gt;
      level := level &amp;lt;+ { j1|-&amp;gt; level(j1)-amount, j2 |-&amp;gt; level(j2)+amount }&lt;br /&gt;
   END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opening the file in ProB, choose the Model Check command in the Verify menu and then check the &amp;quot;Find Define GOAL&amp;quot; check box.&lt;br /&gt;
This instructs ProB to search for states satisfying the GOAL predicate &amp;lt;tt&amp;gt;(4:ran(level))&amp;lt;/tt&amp;gt; defined above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_ModelCheckGoalBox.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now press the model check button and you should now obtain the following message:&lt;br /&gt;
[[File:ProB_Goal_Found.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
The main window of ProB now contains the following information:&lt;br /&gt;
&lt;br /&gt;
[[File:Jars_Panes.png|700px|center]]&lt;br /&gt;
&lt;br /&gt;
You can see that the second jug contains exactly 4 gallons. The steps required to reach this state can be found in the history pane on the right (in reverse order).&lt;br /&gt;
&lt;br /&gt;
== Graphical Animation ==&lt;br /&gt;
&lt;br /&gt;
This machine above is actually included in the ProB distribution (inside the examples/B/GraphicalAnimation/ directory).&lt;br /&gt;
It also contains the following lines in the DEFINITIONS section, which defines a quick-and-dirty [[Graphical_Visualization|graphical visualisation]] of the state.&lt;br /&gt;
The images can be found in the subfolder images along the file Jars.mch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ANIMATION_IMG1 == &amp;quot;images/Filled.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG2 == &amp;quot;images/Empty.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG3 == &amp;quot;images/Void.gif&amp;quot;;&lt;br /&gt;
  gmax == max(ran(maxf));&lt;br /&gt;
  ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars &amp;amp; r:1..gmax &amp;amp; i=3};&lt;br /&gt;
  ri == (gmax+1-r);&lt;br /&gt;
  ANIMATION_FUNCTION == {r,c,i | c:Jars &amp;amp; ri:1..maxf(c) &amp;amp;&lt;br /&gt;
                                 (ri&amp;lt;=level(c) =&amp;gt; i=1 ) &amp;amp; (ri&amp;gt;level(c) =&amp;gt; i=2)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of ProB Tcl/Tk after loading the model and having found the goal:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_DieHard_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Using probcli (command-line version) ==&lt;br /&gt;
&lt;br /&gt;
To find the solution using probcli you just need to type:&lt;br /&gt;
&lt;br /&gt;
  probcli -model_check Jars.mch&lt;br /&gt;
&lt;br /&gt;
The output will be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -model_check Jars.mch&lt;br /&gt;
% found_enumeration_of_constants(30,40)&lt;br /&gt;
% backtrack(found_enumeration_of_constants(30,40))&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,10)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 60 ms (60 ms walltime)&lt;br /&gt;
States analysed: 10&lt;br /&gt;
Transitions fired: 36&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: SETUP_CONSTANTS({(j3|-&amp;gt;3),(j5|-&amp;gt;5)}): &lt;br /&gt;
 2: INITIALISATION({(j3|-&amp;gt;0),(j5|-&amp;gt;0)}): &lt;br /&gt;
 3: FillJar(j5): &lt;br /&gt;
 4: Transfer(j5,3,j3): &lt;br /&gt;
 5: EmptyJar(j3): &lt;br /&gt;
 6: Transfer(j5,2,j3): &lt;br /&gt;
 7: FillJar(j5): &lt;br /&gt;
 8: Transfer(j5,1,j3): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TLA+ Version ==&lt;br /&gt;
A TLA+ version of the puzzle is also included with ProB (inside the examples/TLA+/ directory).&lt;br /&gt;
The specification was developed by Leslie Lamport in order to be validated by the TLC model checker. However, it is possible to load TLA+ specifications with ProB as shown on the [[TLA]] wiki page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
------------------------------ MODULE DieHard ------------------------------- &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* In the movie Die Hard 3, the heros must obtain exactly 4 gallons of     *)&lt;br /&gt;
(* water using a 5 gallon jug, a 3 gallon jug, and a water faucet.  Our    *)&lt;br /&gt;
(* goal: to get TLC to solve the problem for us.                           *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* First, we write a spec that describes all allowable behaviors of our    *)&lt;br /&gt;
(* heros.                                                                  *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
EXTENDS Naturals&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  (* This statement imports the definitions of the ordinary operators on   *)&lt;br /&gt;
  (* natural numbers, such as +.                                           *)&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We next declare the specification&#039;s variables.                          *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
VARIABLES big,   \* The number of gallons of water in the 5 gallon jug.&lt;br /&gt;
          small  \* The number of gallons of water in the 3 gallon jug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now define TypeOK to be the type invariant, asserting that the value *)&lt;br /&gt;
(* of each variable is an element of the appropriate set.  A type          *)&lt;br /&gt;
(* invariant like this is not part of the specification, but it&#039;s          *)&lt;br /&gt;
(* generally a good idea to include it because it helps the reader         *)&lt;br /&gt;
(* understand the spec.  Moreover, having TLC check that it is an          *)&lt;br /&gt;
(* invariant of the spec catches errors that, in a typed language, are     *)&lt;br /&gt;
(* caught by type checking.                                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* Note: TLA+ uses the convention that a list of formulas bulleted by /\   *)&lt;br /&gt;
(* or \/ denotes the conjunction or disjunction of those formulas.         *)&lt;br /&gt;
(* Indentation of subitems is significant, allowing one to eliminate lots  *)&lt;br /&gt;
(* of parentheses.  This makes a large formula much easier to read.        *)&lt;br /&gt;
(* However, it does mean that you have to be careful with your indentation.*)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
TypeOK == /\ small \in 0..3 &lt;br /&gt;
          /\ big   \in 0..5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define of the initial predicate, that specifies the initial      *)&lt;br /&gt;
(* values of the variables.  I like to name this predicate Init, but the   *)&lt;br /&gt;
(* name doesn&#039;t matter.                                                    *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Init == /\ big = 0 &lt;br /&gt;
        /\ small = 0&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the actions that our hero can perform.  There are three   *)&lt;br /&gt;
(* things they can do:                                                     *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from the faucet into a jug.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from a jug onto the ground.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from one jug into another                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* We now consider the first two.  Since the jugs are not calibrated,      *)&lt;br /&gt;
(* partially filling or partially emptying a jug accomplishes nothing.     *)&lt;br /&gt;
(* So, the first two possibilities yield the following four possible       *)&lt;br /&gt;
(* actions.                                                                *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
FillSmallJug  == /\ small&#039; = 3 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
FillBigJug    == /\ big&#039; = 5 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
EmptySmallJug == /\ small&#039; = 0 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
EmptyBigJug   == /\ big&#039; = 0 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now consider pouring water from one jug into another.  Again, since  *)&lt;br /&gt;
(* the jugs are not callibrated, when pouring from jug A to jug B, it      *)&lt;br /&gt;
(* makes sense only to either fill B or empty A. And there&#039;s no point in   *)&lt;br /&gt;
(* emptying A if this will cause B to overflow, since that could be        *)&lt;br /&gt;
(* accomplished by the two actions of first filling B and then emptying A. *)&lt;br /&gt;
(* So, pouring water from A to B leaves B with the lesser of (i) the water *)&lt;br /&gt;
(* contained in both jugs and (ii) the volume of B. To express this        *)&lt;br /&gt;
(* mathematically, we first define Min(m,n) to equal the minimum of the    *)&lt;br /&gt;
(* numbers m and n.                                                        *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Min(m,n) == IF m &amp;lt; n THEN m ELSE n&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the last two pouring actions.  From the observation       *)&lt;br /&gt;
(* above, these definitions should be clear.                               *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
SmallToBig == /\ big&#039;   = Min(big + small, 5)&lt;br /&gt;
              /\ small&#039; = small - (big&#039; - big)&lt;br /&gt;
&lt;br /&gt;
BigToSmall == /\ small&#039; = Min(big + small, 3) &lt;br /&gt;
              /\ big&#039;   = big - (small&#039; - small)&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We define the next-state relation, which I like to call Next.  A Next   *)&lt;br /&gt;
(* step is a step of one of the six actions defined above.  Hence, Next is *)&lt;br /&gt;
(* the disjunction of those actions.                                       *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Next ==  \/ FillSmallJug &lt;br /&gt;
         \/ FillBigJug    &lt;br /&gt;
         \/ EmptySmallJug &lt;br /&gt;
         \/ EmptyBigJug    &lt;br /&gt;
         \/ SmallToBig    &lt;br /&gt;
         \/ BigToSmall    &lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Remember that our heros must measure out 4 gallons of water.            *)&lt;br /&gt;
(* Obviously, those 4 gallons must be in the 5 gallon jug.  So, they have  *)&lt;br /&gt;
(* solved their problem when they reach a state with big = 4.  So, we      *)&lt;br /&gt;
(* define NotSolved to be the predicate asserting that big # 4.            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
NotSolved == big # 4&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We find a solution by having TLC check if NotSolved is an invariant,    *)&lt;br /&gt;
(* which will cause it to print out an &amp;quot;error trace&amp;quot; consisting of a       *)&lt;br /&gt;
(* behavior ending in a states where NotSolved is false.  Such a           *)&lt;br /&gt;
(* behavior is the desired solution.  (Because TLC uses a breadth-first    *)&lt;br /&gt;
(* search, it will find the shortest solution.)                            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Version ==&lt;br /&gt;
&lt;br /&gt;
A Z version of the puzzle is also included with ProB (inside the examples/Z/GraphicalAnimation/ directory) and shown on the [[ProZ]] wiki page.&lt;br /&gt;
&lt;br /&gt;
Here is how the animation of the Z specification should look like:&lt;br /&gt;
&lt;br /&gt;
[[File:ProZ_jars.png|600px|center]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3405</id>
		<title>Die Hard Jugs Puzzle</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3405"/>
		<updated>2016-02-03T11:03:47Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* TLA+ Version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the B model of a puzzle from the movie &amp;quot;Die Hard with a Vengeance&amp;quot;.&lt;br /&gt;
This [https://www.youtube.com/watch?v=BVtQNK_ZUJg|clip shows Bruce Willis and Samuel Jackson having a go at the puzzle].&lt;br /&gt;
A [http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm|more detailed explanation can be found here].&lt;br /&gt;
At start we have one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gallons by filling, emptying or transferring water from the jugs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Jars&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  GOAL == (4 : ran(level));&lt;br /&gt;
SETS Jars = {j3,j5}&lt;br /&gt;
CONSTANTS maxf&lt;br /&gt;
PROPERTIES maxf : Jars --&amp;gt; NATURAL &amp;amp;&lt;br /&gt;
           maxf = {j3 |-&amp;gt; 3, j5 |-&amp;gt; 5} /* in this puzzle we have two jars, with capacities 3 and 5 */&lt;br /&gt;
VARIABLES level&lt;br /&gt;
INVARIANT&lt;br /&gt;
  level: Jars --&amp;gt; NATURAL&lt;br /&gt;
INITIALISATION level := Jars * {0}  /* all jars start out empty */&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  FillJar(j) = /* we can completely fill a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;lt;maxf(j) THEN&lt;br /&gt;
    level(j) := maxf(j)&lt;br /&gt;
   END;&lt;br /&gt;
  EmptyJar(j) = /* we can completely empty a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;gt;0 THEN&lt;br /&gt;
    level(j) := 0&lt;br /&gt;
   END;&lt;br /&gt;
  Transfer(j1,amount,j2) = /* we can transfer from jar j1 to j2 until either j2 is full or j1 is empty */&lt;br /&gt;
   PRE j1:Jars &amp;amp; j2:Jars &amp;amp; j1 /= j2 &amp;amp; amount&amp;gt;0 &amp;amp;&lt;br /&gt;
                               amount = min({level(j1), maxf(j2)-level(j2)}) THEN&lt;br /&gt;
      level := level &amp;lt;+ { j1|-&amp;gt; level(j1)-amount, j2 |-&amp;gt; level(j2)+amount }&lt;br /&gt;
   END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opening the file in ProB, choose the Model Check command in the Verify menu and then check the &amp;quot;Find Define GOAL&amp;quot; check box.&lt;br /&gt;
This instructs ProB to search for states satisfying the GOAL predicate &amp;lt;tt&amp;gt;(4:ran(level))&amp;lt;/tt&amp;gt; defined above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_ModelCheckGoalBox.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now press the model check button and you should now obtain the following message:&lt;br /&gt;
[[File:ProB_Goal_Found.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
The main window of ProB now contains the following information:&lt;br /&gt;
&lt;br /&gt;
[[File:Jars_Panes.png|700px|center]]&lt;br /&gt;
&lt;br /&gt;
You can see that the second jug contains exactly 4 gallons. The steps required to reach this state can be found in the history pane on the right (in reverse order).&lt;br /&gt;
&lt;br /&gt;
== Graphical Animation ==&lt;br /&gt;
&lt;br /&gt;
This machine above is actually included in the ProB distribution (inside the examples/B/GraphicalAnimation/ directory).&lt;br /&gt;
It also contains the following lines in the DEFINITIONS section, which defines a quick-and-dirty [[Graphical_Visualization|graphical visualisation]] of the state.&lt;br /&gt;
The images can be found in the subfolder images along the file Jars.mch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ANIMATION_IMG1 == &amp;quot;images/Filled.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG2 == &amp;quot;images/Empty.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG3 == &amp;quot;images/Void.gif&amp;quot;;&lt;br /&gt;
  gmax == max(ran(maxf));&lt;br /&gt;
  ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars &amp;amp; r:1..gmax &amp;amp; i=3};&lt;br /&gt;
  ri == (gmax+1-r);&lt;br /&gt;
  ANIMATION_FUNCTION == {r,c,i | c:Jars &amp;amp; ri:1..maxf(c) &amp;amp;&lt;br /&gt;
                                 (ri&amp;lt;=level(c) =&amp;gt; i=1 ) &amp;amp; (ri&amp;gt;level(c) =&amp;gt; i=2)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of ProB Tcl/Tk after loading the model and having found the goal:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_DieHard_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Using probcli (command-line version) ==&lt;br /&gt;
&lt;br /&gt;
To find the solution using probcli you just need to type:&lt;br /&gt;
&lt;br /&gt;
  probcli -model_check Jars.mch&lt;br /&gt;
&lt;br /&gt;
The output will be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -model_check Jars.mch&lt;br /&gt;
% found_enumeration_of_constants(30,40)&lt;br /&gt;
% backtrack(found_enumeration_of_constants(30,40))&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,10)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 60 ms (60 ms walltime)&lt;br /&gt;
States analysed: 10&lt;br /&gt;
Transitions fired: 36&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: SETUP_CONSTANTS({(j3|-&amp;gt;3),(j5|-&amp;gt;5)}): &lt;br /&gt;
 2: INITIALISATION({(j3|-&amp;gt;0),(j5|-&amp;gt;0)}): &lt;br /&gt;
 3: FillJar(j5): &lt;br /&gt;
 4: Transfer(j5,3,j3): &lt;br /&gt;
 5: EmptyJar(j3): &lt;br /&gt;
 6: Transfer(j5,2,j3): &lt;br /&gt;
 7: FillJar(j5): &lt;br /&gt;
 8: Transfer(j5,1,j3): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TLA+ Version ==&lt;br /&gt;
A TLA+ version of the puzzle is also included with ProB (inside the examples/TLA+/ directory).&lt;br /&gt;
The specification was developed by Leslie Lamport in order to be validated by the TLC model checker. However, it is possible to load TLA+ specifications with ProB as shown on the [[TLA]] wiki page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
------------------------------ MODULE DieHard ------------------------------- &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* In the movie Die Hard 3, the heros must obtain exactly 4 gallons of     *)&lt;br /&gt;
(* water using a 5 gallon jug, a 3 gallon jug, and a water faucet.  Our    *)&lt;br /&gt;
(* goal: to get TLC to solve the problem for us.                           *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* First, we write a spec that describes all allowable behaviors of our    *)&lt;br /&gt;
(* heros.                                                                  *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
EXTENDS Naturals&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  (* This statement imports the definitions of the ordinary operators on   *)&lt;br /&gt;
  (* natural numbers, such as +.                                           *)&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We next declare the specification&#039;s variables.                          *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
VARIABLES big,   \* The number of gallons of water in the 5 gallon jug.&lt;br /&gt;
          small  \* The number of gallons of water in the 3 gallon jug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now define TypeOK to be the type invariant, asserting that the value *)&lt;br /&gt;
(* of each variable is an element of the appropriate set.  A type          *)&lt;br /&gt;
(* invariant like this is not part of the specification, but it&#039;s          *)&lt;br /&gt;
(* generally a good idea to include it because it helps the reader         *)&lt;br /&gt;
(* understand the spec.  Moreover, having TLC check that it is an          *)&lt;br /&gt;
(* invariant of the spec catches errors that, in a typed language, are     *)&lt;br /&gt;
(* caught by type checking.                                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* Note: TLA+ uses the convention that a list of formulas bulleted by /\   *)&lt;br /&gt;
(* or \/ denotes the conjunction or disjunction of those formulas.         *)&lt;br /&gt;
(* Indentation of subitems is significant, allowing one to eliminate lots  *)&lt;br /&gt;
(* of parentheses.  This makes a large formula much easier to read.        *)&lt;br /&gt;
(* However, it does mean that you have to be careful with your indentation.*)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
TypeOK == /\ small \in 0..3 &lt;br /&gt;
          /\ big   \in 0..5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define of the initial predicate, that specifies the initial      *)&lt;br /&gt;
(* values of the variables.  I like to name this predicate Init, but the   *)&lt;br /&gt;
(* name doesn&#039;t matter.                                                    *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Init == /\ big = 0 &lt;br /&gt;
        /\ small = 0&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the actions that our hero can perform.  There are three   *)&lt;br /&gt;
(* things they can do:                                                     *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from the faucet into a jug.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from a jug onto the ground.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from one jug into another                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* We now consider the first two.  Since the jugs are not calibrated,      *)&lt;br /&gt;
(* partially filling or partially emptying a jug accomplishes nothing.     *)&lt;br /&gt;
(* So, the first two possibilities yield the following four possible       *)&lt;br /&gt;
(* actions.                                                                *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
FillSmallJug  == /\ small&#039; = 3 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
FillBigJug    == /\ big&#039; = 5 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
EmptySmallJug == /\ small&#039; = 0 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
EmptyBigJug   == /\ big&#039; = 0 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now consider pouring water from one jug into another.  Again, since  *)&lt;br /&gt;
(* the jugs are not callibrated, when pouring from jug A to jug B, it      *)&lt;br /&gt;
(* makes sense only to either fill B or empty A. And there&#039;s no point in   *)&lt;br /&gt;
(* emptying A if this will cause B to overflow, since that could be        *)&lt;br /&gt;
(* accomplished by the two actions of first filling B and then emptying A. *)&lt;br /&gt;
(* So, pouring water from A to B leaves B with the lesser of (i) the water *)&lt;br /&gt;
(* contained in both jugs and (ii) the volume of B. To express this        *)&lt;br /&gt;
(* mathematically, we first define Min(m,n) to equal the minimum of the    *)&lt;br /&gt;
(* numbers m and n.                                                        *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Min(m,n) == IF m &amp;lt; n THEN m ELSE n&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the last two pouring actions.  From the observation       *)&lt;br /&gt;
(* above, these definitions should be clear.                               *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
SmallToBig == /\ big&#039;   = Min(big + small, 5)&lt;br /&gt;
              /\ small&#039; = small - (big&#039; - big)&lt;br /&gt;
&lt;br /&gt;
BigToSmall == /\ small&#039; = Min(big + small, 3) &lt;br /&gt;
              /\ big&#039;   = big - (small&#039; - small)&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We define the next-state relation, which I like to call Next.  A Next   *)&lt;br /&gt;
(* step is a step of one of the six actions defined above.  Hence, Next is *)&lt;br /&gt;
(* the disjunction of those actions.                                       *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Next ==  \/ FillSmallJug &lt;br /&gt;
         \/ FillBigJug    &lt;br /&gt;
         \/ EmptySmallJug &lt;br /&gt;
         \/ EmptyBigJug    &lt;br /&gt;
         \/ SmallToBig    &lt;br /&gt;
         \/ BigToSmall    &lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Remember that our heros must measure out 4 gallons of water.            *)&lt;br /&gt;
(* Obviously, those 4 gallons must be in the 5 gallon jug.  So, they have  *)&lt;br /&gt;
(* solved their problem when they reach a state with big = 4.  So, we      *)&lt;br /&gt;
(* define NotSolved to be the predicate asserting that big # 4.            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
NotSolved == big # 4&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We find a solution by having TLC check if NotSolved is an invariant,    *)&lt;br /&gt;
(* which will cause it to print out an &amp;quot;error trace&amp;quot; consisting of a       *)&lt;br /&gt;
(* behavior ending in a states where NotSolved is false.  Such a           *)&lt;br /&gt;
(* behavior is the desired solution.  (Because TLC uses a breadth-first    *)&lt;br /&gt;
(* search, it will find the shortest solution.)                            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Version ==&lt;br /&gt;
&lt;br /&gt;
A Z version of the puzzle is also included with ProB (inside the examples/Z/GraphicalAnimation/ directory) and shown on the [[ProZ]] wiki page.&lt;br /&gt;
&lt;br /&gt;
Here is how the animation of the Z specification should look like:&lt;br /&gt;
&lt;br /&gt;
[[File:ProZ_jars.png|600px|center]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3404</id>
		<title>Die Hard Jugs Puzzle</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3404"/>
		<updated>2016-02-03T09:18:25Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the B model of a puzzle from the movie &amp;quot;Die Hard with a Vengeance&amp;quot;.&lt;br /&gt;
This [https://www.youtube.com/watch?v=BVtQNK_ZUJg|clip shows Bruce Willis and Samuel Jackson having a go at the puzzle].&lt;br /&gt;
A [http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm|more detailed explanation can be found here].&lt;br /&gt;
At start we have one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gallons by filling, emptying or transferring water from the jugs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Jars&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  GOAL == (4 : ran(level));&lt;br /&gt;
SETS Jars = {j3,j5}&lt;br /&gt;
CONSTANTS maxf&lt;br /&gt;
PROPERTIES maxf : Jars --&amp;gt; NATURAL &amp;amp;&lt;br /&gt;
           maxf = {j3 |-&amp;gt; 3, j5 |-&amp;gt; 5} /* in this puzzle we have two jars, with capacities 3 and 5 */&lt;br /&gt;
VARIABLES level&lt;br /&gt;
INVARIANT&lt;br /&gt;
  level: Jars --&amp;gt; NATURAL&lt;br /&gt;
INITIALISATION level := Jars * {0}  /* all jars start out empty */&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  FillJar(j) = /* we can completely fill a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;lt;maxf(j) THEN&lt;br /&gt;
    level(j) := maxf(j)&lt;br /&gt;
   END;&lt;br /&gt;
  EmptyJar(j) = /* we can completely empty a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;gt;0 THEN&lt;br /&gt;
    level(j) := 0&lt;br /&gt;
   END;&lt;br /&gt;
  Transfer(j1,amount,j2) = /* we can transfer from jar j1 to j2 until either j2 is full or j1 is empty */&lt;br /&gt;
   PRE j1:Jars &amp;amp; j2:Jars &amp;amp; j1 /= j2 &amp;amp; amount&amp;gt;0 &amp;amp;&lt;br /&gt;
                               amount = min({level(j1), maxf(j2)-level(j2)}) THEN&lt;br /&gt;
      level := level &amp;lt;+ { j1|-&amp;gt; level(j1)-amount, j2 |-&amp;gt; level(j2)+amount }&lt;br /&gt;
   END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opening the file in ProB, choose the Model Check command in the Verify menu and then check the &amp;quot;Find Define GOAL&amp;quot; check box.&lt;br /&gt;
This instructs ProB to search for states satisfying the GOAL predicate &amp;lt;tt&amp;gt;(4:ran(level))&amp;lt;/tt&amp;gt; defined above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_ModelCheckGoalBox.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now press the model check button and you should now obtain the following message:&lt;br /&gt;
[[File:ProB_Goal_Found.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
The main window of ProB now contains the following information:&lt;br /&gt;
&lt;br /&gt;
[[File:Jars_Panes.png|700px|center]]&lt;br /&gt;
&lt;br /&gt;
You can see that the second jug contains exactly 4 gallons. The steps required to reach this state can be found in the history pane on the right (in reverse order).&lt;br /&gt;
&lt;br /&gt;
== Graphical Animation ==&lt;br /&gt;
&lt;br /&gt;
This machine above is actually included in the ProB distribution (inside the examples/B/GraphicalAnimation/ directory).&lt;br /&gt;
It also contains the following lines in the DEFINITIONS section, which defines a quick-and-dirty [[Graphical_Visualization|graphical visualisation]] of the state.&lt;br /&gt;
The images can be found in the subfolder images along the file Jars.mch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ANIMATION_IMG1 == &amp;quot;images/Filled.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG2 == &amp;quot;images/Empty.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG3 == &amp;quot;images/Void.gif&amp;quot;;&lt;br /&gt;
  gmax == max(ran(maxf));&lt;br /&gt;
  ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars &amp;amp; r:1..gmax &amp;amp; i=3};&lt;br /&gt;
  ri == (gmax+1-r);&lt;br /&gt;
  ANIMATION_FUNCTION == {r,c,i | c:Jars &amp;amp; ri:1..maxf(c) &amp;amp;&lt;br /&gt;
                                 (ri&amp;lt;=level(c) =&amp;gt; i=1 ) &amp;amp; (ri&amp;gt;level(c) =&amp;gt; i=2)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of ProB Tcl/Tk after loading the model and having found the goal:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_DieHard_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Using probcli (command-line version) ==&lt;br /&gt;
&lt;br /&gt;
To find the solution using probcli you just need to type:&lt;br /&gt;
&lt;br /&gt;
  probcli -model_check Jars.mch&lt;br /&gt;
&lt;br /&gt;
The output will be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -model_check Jars.mch&lt;br /&gt;
% found_enumeration_of_constants(30,40)&lt;br /&gt;
% backtrack(found_enumeration_of_constants(30,40))&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,10)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 60 ms (60 ms walltime)&lt;br /&gt;
States analysed: 10&lt;br /&gt;
Transitions fired: 36&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: SETUP_CONSTANTS({(j3|-&amp;gt;3),(j5|-&amp;gt;5)}): &lt;br /&gt;
 2: INITIALISATION({(j3|-&amp;gt;0),(j5|-&amp;gt;0)}): &lt;br /&gt;
 3: FillJar(j5): &lt;br /&gt;
 4: Transfer(j5,3,j3): &lt;br /&gt;
 5: EmptyJar(j3): &lt;br /&gt;
 6: Transfer(j5,2,j3): &lt;br /&gt;
 7: FillJar(j5): &lt;br /&gt;
 8: Transfer(j5,1,j3): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TLA+ Version ==&lt;br /&gt;
A TLA+ version of the puzzle is also included with ProB (inside the examples/TLA+/ directory).&lt;br /&gt;
The specification was developed by Leslie Lamport in order to be validated by the TLC model checker. However, it possible to load TLA+ specifications with ProB as shown on the [[TLA]] wiki page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
------------------------------ MODULE DieHard ------------------------------- &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* In the movie Die Hard 3, the heros must obtain exactly 4 gallons of     *)&lt;br /&gt;
(* water using a 5 gallon jug, a 3 gallon jug, and a water faucet.  Our    *)&lt;br /&gt;
(* goal: to get TLC to solve the problem for us.                           *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* First, we write a spec that describes all allowable behaviors of our    *)&lt;br /&gt;
(* heros.                                                                  *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
EXTENDS Naturals&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  (* This statement imports the definitions of the ordinary operators on   *)&lt;br /&gt;
  (* natural numbers, such as +.                                           *)&lt;br /&gt;
  (*************************************************************************)&lt;br /&gt;
  &lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We next declare the specification&#039;s variables.                          *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
VARIABLES big,   \* The number of gallons of water in the 5 gallon jug.&lt;br /&gt;
          small  \* The number of gallons of water in the 3 gallon jug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now define TypeOK to be the type invariant, asserting that the value *)&lt;br /&gt;
(* of each variable is an element of the appropriate set.  A type          *)&lt;br /&gt;
(* invariant like this is not part of the specification, but it&#039;s          *)&lt;br /&gt;
(* generally a good idea to include it because it helps the reader         *)&lt;br /&gt;
(* understand the spec.  Moreover, having TLC check that it is an          *)&lt;br /&gt;
(* invariant of the spec catches errors that, in a typed language, are     *)&lt;br /&gt;
(* caught by type checking.                                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* Note: TLA+ uses the convention that a list of formulas bulleted by /\   *)&lt;br /&gt;
(* or \/ denotes the conjunction or disjunction of those formulas.         *)&lt;br /&gt;
(* Indentation of subitems is significant, allowing one to eliminate lots  *)&lt;br /&gt;
(* of parentheses.  This makes a large formula much easier to read.        *)&lt;br /&gt;
(* However, it does mean that you have to be careful with your indentation.*)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
TypeOK == /\ small \in 0..3 &lt;br /&gt;
          /\ big   \in 0..5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define of the initial predicate, that specifies the initial      *)&lt;br /&gt;
(* values of the variables.  I like to name this predicate Init, but the   *)&lt;br /&gt;
(* name doesn&#039;t matter.                                                    *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Init == /\ big = 0 &lt;br /&gt;
        /\ small = 0&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the actions that our hero can perform.  There are three   *)&lt;br /&gt;
(* things they can do:                                                     *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from the faucet into a jug.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from a jug onto the ground.                              *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(*   - Pour water from one jug into another                                *)&lt;br /&gt;
(*                                                                         *)&lt;br /&gt;
(* We now consider the first two.  Since the jugs are not calibrated,      *)&lt;br /&gt;
(* partially filling or partially emptying a jug accomplishes nothing.     *)&lt;br /&gt;
(* So, the first two possibilities yield the following four possible       *)&lt;br /&gt;
(* actions.                                                                *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
FillSmallJug  == /\ small&#039; = 3 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
FillBigJug    == /\ big&#039; = 5 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
EmptySmallJug == /\ small&#039; = 0 &lt;br /&gt;
                 /\ big&#039; = big&lt;br /&gt;
&lt;br /&gt;
EmptyBigJug   == /\ big&#039; = 0 &lt;br /&gt;
                 /\ small&#039; = small&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We now consider pouring water from one jug into another.  Again, since  *)&lt;br /&gt;
(* the jugs are not callibrated, when pouring from jug A to jug B, it      *)&lt;br /&gt;
(* makes sense only to either fill B or empty A. And there&#039;s no point in   *)&lt;br /&gt;
(* emptying A if this will cause B to overflow, since that could be        *)&lt;br /&gt;
(* accomplished by the two actions of first filling B and then emptying A. *)&lt;br /&gt;
(* So, pouring water from A to B leaves B with the lesser of (i) the water *)&lt;br /&gt;
(* contained in both jugs and (ii) the volume of B. To express this        *)&lt;br /&gt;
(* mathematically, we first define Min(m,n) to equal the minimum of the    *)&lt;br /&gt;
(* numbers m and n.                                                        *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Min(m,n) == IF m &amp;lt; n THEN m ELSE n&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Now we define the last two pouring actions.  From the observation       *)&lt;br /&gt;
(* above, these definitions should be clear.                               *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
SmallToBig == /\ big&#039;   = Min(big + small, 5)&lt;br /&gt;
              /\ small&#039; = small - (big&#039; - big)&lt;br /&gt;
&lt;br /&gt;
BigToSmall == /\ small&#039; = Min(big + small, 3) &lt;br /&gt;
              /\ big&#039;   = big - (small&#039; - small)&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We define the next-state relation, which I like to call Next.  A Next   *)&lt;br /&gt;
(* step is a step of one of the six actions defined above.  Hence, Next is *)&lt;br /&gt;
(* the disjunction of those actions.                                       *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
Next ==  \/ FillSmallJug &lt;br /&gt;
         \/ FillBigJug    &lt;br /&gt;
         \/ EmptySmallJug &lt;br /&gt;
         \/ EmptyBigJug    &lt;br /&gt;
         \/ SmallToBig    &lt;br /&gt;
         \/ BigToSmall    &lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* Remember that our heros must measure out 4 gallons of water.            *)&lt;br /&gt;
(* Obviously, those 4 gallons must be in the 5 gallon jug.  So, they have  *)&lt;br /&gt;
(* solved their problem when they reach a state with big = 4.  So, we      *)&lt;br /&gt;
(* define NotSolved to be the predicate asserting that big # 4.            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
NotSolved == big # 4&lt;br /&gt;
&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
(* We find a solution by having TLC check if NotSolved is an invariant,    *)&lt;br /&gt;
(* which will cause it to print out an &amp;quot;error trace&amp;quot; consisting of a       *)&lt;br /&gt;
(* behavior ending in a states where NotSolved is false.  Such a           *)&lt;br /&gt;
(* behavior is the desired solution.  (Because TLC uses a breadth-first    *)&lt;br /&gt;
(* search, it will find the shortest solution.)                            *)&lt;br /&gt;
(***************************************************************************)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Version ==&lt;br /&gt;
&lt;br /&gt;
A Z version of the puzzle is also included with ProB (inside the examples/Z/GraphicalAnimation/ directory) and shown on the [[ProZ]] wiki page.&lt;br /&gt;
&lt;br /&gt;
Here is how the animation of the Z specification should look like:&lt;br /&gt;
&lt;br /&gt;
[[File:ProZ_jars.png|600px|center]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3403</id>
		<title>Die Hard Jugs Puzzle</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Die_Hard_Jugs_Puzzle&amp;diff=3403"/>
		<updated>2016-02-03T08:53:52Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the B model of a puzzle from the movie &amp;quot;Die Hard with a Vengeance&amp;quot;.&lt;br /&gt;
This [https://www.youtube.com/watch?v=BVtQNK_ZUJg|clip shows Bruce Willis and Samuel Jackson having a go at the puzzle].&lt;br /&gt;
A [http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm|more detailed explanation can be found here].&lt;br /&gt;
At start we have one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gallons by filling, emptying or transferring water from the jugs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Jars&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  GOAL == (4 : ran(level));&lt;br /&gt;
SETS Jars = {j3,j5}&lt;br /&gt;
CONSTANTS maxf&lt;br /&gt;
PROPERTIES maxf : Jars --&amp;gt; NATURAL &amp;amp;&lt;br /&gt;
           maxf = {j3 |-&amp;gt; 3, j5 |-&amp;gt; 5} /* in this puzzle we have two jars, with capacities 3 and 5 */&lt;br /&gt;
VARIABLES level&lt;br /&gt;
INVARIANT&lt;br /&gt;
  level: Jars --&amp;gt; NATURAL&lt;br /&gt;
INITIALISATION level := Jars * {0}  /* all jars start out empty */&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  FillJar(j) = /* we can completely fill a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;lt;maxf(j) THEN&lt;br /&gt;
    level(j) := maxf(j)&lt;br /&gt;
   END;&lt;br /&gt;
  EmptyJar(j) = /* we can completely empty a jar j */&lt;br /&gt;
   PRE j:Jars &amp;amp; level(j)&amp;gt;0 THEN&lt;br /&gt;
    level(j) := 0&lt;br /&gt;
   END;&lt;br /&gt;
  Transfer(j1,amount,j2) = /* we can transfer from jar j1 to j2 until either j2 is full or j1 is empty */&lt;br /&gt;
   PRE j1:Jars &amp;amp; j2:Jars &amp;amp; j1 /= j2 &amp;amp; amount&amp;gt;0 &amp;amp;&lt;br /&gt;
                               amount = min({level(j1), maxf(j2)-level(j2)}) THEN&lt;br /&gt;
      level := level &amp;lt;+ { j1|-&amp;gt; level(j1)-amount, j2 |-&amp;gt; level(j2)+amount }&lt;br /&gt;
   END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opening the file in ProB, choose the Model Check command in the Verify menu and then check the &amp;quot;Find Define GOAL&amp;quot; check box.&lt;br /&gt;
This instructs ProB to search for states satisfying the GOAL predicate &amp;lt;tt&amp;gt;(4:ran(level))&amp;lt;/tt&amp;gt; defined above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_ModelCheckGoalBox.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now press the model check button and you should now obtain the following message:&lt;br /&gt;
[[File:ProB_Goal_Found.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
The main window of ProB now contains the following information:&lt;br /&gt;
&lt;br /&gt;
[[File:Jars_Panes.png|700px|center]]&lt;br /&gt;
&lt;br /&gt;
You can see that the second jug contains exactly 4 gallons. The steps required to reach this state can be found in the history pane on the right (in reverse order).&lt;br /&gt;
&lt;br /&gt;
== Graphical Animation ==&lt;br /&gt;
&lt;br /&gt;
This machine above is actually included in the ProB distribution (inside the examples/B/GraphicalAnimation/ directory).&lt;br /&gt;
It also contains the following lines in the DEFINITIONS section, which defines a quick-and-dirty [[Graphical_Visualization|graphical visualisation]] of the state.&lt;br /&gt;
The images can be found in the subfolder images along the file Jars.mch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ANIMATION_IMG1 == &amp;quot;images/Filled.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG2 == &amp;quot;images/Empty.gif&amp;quot;;&lt;br /&gt;
  ANIMATION_IMG3 == &amp;quot;images/Void.gif&amp;quot;;&lt;br /&gt;
  gmax == max(ran(maxf));&lt;br /&gt;
  ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars &amp;amp; r:1..gmax &amp;amp; i=3};&lt;br /&gt;
  ri == (gmax+1-r);&lt;br /&gt;
  ANIMATION_FUNCTION == {r,c,i | c:Jars &amp;amp; ri:1..maxf(c) &amp;amp;&lt;br /&gt;
                                 (ri&amp;lt;=level(c) =&amp;gt; i=1 ) &amp;amp; (ri&amp;gt;level(c) =&amp;gt; i=2)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of ProB Tcl/Tk after loading the model and having found the goal:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_DieHard_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Using probcli (command-line version) ==&lt;br /&gt;
&lt;br /&gt;
To find the solution using probcli you just need to type:&lt;br /&gt;
&lt;br /&gt;
  probcli -model_check Jars.mch&lt;br /&gt;
&lt;br /&gt;
The output will be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -model_check Jars.mch&lt;br /&gt;
% found_enumeration_of_constants(30,40)&lt;br /&gt;
% backtrack(found_enumeration_of_constants(30,40))&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,10)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 60 ms (60 ms walltime)&lt;br /&gt;
States analysed: 10&lt;br /&gt;
Transitions fired: 36&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: SETUP_CONSTANTS({(j3|-&amp;gt;3),(j5|-&amp;gt;5)}): &lt;br /&gt;
 2: INITIALISATION({(j3|-&amp;gt;0),(j5|-&amp;gt;0)}): &lt;br /&gt;
 3: FillJar(j5): &lt;br /&gt;
 4: Transfer(j5,3,j3): &lt;br /&gt;
 5: EmptyJar(j3): &lt;br /&gt;
 6: Transfer(j5,2,j3): &lt;br /&gt;
 7: FillJar(j5): &lt;br /&gt;
 8: Transfer(j5,1,j3): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Version ==&lt;br /&gt;
&lt;br /&gt;
A Z version of the puzzle is also included with ProB (inside the examples/Z/GraphicalAnimation/ directory) and shown on the [[ProZ]] wiki page.&lt;br /&gt;
&lt;br /&gt;
Here is how the animation of the Z specification should look like:&lt;br /&gt;
&lt;br /&gt;
[[File:ProZ_jars.png|600px|center]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=3275</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=3275"/>
		<updated>2016-01-13T14:09:41Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : NATURAL&lt;br /&gt;
 INITIALISATION x := k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=State_space_visualization_examples&amp;diff=3222</id>
		<title>State space visualization examples</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=State_space_visualization_examples&amp;diff=3222"/>
		<updated>2015-12-18T18:07:59Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Alternating Bit Protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
(This page is under construction)&lt;br /&gt;
== Alternating Bit Protocol ==&lt;br /&gt;
&lt;br /&gt;
This is a visualisation of 3643 states and 11115 transitions of a TLA+ model of the alternating bit protocol, as distributed with the [http://research.microsoft.com/en-us/um/people/lamport/tla/tools.html TLA+ tools].&lt;br /&gt;
This model (MCAlternatingBit.tla) was loaded with ProB, the model checker run for a few seconds and then the command &amp;quot;State Space Fast Rendering&amp;quot; with options (scale,fast) was used.&lt;br /&gt;
&lt;br /&gt;
The goal predicate rBit=1 was used; those states satisfying this predicate are shown in orange.&lt;br /&gt;
&lt;br /&gt;
[[File:MCAlternatingBit_sfdp.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main file of the model is:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
--------------------------- MODULE MCAlternatingBit -------------------------&lt;br /&gt;
EXTENDS AlternatingBit, TLC&lt;br /&gt;
&lt;br /&gt;
INSTANCE ABCorrectness &lt;br /&gt;
&lt;br /&gt;
CONSTANTS msgQLen, ackQLen&lt;br /&gt;
&lt;br /&gt;
SeqConstraint == /\ Len(msgQ) \leq msgQLen&lt;br /&gt;
                 /\ Len(ackQ) \leq ackQLen&lt;br /&gt;
&lt;br /&gt;
SentLeadsToRcvd == \A d \in Data : (sent = d) /\ (sBit # sAck) ~&amp;gt; (rcvd = d)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
ImpliedAction == [ABCNext]_cvars&lt;br /&gt;
&lt;br /&gt;
TNext == WF_msgQ(~ABTypeInv&#039;)&lt;br /&gt;
TProp == \A d \in Data : (sent = d) =&amp;gt; [](sent = d)&lt;br /&gt;
&lt;br /&gt;
CSpec == ABSpec /\ TNext&lt;br /&gt;
&lt;br /&gt;
DataPerm == Permutations(Data)&lt;br /&gt;
==============================================================&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=State_space_visualization_examples&amp;diff=3221</id>
		<title>State space visualization examples</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=State_space_visualization_examples&amp;diff=3221"/>
		<updated>2015-12-18T18:03:46Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Alternating Bit Protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
(This page is under construction)&lt;br /&gt;
== Alternating Bit Protocol ==&lt;br /&gt;
&lt;br /&gt;
This is a visualisation of 3643 states and 11115 transitions of a TLA+ model of the alternating bit protocol, as distributed with the [http://research.microsoft.com/en-us/um/people/lamport/tla/tools.html | TLC model checker].&lt;br /&gt;
This model (MCAlternatingBit.tla) was loaded with ProB, the model checker run for a few seconds and then the command &amp;quot;State Space Fast Rendering&amp;quot; with options (scale,fast) was used.&lt;br /&gt;
&lt;br /&gt;
The goal predicate rBit=1 was used; those states satisfying this predicate are shown in orange.&lt;br /&gt;
&lt;br /&gt;
[[File:MCAlternatingBit_sfdp.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main file of the model is:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
--------------------------- MODULE MCAlternatingBit -------------------------&lt;br /&gt;
EXTENDS AlternatingBit, TLC&lt;br /&gt;
&lt;br /&gt;
INSTANCE ABCorrectness &lt;br /&gt;
&lt;br /&gt;
CONSTANTS msgQLen, ackQLen&lt;br /&gt;
&lt;br /&gt;
SeqConstraint == /\ Len(msgQ) \leq msgQLen&lt;br /&gt;
                 /\ Len(ackQ) \leq ackQLen&lt;br /&gt;
&lt;br /&gt;
SentLeadsToRcvd == \A d \in Data : (sent = d) /\ (sBit # sAck) ~&amp;gt; (rcvd = d)&lt;br /&gt;
=============================================================================&lt;br /&gt;
&lt;br /&gt;
ImpliedAction == [ABCNext]_cvars&lt;br /&gt;
&lt;br /&gt;
TNext == WF_msgQ(~ABTypeInv&#039;)&lt;br /&gt;
TProp == \A d \in Data : (sent = d) =&amp;gt; [](sent = d)&lt;br /&gt;
&lt;br /&gt;
CSpec == ABSpec /\ TNext&lt;br /&gt;
&lt;br /&gt;
DataPerm == Permutations(Data)&lt;br /&gt;
==============================================================&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLA&amp;diff=2490</id>
		<title>TLA</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLA&amp;diff=2490"/>
		<updated>2014-11-21T19:56:51Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Using ProB for Animation and Model Checking of TLA+ specifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.3.5, ProB supports [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Using ProB for Animation and Model Checking of TLA+ specifications =&lt;br /&gt;
&lt;br /&gt;
The [http://nightly.cobra.cs.uni-duesseldorf.de/tcl/ latest version of ProB] uses the translator TLA2B, which translates the non temporal part of a [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] module to a B machine.&lt;br /&gt;
To use ProB for TLA+ you have to download the TLA tools. They are  released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
In the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
When you open a TLA+ module ProB generates the translated B machine in the same folder and loads it in the background.&lt;br /&gt;
If there is a valid translation you can animate and model check the TLA+ specification.&lt;br /&gt;
There are many working examples in the &#039;ProB/Examples/TLA+/&#039;-directory.&lt;br /&gt;
&lt;br /&gt;
There is also an [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschelTLA2012 iFM&#039;2012 paper] that describes our approach and performs some comparison with TLC.&lt;br /&gt;
Our [[ProB_Logic_Calculator|online ProB Logic Calculator]] now also supports TLA syntax and you can experiment with its predicate and expression evaluation capabilities.&lt;br /&gt;
&lt;br /&gt;
= TLA2B =&lt;br /&gt;
&lt;br /&gt;
The parser and semantic analyzer [http://research.microsoft.com/en-us/um/people/lamport/tla/sany.html SANY] serves as the front end of TLA2B. SANY was written by Jean-Charles Grégoire&lt;br /&gt;
and David Jefferson and is also the front end of the model checker [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC].&lt;br /&gt;
After parsing there is type checking phase, in which types of variables and constants are inferred.&lt;br /&gt;
So there is no need to especially declare types in a invariant clause (in the manner of the B method).&lt;br /&gt;
Moreover it checks if a TLA+ module is translatable (see Limitations of Translation).&lt;br /&gt;
&lt;br /&gt;
To tell TLA2B the name of a specification of a TLA+ module you can use a configuration file, just like for TLC.&lt;br /&gt;
The configuration file must have the same name as the name of the module and the filename extension &#039;cfg&#039;.&lt;br /&gt;
The configuration file parser is the same as for TLC so you can look up the syntax in the [http://research.microsoft.com/en-us/um/people/lamport/tla/book.html &#039;Specifying Systems&#039;-book] (Leslie Lamport).&lt;br /&gt;
If there is no configuration file available TLA2B looks for a TLA+ definition named &#039;Spec&#039; &lt;br /&gt;
or alternatively for a &#039;Init&#039; and a &#039;Next&#039; definition describing the initial state and the next state relation.&lt;br /&gt;
Besides that in the configuration file you can give a constant a value but this is not mandatory, in contrast to TLC.&lt;br /&gt;
Otherwise ProB lets you choose during the animation process a value for the constant which satisfy the assumptions under the ASSUME clause. &lt;br /&gt;
TLA2B supports furthermore overriding of a constant or definition by another definition in the configuration file.&lt;br /&gt;
&lt;br /&gt;
= Supported TLA+ syntax =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Logic&lt;br /&gt;
-----&lt;br /&gt;
 P /\ Q                       conjunction&lt;br /&gt;
 P \/ Q                       disjunction&lt;br /&gt;
 ~ or \lnot or \neg           negation&lt;br /&gt;
 =&amp;gt;                           implication&lt;br /&gt;
 &amp;lt;=&amp;gt; or \equiv                equivalence&lt;br /&gt;
 TRUE&lt;br /&gt;
 FALSE&lt;br /&gt;
 BOOLEAN                      set containing TRUE and FALSE&lt;br /&gt;
 \A x \in S : P               universal quantification&lt;br /&gt;
 \E x \in S : P               existential quantification&lt;br /&gt;
 &lt;br /&gt;
Equality:&lt;br /&gt;
------&lt;br /&gt;
 e = f                        equality&lt;br /&gt;
 e # f or e /= f              inequality &lt;br /&gt;
&lt;br /&gt;
Sets&lt;br /&gt;
------&lt;br /&gt;
 {d, e}                       set consisting of elements d, e&lt;br /&gt;
 {x \in S : P}                set of elements x in S satisfying p&lt;br /&gt;
 {e : x \in S}                set of elements e such that x in S&lt;br /&gt;
 e \in S                      element of&lt;br /&gt;
 e \notin S                   not element of&lt;br /&gt;
 S \cup T or S \union T       set union&lt;br /&gt;
 S \cap T or S \intersect     set intersection&lt;br /&gt;
 S \subseteq T                equality or subset of&lt;br /&gt;
 S \ t                        set difference&lt;br /&gt;
 SUBSET S                     set of subsets of S&lt;br /&gt;
 UNION S                      union of all elements of S&lt;br /&gt;
&lt;br /&gt;
Functions&lt;br /&gt;
------&lt;br /&gt;
 f[e]                         function application&lt;br /&gt;
 DOMAIN f                     domain of function f&lt;br /&gt;
 [x \in S |-&amp;gt; e]              function f such that f[x] = e for x in S&lt;br /&gt;
 [S -&amp;gt; T]                     Set of functions f with f[x] in T for x in S&lt;br /&gt;
 [f EXCEPT ![e] = d]          the function equal to f except f[e] = d&lt;br /&gt;
&lt;br /&gt;
Records&lt;br /&gt;
-------&lt;br /&gt;
 r.id                         the id-field of record r&lt;br /&gt;
 [id_1|-&amp;gt;e_1,...,id_n|-&amp;gt;e_n]  construct a record with given field names and values&lt;br /&gt;
 [id_1:S_1,...,id_n:S_n]      set of records with given fields and field types&lt;br /&gt;
 [r EXCEPT !.id = e]          the record equal to r except r.id = e&lt;br /&gt;
&lt;br /&gt;
Strings and Numbers&lt;br /&gt;
-------------------&lt;br /&gt;
 &amp;quot;abc&amp;quot;                        a string&lt;br /&gt;
 STRING                       set of a strings&lt;br /&gt;
 123                          a number&lt;br /&gt;
 &lt;br /&gt;
Miscellaneous constructs&lt;br /&gt;
------------------------&lt;br /&gt;
IF P THEN e_1 ELSE e_2&lt;br /&gt;
CASE P_1 -&amp;gt; e_1 [] ... [] P_n -&amp;gt;e_n&lt;br /&gt;
CASE P_1 -&amp;gt; e_1 [] ... [] P_n -&amp;gt;e_n [] OTHER -&amp;gt; e&lt;br /&gt;
LET d_1 == e_1 ... d_n == e_n IN e&lt;br /&gt;
&lt;br /&gt;
Action Operators&lt;br /&gt;
----------------&lt;br /&gt;
v&#039;                            prime operator (only variables are able to be primed)&lt;br /&gt;
UNCHANGED v                   v&#039;=v&lt;br /&gt;
UNCHANGED &amp;lt;&amp;lt;v_1, v_2&amp;gt;&amp;gt;        v_1&#039;=v_1 /\ v_2=v_2&lt;br /&gt;
&lt;br /&gt;
Supported standard modules&lt;br /&gt;
--------------------------&lt;br /&gt;
Naturals&lt;br /&gt;
--------&lt;br /&gt;
x + y                         addition&lt;br /&gt;
x - y                         difference&lt;br /&gt;
x * y                         multiplication&lt;br /&gt;
x \div y                      division&lt;br /&gt;
x % y                         remainder of division&lt;br /&gt;
x ^ y                         exponentiation&lt;br /&gt;
x &amp;gt; y                         greater than&lt;br /&gt;
x &amp;lt; y                         less than&lt;br /&gt;
x \geq y                      greater than or equal&lt;br /&gt;
x \leq y                      less than or equal&lt;br /&gt;
x .. y                        set of numbers from x to y&lt;br /&gt;
Nat                           set of natural numbers&lt;br /&gt;
&lt;br /&gt;
Integers&lt;br /&gt;
--------&lt;br /&gt;
-x                            unary minus&lt;br /&gt;
Int                           set of integers&lt;br /&gt;
&lt;br /&gt;
Sequences&lt;br /&gt;
---------&lt;br /&gt;
SubSeq(s,m,n)                 subsequence of s from component m to n&lt;br /&gt;
Append(s, e)                  appending e to sequence s&lt;br /&gt;
Len(s)                        length of sequence s&lt;br /&gt;
Seq(s)                        set of sequences&lt;br /&gt;
s_1 \o s_2 or s_1 \circ s_2   concatenation of s_1 and s_2&lt;br /&gt;
Head(s)&lt;br /&gt;
Tail(s)&lt;br /&gt;
&lt;br /&gt;
FiniteSets&lt;br /&gt;
----------&lt;br /&gt;
Cardinality(S)&lt;br /&gt;
IsFiniteSet(S)                (ProB can only handle certain infinite sets as argument) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
typical structure of a TLA+ module&lt;br /&gt;
--------------------------&lt;br /&gt;
&lt;br /&gt;
---- MODULE m ----&lt;br /&gt;
EXTENDS m_1, m_2&lt;br /&gt;
CONSTANTS c_1, c_2&lt;br /&gt;
ASSUME c_1 = ...&lt;br /&gt;
VARIABLES v_1, v_2&lt;br /&gt;
foo == ...&lt;br /&gt;
Init == ...&lt;br /&gt;
Next == ...&lt;br /&gt;
Spec == ...&lt;br /&gt;
=====================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Temporal formulas and unused definitions are ignored by TLA2B (they are also ignored by the type inference algorithm).&lt;br /&gt;
&lt;br /&gt;
= Limitations of the translation =&lt;br /&gt;
* due to the strict type system of the B method there are several restrictions to TLA+ modules.&lt;br /&gt;
** the elements of a set must have the same type (domain and range of a function are sets)&lt;br /&gt;
** TLA+ tuples are translated as sequences in B, hence all components of the tuple must have the same type&lt;br /&gt;
* TLA2B do not support 2nd-order operators, i.e. operators that take a operator with arguments as argument (e.g.: foo(bar(_),p))&lt;br /&gt;
&lt;br /&gt;
= TLA+ Actions =&lt;br /&gt;
-----------&lt;br /&gt;
TLA2B divides the next state relation into different actions if a disjunction occurs.&lt;br /&gt;
IF a existential quantification occurs TLA2B searches for further actions in the predicate&lt;br /&gt;
of the quantification and adds the bounded variables as arguments to these actions.&lt;br /&gt;
IF a definition call occurs and the definition has no arguments TLA2B goes into the definition&lt;br /&gt;
searching for further actions.&lt;br /&gt;
The displayed actions by ProB are not necessarily identical with the actions determined by TLC.&lt;br /&gt;
&lt;br /&gt;
= Understanding the type checker =&lt;br /&gt;
&lt;br /&gt;
Corresponding B types to TLA+ data values (let type(e) be the type of the expression e):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TLA+ data                               B Type&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
number e.g. 123                         INTEGER&lt;br /&gt;
string e.g. &amp;quot;abc&amp;quot;                       STRING&lt;br /&gt;
bool value e.g. TRUE                    BOOL&lt;br /&gt;
set e.g. {e,f}                          POW(type(e)), type(e) = type(f)&lt;br /&gt;
function e.g. [x \in S |-&amp;gt; e]           POW(type(x)*type(e)), type(S) = POW(type(x))&lt;br /&gt;
sequence e.g. &amp;lt;&amp;lt;a,b&amp;gt;&amp;gt;                   POW(INTEGER*type(a)), type(a) = type(b)&lt;br /&gt;
record e.g. [id_1|-&amp;gt;e_1,...,id_n|-&amp;gt;e_n] struct(id_1:type(e_1),...,id_n:type(e_n))&lt;br /&gt;
model value                             ENUM &lt;br /&gt;
 (only definable in config file)&lt;br /&gt;
&lt;br /&gt;
Nat                                     POW(INTEGER)&lt;br /&gt;
Int                                     POW(INTEGER)&lt;br /&gt;
STRING                                  POW(STRING)&lt;br /&gt;
BOOLEAN                                 POW(BOOL)&lt;br /&gt;
SUBSET S                                POW(type(S)) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can only compare data values with the same type.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLA&amp;diff=2489</id>
		<title>TLA</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLA&amp;diff=2489"/>
		<updated>2014-11-21T19:53:24Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.3.5, ProB supports [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Using ProB for Animation and Model Checking of TLA+ specifications =&lt;br /&gt;
&lt;br /&gt;
The [http://nightly.cobra.cs.uni-duesseldorf.de/tcl/ latest version of ProB] uses the translator TLA2B, which translates the non temporal part of a [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] module to a B machine.&lt;br /&gt;
To use ProB for TLA+ you have to download the TLA tools. They are  released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
In the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
When you then open a TLA+ module ProB then generates the translated B machine in the same folder and loads it in the background.&lt;br /&gt;
If there is a valid translation you can animate and model check the TLA+ specification.&lt;br /&gt;
There are many working examples in the &#039;ProB/Examples/TLA+/&#039;-directory.&lt;br /&gt;
&lt;br /&gt;
There is also an [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschelTLA2012 iFM&#039;2012 paper] that describes our approach and performs some comparison with TLC.&lt;br /&gt;
Our [[ProB_Logic_Calculator|online ProB Logic Calculator]] now also supports TLA syntax and you can experiment with its predicate and expression evaluation capabilities.&lt;br /&gt;
&lt;br /&gt;
= TLA2B =&lt;br /&gt;
&lt;br /&gt;
The parser and semantic analyzer [http://research.microsoft.com/en-us/um/people/lamport/tla/sany.html SANY] serves as the front end of TLA2B. SANY was written by Jean-Charles Grégoire&lt;br /&gt;
and David Jefferson and is also the front end of the model checker [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC].&lt;br /&gt;
After parsing there is type checking phase, in which types of variables and constants are inferred.&lt;br /&gt;
So there is no need to especially declare types in a invariant clause (in the manner of the B method).&lt;br /&gt;
Moreover it checks if a TLA+ module is translatable (see Limitations of Translation).&lt;br /&gt;
&lt;br /&gt;
To tell TLA2B the name of a specification of a TLA+ module you can use a configuration file, just like for TLC.&lt;br /&gt;
The configuration file must have the same name as the name of the module and the filename extension &#039;cfg&#039;.&lt;br /&gt;
The configuration file parser is the same as for TLC so you can look up the syntax in the [http://research.microsoft.com/en-us/um/people/lamport/tla/book.html &#039;Specifying Systems&#039;-book] (Leslie Lamport).&lt;br /&gt;
If there is no configuration file available TLA2B looks for a TLA+ definition named &#039;Spec&#039; &lt;br /&gt;
or alternatively for a &#039;Init&#039; and a &#039;Next&#039; definition describing the initial state and the next state relation.&lt;br /&gt;
Besides that in the configuration file you can give a constant a value but this is not mandatory, in contrast to TLC.&lt;br /&gt;
Otherwise ProB lets you choose during the animation process a value for the constant which satisfy the assumptions under the ASSUME clause. &lt;br /&gt;
TLA2B supports furthermore overriding of a constant or definition by another definition in the configuration file.&lt;br /&gt;
&lt;br /&gt;
= Supported TLA+ syntax =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Logic&lt;br /&gt;
-----&lt;br /&gt;
 P /\ Q                       conjunction&lt;br /&gt;
 P \/ Q                       disjunction&lt;br /&gt;
 ~ or \lnot or \neg           negation&lt;br /&gt;
 =&amp;gt;                           implication&lt;br /&gt;
 &amp;lt;=&amp;gt; or \equiv                equivalence&lt;br /&gt;
 TRUE&lt;br /&gt;
 FALSE&lt;br /&gt;
 BOOLEAN                      set containing TRUE and FALSE&lt;br /&gt;
 \A x \in S : P               universal quantification&lt;br /&gt;
 \E x \in S : P               existential quantification&lt;br /&gt;
 &lt;br /&gt;
Equality:&lt;br /&gt;
------&lt;br /&gt;
 e = f                        equality&lt;br /&gt;
 e # f or e /= f              inequality &lt;br /&gt;
&lt;br /&gt;
Sets&lt;br /&gt;
------&lt;br /&gt;
 {d, e}                       set consisting of elements d, e&lt;br /&gt;
 {x \in S : P}                set of elements x in S satisfying p&lt;br /&gt;
 {e : x \in S}                set of elements e such that x in S&lt;br /&gt;
 e \in S                      element of&lt;br /&gt;
 e \notin S                   not element of&lt;br /&gt;
 S \cup T or S \union T       set union&lt;br /&gt;
 S \cap T or S \intersect     set intersection&lt;br /&gt;
 S \subseteq T                equality or subset of&lt;br /&gt;
 S \ t                        set difference&lt;br /&gt;
 SUBSET S                     set of subsets of S&lt;br /&gt;
 UNION S                      union of all elements of S&lt;br /&gt;
&lt;br /&gt;
Functions&lt;br /&gt;
------&lt;br /&gt;
 f[e]                         function application&lt;br /&gt;
 DOMAIN f                     domain of function f&lt;br /&gt;
 [x \in S |-&amp;gt; e]              function f such that f[x] = e for x in S&lt;br /&gt;
 [S -&amp;gt; T]                     Set of functions f with f[x] in T for x in S&lt;br /&gt;
 [f EXCEPT ![e] = d]          the function equal to f except f[e] = d&lt;br /&gt;
&lt;br /&gt;
Records&lt;br /&gt;
-------&lt;br /&gt;
 r.id                         the id-field of record r&lt;br /&gt;
 [id_1|-&amp;gt;e_1,...,id_n|-&amp;gt;e_n]  construct a record with given field names and values&lt;br /&gt;
 [id_1:S_1,...,id_n:S_n]      set of records with given fields and field types&lt;br /&gt;
 [r EXCEPT !.id = e]          the record equal to r except r.id = e&lt;br /&gt;
&lt;br /&gt;
Strings and Numbers&lt;br /&gt;
-------------------&lt;br /&gt;
 &amp;quot;abc&amp;quot;                        a string&lt;br /&gt;
 STRING                       set of a strings&lt;br /&gt;
 123                          a number&lt;br /&gt;
 &lt;br /&gt;
Miscellaneous constructs&lt;br /&gt;
------------------------&lt;br /&gt;
IF P THEN e_1 ELSE e_2&lt;br /&gt;
CASE P_1 -&amp;gt; e_1 [] ... [] P_n -&amp;gt;e_n&lt;br /&gt;
CASE P_1 -&amp;gt; e_1 [] ... [] P_n -&amp;gt;e_n [] OTHER -&amp;gt; e&lt;br /&gt;
LET d_1 == e_1 ... d_n == e_n IN e&lt;br /&gt;
&lt;br /&gt;
Action Operators&lt;br /&gt;
----------------&lt;br /&gt;
v&#039;                            prime operator (only variables are able to be primed)&lt;br /&gt;
UNCHANGED v                   v&#039;=v&lt;br /&gt;
UNCHANGED &amp;lt;&amp;lt;v_1, v_2&amp;gt;&amp;gt;        v_1&#039;=v_1 /\ v_2=v_2&lt;br /&gt;
&lt;br /&gt;
Supported standard modules&lt;br /&gt;
--------------------------&lt;br /&gt;
Naturals&lt;br /&gt;
--------&lt;br /&gt;
x + y                         addition&lt;br /&gt;
x - y                         difference&lt;br /&gt;
x * y                         multiplication&lt;br /&gt;
x \div y                      division&lt;br /&gt;
x % y                         remainder of division&lt;br /&gt;
x ^ y                         exponentiation&lt;br /&gt;
x &amp;gt; y                         greater than&lt;br /&gt;
x &amp;lt; y                         less than&lt;br /&gt;
x \geq y                      greater than or equal&lt;br /&gt;
x \leq y                      less than or equal&lt;br /&gt;
x .. y                        set of numbers from x to y&lt;br /&gt;
Nat                           set of natural numbers&lt;br /&gt;
&lt;br /&gt;
Integers&lt;br /&gt;
--------&lt;br /&gt;
-x                            unary minus&lt;br /&gt;
Int                           set of integers&lt;br /&gt;
&lt;br /&gt;
Sequences&lt;br /&gt;
---------&lt;br /&gt;
SubSeq(s,m,n)                 subsequence of s from component m to n&lt;br /&gt;
Append(s, e)                  appending e to sequence s&lt;br /&gt;
Len(s)                        length of sequence s&lt;br /&gt;
Seq(s)                        set of sequences&lt;br /&gt;
s_1 \o s_2 or s_1 \circ s_2   concatenation of s_1 and s_2&lt;br /&gt;
Head(s)&lt;br /&gt;
Tail(s)&lt;br /&gt;
&lt;br /&gt;
FiniteSets&lt;br /&gt;
----------&lt;br /&gt;
Cardinality(S)&lt;br /&gt;
IsFiniteSet(S)                (ProB can only handle certain infinite sets as argument) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
typical structure of a TLA+ module&lt;br /&gt;
--------------------------&lt;br /&gt;
&lt;br /&gt;
---- MODULE m ----&lt;br /&gt;
EXTENDS m_1, m_2&lt;br /&gt;
CONSTANTS c_1, c_2&lt;br /&gt;
ASSUME c_1 = ...&lt;br /&gt;
VARIABLES v_1, v_2&lt;br /&gt;
foo == ...&lt;br /&gt;
Init == ...&lt;br /&gt;
Next == ...&lt;br /&gt;
Spec == ...&lt;br /&gt;
=====================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Temporal formulas and unused definitions are ignored by TLA2B (they are also ignored by the type inference algorithm).&lt;br /&gt;
&lt;br /&gt;
= Limitations of the translation =&lt;br /&gt;
* due to the strict type system of the B method there are several restrictions to TLA+ modules.&lt;br /&gt;
** the elements of a set must have the same type (domain and range of a function are sets)&lt;br /&gt;
** TLA+ tuples are translated as sequences in B, hence all components of the tuple must have the same type&lt;br /&gt;
* TLA2B do not support 2nd-order operators, i.e. operators that take a operator with arguments as argument (e.g.: foo(bar(_),p))&lt;br /&gt;
&lt;br /&gt;
= TLA+ Actions =&lt;br /&gt;
-----------&lt;br /&gt;
TLA2B divides the next state relation into different actions if a disjunction occurs.&lt;br /&gt;
IF a existential quantification occurs TLA2B searches for further actions in the predicate&lt;br /&gt;
of the quantification and adds the bounded variables as arguments to these actions.&lt;br /&gt;
IF a definition call occurs and the definition has no arguments TLA2B goes into the definition&lt;br /&gt;
searching for further actions.&lt;br /&gt;
The displayed actions by ProB are not necessarily identical with the actions determined by TLC.&lt;br /&gt;
&lt;br /&gt;
= Understanding the type checker =&lt;br /&gt;
&lt;br /&gt;
Corresponding B types to TLA+ data values (let type(e) be the type of the expression e):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TLA+ data                               B Type&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
number e.g. 123                         INTEGER&lt;br /&gt;
string e.g. &amp;quot;abc&amp;quot;                       STRING&lt;br /&gt;
bool value e.g. TRUE                    BOOL&lt;br /&gt;
set e.g. {e,f}                          POW(type(e)), type(e) = type(f)&lt;br /&gt;
function e.g. [x \in S |-&amp;gt; e]           POW(type(x)*type(e)), type(S) = POW(type(x))&lt;br /&gt;
sequence e.g. &amp;lt;&amp;lt;a,b&amp;gt;&amp;gt;                   POW(INTEGER*type(a)), type(a) = type(b)&lt;br /&gt;
record e.g. [id_1|-&amp;gt;e_1,...,id_n|-&amp;gt;e_n] struct(id_1:type(e_1),...,id_n:type(e_n))&lt;br /&gt;
model value                             ENUM &lt;br /&gt;
 (only definable in config file)&lt;br /&gt;
&lt;br /&gt;
Nat                                     POW(INTEGER)&lt;br /&gt;
Int                                     POW(INTEGER)&lt;br /&gt;
STRING                                  POW(STRING)&lt;br /&gt;
BOOLEAN                                 POW(BOOL)&lt;br /&gt;
SUBSET S                                POW(type(S)) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can only compare data values with the same type.&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2467</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2467"/>
		<updated>2014-11-10T10:11:57Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : NATURAL&lt;br /&gt;
 INITIALISATION x := k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2466</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2466"/>
		<updated>2014-11-10T10:10:47Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2465</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2465"/>
		<updated>2014-11-10T10:09:08Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2464</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2464"/>
		<updated>2014-11-10T10:06:55Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=k&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|800px|left|State space generated by ProB]]&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:NumberOfStates.jpeg&amp;diff=2463</id>
		<title>File:NumberOfStates.jpeg</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:NumberOfStates.jpeg&amp;diff=2463"/>
		<updated>2014-11-10T10:06:31Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: uploaded a new version of &amp;quot;File:NumberOfStates.jpeg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2461</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2461"/>
		<updated>2014-11-10T10:02:39Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=1&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|1000px|thumb|left|State space generated by ProB]]&lt;br /&gt;
TLC will only report 10 distinct states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2459</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2459"/>
		<updated>2014-11-10T10:01:34Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=1&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg|200px|thumb|left|State space generated by ProB]]&lt;br /&gt;
TLC will report 10 states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2458</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2458"/>
		<updated>2014-11-10T10:00:20Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=1&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states):&lt;br /&gt;
[[File:NumberOfStates.jpeg]]&lt;br /&gt;
TLC will report 10 states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:NumberOfStates.jpeg&amp;diff=2457</id>
		<title>File:NumberOfStates.jpeg</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:NumberOfStates.jpeg&amp;diff=2457"/>
		<updated>2014-11-10T10:00:01Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:NumberOfStates.pdf&amp;diff=2454</id>
		<title>File:NumberOfStates.pdf</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:NumberOfStates.pdf&amp;diff=2454"/>
		<updated>2014-11-10T09:54:39Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2453</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2453"/>
		<updated>2014-11-10T09:51:51Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Visited States */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=1&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
ProB will report 21 distinct states (1 root state, 10 constant setup states, 10 initialization states).&lt;br /&gt;
TLC will report 10 states (10 initialization states).&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2452</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2452"/>
		<updated>2014-11-10T09:47:19Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.4.0, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications. TLC is an efficient model checker for TLA+ specifications, which can check LTL properties with fairness. It is particularly good for lower level specifications, where it can be substantially faster than ProB&#039;s own model checker.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;br /&gt;
&lt;br /&gt;
= Visited States =&lt;br /&gt;
Sometimes TLC will show a different number of visited states compared to the ProB model checker.  The following example should illustrate this issue:&lt;br /&gt;
&lt;br /&gt;
 MACHINE NumberOfStates&lt;br /&gt;
 CONSTANTS k&lt;br /&gt;
 PROPERTIES&lt;br /&gt;
  k : 1..10&lt;br /&gt;
 VARIABLES x&lt;br /&gt;
 INVARIANT&lt;br /&gt;
  x : 1..10&lt;br /&gt;
 INITIALISATION x:=1&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= More Information =&lt;br /&gt;
More information can be found in our [http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_ABZ14 ABZ&#039;14 article].&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Team&amp;diff=2407</id>
		<title>Team</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Team&amp;diff=2407"/>
		<updated>2014-10-31T13:42:27Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ProB is based in research and implemention effort by:&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel],&lt;br /&gt;
* Michael Butler,&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Jens_Bendisposto Jens Bendisposto],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Daniel_Plagge Daniel Plagge],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Lukas_Ladenberger Lukas Ladenberger],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Ivaylo_Miroslavov_Dobrikov Ivaylo Dobrikov],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Marc_Fontaine Marc Fontaine],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Fabian_Fritz Fabian Fritz],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Corinna_Spermann Corina Spermann],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Michael_Jastram Michael Jastram],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Dominik_Hansen Dominik Hansen],&lt;br /&gt;
* [http://www.stups.uni-duesseldorf.de/w/Sebastian_Krings Sebastian Krings],&lt;br /&gt;
* Philipp Körner,&lt;br /&gt;
* Joy Clark,&lt;br /&gt;
* Edward Turner,&lt;br /&gt;
* Dennis Winter,&lt;br /&gt;
* Sonja Holl,&lt;br /&gt;
* Jens Krüger,&lt;br /&gt;
* Michael Birkhoff,&lt;br /&gt;
* Carla Ferreira,&lt;br /&gt;
* Stéphane Lo Presti,&lt;br /&gt;
* Leonid Mikhailov,&lt;br /&gt;
* Laksono Adhianto, ...&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ABZ14&amp;diff=2339</id>
		<title>ABZ14</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ABZ14&amp;diff=2339"/>
		<updated>2014-10-28T12:22:06Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:ABZ 2014 Case Study}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This page provides additional resources for the paper we have submitted for the [http://www.irit.fr/ABZ2014/casestudy.html ABZ 2014 case study track]. &lt;br /&gt;
The full description of the case study can be found [[Media:landing_system.pdf|here]].&lt;br /&gt;
&lt;br /&gt;
=== ProB Live Visualization (click to join) ===&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;a href=&amp;quot;http://cobra.cs.uni-duesseldorf.de:8083/bms/0d7c3566-40f0-4cc0-bfff-c1425dab219e/landinggear.html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;http://www.stups.uni-duesseldorf.de/ProB/images/7/7b/Landing_gear.png&amp;quot; width=&amp;quot;600&amp;quot; /&amp;gt;&amp;lt;a&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ProB BMotion Studio Video ===&lt;br /&gt;
{{#ev:youtube|wFr_pEjbpqo|640}}&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
* [http://www.stups.hhu.de/w/Special:Publication/abz14casestudy Case Study Paper]&lt;br /&gt;
* [[Media:LandingGear.zip|Landing Gear Model EventB Model]]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
* [https://github.com/bendisposto/prob2 ProB 2.0 Sourcecode]&lt;br /&gt;
* [http://nightly.cobra.cs.uni-duesseldorf.de/experimental/updatesite/ ProB 2.0 Nightly Build Updatesite]&lt;br /&gt;
* [[Tutorial13|ProB 2.0 Tutorial]]&lt;br /&gt;
* [[ProB_2.0_within_Rodin_and_a_HTML_Visualization_Example|BMotionStudio Simple Example]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=File:Landing_system.pdf&amp;diff=2338</id>
		<title>File:Landing system.pdf</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=File:Landing_system.pdf&amp;diff=2338"/>
		<updated>2014-10-28T12:19:11Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: Landing Gear Requirements Document&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Landing Gear Requirements Document&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ABZ14&amp;diff=2337</id>
		<title>ABZ14</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ABZ14&amp;diff=2337"/>
		<updated>2014-10-28T12:03:20Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Ressources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:ABZ 2014 Case Study}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This page provides additional resources for the paper we have submitted for the [http://www.irit.fr/ABZ2014/casestudy.html ABZ 2014 case study track]. &lt;br /&gt;
The full description of the case study can be found [http://www.irit.fr/ABZ2014/landing_system.pdf here].&lt;br /&gt;
&lt;br /&gt;
=== ProB Live Visualization (click to join) ===&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;a href=&amp;quot;http://cobra.cs.uni-duesseldorf.de:8083/bms/0d7c3566-40f0-4cc0-bfff-c1425dab219e/landinggear.html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;http://www.stups.uni-duesseldorf.de/ProB/images/7/7b/Landing_gear.png&amp;quot; width=&amp;quot;600&amp;quot; /&amp;gt;&amp;lt;a&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ProB BMotion Studio Video ===&lt;br /&gt;
{{#ev:youtube|wFr_pEjbpqo|640}}&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
* [http://www.stups.hhu.de/w/Special:Publication/abz14casestudy Case Study Paper]&lt;br /&gt;
* [[Media:LandingGear.zip|Landing Gear Model EventB Model]]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
* [https://github.com/bendisposto/prob2 ProB 2.0 Sourcecode]&lt;br /&gt;
* [http://nightly.cobra.cs.uni-duesseldorf.de/experimental/updatesite/ ProB 2.0 Nightly Build Updatesite]&lt;br /&gt;
* [[Tutorial13|ProB 2.0 Tutorial]]&lt;br /&gt;
* [[ProB_2.0_within_Rodin_and_a_HTML_Visualization_Example|BMotionStudio Simple Example]]&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2329</id>
		<title>TLC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=TLC&amp;diff=2329"/>
		<updated>2014-10-17T08:40:33Z</updated>

		<summary type="html">&lt;p&gt;Dominik Hansen: /* Limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of version 1.3.7-beta, ProB can make use of [http://research.microsoft.com/en-us/um/people/lamport/tla/tlc.html TLC] as an alternative model checker to validate B specifications.&lt;br /&gt;
&lt;br /&gt;
= Download and Installation =&lt;br /&gt;
&lt;br /&gt;
TLC has been released as an open source project, under the [http://research.microsoft.com/en-us/um/people/lamport/tla/license.html MIT License].&lt;br /&gt;
To use TLC in the ProB Tcl/Tk GUI you have to select the menu command &amp;quot;Download and Install TLA Tools&amp;quot; in the Help menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Download_TLA_Tools.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
= How to use TLC =&lt;br /&gt;
&lt;br /&gt;
First you have to open a B specification in the ProB GUI.&lt;br /&gt;
Then you can select the menu command &amp;quot;Model Check with TLC&amp;quot; in the &amp;quot;Verify-&amp;gt;External Tools&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC.png|400px|center]] &lt;br /&gt;
&lt;br /&gt;
You can use TLC to find the following kinds of errors in the B specification:&lt;br /&gt;
* Deadlocks&lt;br /&gt;
* Invariant violations&lt;br /&gt;
* Assertion errors&lt;br /&gt;
* Goal found (a desired state is reached)&lt;br /&gt;
* Properties violations (i.e, axioms over the B constants are false)&lt;br /&gt;
* Well-definedness violations&lt;br /&gt;
* Temporal formulas violations&lt;br /&gt;
&lt;br /&gt;
In some cases, TLC reports a trace leading to the state where the error (e.g. deadlock or invariant violation) occur. Such traces are automatically replayed in the ProB animator (displayed in the history pane) to give an optimal feedback.&lt;br /&gt;
&lt;br /&gt;
[[File:Model_Checking_With_TLC_Trace.png|400px|center]]&lt;br /&gt;
 &lt;br /&gt;
= When to use TLC =&lt;br /&gt;
TLC is extremely valuable when it comes to explicit state model checking for large state spaces.&lt;br /&gt;
Otherwise, TLC has no constraint solving abilities.&lt;br /&gt;
&lt;br /&gt;
= Translation from B to TLA+ =&lt;br /&gt;
&lt;br /&gt;
TLC is a very efficient model checker for specifications written in [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+].&lt;br /&gt;
To validate B specification with TLC we developed the translator TLC4B which automatically translates a B specification to TLA+, invokes the model checker TLC, and translates the results back to B. &lt;br /&gt;
Counter examples produced by TLC are double checked by ProB and replayed in the ProB animator.&lt;br /&gt;
The translation to TLA+ and back to B is completely hidden to the user. Hence, the user needs no knowledge of TLA+ to use TLC.&lt;br /&gt;
&lt;br /&gt;
There is a [http://stups.hhu.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport technical report] that describes our translation from B to TLA+.&lt;br /&gt;
&lt;br /&gt;
= Limitations =&lt;br /&gt;
The following constructs are currently not supported by the TLC4B translator:&lt;br /&gt;
* Refinement specifications&lt;br /&gt;
* Machine inclusion (SEES, INCLUDES, ..)&lt;br /&gt;
* Sequential composition statement (G;H)&lt;/div&gt;</summary>
		<author><name>Dominik Hansen</name></author>
	</entry>
</feed>